Register Webhook
POST
https://api.salla.dev/admin/v2/webhooks/subscribeThis endpoint allows you to register a new webhook.
:::tip[Note]
- The webhook used is to notify/update/delete an external service when an event has occurred.
- To trigger your webhook to send data, you can choose one event from the List Events endpoint.
:::
:::info[Information]
Read more on Webhooks here.
:::
:::caution[Alert]
• New subscriptions with the same URL will update events / restore old webhooks (if they exist).
• The added URL must accept POST
requests.
• By default, all new webhooks are registered as version 2
. To use version 1
, specify it in your request parameters.
:::
Request
Webhook name. List of Webhook names can be found here.
Webhook event. List of events can be found here, you can use one from the list.
Webhook URL.
Version of the webhook; either valued as 1
or 2
.
Operations, expressions and conditions to your webhook. For example, you may use =
,!=
,AND
,OR
etc in such a menner: payment_method = YOUR_PAYMENT_METHOD
or in combination company_id = 871291 OR price < 50
. That adds more capbility to filter the response based on conditions
Webhook headers.
Any header key, which its value is sent in the post request to the webhook URL
The value sent to the webhook; for example: cf-ray: 669af54ecf55dfcb-FRA
{
"name": "Salla Update Customer Event",
"event": "customer.updated",
"url": "https://webhook.site/07254470-c763-4ee3-bef1-ab2480262814",
"version": 2,
"rule": "payment_method = mada OR price < 50",
"headers": [
{
"key": "Your Secret token key name",
"value": "Your Secret token value"
}
]
}
Request samples
Responses
Response status code, a numeric or alphanumeric identifier used to convey the outcome or status of a request, operation, or transaction in various systems and applications, typically indicating whether the action was successful, encountered an error, or resulted in a specific condition.
Response flag, boolean indicator used to signal a particular condition or state in the response of a system or application, often representing the presence or absence of certain conditions or outcomes.
A unique identifier assigned to a webhook.
The designated label assigned to a webhook.
An event that triggers a webhook to send real-time data between applications (from the events list).
Webhook type
Webhook URL is the address where a webhook sends data when a predefined event occurs.
The webhook version, with values of 1
or 2
, reflecting changes or updates to its functionality or structure.
operations, expressions, and conditions to your webhook, like =, !=, AND, or OR. For example: payment_method = YOUR_PAYMENT_METHOD , payment_method = mada OR price < 50
This enables precise response filtering based on your criteria.
Details included in webhook requests, such as authentication and content metadata, ensure secure and accurate communication between web services. These are represented by headers.key
and headers.value
.
{
"status": 200,
"success": true,
"data": {
"id": 60587520,
"name": "Salla Update Customer Event",
"event": "customer.updated",
"type": "manual",
"url": "https://webhook.site/07254470-c763-4ee3-bef1-ab2480262814",
"version": 2,
"rule": "payment_method = mada OR price < 50",
"headers": {
"Authorization": "abcd1234",
"Accept-Language": "AR"
}
}
}