Search in documentation
ctrl+4K
Modules
Authentication
Merchant
Catalog
Order
Events
Logistics
Shipping
Review
Financial
Solutions

Orders on iFood platform

Use this documentation to request iFood delivery drivers for orders that already exist on the platform. This flow is ideal when you have orders with orderId and want to contract iFood's logistics services for delivery.
The flow consists of three stages:
  1. Check availability - Confirm delivery is available for the address
  2. Request driver - Allocate an iFood driver to the order
  3. Cancel (optional) - Cancel the request before driver acceptance
ClientAPIEvent Polling1. Check availabilityGET /orders/{orderId}/deliveryAvailabilitiesQuote and delivery windows2. Request driverPOST /orders/{orderId}/requestDriverREQUEST_DRIVER202 AcceptedREQUEST_DRIVER_SUCCESS/FAILED3. Cancel request (optional)POST /orders/{orderId}/cancelRequestDriverDELIVERY_CANCELLATION_REQUESTED202 AcceptedClientAPIEvent Polling
Verify if delivery is available for the order and get price and estimated time information.This stage is essential for:
  • Validating that the address is within iFood coverage area
  • Identifying temporary unavailability (high demand, off-hours)
  • Obtaining price information and estimated time window
  • Avoiding failures in the driver request
Tip: We recommend always performing this check to improve request success rate and user experience.
GET /shipping/v1.0/orders/{orderId}/deliveryAvailabilities
ParameterLocationTypeRequiredDescription
orderIdpathuuidYesID of existing order on the platform
curl -X GET "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/deliveryAvailabilities" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"
Valid quote obtained successfully. Use the returned id as quoteId in the next stage.

Response fields

FieldTypeDescription
iduuidQuote ID (use as quoteId in next stage)
expirationAtdatetimeQuote validity in UTC. Requesting after is invalid.
createdAtdatetimeQuote creation date in UTC
distanceintegerDelivery distance in meters
preparationTimeintegerPreparation time in seconds
quote.grossValuedecimalGross delivery value in reals
quote.discountdecimalApplied discount in reals
quote.raisedecimalApplied surcharge in reals
quote.netValuedecimalNet value = grossValue - discount + raise
deliveryTime.minintegerEstimated minimum delivery time in seconds
deliveryTime.maxintegerEstimated maximum delivery time in seconds
hasPaymentMethodsbooleanIndicates if payment methods are available
paymentMethods[].iduuidUnique payment method ID
paymentMethods[].brandstringCard brand (e.g., Visa, Mastercard)
paymentMethods[].liabilitystringPayment responsible party (e.g., IFOOD)
paymentMethods[].paymentTypestringPayment type (e.g., OFFLINE for cash on delivery)
paymentMethods[].methodstringPayment method: CREDIT or DEBIT

Example response

{
  "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"
    }
  ]
}
Interpreting the response:
  • Distance: 3km
  • Price: R$ 7.99 (no discount)
  • Estimated time: 20-30 minutes
  • Payment methods: 1 Visa card available

The API returns 400 Bad Request when delivery is not available. Check the error codes to determine the cause.
For detailed solutions for each error, consult Best practices and troubleshooting.

Error codes

CodeDescriptionRecommended Action
BadRequestProblem in requestVerify if orderId is in correct format
BadRequestMerchantYour store is temporarily unavailableCheck store status in dashboard
DeliveryDistanceTooHighAddress more than ~10km from storeConfirm address with customer
OffOpeningHoursOutside operating hoursTry again during business hours
OriginNotFoundStore not found in logistics areaRegister your store in iFood areas
ServiceAreaMismatchAddress outside iFood coverageConfirm if region has iFood delivery
HighDemandLogistics saturated temporarilyTry again in a few minutes
MerchantStatusAvailabilityYour account has pending issuesContact iFood support
InvalidPaymentMethodsPayment method not supportedUse another payment method
SaturatedOfflinePaymentCash on delivery unavailableSwitch to another method
NRELimitExceededLimit of simultaneous drivers reachedWait for ongoing deliveries to complete

Example error

{
  "code": "DeliveryDistanceTooHigh",
  "message": "On Demand unavailable: delivery address is more than 10 km from your store.",
  "details": ["Delivery distance too high"]
}

Temporary server error. Try again in a few seconds.
{
  "code": "InternalServerError",
  "message": "Oops. There was a failure. Please try again in a few moments.",
  "details": ["Internal server error"]
}
What to do: Implement automatic retry with exponential backoff. After 3-5 failed attempts, log and notify support.
After obtaining the quote from the previous stage, request the allocation of an iFood driver.
Asynchronous operation:
  • The immediate response is just an acknowledgment (202 Accepted)
  • A driver will be allocated automatically in the background
  • Monitor events to know the final result (success or failure)
POST /shipping/v1.0/orders/{orderId}/requestDriver
ParameterLocationTypeRequiredDescription
orderIdpathuuidYesID of existing order on the platform
quoteIdbodyuuidYesQuote ID obtained in previous stage (valid ~24h)
curl -X POST "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/requestDriver" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "quoteId": "57cd1046-2e06-446f-a2dd-18a518212c3c"
  }'
Body:
{
  "quoteId": "57cd1046-2e06-446f-a2dd-18a518212c3c"
}
Request registered successfully. A driver is being allocated.Next steps: Monitor event polling for the following events:
EventMeaningAction
REQUEST_DRIVERRequest registered in systemProcessing started
REQUEST_DRIVER_SUCCESSDriver successfully allocatedDelivery will proceed as quoted
REQUEST_DRIVER_FAILEDDriver allocation failedTry again or use another service
Important: Lack of quick response doesn't mean failure. Processing is asynchronous and can take minutes.
Invalid request or service unavailable. Check the error code for details.
For detailed solutions for each error, consult Best practices and troubleshooting.
CodeDescriptionRecommended Action
BadRequestInvalid data in requestValidate orderId and quoteId
BadRequestCustomerCustomer unavailable at the momentCheck customer data
BadRequestMerchantYour store is unavailableCheck store status
DeliveryDistanceTooHighAddress outside coverageConfirm customer address
HighDemandLogistics saturated nowWait minutes and try again
MerchantEasyDeliveryDisabledService not enabled for your storeEnable service in dashboard
OffOpeningHoursOutside operating hoursWait for business hours
OriginNotFoundStore not locatedRegister store in iFood areas
ServiceAreaMismatchAddress outside service areaCheck iFood coverage in region
MerchantStatusAvailabilityYour account has restrictionsContact support
InvalidPaymentMethodsPayment method not supportedUse another payment method
SaturatedOfflinePaymentCash on delivery unavailableSwitch to another method
NRELimitExceededLimit of simultaneous drivers reachedWait for ongoing deliveries to complete

Example error

{
  "code": "HighDemand",
  "message": "iFood logistics is temporarily unavailable. Please try again later.",
  "details": ["High demand"]
}
Retry strategy: For transient errors (like HighDemand, OffOpeningHours), implement automatic retry with exponential backoff.
Cancel the driver allocation without canceling the order itself. Ideal when preparation was faster or slower than expected.
Critical restrictions:
  • Cancellation is only possible before driver acceptance
  • After driver accepts, follow Order cancellation rules
  • No fee for cancellations before acceptance
  • The action is permanent and irreversible
POST /shipping/v1.0/orders/{orderId}/cancelRequestDriver
ParameterLocationTypeRequiredDescription
orderIdpathuuidYesID of order to cancel delivery
curl -X POST "https://merchant-api.ifood.com.br/shipping/v1.0/orders/{orderId}/cancelRequestDriver" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"
Cancellation request registered successfully. Processing occurs in the background.Monitor events for confirmation:
EventMeaningAction
DELIVERY_CANCELLATION_REQUESTEDCancellation requested from systemProcessing started
DELIVERY_CANCELLATION_REQUEST_ACCEPTEDCancellation accepted and processedDelivery was cancelled, no fee
DELIVERY_CANCELLATION_REQUEST_REJECTEDCancellation rejected by systemDriver already accepted; follow standard workflow
For more details: See Delivery events.
Invalid request. Verify the orderId sent.
{
  "code": "BadRequest",
  "message": "There was a problem requesting cancellation. Check the information sent.",
  "details": ["Field 'OrderID' must be in uuid format."]
}
Validation: Ensure that orderId is a valid UUID in format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Temporary server error.
{
  "code": "InternalServerError",
  "message": "Oops. There was a failure. Please try again in a few moments.",
  "details": ["Internal server error"]
}
What to do: Implement automatic retries. After 3-5 attempts, log and notify support.
Integration complete?
  1. Implement event polling to monitor status in real-time
  2. Consult the delivery tracking guide for location information
  3. Review the complete order flow to understand the lifecycle
Questions?
Was this page helpful?
Rate your experience in the new Developer portal: