Get All Webhooks
Retrieves a paginated list of webhooks. A webhook sends a POST request to your URL whenever one of its events happens in the store. See Create Webhook for the list of events.
HTTP Request
- URL:
/webhook - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_WEBHOOKorREAD_WRITE_WEBHOOK
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | Number | Page number to retrieve. Default is 1. |
limit | Number | Number of webhooks per page. Default is 10. |
cURL Example
curl --location '<BASE_URL>/webhook?page=1&limit=10' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The list of webhooks was returned successfully.
- 400 Bad Request: The access token is missing or invalid, or the token does not have the required scope.
Sample JSON Response
{
"success": true,
"data": {
"webhook": [
{
"_id": "66e2b7c1a4f3d2e1c0b9a876",
"name": "ERP order sync",
"url": "https://erp.example.com/hooks/axim",
"description": "Sends new and updated orders to the ERP.",
"events": ["order.create", "order.update"],
"active": true,
"createdAt": "2024-09-12T09:14:41.220Z",
"updatedAt": "2024-09-12T09:14:41.220Z"
}
],
"total": 1,
"page": 1,
"limit": 10
}
}
Response Details
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the request was successful. |
webhook | Array | List of webhooks. See Webhook Data. The ID is returned as _id. |
total | Number | Total number of webhooks. |
page | Number | Current page number. |
limit | Number | Number of webhooks per page. |