Webhook subscriptions
Register URLs to receive events, test them and read the delivery log.
Endpoints
List webhook subscriptions
https://api.dawatrack.com/partner-api/v1/webhooks/
Your webhook subscriptions.
webhooks:manage
Limit 5,000 per day
The signing secret isn't listed: it is in the response that created the subscription only.
Query parameters
-
orderingstring OptionalWhich field to use when ordering the results.
-
pageinteger OptionalA page number within the paginated result set.
-
page_sizeinteger OptionalNumber of results to return per page.
-
searchstring OptionalA search term.
Example request
curl -X GET https://api.dawatrack.com/partner-api/v1/webhooks/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests
token = "..." # from POST /oauth/token/
response = requests.get(
"https://api.dawatrack.com/partner-api/v1/webhooks/",
headers={"Authorization": f"Bearer {token}"},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/webhooks/", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
});
console.log(await response.json());
Response fields
A page of results. These are the fields of each item in results. See Pagination.
-
idinteger Read-onlyThe record's id.
-
target_urlURLThe URL events are sent to.
-
event_typesenumThe events to deliver to target_url. See Webhook events for the list.
Possible values:recall.issuedrecall.escalatedrecall.acknowledgedhold.liftedorder.createdorder.confirmedorder.rejectedorder.cancelledorder.delivery_declaredorder.receivedinvoice.createdinvoice.payment_recordedreturn.shippedreturn.confirmedconsignment.receivedconsignment.not_confirmed -
secretstring Read-onlyThe signing secret. Only in the response that creates the subscription: save it.
-
is_activebooleanWhether this record is active.
-
created_atdatetime Read-onlyWhen the record was created.
Example response
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 42,
"target_url": "https://your-system.example.com/dawatrack-webhooks",
"event_types": [
"order.created",
"recall.issued"
],
"secret": "whsec_...",
"is_active": true,
"created_at": "2026-10-10T09:00:00Z"
}
]
}
Status codes
200 | OK |
401 | No valid access token |
403 | Your credential lacks the scope, partner type or environment this needs |
429 | Rate limit exceeded |
Create a webhook subscription
https://api.dawatrack.com/partner-api/v1/webhooks/
Register a URL and the events to send to it.
webhooks:manage
Limit 5,000 per day
The response includes the signing secret. Save it: it isn't shown again.
The URL must use https and be a public internet address. A plain http URL, private, loopback and link-local addresses, internal host names and URLs with credentials are rejected with 400. Redirects aren't followed.
Request body
JSON. Send Content-Type: application/json.
-
target_urlURL RequiredThe URL events are sent to.
-
event_typesenum OptionalThe events to deliver to target_url. See Webhook events for the list.
Possible values:recall.issuedrecall.escalatedrecall.acknowledgedhold.liftedorder.createdorder.confirmedorder.rejectedorder.cancelledorder.delivery_declaredorder.receivedinvoice.createdinvoice.payment_recordedreturn.shippedreturn.confirmedconsignment.receivedconsignment.not_confirmed -
is_activeboolean OptionalWhether this record is active.
Example request
curl -X POST https://api.dawatrack.com/partner-api/v1/webhooks/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"target_url": "https://your-system.example.com/dawatrack-webhooks",
"event_types": [
"order.created",
"order.cancelled",
"recall.issued"
]
}'
import uuid
import requests
token = "..." # from POST /oauth/token/
response = requests.post(
"https://api.dawatrack.com/partner-api/v1/webhooks/",
headers={"Authorization": f"Bearer {token}", "Idempotency-Key": str(uuid.uuid4())},
json={
"target_url": "https://your-system.example.com/dawatrack-webhooks",
"event_types": [
"order.created",
"order.cancelled",
"recall.issued"
]
},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/webhooks/", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"target_url": "https://your-system.example.com/dawatrack-webhooks",
"event_types": [
"order.created",
"order.cancelled",
"recall.issued"
]
}),
});
console.log(await response.json());
Response fields
-
idinteger Read-onlyThe record's id.
-
target_urlURLThe URL events are sent to.
-
event_typesenumThe events to deliver to target_url. See Webhook events for the list.
Possible values:recall.issuedrecall.escalatedrecall.acknowledgedhold.liftedorder.createdorder.confirmedorder.rejectedorder.cancelledorder.delivery_declaredorder.receivedinvoice.createdinvoice.payment_recordedreturn.shippedreturn.confirmedconsignment.receivedconsignment.not_confirmed -
secretstring Read-onlyThe signing secret. Only in the response that creates the subscription: save it.
-
is_activebooleanWhether this record is active.
-
created_atdatetime Read-onlyWhen the record was created.
Example response
{
"id": 42,
"target_url": "https://your-system.example.com/dawatrack-webhooks",
"event_types": [
"order.created",
"recall.issued"
],
"secret": "whsec_...",
"is_active": true,
"created_at": "2026-10-10T09:00:00Z"
}
Status codes
201 | Created |
400 | The request is invalid, for example a malformed GTIN or a missing field |
401 | No valid access token |
403 | Your credential lacks the scope, partner type or environment this needs |
409 | Conflict: a request with this Idempotency-Key is in progress, or the record already exists |
429 | Rate limit exceeded |
Delete a webhook subscription
https://api.dawatrack.com/partner-api/v1/webhooks/{id}/
Stop sending events to a subscription's URL.
webhooks:manage
Limit 5,000 per day
Path parameters
-
idinteger Required
Example request
curl -X DELETE https://api.dawatrack.com/partner-api/v1/webhooks/42/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests
token = "..." # from POST /oauth/token/
response = requests.delete(
"https://api.dawatrack.com/partner-api/v1/webhooks/42/",
headers={"Authorization": f"Bearer {token}"},
)
response.raise_for_status()
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/webhooks/42/", {
method: "DELETE",
headers: {
Authorization: `Bearer ${token}`,
},
});
Status codes
204 | No content |
401 | No valid access token |
403 | Your credential lacks the scope, partner type or environment this needs |
404 | Not found, or not visible to your credential |
429 | Rate limit exceeded |
List deliveries
https://api.dawatrack.com/partner-api/v1/webhooks/{id}/deliveries/
Every delivery attempt for one subscription, including ones that failed for good.
webhooks:manage
Limit 5,000 per day
Path parameters
-
idinteger Required
Query parameters
-
orderingstring OptionalWhich field to use when ordering the results.
-
pageinteger OptionalA page number within the paginated result set.
-
page_sizeinteger OptionalNumber of results to return per page.
-
searchstring OptionalA search term.
Example request
curl -X GET https://api.dawatrack.com/partner-api/v1/webhooks/42/deliveries/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests
token = "..." # from POST /oauth/token/
response = requests.get(
"https://api.dawatrack.com/partner-api/v1/webhooks/42/deliveries/",
headers={"Authorization": f"Bearer {token}"},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/webhooks/42/deliveries/", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
});
console.log(await response.json());
Response fields
A page of results. These are the fields of each item in results. See Pagination.
-
idinteger Read-onlyThe record's id.
-
event_idUUID Read-onlyStable across retries - for the partner to dedupe.
-
event_typeenumThe kind of event.
Possible values:recall.issuedrecall.escalatedrecall.acknowledgedhold.liftedorder.createdorder.confirmedorder.rejectedorder.cancelledorder.delivery_declaredorder.receivedinvoice.createdinvoice.payment_recordedreturn.shippedreturn.confirmedconsignment.receivedconsignment.not_confirmedwebhook.test -
statusenumPossible values:PENDINGDELIVEREDFAILED -
attempt_countintegerHow many delivery attempts have been made.
-
next_attempt_atdatetimeWhen the next attempt is due, while pending.
-
created_atdatetime Read-onlyWhen the record was created.
Example response
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 42,
"event_id": "5c0e7d2a-91b4-4f63-8a27-0d4e6b9c1f35",
"event_type": "SHIP",
"status": "OPEN",
"attempt_count": 1,
"next_attempt_at": "2026-10-10T09:00:00Z",
"created_at": "2026-10-10T09:00:00Z"
}
]
}
Status codes
200 | OK |
401 | No valid access token |
403 | Your credential lacks the scope, partner type or environment this needs |
429 | Rate limit exceeded |
Send a test event
https://api.dawatrack.com/partner-api/v1/webhooks/{id}/test/
Send a signed webhook.test event to the subscription's URL, to check your endpoint before a real event arrives.
webhooks:manage
Limit 5,000 per day
Returns 202 with the queued delivery. Its result shows in the subscription's deliveries.
Path parameters
-
idinteger Required
Example request
curl -X POST https://api.dawatrack.com/partner-api/v1/webhooks/42/test/ \
-H "Authorization: Bearer $DAWATRACK_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"
import uuid
import requests
token = "..." # from POST /oauth/token/
response = requests.post(
"https://api.dawatrack.com/partner-api/v1/webhooks/42/test/",
headers={"Authorization": f"Bearer {token}", "Idempotency-Key": str(uuid.uuid4())},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/webhooks/42/test/", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
console.log(await response.json());
Response fields
-
idinteger Read-onlyThe record's id.
-
event_idUUID Read-onlyStable across retries - for the partner to dedupe.
-
event_typeenumThe kind of event.
Possible values:recall.issuedrecall.escalatedrecall.acknowledgedhold.liftedorder.createdorder.confirmedorder.rejectedorder.cancelledorder.delivery_declaredorder.receivedinvoice.createdinvoice.payment_recordedreturn.shippedreturn.confirmedconsignment.receivedconsignment.not_confirmedwebhook.test -
statusenumPossible values:PENDINGDELIVEREDFAILED -
attempt_countintegerHow many delivery attempts have been made.
-
next_attempt_atdatetimeWhen the next attempt is due, while pending.
-
created_atdatetime Read-onlyWhen the record was created.
Example response
{
"id": 42,
"event_id": "5c0e7d2a-91b4-4f63-8a27-0d4e6b9c1f35",
"event_type": "SHIP",
"status": "OPEN",
"attempt_count": 1,
"next_attempt_at": "2026-10-10T09:00:00Z",
"created_at": "2026-10-10T09:00:00Z"
}
Status codes
202 | Accepted: queued for processing |
400 | The request is invalid, for example a malformed GTIN or a missing field |
401 | No valid access token |
403 | Your credential lacks the scope, partner type or environment this needs |
404 | Not found, or not visible to your credential |
409 | Conflict: a request with this Idempotency-Key is in progress, or the record already exists |
429 | Rate limit exceeded |
Partner API v1. The API reference is generated from the API's own code.