Skip to content
Proud to collaborate with Microsoft for Startups

ifood.patch-option ​

Change the photo, name or description of one complemento

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-ifood
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Authenticated organization UUID injected by the workflow boundary
connection_uuiduuidYes—Organization-scoped iFood CloudConnection UUID
workflow_run_idstringNo—Engine-stamped parent DAG run id
merchant_refstringYes—Provider merchant reference.
item_refstringYes—Item the complemento is on. The id from ifood.list-items; the item's name is resolved if that is all you have.
option_refstringNo—Complemento id, as returned by ifood.get-item or ifood.create-option.
option_namestringNo—Complemento name, when the id is not at hand. Supply this or option_ref.
namestringNo—New name for the complemento.
descriptionstringNo—New description for the complemento.
imagestringNo—Product photo as a base64 data URI, e.g. 'data:image/png;base64,<bytes>'. jpg, jpeg or png, up to 5 MB. It is uploaded to iFood in the same run and the resulting path is attached to the product — send this when the merchant hands over a photo. To reuse a photo already on the menu, send image_path instead.
image_pathstringNo—An iFood image path minted by a previous upload (ifood.upload-image or an earlier item). Reuses that photo without sending the bytes again. Ignored when 'image' is supplied.

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Authenticated organization UUID injected by the workflow boundary
connection_uuiduuidYes—Organization-scoped iFood CloudConnection UUID
workflow_run_idstringNo—Engine-stamped parent DAG run id
merchant_refstringYes—Provider merchant reference.
item_refstringYes—Item the complemento is on. The id from ifood.list-items; the item's name is resolved if that is all you have.
option_refstringNo—Complemento id, as returned by ifood.get-item or ifood.create-option.
option_namestringNo—Complemento name, when the id is not at hand. Supply this or option_ref.
namestringNo—New name for the complemento.
descriptionstringNo—New description for the complemento.
imagestringNo—Product photo as a base64 data URI, e.g. 'data:image/png;base64,<bytes>'. jpg, jpeg or png, up to 5 MB. It is uploaded to iFood in the same run and the resulting path is attached to the product — send this when the merchant hands over a photo. To reuse a photo already on the menu, send image_path instead.
image_pathstringNo—An iFood image path minted by a previous upload (ifood.upload-image or an earlier item). Reuses that photo without sending the bytes again. Ignored when 'image' is supplied.
optionjsonNo——
acceptedbooleanYes——
applied_atstringYes——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_stepjsonNo——
failed_layerintegerNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——
failed_atstringNo——
provider_request_refstringNo——
retryablebooleanNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—execute—
executingNoNo—complete—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
initiatedexecuteexecuting—
executingcompletecompleted—
* (any state)failfailed—

Outcomes ​

OutcomeTypeDescriptionState Data Keys
appliedSUCCESSChange the photo, name or description of one complementoaccepted
failedFAILUREMutation failedfailure_reason, failure_type

Business Errors ​

CodeMessage Template
IFOOD_ORGANIZATION_CONTEXT_INVALIDAuthenticated organization context is missing or does not match the workflow input
IFOOD_CONNECTION_NOT_FOUNDiFood connection {connection_uuid} was not found in the authenticated organization
IFOOD_CONNECTION_WRONG_PROVIDERConnection {connection_uuid} is not an iFood connection
IFOOD_CONNECTION_SERVICE_UNAVAILABLEThe shared cloud connection service is unavailable
IFOOD_PROVIDER_CAPABILITY_MISSINGThe installed iFood provider does not expose the required API operation
IFOOD_AUTHENTICATION_FAILEDiFood rejected the connection credentials or bearer token
IFOOD_PROVIDER_REQUEST_FAILEDThe iFood API request failed
IFOOD_RESPONSE_SHAPE_INVALIDThe iFood Merchant API returned an invalid merchant record
IFOOD_PAGINATION_INVALIDMerchant page must be at least 1 and limit must be between 1 and 100
IFOOD_SALES_WINDOW_INVALIDSales dates must use YYYY-MM-DD, be ordered, and span no more than 8 inclusive days
IFOOD_SALES_PAGINATION_INVALIDSales page must be a zero-based integer
IFOOD_SALES_RESPONSE_SHAPE_INVALIDThe iFood Financial Sales API returned an invalid response
IFOOD_FINANCIAL_EVENTS_WINDOW_INVALIDFinancial Events dates must use YYYY-MM-DD, be ordered, and span no more than 33 inclusive days
IFOOD_SETTLEMENTS_WINDOW_INVALIDSettlements dates must use YYYY-MM-DD, be ordered, and span no more than 90 inclusive days
IFOOD_FINANCIAL_PAGINATION_INVALIDFinancial page must be one-based and page_size must be between 100 and 300
IFOOD_FINANCIAL_EVENTS_RESPONSE_SHAPE_INVALIDThe iFood Financial Events API returned an invalid response
IFOOD_SETTLEMENTS_RESPONSE_SHAPE_INVALIDThe iFood Settlements API returned an invalid response
IFOOD_DATA_ENVIRONMENT_INVALIDdata_environment must be exactly 'production' or 'homologation'
IFOOD_DATA_ENVIRONMENT_UNSUPPORTEDThe installed iFood provider does not support data_environment; upgrade ltinteg-cloud-connections to request homologation records

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "ifood.patch-option",
  "initial_data": {
    "organization_uuid": "value",
    "connection_uuid": "value",
    "merchant_ref": "value",
    "item_ref": "value"
  }
}