orderId) with iFood's On Demand delivery service. Ideal for integrators who manage their own order systems and want to contract iFood's logistics services.GET /shipping/v1.0/merchants/{merchantId}/deliveryAvailabilities?latitude={lat}&longitude={lng}| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
merchantId | path | uuid | Yes | Merchant ID (your store) |
latitude | query | float | Yes | Latitude of delivery address (ex: -23.55) |
longitude | query | float | Yes | Longitude of delivery address (ex: -46.63) |
curl -X GET "https://merchant-api.ifood.com.br/shipping/v1.0/merchants/{merchantId}/deliveryAvailabilities?latitude=-23.5505&longitude=-46.6333" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"id as quoteId when registering the order.| Field | Type | Description |
|---|---|---|
id | uuid | Quote ID (use as quoteId when creating order) |
expirationAt | datetime | Quote validity in UTC (~24h). Requesting after is invalid. |
createdAt | datetime | Quote creation date in UTC |
distance | integer | Delivery distance in meters |
preparationTime | integer | Suggested preparation time in seconds |
quote.grossValue | decimal | Gross delivery value in reals |
quote.discount | decimal | Applied discount in reals |
quote.raise | decimal | Applied surcharge in reals |
quote.netValue | decimal | Net value = grossValue - discount + raise |
deliveryTime.min | integer | Estimated minimum delivery time in seconds |
deliveryTime.max | integer | Estimated maximum delivery time in seconds |
hasPaymentMethods | boolean | Indicates if payment methods are available |
paymentMethods[].id | uuid | Unique payment method ID |
paymentMethods[].brand | string | Card brand (ex: Visa, Mastercard) |
paymentMethods[].liability | string | Payment responsible party (ex: IFOOD) |
paymentMethods[].paymentType | string | Payment type (ex: OFFLINE for cash on delivery) |
paymentMethods[].method | string | Payment method: CREDIT, DEBIT or CASH |
{
"id": "57cd1046-2e06-446f-a2dd-18a518212c3c",
"expirationAt": "2023-08-18T19:49:06Z",
"createdAt": "2023-08-17T19:49:06Z",
"distance": 3000,
"preparationTime": 60,
"quote": {
"grossValue": 7.99,
"discount": 0,
"raise": 0,
"netValue": 7.99
},
"deliveryTime": {
"min": 1200,
"max": 1800
},
"hasPaymentMethods": true,
"paymentMethods": [
{
"id": "21c65a8c-f29e-463f-b0bd-240edeb593c4",
"brand": "Visa",
"liability": "IFOOD",
"paymentType": "OFFLINE",
"method": "CREDIT"
},
{
"id": "93c1c7c7-61f1-4dd9-bb84-62a03254701d",
"liability": "IFOOD",
"paymentType": "OFFLINE",
"method": "CASH"
}
]
}400 Bad Request when delivery is not available. Check the error codes to determine the cause.| Code | Description | Recommended Action |
|---|---|---|
| BadRequest | Problem in request | Verify if latitude and longitude are in correct format |
| BadRequestMerchant | Your store is temporarily unavailable | Check store status in dashboard |
| DeliveryDistanceTooHigh | Address more than ~10 km from store | Confirm coordinates with customer |
| OffOpeningHours | Outside logistics operating hours | Try again during business hours |
| OriginNotFound | Store not found in logistics area | Register your store in iFood areas |
| ServiceAreaMismatch | Address outside iFood coverage | Confirm if region has iFood delivery |
| HighDemand | Logistics saturated temporarily | Try again in a few minutes |
| MerchantStatusAvailability | Your account has pending issues | Contact iFood support |
| InvalidPaymentMethods | Payment method not supported | Use another payment method |
| NRELimitExceeded | Limit of simultaneous drivers reached | Wait for ongoing deliveries to complete |
| UnavailableFleet | Driver fleet unavailable | Try again later |
id for trackingcustomer.phone.type="CUSTOMER" with valid numbercustomer.phone.type="STORE"DELIVERY_DROP_CODE_REQUESTEDmetadata.CODE of the eventPOST /shipping/v1.0/merchants/{merchantId}/orderscurl -X POST "https://merchant-api.ifood.com.br/shipping/v1.0/merchants/{merchantId}/orders" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"name": "João Silva",
"phone": {
"countryCode": "55",
"areaCode": "11",
"number": "999999999",
"type": "CUSTOMER"
}
},
"delivery": {
"merchantFee": 5.99,
"quoteId": "57cd1046-2e06-446f-a2dd-18a518212c3c",
"deliveryAddress": {
"postalCode": "01310100",
"streetNumber": "100",
"streetName": "Avenida Paulista",
"neighborhood": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"coordinates": {
"latitude": -23.5505,
"longitude": -46.6333
}
}
},
"items": [{
"id": "item-1",
"name": "Hambúrguer",
"quantity": 1,
"unitPrice": 25.00,
"price": 25.00,
"optionsPrice": 0,
"totalPrice": 25.00
}],
"payments": {
"methods": [{
"method": "CREDIT",
"type": "OFFLINE",
"value": 30.99,
"card": {
"brand": "Visa"
}
}]
}
}'{
"id": "522e4d7e-0ce1-44f3-8cc7-73a9f190a5e8",
"trackingUrl": "https://meupedido.ifood.com.br/522e4d7e-0ce1-44f3-8cc7-73a9f190a5e8"
}id (uuid) - Unique order ID created (use for future operations)trackingUrl (string) - Tracking URL shareable with customertrackingUrl with customer to track deliveryidDELIVERY_DROP_CODE_REQUESTED, DELIVERY_IN_TRANSIT, DELIVERY_CONCLUDED| Field | Type | Description |
|---|---|---|
customer.name* | string | Name (max. 50 characters) |
customer.phone.type | string | CUSTOMER (default) or STORE |
customer.phone.countryCode* | string | Country code (2 digits). Ex: 55 |
customer.phone.areaCode* | string | Area code (2 digits). Ex: 11 |
customer.phone.number* | string | Phone (7-9 digits) |
customer.phone.type="STORE"| Field | Type | Description |
|---|---|---|
delivery.merchantFee* | float | Partner fee |
delivery.preparationTime | integer | Preparation time (seconds) |
delivery.quoteId | uuid | Quote ID |
delivery.deliveryAddress.postalCode* | string | Postal code (8 digits) |
delivery.deliveryAddress.streetNumber* | string | Street number |
delivery.deliveryAddress.streetName* | string | Street name (max. 50 characters) |
delivery.deliveryAddress.complement | string | Complement (max. 50 characters) |
delivery.deliveryAddress.reference | string | Reference (max. 70 characters) |
delivery.deliveryAddress.neighborhood* | string | Neighborhood (max. 50 characters) |
delivery.deliveryAddress.city* | string | City (2-50 characters) |
delivery.deliveryAddress.state* | string | State (2 letters). Ex: SP |
delivery.deliveryAddress.country* | string | Country (2 letters). Ex: BR |
delivery.deliveryAddress.coordinates.latitude* | float | Latitude |
delivery.deliveryAddress.coordinates.longitude* | float | Longitude |
| Field | Type | Description |
|---|---|---|
items[].id* | uuid | Item ID |
items[].name* | string | Name (max. 50 characters) |
items[].externalCode | string | External code |
items[].quantity* | integer | Quantity (> 0) |
items[].unitPrice* | float | Unit price (≥ 0) |
items[].price* | float | Total price (quantity * unitPrice) |
items[].optionsPrice* | float | Add-ons price (≥ 0) |
items[].totalPrice* | float | Total (price + optionsPrice) |
| Field | Type | Description |
|---|---|---|
payments.methods[].method* | string | CREDIT, DEBIT or CASH |
payments.methods[].type* | string | OFFLINE |
payments.methods[].value* | float | Amount |
payments.methods[].card.brand* | string | Brand (if CREDIT/DEBIT) |
payments.methods[].cash.changeFor* | float | Change (if CASH) |
payments object (processed by merchant)| Field | Type | Description |
|---|---|---|
displayId | string | Friendly ID (max. 4 characters). Ex: A4BC |
metadata | object | Additional information (max. 20 characters) |
delivery.preparationTime parameter (in seconds) controls when the driver will be allocated. This is critical for customer experience.| Scenario | Problem | Impact |
|---|---|---|
| Too short | Driver arrives before order is ready | Customer waits, driver idle |
| Too long | Driver waits without purpose | Queue congestion, inefficient allocation |
| Correct | Driver and order ready simultaneously | Optimal operation, satisfied customer |
{
"delivery": {
// Do not send preparationTime or send 0
}
}{
"delivery": {
"preparationTime": 900 // 15 minutes in seconds
}
}preparationTime on your average preparation timepreparationTime - use as referenceYour business data:
- Average preparation time: 12 minutes
- Typical variation: ±2 minutes
- Safety margin: +3 minutes
Recommendation:
preparationTime = (12 + 3) * 60 = 900 seconds (15 minutes)salesChannel="POS" (use the returned id)DELIVERY_DROP_CODE_REQUESTED - Confirmation code neededDELIVERY_IN_TRANSIT - Driver left for deliveryDELIVERY_CONCLUDED - Delivery completedDELIVERY_CANCELLED - Delivery cancelledid at tracking endpoint to get location| Code | Description | Recommended Action |
|---|---|---|
| BadRequest | Invalid data in request | Verify all required fields (marked with *) |
| BadRequestCustomer | Customer unavailable or invalid | Check customer name, phone |
| BadRequestMerchant | Your store is unavailable | Check store status in dashboard |
| DeliveryDistanceTooHigh | Address outside coverage | Confirm coordinates with customer |
| HighDemand | Logistics saturated now | Try again in a few minutes |
| MerchantEasyDeliveryDisabled | Service not enabled for your store | Enable service in iFood dashboard |
| OffOpeningHours | Outside operating hours | Wait for business hours |
| OriginNotFound | Store not located in logistics area | Register your store in iFood areas |
| PaymentMethodNotFound | Payment method not supported | Use available method (CREDIT, DEBIT or CASH) |
| PaymentTotalInvalid | Payment amount ≠ order total | Verify sum of items + delivery |
| ServiceAreaMismatch | Address outside service area | Confirm iFood coverage in region |
| NRELimitExceeded | Limit of simultaneous drivers | Wait for ongoing deliveries to complete |
trackingUrl) to confirm/change address securely.Requirements:customer.phone.type="STORE"POST /shipping/v1.0/orders/{orderId}/userConfirmAddresscurl -X POST "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/userConfirmAddress" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"POST /shipping/v1.0/orders/{orderId}/deliveryAddressChangeRequest| Parameter | Type | Required | Description |
|---|---|---|---|
streetNumber | string | No | Street number (ex: 200) |
streetName | string | Yes | Street name (ex: Flower Street) |
complement | string | No | Complement (ex: Apt 42) |
neighborhood | string | Yes | Neighborhood (ex: Center) |
city | string | Yes | City (ex: São Paulo) |
state | string | Yes | State (ex: SP, 2 letters) |
country | string | Yes | Country (ex: BR, 2 letters) |
reference | string | No | Reference (ex: Near the station) |
coordinates.latitude | float | Yes | Latitude of new address |
coordinates.longitude | float | Yes | Longitude of new address |
curl -X POST "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/deliveryAddressChangeRequest" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"streetNumber": "200",
"streetName": "Rua das Flores",
"complement": "Apto 42",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"reference": "Perto da estação",
"coordinates": {
"latitude": -23.5510,
"longitude": -46.6340
}
}'| Restriction | Limit | Consequence |
|---|---|---|
| Maximum distance | 500m from original coordinate | Changes larger are rejected |
| Response deadline | 15 minutes | After that, automatic rejection |
| Region change | Not allowed | Generates automatic denial event |
POST /shipping/v1.0/orders/{orderId}/acceptDeliveryAddressChangecurl -X POST "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/acceptDeliveryAddressChange" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"metadata.action="region-mismatch".POST /shipping/v1.0/orders/{orderId}/denyDeliveryAddressChangecurl -X POST "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/denyDeliveryAddressChange" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"| Code | Status | Description | Action |
|---|---|---|---|
| BadRequest | 400 | Invalid parameters | Check coordinates, street name, city |
| OrderNotFound | 404 | Order not found or expired (>8h) | Order is valid for up to 8 hours |
| ChangeAddressOperationConflict | 409 | Operation in conflict | Another change already pending |
| ChangeAddressOperationNotStarted | 409 | No pending change | No request to accept/deny |
| MaxDistanceHigherThanAllowed | 400 | Change > 500m from original coordinate | Request outside allowed limit |
| RegionMismatch | 400 | New address in different region | Address in different iFood coverage |
salesChannel="POS"). The process is in two stages: get valid reasons and send cancellation.GET /shipping/v1.0/orders/{orderId}/cancellationReasonscurl -X GET "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/cancellationReasons" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"[
{
"cancelCodeId": "817",
"description": "Customer cancelled the order"
},
{
"cancelCodeId": "818",
"description": "Unable to prepare order"
}
]cancelCodeId (string) - Unique reason code (use in cancellation)description (string) - Readable description to show operatorPOST /shipping/v1.0/orders/{orderId}/cancel| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | Explanatory text for cancellation (for logs) |
cancellationCode | integer | Yes | Code obtained in 4.1 (ex: 817) |
curl -X POST "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/cancel" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"reason": "Customer requested cancellation via chat",
"cancellationCode": 817
}'{
"reason": "Customer requested cancellation via chat",
"cancellationCode": 817
}CANCELLED - Cancellation confirmed successfullyCANCELLATION_REQUEST_FAILED - Cancellation failed (ex: driver already left)| Level | Description | When it occurs | Recommendation |
|---|---|---|---|
| LOW | Low trust | Invalid customer or change denied | Request extra customer confirmation |
| MODERATE | Moderate trust | Landline phone (weaker validation) | Monitor carefully |
| HIGH | High trust | Valid mobile phone | Standard processing |
| VERY_HIGH | Very high trust | Valid phone + address confirmed | Prioritize, lower risk |
| Rule | Description | Impact |
|---|---|---|
| customer_phone_valid | Valid mobile phone (11+ digits, type CUSTOMER) | Increases trust |
| customer_phone_is_fixed | Landline phone (8 digits) | Intermediate trust |
| customer_address_confirmed | Customer confirmed address | Increases much |
| customer_address_change_requested | Customer requested address change | Reduces (may indicate initial error) |
| merchant_address_change_approved | You approved change | Improves score |
| merchant_address_change_denied | You denied change | Reduces significantly |
Scenario 1: No validation
`customer_phone_valid`=false
→ Score: LOW (high risk)
Scenario 2: Landline phone only
`customer_phone_is_fixed`=true
→ Score: MODERATE
Scenario 3: Valid mobile phone
`customer_phone_valid`=true
→ Score: HIGH
Scenario 4: Phone + Address confirmed
`customer_phone_valid`=true +
`customer_address_confirmed`=true
→ Score: VERY_HIGH (maximum trust)
Scenario 5: Change approved
`customer_phone_valid`=true +
`merchant_address_change_approved`=true
→ Score: VERY_HIGH
Scenario 6: Change denied
`customer_phone_valid`=true +
`customer_address_change_requested`=true +
`merchant_address_change_denied`=true
→ Score: LOW (distrust)GET /shipping/v1.0/orders/{orderId}/safeDeliverycurl -X GET "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/safeDelivery" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"{
"rules": {
"customer_address_change_requested": false,
"customer_address_confirmed": true,
"customer_phone_is_fixed": false,
"customer_phone_valid": true,
"merchant_address_change_approved": false,
"merchant_address_change_denied": false
},
"score": "VERY_HIGH"
}score (enum) - Level: LOW, MODERATE, HIGH, VERY_HIGHrules.* (boolean) - Each rule true or false| Event | Impact | New Score |
|---|---|---|
| Customer confirms address | Increases trust | Can rise to VERY_HIGH |
| Customer requests change | Reduces (initial error?) | Can drop to MODERATE/LOW |
| You approve change | Increases trust | Can return to VERY_HIGH |
| You deny change | Reduces much | Falls to LOW |
| Time passes | Some data expires | Score can drop over time |
1. Order created → Score HIGH
↓ (Customer confirms address)
2. Before delivery → Score VERY_HIGH
↓ (Use for critical decisions)
3. Allocate resources or apply extra validations if LOW