ifood.create-item ​
Add one product to a menu category, with its price
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-ifood |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Authenticated organization UUID injected by the workflow boundary |
connection_uuid | uuid | Yes | — | Organization-scoped iFood CloudConnection UUID |
workflow_run_id | string | No | — | Engine-stamped parent DAG run id |
merchant_ref | string | Yes | — | Provider merchant reference. |
name | string | Yes | — | Product name as the customer sees it, e.g. 'X-Bacon'. |
price_value | float | Yes | — | Selling price in BRL, e.g. 45.00. |
category_ref | string | No | — | Category to place the item in (from ifood.list-categories). |
description | string | No | — | Product description shown under the name. |
price_original | float | No | — | Price before discount — set only for a promotion. |
status | string | No | AVAILABLE | Whether the item is on sale as soon as it is created. |
item_type | string | No | DEFAULT | DEFAULT for a normal item; PIZZA and COMBO_V2 are special layouts. |
serving | string | No | NOT_APPLICABLE | How many people the product serves. |
index | integer | No | — | Position of the item inside its category. |
external_code | string | No | — | The merchant's own code for this product. iFood requires one; a stable code is generated when the merchant has none. |
ifood_product_ref | string | No | — | Reuse an existing iFood product instead of creating one. Omit for a new product — the id is generated and the product is created in the same call. |
industrialized | boolean | No | False | True for a packaged industrial product, false for food the store prepares. |
image | string | No | — | 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_path | string | No | — | 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. |
ean | string | No | — | Barcode, for industrialized products. |
dietary_restrictions | list | No | — | Dietary tags, e.g. ['VEGETARIAN'] or ['ORGANIC']. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Authenticated organization UUID injected by the workflow boundary |
connection_uuid | uuid | Yes | — | Organization-scoped iFood CloudConnection UUID |
workflow_run_id | string | No | — | Engine-stamped parent DAG run id |
merchant_ref | string | Yes | — | Provider merchant reference. |
name | string | Yes | — | Product name as the customer sees it, e.g. 'X-Bacon'. |
price_value | float | Yes | — | Selling price in BRL, e.g. 45.00. |
category_ref | string | No | — | Category to place the item in (from ifood.list-categories). |
description | string | No | — | Product description shown under the name. |
price_original | float | No | — | Price before discount — set only for a promotion. |
status | string | No | AVAILABLE | Whether the item is on sale as soon as it is created. |
item_type | string | No | DEFAULT | DEFAULT for a normal item; PIZZA and COMBO_V2 are special layouts. |
serving | string | No | NOT_APPLICABLE | How many people the product serves. |
index | integer | No | — | Position of the item inside its category. |
external_code | string | No | — | The merchant's own code for this product. iFood requires one; a stable code is generated when the merchant has none. |
ifood_product_ref | string | No | — | Reuse an existing iFood product instead of creating one. Omit for a new product — the id is generated and the product is created in the same call. |
industrialized | boolean | No | False | True for a packaged industrial product, false for food the store prepares. |
image | string | No | — | 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_path | string | No | — | 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. |
ean | string | No | — | Barcode, for industrialized products. |
dietary_restrictions | list | No | — | Dietary tags, e.g. ['VEGETARIAN'] or ['ORGANIC']. |
item | json | Yes | — | — |
item_body | json | No | — | — |
accepted | boolean | Yes | — | — |
applied_at | string | Yes | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | integer | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_at | string | No | — | — |
provider_request_ref | string | No | — | — |
retryable | boolean | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | execute | — |
executing | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | execute | executing | — |
executing | complete | completed | — |
* (any state) | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
applied | SUCCESS | Add one product to a menu category, with its price | accepted |
failed | FAILURE | Mutation failed | failure_reason, failure_type |
Business Errors ​
| Code | Message Template |
|---|---|
IFOOD_ORGANIZATION_CONTEXT_INVALID | Authenticated organization context is missing or does not match the workflow input |
IFOOD_CONNECTION_NOT_FOUND | iFood connection {connection_uuid} was not found in the authenticated organization |
IFOOD_CONNECTION_WRONG_PROVIDER | Connection {connection_uuid} is not an iFood connection |
IFOOD_CONNECTION_SERVICE_UNAVAILABLE | The shared cloud connection service is unavailable |
IFOOD_PROVIDER_CAPABILITY_MISSING | The installed iFood provider does not expose the required API operation |
IFOOD_AUTHENTICATION_FAILED | iFood rejected the connection credentials or bearer token |
IFOOD_PROVIDER_REQUEST_FAILED | The iFood API request failed |
IFOOD_RESPONSE_SHAPE_INVALID | The iFood Merchant API returned an invalid merchant record |
IFOOD_PAGINATION_INVALID | Merchant page must be at least 1 and limit must be between 1 and 100 |
IFOOD_SALES_WINDOW_INVALID | Sales dates must use YYYY-MM-DD, be ordered, and span no more than 8 inclusive days |
IFOOD_SALES_PAGINATION_INVALID | Sales page must be a zero-based integer |
IFOOD_SALES_RESPONSE_SHAPE_INVALID | The iFood Financial Sales API returned an invalid response |
IFOOD_FINANCIAL_EVENTS_WINDOW_INVALID | Financial Events dates must use YYYY-MM-DD, be ordered, and span no more than 33 inclusive days |
IFOOD_SETTLEMENTS_WINDOW_INVALID | Settlements dates must use YYYY-MM-DD, be ordered, and span no more than 90 inclusive days |
IFOOD_FINANCIAL_PAGINATION_INVALID | Financial page must be one-based and page_size must be between 100 and 300 |
IFOOD_FINANCIAL_EVENTS_RESPONSE_SHAPE_INVALID | The iFood Financial Events API returned an invalid response |
IFOOD_SETTLEMENTS_RESPONSE_SHAPE_INVALID | The iFood Settlements API returned an invalid response |
IFOOD_DATA_ENVIRONMENT_INVALID | data_environment must be exactly 'production' or 'homologation' |
IFOOD_DATA_ENVIRONMENT_UNSUPPORTED | The 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.create-item",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"merchant_ref": "value",
"name": "value"
}
}