Rest API - Availability

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

The following table describes the different contents of the Availability resources:

ResourceDescription
PATCH /v1/stores/{storeId}/products/{identityType}/stockAsynchronously manages the availability of products by SKU or ID in the Rappi app
POST /v1/stores/{storeId}/products/{identityType}/stock/statusReturns the availability of products by SKU or ID in the Rappi app
PATCH /v1/stores/{storeId}/toppings/{identityType}/stockAsynchronously manages the availability of toppings by SKU or ID in the Rappi app
POST /v1/stores/{storeId}/toppings/{identityType}/stock/statusReturns the availability of toppings by SKU or ID in the Rappi app
PATCH /v1/stores/{storeId}/items/{identityType}/stockAsynchronously manages the availability of products and toppings by SKU or ID in the Rappi app
POST /v1/stores/{storeId}/items/{identityType}/stock/statusReturns the availability of products and toppings by SKU or ID in the Rappi app

PATCH Products availability by SKU or ID

Use this endpoint to enable/disable products in bulk for a specific store.

Endpoint URL

Use this URL to make a request with this endpoint:

URL: https://{NEW_DOMAIN}/restaurants/menu/v1/stores/{storeId}/products/{identityType}/stock

Endpoint Properties (Headers)

This resource has the following properties:

HeaderValue
Content-Typeapplication/json
x-authorizationaccess_token

Parameters

ParameterDescription
storeIdThis is the store identifier on Rappi's side.
identityTypePossible values are RAPPI, SKU; where you should use RAPPI if the identifiers used for activation/deactivation are Rappi IDs, and SKU if merchant identifiers are used.

Sample Request

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

PATCH https://api.dev.rappi.com/restaurants/menu/v1/stores/{storeId}/products/{identityType}/stock

This is an example of the request:

{ "available": ["123123"], "unavailable": [] }

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

AttributesRequiredDescription
availablearray of stringstrueList of identifiers of products, whether they are SKUs or Rappi IDs, to be enabled.
unavailablearray of stringstrueList of identifiers of products, whether they are SKUs or Rappi IDs, to be disabled.

URL url = new URL("https://api.dev.rappi.com/restaurants/menu/v1/stores/11111/products/RAPPI/stock"); HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); httpConn.setRequestMethod("PATCH"); httpConn.setRequestProperty("x-authorization", "Bearer <access_token>"); httpConn.setRequestProperty("Content-Type", "application/json"); httpConn.setDoOutput(true); OutputStreamWriter writer = new OutputStreamWriter(httpConn.getOutputStream()); writer.write("{\n \"available\": [\n \"123123\"\n ],\n \"unavailable\": [\n ]\n}"); writer.flush(); writer.close(); httpConn.getOutputStream().close(); InputStream responseStream = httpConn.getResponseCode() / 100 == 2 ? httpConn.getInputStream() : httpConn.getErrorStream(); Scanner s = new Scanner(responseStream).useDelimiter("\\A"); String response = s.hasNext() ? s.next() : ""; System.out.println(response);



Response Codes

These are the possible response codes for this endpoint:

Example of Response

Successful response example:

{ "message": "Your request has been accepted" }

This table describes the objects contained in the response example:

Response ObjectObject Description
messagestringDisplays the message that the request has been accepted

POST Validate products availability by SKU or ID

Use this endpoint to validate product availability in bulk for a specific store.

Endpoint URL

Use this URL to make a request with this endpoint:

URL: https://{NEW_DOMAIN}/restaurants/menu/v1/stores/{storeId}/products/{identityType}/stock/status

Endpoint Properties (Headers)

This resource has the following properties:

HeaderValue
Content-Typeapplication/json
x-authorizationaccess_token

Parameters

ParameterDescription
storeIdThis is the store identifier on Rappi's side.
identityTypePossible values are RAPPI, SKU; where you should use RAPPI if the identifiers used for activation/deactivation are Rappi IDs, and SKU if merchant identifiers are used.

Sample Request

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

POST https://api.dev.rappi.com/restaurants/menu/v1/stores/{storeId}/products/{identityType}/stock/status

This is an example of the request:

{ "products": ["123123"] }

This table describes the attributes that the JSON in your request's body requires:

AttributesRequiredDescription
productsarray of stringstrueList of identifiers of products, whether they are SKUs or Rappi IDs, to be enabled.

URL url = new URL("https://api.dev.rappi.com/restaurants/menu/v1/stores/{storeId}/products/{identityType}/stock/status"); HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); httpConn.setRequestMethod("POST"); httpConn.setRequestProperty("x-authorization", "Bearer <access_token>"); httpConn.setRequestProperty("Content-Type", "application/json"); httpConn.setDoOutput(true); OutputStreamWriter writer = new OutputStreamWriter(httpConn.getOutputStream()); writer.write("{\n\"products\":[\n\"123123\"\n]\n}"); writer.flush(); writer.close(); httpConn.getOutputStream().close(); InputStream responseStream = httpConn.getResponseCode() / 100 == 2 ? httpConn.getInputStream() : httpConn.getErrorStream(); Scanner s = new Scanner(responseStream).useDelimiter("\\A"); String response = s.hasNext() ? s.next() : ""; System.out.println(response);



Response Codes

These are the possible response codes for this endpoint:

Sample Response

This is an example of the response:

Successful response example:

[ { "item_id": 123456, "item_sku": "", "item_type": "PRODUCT", "stock_out_state": "UNKNOWN" } ]

This table describes the objects contained in the response example:

Response ObjectObject Description
item_idlongItem Rappi ID
item_skustringItem Sku.
item_typestringItem type can be PRODUCT TOPPING ITEM.
stock_out_statestringItem stock status.

PATCH Toppings availability by SKU or ID

Use this endpoint to enable/disable toppings in bulk for a specific store.

Endpoint URL

Use this URL to make a request with this endpoint:

URL: https://{NEW_DOMAIN}/restaurants/menu/v1/stores/{storeId}/toppings/{identityType}/stock

Endpoint Properties (Headers)

This resource has the following properties:

HeaderValue
Content-Typeapplication/json
x-authorizationaccess_token

Parameters

ParameterDescription
storeIdThis is the store identifier on Rappi's side.
identityTypePossible values are RAPPI, SKU; where you should use RAPPI if the identifiers used for activation/deactivation are Rappi IDs, and SKU if merchant identifiers are used.

Sample Request

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

PATCH https://api.dev.rappi.com/restaurants/menu/v1/stores/{storeId}/toppings/{identityType}/stock

This is an example of the request:

{ "available": ["123123"], "unavailable": [] }

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

AttributesRequiredDescription
availablearray of stringstrueList of identifiers of toppings, whether they are SKUs or Rappi IDs, to be enabled.
unavailablearray of stringstrueList of identifiers of toppings, whether they are SKUs or Rappi IDs, to be disabled.

URL url = new URL("https://api.dev.rappi.com/restaurants/menu/v1/stores/11111/toppings/RAPPI/stock"); HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); httpConn.setRequestMethod("PATCH"); httpConn.setRequestProperty("x-authorization", "Bearer <access_token>"); httpConn.setRequestProperty("Content-Type", "application/json"); httpConn.setDoOutput(true); OutputStreamWriter writer = new OutputStreamWriter(httpConn.getOutputStream()); writer.write("{\n \"available\": [\n \"123123\"\n ],\n \"unavailable\": [\n ]\n}"); writer.flush(); writer.close(); httpConn.getOutputStream().close(); InputStream responseStream = httpConn.getResponseCode() / 100 == 2 ? httpConn.getInputStream() : httpConn.getErrorStream(); Scanner s = new Scanner(responseStream).useDelimiter("\\A"); String response = s.hasNext() ? s.next() : ""; System.out.println(response);



Response Codes

These are the possible response codes for this endpoint:

Example of Response

Successful response example:

{ "message": "Your request has been accepted" }

This table describes the objects contained in the response example:

Response ObjectObject Description
messagestringDisplays the message that the request has been accepted

POST Validate toppings availability by SKU or ID

Use this endpoint to validate toppings availability in bulk for a specific store.

Endpoint URL

Use this URL to make a request with this endpoint:

URL: https://{NEW_DOMAIN}/restaurants/menu/v1/stores/{storeId}/toppings/{identityType}/stock/status

Endpoint Properties (Headers)

This resource has the following properties:

HeaderValue
Content-Typeapplication/json
x-authorizationaccess_token

Parameters

ParameterDescription
storeIdThis is the store identifier on Rappi's side.
identityTypePossible values are RAPPI, SKU; where you should use RAPPI if the identifiers used for activation/deactivation are Rappi IDs, and SKU if merchant identifiers are used.

Sample Request

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

POST https://api.dev.rappi.com/restaurants/menu/v1/stores/{storeId}/toppings/{identityType}/stock/status

This is an example of the request:

{ "toppings": ["123123"] }

This table describes the attributes that the JSON in your request's body requires:

AttributesRequiredDescription
toppingsarray of stringstrueList of identifiers of toppings, whether they are SKUs or Rappi IDs, to be enabled.

URL url = new URL("https://api.dev.rappi.com/restaurants/menu/v1/stores/{storeId}/toppings/{identityType}/stock/status"); HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); httpConn.setRequestMethod("POST"); httpConn.setRequestProperty("x-authorization", "Bearer <access_token>"); httpConn.setRequestProperty("Content-Type", "application/json"); httpConn.setDoOutput(true); OutputStreamWriter writer = new OutputStreamWriter(httpConn.getOutputStream()); writer.write("{\n\"toppings\":[\n\"123123\"\n]\n}"); writer.flush(); writer.close(); httpConn.getOutputStream().close(); InputStream responseStream = httpConn.getResponseCode() / 100 == 2 ? httpConn.getInputStream() : httpConn.getErrorStream(); Scanner s = new Scanner(responseStream).useDelimiter("\\A"); String response = s.hasNext() ? s.next() : ""; System.out.println(response);



Response Codes

These are the possible response codes for this endpoint:

Sample Response

This is an example of the response:

Successful response example:

[ { "item_id": 123456, "item_sku": "", "item_type": "TOPPING", "stock_out_state": "UNKNOWN" } ]

This table describes the objects contained in the response example:

Response ObjectObject Description
item_idlongItem Rappi ID
item_skustringItem Sku.
item_typestringItem type can be PRODUCT TOPPING ITEM.
stock_out_statestringItem stock status.

PATCH Items availability by SKU or ID

Use this endpoint to enable/disable items in bulk for a specific store.

Endpoint URL

Use this URL to make a request with this endpoint:

URL: https://{NEW_DOMAIN}/restaurants/menu/v1/stores/{storeId}/items/{identityType}/stock

Endpoint Properties (Headers)

This resource has the following properties:

HeaderValue
Content-Typeapplication/json
x-authorizationaccess_token

Parameters

ParameterDescription
storeIdThis is the store identifier on Rappi's side.
identityTypePossible values are RAPPI, SKU; where you should use RAPPI if the identifiers used for activation/deactivation are Rappi IDs, and SKU if merchant identifiers are used.

Sample Request

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

PATCH https://api.dev.rappi.com/restaurants/menu/v1/stores/{storeId}/items/{identityType}/stock

This is an example of the request:

{ "available": ["123123"], "unavailable": [] }

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

AttributesRequiredDescription
availablearray of stringstrueList of identifiers of items, whether they are SKUs or Rappi IDs, to be enabled.
unavailablearray of stringstrueList of identifiers of items, whether they are SKUs or Rappi IDs, to be disabled.

URL url = new URL("https://api.dev.rappi.com/restaurants/menu/v1/stores/11111/items/RAPPI/stock"); HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); httpConn.setRequestMethod("PATCH"); httpConn.setRequestProperty("x-authorization", "Bearer <access_token>"); httpConn.setRequestProperty("Content-Type", "application/json"); httpConn.setDoOutput(true); OutputStreamWriter writer = new OutputStreamWriter(httpConn.getOutputStream()); writer.write("{\n \"available\": [\n \"123123\"\n ],\n \"unavailable\": [\n ]\n}"); writer.flush(); writer.close(); httpConn.getOutputStream().close(); InputStream responseStream = httpConn.getResponseCode() / 100 == 2 ? httpConn.getInputStream() : httpConn.getErrorStream(); Scanner s = new Scanner(responseStream).useDelimiter("\\A"); String response = s.hasNext() ? s.next() : ""; System.out.println(response);



Response Codes

These are the possible response codes for this endpoint:

Example of Response

Successful response example:

{ "message": "Your request has been accepted" }

This table describes the objects contained in the response example:

Response ObjectObject Description
messagestringDisplays the message that the request has been accepted

POST Validate items availability by SKU or ID

Use this endpoint to validate items availability in bulk for a specific store.

Endpoint URL

Use this URL to make a request with this endpoint:

URL: https://{NEW_DOMAIN}/restaurants/menu/v1/stores/{storeId}/items/{identityType}/stock/status

Endpoint Properties (Headers)

This resource has the following properties:

HeaderValue
Content-Typeapplication/json
x-authorizationaccess_token

Parameters

ParameterDescription
storeIdThis is the store identifier on Rappi's side.
identityTypePossible values are RAPPI, SKU; where you should use RAPPI if the identifiers used for activation/deactivation are Rappi IDs, and SKU if merchant identifiers are used.

Sample Request

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

POST https://api.dev.rappi.com/restaurants/menu/v1/stores/{storeId}/items/{identityType}/stock/status

This is an example of the request:

{ "items": ["123123"] }

This table describes the attributes that the JSON in your request's body requires:

AttributesRequiredDescription
itemsarray of stringstrueList of identifiers of items, whether they are SKUs or Rappi IDs, to be enabled.

URL url = new URL("https://api.dev.rappi.com/restaurants/menu/v1/stores/{storeId}/items/{identityType}/stock/status"); HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); httpConn.setRequestMethod("POST"); httpConn.setRequestProperty("x-authorization", "Bearer <access_token>"); httpConn.setRequestProperty("Content-Type", "application/json"); httpConn.setDoOutput(true); OutputStreamWriter writer = new OutputStreamWriter(httpConn.getOutputStream()); writer.write("{\n\"items\":[\n\"123123\"\n]\n}"); writer.flush(); writer.close(); httpConn.getOutputStream().close(); InputStream responseStream = httpConn.getResponseCode() / 100 == 2 ? httpConn.getInputStream() : httpConn.getErrorStream(); Scanner s = new Scanner(responseStream).useDelimiter("\\A"); String response = s.hasNext() ? s.next() : ""; System.out.println(response);



Response Codes

These are the possible response codes for this endpoint:

Sample Response

This is an example of the response:

Successful response example:

[ { "item_id": 123456, "item_sku": "", "item_type": "ITEM", "stock_out_state": "UNKNOWN" } ]

This table describes the objects contained in the response example:

Response ObjectObject Description
item_idlongItem Rappi ID
item_skustringItem Sku.
item_typestringItem type can be PRODUCT TOPPING ITEM.
stock_out_statestringItem stock status.