Skip to main content

Webhook subscriptions

Register URLs to receive events, test them and read the delivery log.

List webhook subscriptions

GET https://api.dawatrack.com/partner-api/v1/webhooks/

Your webhook subscriptions.

Scope 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

  • ordering string Optional

    Which field to use when ordering the results.

  • page integer Optional

    A page number within the paginated result set.

  • page_size integer Optional

    Number of results to return per page.

  • search string Optional

    A 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.

  • id integer Read-only

    The record's id.

  • target_url URL

    The URL events are sent to.

  • event_types enum

    The 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
  • secret string Read-only

    The signing secret. Only in the response that creates the subscription: save it.

  • is_active boolean

    Whether this record is active.

  • created_at datetime Read-only

    When the record was created.

Example response

JSON
{
  "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

200OK
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
429Rate limit exceeded

Create a webhook subscription

POST https://api.dawatrack.com/partner-api/v1/webhooks/

Register a URL and the events to send to it.

Scope 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_url URL Required

    The URL events are sent to.

  • event_types enum Optional

    The 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_active boolean Optional

    Whether 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

  • id integer Read-only

    The record's id.

  • target_url URL

    The URL events are sent to.

  • event_types enum

    The 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
  • secret string Read-only

    The signing secret. Only in the response that creates the subscription: save it.

  • is_active boolean

    Whether this record is active.

  • created_at datetime Read-only

    When the record was created.

Example response

JSON
{
  "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

201Created
400The request is invalid, for example a malformed GTIN or a missing field
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
409Conflict: a request with this Idempotency-Key is in progress, or the record already exists
429Rate limit exceeded

Delete a webhook subscription

DELETE https://api.dawatrack.com/partner-api/v1/webhooks/{id}/

Stop sending events to a subscription's URL.

Scope webhooks:manage Limit 5,000 per day

Path parameters

  • id integer 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

204No content
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
404Not found, or not visible to your credential
429Rate limit exceeded

List deliveries

GET https://api.dawatrack.com/partner-api/v1/webhooks/{id}/deliveries/

Every delivery attempt for one subscription, including ones that failed for good.

Scope webhooks:manage Limit 5,000 per day

Path parameters

  • id integer Required

Query parameters

  • ordering string Optional

    Which field to use when ordering the results.

  • page integer Optional

    A page number within the paginated result set.

  • page_size integer Optional

    Number of results to return per page.

  • search string Optional

    A 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.

  • id integer Read-only

    The record's id.

  • event_id UUID Read-only

    Stable across retries - for the partner to dedupe.

  • event_type enum

    The 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
  • status enum
    Possible values: PENDINGDELIVEREDFAILED
  • attempt_count integer

    How many delivery attempts have been made.

  • next_attempt_at datetime

    When the next attempt is due, while pending.

  • created_at datetime Read-only

    When the record was created.

Example response

JSON
{
  "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

200OK
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
429Rate limit exceeded

Send a test event

POST 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.

Scope webhooks:manage Limit 5,000 per day

Returns 202 with the queued delivery. Its result shows in the subscription's deliveries.

Path parameters

  • id integer 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

  • id integer Read-only

    The record's id.

  • event_id UUID Read-only

    Stable across retries - for the partner to dedupe.

  • event_type enum

    The 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
  • status enum
    Possible values: PENDINGDELIVEREDFAILED
  • attempt_count integer

    How many delivery attempts have been made.

  • next_attempt_at datetime

    When the next attempt is due, while pending.

  • created_at datetime Read-only

    When the record was created.

Example response

JSON
{
  "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

202Accepted: queued for processing
400The request is invalid, for example a malformed GTIN or a missing field
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
404Not found, or not visible to your credential
409Conflict: a request with this Idempotency-Key is in progress, or the record already exists
429Rate limit exceeded

Partner API v1. The API reference is generated from the API's own code.