Managing User Orders

API Reference

The Rappi API enables you to manage the orders that the users make using the Rappi application with the new domains. The following sections describe the process to:

  • Manage the workflow and status of the user orders
  • Get user orders through API requests

Retrieving New Orders

API Reference

Use the GET orders endpoint to retrieve a list of all the orders that are in READY status for further action.

Important

You can only retrieve new orders once. After you retrieve these orders, the system changes their status from READY to SENT.

To retrieve new orders:

Make a GET request to the following URL:

URL: https://{COUNTRY_DOMAIN}/restaurants/orders/v1/orders

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

The system retrieves a JSON response with all the new orders of your stores. Consult the JSON response structure in the orders endpoint section of the API Reference.

When you retrieve the list of your new orders, you can take the orders.

Retrieving New Orders From A Specific Store

API Reference

Use the GET stores/{storeId}/orders endpoint to retrieve a list of all the orders from a specific store that are in READY status for further action.

Important

You can only retrieve new orders once. After you retrieve these orders, the system changes their status from READY to SENT.

To retrieve new orders:

Make a GET request to the following URL:

URL: https://{COUNTRY_DOMAIN}/restaurants/orders/v1/stores/{storeId}/orders

The system retrieves a JSON response with all the new orders of your store. Consult the JSON response structure in the orders endpoint section of the API Reference.

When you retrieve the list of your new orders, you can take the orders.

Retrieving New Orders Status SENT

API Reference

Use the GET orders/status/sent endpoint to retrieve a list of all the orders that are in SENT.

Important

Only orders whose last status is SENT and that status has been updated within the time limit (10 minutes forward) will be retrieved.

Example:

If order change status to SENT at 14:00 of 12/10/2021, and use this enpoint at 14:07, it returns the order, because 14:07 - 10 minutes = 13:57 and the status change hour was at 14:00 then is bigger than 13:57.

Another example, if order change status to SENT at 14:00 of 12/10/2021, but use this enpoint at 17:30, it returns nothing, because 17:30 - 10 minutes = 17:20, and status change hour was at 14:00 then is lower than 17:20.

To retrieve new orders:

Make a GET request to the following URL:

URL: https://{COUNTRY_DOMAIN}/restaurants/orders/v1/orders/status/sent

The system retrieves a JSON response with all the new orders of your stores. Consult the JSON response structure in the orders endpoint section of the API Reference.

When you retrieve the list of your new orders, you can take the orders.

Taking Orders

API Reference

Use the PUT stores/{storeId}/orders/{orderId}/take endpoint to take orders that are in SENT status.

Important

When you take an order, the system changes its status to TAKEN and the store starts its preparation. Although it is unusual, if you get a status different to 200, use resilience patterns as retry; please use it along with exponential backoff to multiplicatively decrease the rate of the request.

To take an order make a PUT request to the following URL:

URL: https://{COUNTRY_DOMAIN}/restaurants/orders/v1/stores/{storeId}/orders/{orderId}/take

  • {COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.
  • {storeId}: This is the identifier of your store.
  • {orderId}: This is the identifier of your order.

Taking Orders with specific cooking time

API Reference

Use the PUT stores/{storeId}/orders/{orderId}/cooking_time/{cookingTime}/take endpoint to take orders that are in SENT status with a specific cooking time.

Important

When you take an order, the system changes its status to TAKEN and the store starts its preparation. Although it is unusual, if you get a status different to 200, use resilience patterns as retry; please use it along with exponential backoff to multiplicatively decrease the rate of the request.

To take an order make a PUT request to the following URL:

URL: https://{COUNTRY_DOMAIN}/restaurants/orders/v1/stores/{storeId}/orders/{orderId}/cooking_time/{cookingTime}/take

  • {COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.
  • {storeId}: This is the identifier of your store.
  • {orderId}: This is the identifier of your order.
  • {cookingTime}: This is the new cooking time.

Cooking Time - CT

This function allows you to set the cooking time of an order when you take it in the POS.

What is cooking time?

Orders have three possible cooking times, which will be applied in the following order.

  • Predictive CT
  • CMS CT (with maximums and minimums)
  • CT set up in the integration core

How does the CT work?

The system goes through each CT in the order explained above to assign the order’s CT, and if it does not find one, it will continue with the next one until a CT is assigned.

Is it possible to change the CT?

Yes, you can change the CT with a value between the minimum and maximum set up in the integration core, and in case you choose a value out of the set up range, the system will select the minimum or maximum value set up in the integration core.