Webhooks

Use the webhooks resource to manage the webhooks configured in your stores.

The following table describes the different contents of the Webhooks resource:

API ResourceEndpointEndpoint Description
GET webhook/{event}Returns the webhooks configured for all the stores of the authenticated client
PUT webhook/{event}/add-storesAdd stores to a specific webhook event
PUT webhook/{event}/change-urlChange url from stores
POST webhookCreates a new webhook for a list of stores for the authenticated client
DELETE webhook/{event}/remove-storesDeletes stores from your webhook
PUT webhook/{event}/reset-secretRestarts the secret and generates a new one for the authenticated client
PUT webhook/{event}/change-statusEnables or disables the webhooks for a list of stores
POST /clients/{clientId}/webhooksConfigure a webhook for an integration (Self-Onboarding)
DELETE /clients/{clientId}/webhooksRemove webhook configuration for an integration
GET /clients/{clientId}/webhooksList all webhook configurations for an integration

GET webhook

Use this endpoint to retrieve the webhooks configured for your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{EVENT}

Sample Request

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

GET https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook

This is an example of the request:

URL url = new URL("https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); 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"); try (BufferedReader br = new BufferedReader( new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) { StringBuilder response = new StringBuilder(); String responseLine; while ((responseLine = br.readLine()) != null) { response.append(responseLine.trim()); } System.out.println("Response body: " + response.toString()); } System.out.println("Response Code : " + connection.getResponseCode());



Endpoint Properties

This resource has the following properties:

Response formatsJSON
Authentication requirementsToken

Parameters

ParameterRequirementDescription
event
string
optionalReturns only the details from a specific event

Status Codes

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

Sample Response

This is an example of the response:

[ { "event": "event_1", "stores": [ { "store_id": "1000", "url": "http://testUrl/one", "state": "ENABLE" }, { "store_id": "10001", "url": "http://testUrl/one", "state": "ENABLE" } ] }, { "event": "event_2", "stores": [ { "store_id": "1000", "url": "http://testUrl/one", "state": "ENABLE" } ] } ]

This table describes the objects contained in the response example:

Response ObjectObject Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE

PUT webhook Add Stores

Use this endpoint to add stores to the webhook event specified.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{event}/add-stores

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

ParameterRequirementDescription
event
string
requiredThe event name to update

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://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/add-stores

This is an example of the request:

[ { "url": "http://testDomain/webhook/data", "stores": ["1000", "1001"] } ]
URL url = new URL("https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/add-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" + " \"url\":\"http://testDomain/webhook/data\",\n" + " \"stores\":[\n" + " \"1000\",\n" + " \"1001\"\n" + " ]\n" + "}]"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } try (BufferedReader br = new BufferedReader( new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) { StringBuilder response = new StringBuilder(); String responseLine; while ((responseLine = br.readLine()) != null) { response.append(responseLine.trim()); } System.out.println("Response body: " + response.toString()); } System.out.println("Response Code : " + connection.getResponseCode());



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

AttributesRequirementDescription
url
string
requiredURL to which the webhook communicates.
stores
array of strings
requiredList of the stores where the event triggers.

Sample Response

This is an example of the response:

{ "event": "NEW_ORDER", "stores": [ { "store_id": "1000", "url": "http://testDomain/webhook/data", "state": "ENABLE" } ] }

This table describes the objects contained in the response example:

Response ObjectObject Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE

PUT webhook Change Url

Use this endpoint to update the url of the webhook event specified.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{event}/change-url

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

ParameterRequirementDescription
event
string
requiredThe event name to update

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://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-url

This is an example of the request:

{ "url": "http://testDomain/webhook/data", "stores": ["1000", "1001"] }
URL url = new URL("https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-url"); 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" + " \"url\":\"http://testDomain/webhook/data\",\n" + " \"stores\":[\n" + " \"1000\",\n" + " \"1001\"\n" + " ]\n" + "}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } try (BufferedReader br = new BufferedReader( new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) { StringBuilder response = new StringBuilder(); String responseLine; while ((responseLine = br.readLine()) != null) { response.append(responseLine.trim()); } System.out.println("Response body: " + response.toString()); } System.out.println("Response Code : " + connection.getResponseCode());



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

AttributesRequirementDescription
url
string
requiredURL to which the webhook communicates.
stores
array of strings
requiredList of the stores where the event triggers.

Sample Response

This is an example of the response:

{ "event": "NEW_ORDER", "stores": [ { "store_id": "1000", "url": "http://testDomain/webhook/data", "state": "ENABLE" } ] }

This table describes the objects contained in the response example:

Response ObjectObject Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE

POST webhook

Use this endpoint to create a webhook for your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

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

{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://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook

This is an example of the request:

{ "event": "test_event", "data": [ { "url": "http://testDomain/webhook/data", "stores": ["1000", "1001"] } ] }
URL url = new URL("https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook"); 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" + " \"event\":\"test_event\",\n" + " \"data\": [ {" + " \"url\":\"http://testDomain/webhook/data\",\n" + " \"stores\":[\n" + " \"1000\",\n" + " \"1001\"\n" + " ]\n" + " } ]" + "}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } try (BufferedReader br = new BufferedReader( new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) { StringBuilder response = new StringBuilder(); String responseLine; while ((responseLine = br.readLine()) != null) { response.append(responseLine.trim()); } System.out.println("Response body: " + response.toString()); } System.out.println("Response Code : " + connection.getResponseCode());



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

AttributesRequirementDescription
event
string
requiredEvent that triggers the webhook.
url
string
requiredURL to which the webhook communicates.
data
array of Object
requiredContains the attributes to configure
stores
array of strings
optionalList of the stores where the event triggers. If you don't send this attribute, the API takes all the stores of the authenticated user.

Sample Response

This is an example of the response:

{ "event": "test_1", "stores": [ { "url": "https://localhost:8080/test", "store_id": "1000", "state": "ENABLE" }, { "url": "https://localhost:8080/test", "store_id": "1001", "state": "ENABLE" } ], "secret": "TEST_SECRET" }

This table describes the objects contained in the response example:

Response ObjectObject Description
event
string
Name of the event that triggers the webhook.
stores
array of Store
List of the stores where the event triggers
url
string
URL to which the webhook communicates.
store_id
string
Store id where the event triggers
state
string
Status of the webhook. Options available: ENABLE or DISABLE
secret
string
Secret key to create the security signature for every webhook event post.

DELETE webhook

Use this endpoint to delete a store from your webhook.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{EVENT}/remove-stores

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

ParameterRequirementDescription
event
string
requiredThe event name to update

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:

DELETE https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/remove-stores

This is an example of the request:

{ "stores": ["1000"] }
URL url = new URL("https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/remove-stores"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("DELETE"); 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" + " \"1000\"\n" + " ]\n" + "}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } try (BufferedReader br = new BufferedReader( new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) { StringBuilder response = new StringBuilder(); String responseLine; while ((responseLine = br.readLine()) != null) { response.append(responseLine.trim()); } System.out.println("Response body: " + response.toString()); } System.out.println("Response Code : " + connection.getResponseCode());



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

AttributesRequirementDescription
stores
array of strings
requiredList of the stores to delete the webhook from

Sample Response

This is an example of the response:

{ "stores": ["1000"], "message": "Store settings removed successfully." }

This table describes the objects contained in the response example:

Response ObjectObject Description
stores
array of strings
List of the stores where the event triggers.
message
string
Output message of the request.

PUT webhook reset secret

Use this endpoint to reset the secret, and create a new one for the authenticated ally.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{EVENT}/reset-secret

Endpoint Properties

This resource has the following properties:

Response formatsJSON
Request body requirementsJSON
Authentication requirementsToken

Parameters

ParameterRequirementDescription
event
string
requiredThe webhook event name to update

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://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/reset-secret

This is an example of the request:

URL url = new URL("https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/reset-secret"); 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); try (BufferedReader br = new BufferedReader( new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) { StringBuilder response = new StringBuilder(); String responseLine; while ((responseLine = br.readLine()) != null) { response.append(responseLine.trim()); } System.out.println("Response body: " + response.toString()); } System.out.println("Response Code : " + connection.getResponseCode());



Sample Response

This is an example of the response:

{ "event": "NEW_ORDER", "stores": [ { "store_id": "1000", "url": "http://localhost", "state": "ENABLE" } ], "secret": "NEW_SECRET" }

This table describes the objects contained in the response example:

Response ObjectObject Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE
secret
string
New secret key to use when creating the security signature for a webhook event post.

PUT webhook change status

Use this endpoint to change the availability state of a configured webhook.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{EVENT}/change-status

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://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-status

This is an example of the request:

{ "stores": { "enable": ["1001"], "disable": ["1000"] } }
URL url = new URL("https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-status"); 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 = "{\"stores\": {\"enable\": [\"1001\"],\"disable\": [\"1000\" ] } }"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } try (BufferedReader br = new BufferedReader( new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) { StringBuilder response = new StringBuilder(); String responseLine; while ((responseLine = br.readLine()) != null) { response.append(responseLine.trim()); } System.out.println("Response body: " + response.toString()); } System.out.println("Response Code : " + connection.getResponseCode());



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

AttributesRequirementDescription
stores
Object
requiredObject that contains the list of the stores to enable or disable
enable
array of strings
requiredList of the stores to enable
disable
array of strings
requiredList of the stores to disable

Sample Response

This is an example of the response:

{ "event": "NEW_ORDER", "stores": [ { "store_id": "1001", "url": "http://localhost", "state": "ENABLE" }, { "store_id": "1000", "url": "http://localhost", "state": "ENABLE" } ] }

This table describes the objects contained in the response example:

Response ObjectObject Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE

Integration webhook configuration

Use these endpoints to configure webhooks at the integration level. Unlike store-level webhooks, integration webhooks apply to all stores in an integration and are configured once.

The following table describes the integration webhook endpoints:

API ResourceEndpoint Description
POST /clients/{clientId}/webhooksConfigure a webhook URL for all stores in an integration
DELETE /clients/{clientId}/webhooksRemove webhook configuration for an event
GET /clients/{clientId}/webhooksList all webhook configurations for an integration

POST integration webhook

Use this endpoint to configure a webhook URL for an integration event. This creates or updates the webhook configuration. The only supported event at this time is STORE_PROVISIONING_STATUS.

Endpoint URL

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/clients/{clientId}/webhooks

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

{clientId}: Your client ID (the azp claim from your integrator JWT, e.g. your-client-id).

Endpoint Properties

Response formatsJSON
Authentication requirementsBearer integrator JWT (Auth0)

Parameters

ParameterDescription
{clientId}Path param. Your client ID (azp from integrator JWT)

Request Body

AttributeRequirementDescription
event
string
requiredThe event to configure (e.g. STORE_PROVISIONING_STATUS)
url
string
requiredThe HTTPS endpoint that will receive webhook events
secret
string
optionalCustom secret for HMAC signature validation. If omitted, no signature will be sent with webhook payloads

Status Codes

Sample Request

POST https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/clients/your-client-id/webhooks

This is an example of the request:

{ "event": "STORE_PROVISIONING_STATUS", "url": "https://your-endpoint.com/rappi/events", "secret": "optional-custom-secret" }

Sample Response "Created 201"

This is an example of the response "Created 201":

{ "clientId": "your-client-id", "event": "STORE_PROVISIONING_STATUS", "url": "https://your-endpoint.com/rappi/events", "state": true }

This table describes the objects contained in the response example:

ObjectDescription
clientId
string
Your client ID (azp claim from your integrator JWT)
event
string
The configured event name
url
string
The webhook URL that will receive events
state
boolean
Whether the webhook is active (true/false). Note: this differs from store-level webhooks, which use the string values ENABLE/DISABLE.

Sample Response "Unauthorized 401"

This is an example of the response "Unauthorized 401":

{ "message": "Not a valid token" }
ObjectDescription
message
string
Descriptive error message

DELETE integration webhook

Use this endpoint to remove the webhook configuration for a specific event from an integration.

Endpoint URL

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/clients/{clientId}/webhooks

Endpoint Properties

Response formatsNone
Authentication requirementsBearer integrator JWT (Auth0)

Parameters

ParameterDescription
{clientId}Path param. Your client ID (azp from integrator JWT)
eventQuery param. Event name to remove

Status Codes

Sample Request

DELETE https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/clients/your-client-id/webhooks?event=STORE_PROVISIONING_STATUS

GET integration webhooks

Use this endpoint to list all webhook configurations for an integration.

Endpoint URL

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/clients/{clientId}/webhooks

Endpoint Properties

Response formatsJSON
Authentication requirementsBearer integrator JWT (Auth0)

Parameters

ParameterDescription
{clientId}Path param. Your client ID (azp from integrator JWT)

Status Codes

Sample Request

GET https://api.dev.rappi.com/api/v2/restaurants-integrations-public-api/clients/your-client-id/webhooks

Sample Response "Success 200"

This is an example of the response "Success 200":

[ { "clientId": "your-client-id", "event": "STORE_PROVISIONING_STATUS", "url": "https://your-endpoint.com/rappi/events", "state": true } ]

This table describes the objects contained in the response example:

ObjectDescription
clientId
string
Your client ID (azp claim from your integrator JWT)
event
string
The configured event name
url
string
The webhook URL that receives events
state
boolean
Whether the webhook is active (true/false). Note: this differs from store-level webhooks, which use the string values ENABLE/DISABLE.