Availability

The Availability resources allow you to interact with the availability options of your items and stores.

Important

Due to expansion and improvements, new endpoints or resources have been introduced that expand the capabilities for interacting with various item and store availability options. Because of these advancements, this section is now divided into two distinct parts, each with its own List of Country Domains. It's essential to note that the current availability section remains fully operational and contains the traditional resources that have previously handled the established availability options.

The following table describes the different contents of the Availability resources related to this List of Country Domains.

ResourceDescription
POST availability/items/statusReturns the availability of items by Item SKU.
POST availability/items/rappi/statusReturns the availability of items by Item ID.
PUT availability/stores/itemsManage item availability in the application by Item SKU
PUT availability/stores/items/rappiManage item availability in the application by Item ID
POST availability/storesReturns the availability status of the stores in the application
PUT availability/storesManage store availability asynchronously in the application
PUT availability/stores/enable/massiveManage store availability asynchronously in the application
PUT availability/stores/enableManage store availability synchronously in the application

POST availability/items/status

Use this endpoint to check the availability options of your items by SKU in your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores/items

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

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/items/status

This is an example of the request:

{ "store_id": "900144512", "item_ids": ["7713", "2668", "3395", "5685"] }
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/items/status"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("User-Agent", "Mozilla/5.0"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("x-authorization", "Bearer YOUR_TOKEN"); connection.setDoOutput(true); String jsonInputString = "{\n" + " \"store_id\":\"900144512\",\n" + " \"item_ids\":[\n" + " \"7713\",\n" + " \"2668\",\n" + " \"3395\",\n" + " \"5685\"\n" + " ],\n" + "}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } System.out.println("Response Code : " + connection.getResponseCode());



This table describes the attributes that the JSON of your request requires:

AttributesRequirementDescription
store_id
string
requiredIdentifier of the store.
item_ids
array of strings
requiredList of the SKUs of the articles to consult.

Sample Response

This is an example of the response:

[ { "item_id": 2136411305, "item_type": "PRODUCT", "stock_out_state": "AVAILABLE" }, { "item_id": 2136411307, "item_type": "PRODUCT", "stock_out_state": "AVAILABLE" }, { "item_id": 2136411304, "item_type": "PRODUCT", "stock_out_state": "AVAILABLE" }, { "item_id": 2136411306, "item_type": "PRODUCT", "stock_out_state": "AVAILABLE" } ]

This table describes the objects within the sample response::

Object in responseDescription
item_id
integer
Identifier of the item.
item_type
string
Type of product in the menu.
stock_out_state
string
Indicates product availability.

These are the possible responses for the request:

  • If the request succeeds, the endpoint returns a Success response code.
  • If the request fails, the endpoint returns an Error response code with an error message in a JSON.

POST availability/items/rappi/status

Use this endpoint to check the availability options of your items by ID in your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores/items

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

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/items/rappi/status

This is an example of the request:

{ "store_id": "900144512", "item_ids": ["2136411304"] }
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/items/rappi/status"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("User-Agent", "Mozilla/5.0"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("x-authorization", "Bearer YOUR_TOKEN"); connection.setDoOutput(true); String jsonInputString = "{\n" + " \"store_id\":\"900144512\",\n" + " \"item_ids\":[\n" + " \"2136411304\"\n" + " ],\n" + "}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } System.out.println("Response Code : " + connection.getResponseCode());



This table describes the attributes that the JSON of your request requires:

AttributesRequirementDescription
store_id
string
requiredIdentifier of the store.
item_ids
array of strings
requiredList of the IDs of the articles to consult.

Sample Response

This is an example of the response:

[ { "item_id": 2136411304, "item_type": "PRODUCT", "stock_out_state": "AVAILABLE" } ]

This table describes the objects within the sample response::

Object in responseDescription
item_id
integer
Identifier of the item.
item_type
string
Type of product in the menu.
stock_out_state
string
Indicates product availability.

These are the possible responses for the request:

  • If the request succeeds, the endpoint returns a Success response code.
  • If the request fails, the endpoint returns an Error response code with an error message in a JSON.

PUT availability/stores/items

Use this endpoint to configure the availability options of your items by SKU in your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores/items

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

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items

This is an example of the request:

[ { "store_integration_id": "999", "items": { "turn_on": ["1111", "2222", "3333"], "turn_off": ["5555"] } } ]
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("PUT"); connection.setRequestProperty("User-Agent", "Mozilla/5.0"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("x-authorization", "Bearer YOUR_TOKEN"); connection.setDoOutput(true); String jsonInputString = "[\n" + " {\n" + " \"store_integration_id\":\"999\",\n" + " \"items\":{\n" + " \"turn_on\":[\n" + " \"1111\",\n" + " \"2222\",\n" + " \"3333\"\n" + " ],\n" + " \"turn_off\":[\n" + " \"5555\"\n" + " ]\n" + " }\n" + " }\n" + "]"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } System.out.println("Response Code : " + connection.getResponseCode());



This table describes the attributes that the JSON of your request requires:

AttributesRequirementDescription
store_integration_id
string
requiredIdentifier of the store integration.
items
array of objects
requiredProperties of the items you configure.
items.turn_on
string
optionalSKU of the item to turn on.
items.turn_off
string
optionalSKU of the item to turn off.

Sample Response

This is an example of the response with an error message:

[ { "message": "Error updating items" } ]

These are the possible responses for the request:

  • If the request succeeds, the endpoint returns a Success response code.
  • If the request fails, the endpoint returns an Error response code with an error message in a JSON.

PUT availability/stores/items/rappi

Use this endpoint to configure the availability options of your items by Rappi ID in your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores/items/rappi

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

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items/rappi

This is an example of the request:

[ { "store_integration_id": "999", "items": { "turn_on": [1111, 2222, 3333], "turn_off": [5555] } } ]
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items/rappi"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("PUT"); connection.setRequestProperty("User-Agent", "Mozilla/5.0"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("x-authorization", "Bearer YOUR_TOKEN"); connection.setDoOutput(true); String jsonInputString = "[\n" + " {\n" + " \"store_integration_id\":\"999\",\n" + " \"items\":{\n" + " \"turn_on\":[\n" + " 1111,\n" + " 2222,\n" + " 3333\n" + " ],\n" + " \"turn_off\":[\n" + " 5555\n" + " ]\n" + " }\n" + " }\n" + "]"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } System.out.println("Response Code : " + connection.getResponseCode());



This table describes the attributes that the JSON of your request requires:

AttributesRequirementDescription
store_integration_id
string
requiredIdentifier of the store integration.
items
array of objects
requiredProperties of the items you configure.
items.turn_on
integer
optionalRappi ID of the item to turn on.
items.turn_off
integer
optionalRappi ID the item to turn off.

Sample Response

This is an example of the response with an error message:

{ "message": "Error message" }

These are the possible responses for the request:

  • If the request succeeds, the endpoint returns a Success response code.
  • If the request fails, the endpoint returns an Error response code with an error message in a JSON.

POST availability/stores

Use this endpoint to check the availability of your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores

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

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores

This is an example of the request:

[900105433]
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("User-Agent", "Mozilla/5.0"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("x-authorization", "Bearer YOUR_TOKEN"); connection.setDoOutput(true); String jsonInputString = "[ 900105433 ]"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } System.out.println("Response Code : " + connection.getResponseCode());



This table describes the attributes that the JSON of your request requires:

AttributesRequirementDescription
Store list
integer
requiredList of store IDs to consult separated by commas.

Sample Response

This is an example of a Success response:

{ "900105433": false }

This is an example of the response with an error message:

{ "message": "Error message" }

These are the possible responses to the request:

  • If the request is successful, the endpoint returns a Success code with an object in JSON format.
  • If the request fails, the endpoint returns an Error response code with an error message in a JSON.

PUT availability/stores

Use this endpoint to configure the availability options of your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores

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

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores

This is an example of the request:

{ "turn_on": ["2222"], "turn_off": ["333", "444"] }
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("PUT"); connection.setRequestProperty("User-Agent", "Mozilla/5.0"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("x-authorization", "Bearer YOUR_TOKEN"); connection.setDoOutput(true); String jsonInputString = "{\n" + " \"turn_on\":[\n" + " \"2222\"\n" + " ],\n" + " \"turn_off\":[\n" + " \"333\",\n" + " \"444\"\n" + " ]\n" + "}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } System.out.println("Response Code : " + connection.getResponseCode());



This table describes the attributes that the JSON of your request requires:

AttributesRequirementDescription
turn_on
integer
optionalList of store IDs to turn on.
turn_off
integer
optionalList of store IDs to turn off.

Sample Response

This is an example of the response with an error message:

{ "message": "Error message" }

These are the possible responses to the request:

  • If the request succeeds, the endpoint returns a Success response code.
  • If the request fails, the endpoint returns an Error response code with an error message in a JSON.

PUT availability/stores/enable/massive

Use this endpoint to configure the availability options of your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores

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

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable/massive

This is an example of the request:

{ "stores": [ { "store_id": "12312", "is_enabled": true }, { "store_id": "12312", "is_enabled": false } ] }
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable/massive"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("PUT"); connection.setRequestProperty("User-Agent", "Mozilla/5.0"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("x-authorization", "Bearer YOUR_TOKEN"); connection.setDoOutput(true); String jsonInputString = = "{\n" + " \"stores\": [\n" + " {\n" + " \"store_id\": \"12312\",\n" + " \"is_enabled\": true\n" + " },\n" + " {\n" + " \"store_id\": \"12312\",\n" + " \"is_enabled\": false\n" + " }\n" + " ]\n" + "}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } System.out.println("Response Code : " + connection.getResponseCode());



This table describes the attributes that the JSON of your request requires:

AttributesRequirementDescription
stores
array of objects
requiredList of store's data
stores.store_id
string
requiredid of the store (rappi side) that will change the status
stores.is_enabled
boolean
requiredtrue to turn on the store, otherwise false

Sample Response

This is an example of the response with an error message:

{ "message": "Error message" }

These are the possible responses to the request:

  • If the request succeeds, the endpoint returns a Success response code.
  • If the request fails, the endpoint returns an Error response code with an error message in a JSON.

PUT availability/stores/enable

Use this endpoint to configure the availability options of your stores synchronously

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores/enable

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

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response to this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable

This is an example of the request:

{ "stores": [ { "store_id": "12312", "is_enabled": true }, { "store_id": "12312", "is_enabled": false } ] }
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("PUT"); connection.setRequestProperty("User-Agent", "Mozilla/5.0"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Accept", "application/json"); connection.setRequestProperty("x-authorization", "Bearer YOUR_TOKEN"); connection.setDoOutput(true); String jsonInputString = = "{\n" + " \"stores\": [\n" + " {\n" + " \"store_id\": \"12312\",\n" + " \"is_enabled\": true\n" + " },\n" + " {\n" + " \"store_id\": \"12312\",\n" + " \"is_enabled\": false\n" + " }\n" + " ]\n" + "}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } System.out.println("Response Code : " + connection.getResponseCode());



This table describes the attributes that the JSON of your request requires:

AttributesRequirementDescription
stores
array of objects
requiredList of store's data
stores.store_id
string
requiredid of the store (your side) that will change the status
stores.is_enabled
boolean
requiredtrue to turn on the store, otherwise false

Sample Response

This is an example of a successful response:

{ "results": [ { "store_id": 90774, "is_enabled": true, "operation_result": true, "operation_result_type": "SUCCESS", "operation_result_message": "success", "suspended_reason": null, "suspended_at": null, "suspended_time": 0 }, { "store_id": 90775, "is_enabled": false, "operation_result": false, "operation_result_type": "SUSPENDED", "operation_result_message": "suspended", "suspended_reason": "suspended due to cancelled orders", "suspended_at": "2022-04-11T20:23:00.00Z", "suspended_time": 60 } ] }

This is an example of an error response:

{ "message": "It has been sent more than 300 stores and cannot be processed, please use the asynchronous service" }

This table describes the attributes that the JSON of the response contains:

Response ObjectObject Description
results
array of objects
Result list
results.store_id
int
Store id.
results.is_enabled
boolean
Current store status
results.operation_result
boolean
true if the operation has been finished successfully, otherwise false.
results.operation_result_type
string
Possible values: SUCCESS, SUSPENDED, FORBIDDEN, STORE_NOT_PUBLISHED, STORE_ALREADY_IN_STATUS, ERROR_EXTERNAL_SERVICE
results.operation_result_message
string
Result type description
results.suspended_reason
string
If the store has been suspended, the reason will be here
results.suspended_at
date
Date since the store has been suspended
results.suspended_time
int
Time in minutes that indicates for how long the store will be suspended

Meaning of the different operation_result_type values

  • STORE_NOT_PUBLISHED: the store is not currently showing on the app
  • SUSPENDED: the store has been suspended and it is not possible to turn it on
  • ERROR_EXTERNAL_SERVICE: there was an error trying to change the store status
  • STORE_ALREADY_IN_STATUS: the store is already in the status you are trying to change to
  • FORBIDDEN: the authenticated client_id is not allowed to change the status for the specified store
  • SUCCESS: the store was updated successfully