orderId) to the On Demand delivery service.GET /shipping/v1.0/merchants/{merchantId}/deliveryAvailabilities?latitude={lat}&longitude={lng}merchantId (path) - Merchant IDlatitude (query) - Delivery address latitudelongitude (query) - Delivery address longitude| Field | Type | Description |
|---|---|---|
| id | uuid | Quote ID |
| expirationAt | datetime | Quote validity (UTC) |
| createdAt | datetime | Creation date (UTC) |
| distance | integer | Distance in meters |
| preparationTime | integer | Preparation time in seconds |
| quote.grossValue | decimal | Gross value |
| quote.discount | decimal | Discount |
| quote.raise | decimal | Surcharge |
| quote.netValue | decimal | Net value |
| deliveryTime.min | integer | Minimum delivery time (seconds) |
| deliveryTime.max | integer | Maximum delivery time (seconds) |
| hasPaymentMethods | boolean | Indicates available payment methods |
| paymentMethods[].method | string | 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"
}
]
}| Code | Description |
|---|---|
| BadRequest | Request problem. Check data |
| BadRequestMerchant | Merchant unavailable |
| DeliveryDistanceTooHigh | Address outside coverage area |
| OffOpeningHours | Outside operating hours |
| OriginNotFound | Store outside logistics area |
| ServiceAreaMismatch | Address outside coverage area |
| HighDemand | Logistics temporarily unavailable |
| MerchantStatusAvailability | Merchant with pending issue |
| InvalidPaymentMethods | Payment method not accepted |
| NRELimitExceeded | Driver limit reached |
| UnavailableFleet | Fleet unavailable |
customer.phone.type="CUSTOMER" with valid phonecustomer.phone.type="STORE"DELIVERY_DROP_CODE_REQUESTED event with metadata.CODE to make the code available to the customer.POST /shipping/v1.0/merchants/{merchantId}/orders| 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 | ZIP code (8 digits) |
| delivery.deliveryAddress.streetNumber* | string | Number |
| delivery.deliveryAddress.streetName* | string | Street (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 | Options 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 | Value |
| 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 to delay driver allocation.{
"id": "522e4d7e-0ce1-44f3-8cc7-73a9f190a5e8",
"trackingUrl": "https://meupedido.ifood.com.br/522e4d7e-0ce1-44f3-8cc7-73a9f190a5e8"
}salesChannel="POS"| Code | Description |
|---|---|
| BadRequest | Request problem |
| BadRequestCustomer | Customer unavailable |
| BadRequestMerchant | Merchant unavailable |
| DeliveryDistanceTooHigh | Outside coverage area |
| HighDemand | Logistics temporarily unavailable |
| MerchantEasyDeliveryDisabled | Service not enabled |
| OffOpeningHours | Outside operating hours |
| OriginNotFound | Store outside logistics area |
| PaymentMethodNotFound | Payment method not found |
| PaymentTotalInvalid | Payment value does not match total |
| ServiceAreaMismatch | Address outside coverage |
| NRELimitExceeded | Driver limit reached |
customer.phone.type="STORE"POST /shipping/v1.0/orders/{orderId}/userConfirmAddressPOST /shipping/v1.0/orders/{orderId}/deliveryAddressChangeRequestPOST /shipping/v1.0/orders/{orderId}/acceptDeliveryAddressChangemetadata.action="region-mismatch"POST /shipping/v1.0/orders/{orderId}/denyDeliveryAddressChange| Code | Status | Description |
|---|---|---|
| BadRequest | 400 | Invalid parameters |
| OrderNotFound | 404 | Order not found or expired (>8h) |
| ChangeAddressOperationConflict | 409 | Conflict with existing operation |
| ChangeAddressOperationNotStarted | 409 | No pending change |
| MaxDistanceHigherThanAllowed | 400 | Change > 500m |
| RegionMismatch | 400 | New address in different region |
salesChannel="POS".GET /shipping/v1.0/orders/{orderId}/cancellationReasons[{
"cancelCodeId": "817",
"description": "Customer cancelled order through restaurant"
}]POST /shipping/v1.0/orders/{orderId}/cancel{
"reason": "Customer requested cancellation",
"cancellationCode": "817"
}CANCELLED (success) or CANCELLATION_REQUEST_FAILED (failure)| Level | Description |
|---|---|
| LOW | Low trust |
| MODERATE | Moderate trust |
| HIGH | High trust |
| VERY_HIGH | Very high trust |
| Rule | Description |
|---|---|
| customer_phone_valid | Valid phone (not STORE, >11 digits) |
| customer_phone_is_fixed | Landline phone (8 digits) |
| customer_address_confirmed | Address confirmed by customer |
| customer_address_change_requested | Customer requested change |
| merchant_address_change_approved | Merchant approved change |
| merchant_address_change_denied | Merchant denied change |
customer_phone_valid:false → LOWcustomer_phone_is_fixed:true → MODERATEcustomer_phone_is_fixed:true + customer_address_confirmed:true → VERY_HIGHcustomer_phone_valid:true → HIGHcustomer_phone_valid:true + approved change → VERY_HIGHcustomer_phone_valid:true + denied change → LOWGET /shipping/v1.0/orders/{orderId}/safeDelivery{
"rules": {
"customer_address_change_requested": false,
"customer_address_confirmed": false,
"customer_phone_is_fixed": false,
"customer_phone_valid": true,
"merchant_address_change_approved": false,
"merchant_address_change_denied": false
},
"score": "HIGH"
}400 OrderWithoutSafeDelivery: Order without trust rules404 OrderNotFound: Order not found