Order integration is one of the most sensitive flows in a user's journey within the iFood platform. If the store is unable to receive and confirm orders, orders are cancelled and this creates a bad experience for platform users.For this reason, it is important that all applications using the API's order module meet minimum requirements to ensure a good experience for our customers and partners.
Homologation
To perform application homologation, it must be ready. Tests are performed on the APP as a whole and not just on calls to our APIs.
Homologation requests with Personal/Student account registrations (CPF) will not be accepted. Only requests with Professional account registration (CNPJ).
Criteria
The application must be able to:
Receive order events via polling or webhook.
In the case of polling:
Make requests to the /polling endpoint regularly every 30 seconds to not miss any order. This ensures that the merchant stays open on the platform; Use the x-polling-merchants header whenever you need to filter events from one or more merchants. It's also possible to filter the events you want to receive by type and group;
Send /acknowledgment for all received events (with status code 200) immediately after the polling request;
In the case of webhook: successfully respond to webhook requests, verified by our internal audit;
Receive, confirm and dispatch an immediate delivery order (orderType = DELIVERY / orderTiming = IMMEDIATE);
Receive, confirm and dispatch a scheduled delivery order (orderType = DELIVERY / orderTiming = SCHEDULED). It's necessary to display the scheduling date and time;
Receive and cancel an immediate delivery order (orderType = DELIVERY / orderTiming = IMMEDIATE). Before requesting a cancellation, it's mandatory to query the available codes/reasons for the order moment through the /cancellationReasons endpoint, this list of codes/reasons should be made available in the POS system, for the POS user to choose which reason to use;
Receive, confirm and notify that a For Pickup order is ready (orderType = TAKEOUT);
Receive orders with card payment and display payment type details, such as card brand;
Receive orders with cash payment and display the change amount on screen and/or printed receipt;
Receive orders with all discount coupons and display the amount and who's responsible for the subsidy (iFood / Store);
Update the status of an order cancelled by the customer or by iFood;
Update the status of an order that may have been confirmed/cancelled by another application such as the Order Manager;
Receive the same event more than once in polling and discard it if that event has been delivered more than once;
Display CPF/CNPJ on screen if required by the store or automatically fill it in the fiscal document;
Receive events from the Order Negotiation Platform and be able to process them through the available endpoints;
Display on screen and/or printed on receipt the order pickup code;
Non-functional requirements:
Renew the token only when it's about to expire or immediately after expiration.
The application must respect the rate limit policies of each endpoint.
Desirable:
Having the printed receipt follow the suggested model in the documentation is a desirable requirement.
Display on screen and/or printed receipt the information indicating any observation about order delivery (which comes in the delivery.observations field)
Tip
To validate if your application is able to update order status with changes made by another application, you can confirm and cancel test orders using the Web Order Manager and track the status of these orders in your application.
How to schedule
To schedule the homologation of your application, access the tickets area and open a request for homologation of your application. Our team will contact you to schedule the process.
New Attempt
Before scheduling your application's homologation, make sure it meets all the requirements listed above. You must wait 15 days for a new attempt.
Preparation
Before starting, have at hand the data of your test store, such as store id and name.
Make sure you have access to a stable internet service
Duration
At the scheduled time, an analyst from our team will make remote access to accompany each stage of the tests. The process lasts an average of 45 minutes.
Rescheduling
If your application is not homologated, our team will record in the ticket the requirements that were not met and you must adjust your software. You can schedule a new homologation 15 days after the previous attempt.