Skip to main content

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_WEBHOOK or READ_WRITE_WEBHOOK

Query Parameters​

ParameterTypeDescription
pageNumberPage number to retrieve. Default is 1.
limitNumberNumber 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​

FieldTypeDescription
successBooleanWhether the request was successful.
webhookArrayList of webhooks. See Webhook Data. The ID is returned as _id.
totalNumberTotal number of webhooks.
pageNumberCurrent page number.
limitNumberNumber of webhooks per page.