Developers
Get Started
OpenAPI ↗
REST API v1 · Developer previewLive API credentials are not yet generally available. Approved test access uses sandbox-api.parcelxpert.com.

API reference

Webhooks

Same-application subscriptions with one-time signing secrets, signed delivery, outbox retries, history, disable, rotation, replay and controlled test events. Production delivery is disabled.

Hosted sandbox developer preview

Set PX_BASE_URL to https://sandbox-api.parcelxpert.com/v1. Intended live host: https://api.parcelxpert.com/v1. Live requests are not released. Set PX_IDEMPOTENCY_KEY to one stored unique value per write; replace all example quote and shipment IDs with returned IDs.

Register webhook endpoint

POST/v1/webhook-endpoints

Available to approved test accounts in the external sandbox. Synthetic side effects only. Live shipping is disabled. Application-scoped sandbox subscriptions. HTTPS public destinations only. Worker runs outside booking transactions. Signing secret appears once on first registration; idempotent repeats omit it.

Required scope: webhooks:write

Parameters

NameLocationMeaning
Idempotency-Key
required
header8–128 ASCII letters, digits, underscore, dot, colon or hyphen. Account/environment/operation scoped; never reuse for a different request. Sandbox retains keys until reset.

Request body

FieldTypeDescription
url
required
stringPublic HTTPS destination. Private, local, link-local, metadata addresses and unsafe redirects are rejected; DNS is checked again and pinned at delivery.
event_types
required
array
Response schema
FieldTypeDescription
id
required
stringEndpoint ID.
url
required
stringHTTPS URL.
event_types
required
array
status
required
stringactive
created_at
required
stringISO 8601 UTC timestamp. Database-backed responses may use +00:00; tracking events and signed webhook payloads use Z.
signing_secret
required
stringShow once. Save in your secret manager.
HTTP responses and errors
201Resource created in local sandbox. No live purchase.
400Malformed JSON, cursor or idempotency header.
401Missing, invalid, expired or revoked key.
403Required scope not granted.
404Resource unavailable in this account and environment, or label format unavailable.
405Method not supported.
409Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable.
413Body exceeds 256 KiB.
422Schema or capability validation failure.
429Enforced sandbox rate limit reached.
500Unexpected PX failure.
502Provider operation not confirmed. No blind booking retry.
503Provider unavailable or live API not released.

Request example

curl --request POST \
  --url "$PX_BASE_URL/webhook-endpoints" \
  --header "Authorization: Bearer $PX_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $PX_IDEMPOTENCY_KEY" \
  --data '{
  "url": "https://merchant.example.com/webhooks/px",
  "event_types": [
    "shipment.booked",
    "tracking.updated"
  ]
}'

Response example

{
  "id": "wh_test_1",
  "url": "https://merchant.example.com/webhooks/px",
  "event_types": [
    "shipment.booked"
  ],
  "status": "active",
  "created_at": "2026-10-04T10:25:00Z",
  "signing_secret": "whsec_TEST_PLACEHOLDER"
}

List webhook endpoints

GET/v1/webhook-endpoints

Available to approved test accounts in the external sandbox. Synthetic side effects only. Live shipping is disabled. Application-scoped sandbox subscriptions. HTTPS public destinations only. Worker runs outside booking transactions. Signing secret appears once on first registration; idempotent repeats omit it.

Required scope: webhooks:write

Response schema
FieldTypeDescription
data
required
array
data[].id
required
stringEndpoint identifier.
data[].url
required
stringHTTPS delivery URL.
data[].event_types
required
array
data[].status
required
stringValues: active, disabled
data[].created_at
required
stringISO 8601 UTC timestamp. Database-backed responses may use +00:00; tracking events and signed webhook payloads use Z.
data[].signing_secret
optional
stringOne-time first registration/rotation only. Never returned by lists or idempotent replay.
HTTP responses and errors
200Success.
400Malformed JSON, cursor or idempotency header.
401Missing, invalid, expired or revoked key.
403Required scope not granted.
404Resource unavailable in this account and environment, or label format unavailable.
405Method not supported.
409Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable.
413Body exceeds 256 KiB.
422Schema or capability validation failure.
429Enforced sandbox rate limit reached.
500Unexpected PX failure.
502Provider operation not confirmed. No blind booking retry.
503Provider unavailable or live API not released.

Request example

curl --request GET \
  --url "$PX_BASE_URL/webhook-endpoints" \
  --header "Authorization: Bearer $PX_API_KEY"

Response example

{
  "data": [
    {
      "id": "wh_test_1",
      "url": "https://merchant.example.com/webhooks/px",
      "event_types": [
        "shipment.booked"
      ],
      "status": "active",
      "created_at": "2026-10-04T10:25:00Z"
    }
  ]
}

UpdateWebhook

PATCH/v1/webhook-endpoints/{id}

Sandbox only. Organisation/application scoped, authenticated and rate limited. Idempotent management writes; signing secrets are never recoverable. Dispatch attempts one due delivery without bypassing its retry schedule. Live API disabled.

Required scope: webhooks:write

Parameters

NameLocationMeaning
id
required
path
Idempotency-Key
required
header8–128 ASCII letters, digits, underscore, dot, colon or hyphen. Account/environment/operation scoped; never reuse for a different request. Sandbox retains keys until reset.

Request body

FieldTypeDescription
enabled
required
boolean
Response schema
FieldTypeDescription
id
required
stringEndpoint identifier.
url
required
stringHTTPS delivery URL.
event_types
required
array
status
required
stringValues: active, disabled
created_at
required
stringISO 8601 UTC timestamp. Database-backed responses may use +00:00; tracking events and signed webhook payloads use Z.
signing_secret
optional
stringOne-time first registration/rotation only. Never returned by lists or idempotent replay.
HTTP responses and errors
200Sandbox operation result.
400Malformed JSON, cursor or idempotency header.
401Missing, invalid, expired or revoked key.
403Required scope not granted.
404Resource unavailable in this account and environment, or label format unavailable.
409Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable.
422Schema or capability validation failure.
429Enforced sandbox rate limit reached.
500Unexpected PX failure.
503Provider unavailable or live API not released.

Request example

curl --request PATCH \
  --url "$PX_BASE_URL/webhook-endpoints/$PX_WEBHOOK_ID" \
  --header "Authorization: Bearer $PX_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $PX_IDEMPOTENCY_KEY" \
  --data '{
  "enabled": false
}'

Response example

{
  "id": "10000000-0000-4000-8000-000000000001",
  "url": "https://example.com/px-webhook",
  "event_types": [
    "tracking.updated"
  ],
  "status": "active",
  "created_at": "2026-10-09T10:00:00Z"
}

WebhookDeliveries

GET/v1/webhook-endpoints/{id}/deliveries

Sandbox only. Organisation/application scoped, authenticated and rate limited. Idempotent management writes; signing secrets are never recoverable. Dispatch attempts one due delivery without bypassing its retry schedule. Live API disabled.

Required scope: webhooks:write

Parameters

NameLocationMeaning
id
required
path
Response schema
FieldTypeDescription
data
required
array
data[].id
required
string
data[].event_id
required
string
data[].event_type
required
string
data[].status
required
stringValues: queued, delivering, retry, delivered, dead
data[].attempts
required
integerMinimum: 0
data[].response_status
required
integer | null
data[].next_attempt_at
required
string | null
data[].error_code
required
string | null
data[].history
required
array
data[].history[].attempt
required
integerMinimum: 0
data[].history[].response_status
required
integer | null
data[].history[].error_code
required
string | null
data[].history[].created_at
required
string
HTTP responses and errors
200Sandbox operation result.
400Malformed JSON, cursor or idempotency header.
401Missing, invalid, expired or revoked key.
403Required scope not granted.
404Resource unavailable in this account and environment, or label format unavailable.
409Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable.
422Schema or capability validation failure.
429Enforced sandbox rate limit reached.
500Unexpected PX failure.
503Provider unavailable or live API not released.

Request example

curl --request GET \
  --url "$PX_BASE_URL/webhook-endpoints/$PX_WEBHOOK_ID/deliveries" \
  --header "Authorization: Bearer $PX_API_KEY"

Response example

{
  "data": []
}

RotateWebhook

POST/v1/webhook-endpoints/{id}/rotate-secret

Sandbox only. Organisation/application scoped, authenticated and rate limited. Idempotent management writes; signing secrets are never recoverable. Dispatch attempts one due delivery without bypassing its retry schedule. Live API disabled.

Required scope: webhooks:write

Parameters

NameLocationMeaning
id
required
path
Idempotency-Key
required
header8–128 ASCII letters, digits, underscore, dot, colon or hyphen. Account/environment/operation scoped; never reuse for a different request. Sandbox retains keys until reset.

Request body

FieldTypeDescription
Response schema
FieldTypeDescription
id
required
stringEndpoint identifier.
url
required
stringHTTPS delivery URL.
event_types
required
array
status
required
stringValues: active, disabled
created_at
required
stringISO 8601 UTC timestamp. Database-backed responses may use +00:00; tracking events and signed webhook payloads use Z.
signing_secret
optional
stringOne-time first registration/rotation only. Never returned by lists or idempotent replay.
HTTP responses and errors
200Sandbox operation result.
400Malformed JSON, cursor or idempotency header.
401Missing, invalid, expired or revoked key.
403Required scope not granted.
404Resource unavailable in this account and environment, or label format unavailable.
409Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable.
422Schema or capability validation failure.
429Enforced sandbox rate limit reached.
500Unexpected PX failure.
503Provider unavailable or live API not released.

Request example

curl --request POST \
  --url "$PX_BASE_URL/webhook-endpoints/$PX_WEBHOOK_ID/rotate-secret" \
  --header "Authorization: Bearer $PX_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $PX_IDEMPOTENCY_KEY" \
  --data '{}'

Response example

{
  "id": "10000000-0000-4000-8000-000000000001",
  "url": "https://example.com/px-webhook",
  "event_types": [
    "tracking.updated"
  ],
  "status": "active",
  "created_at": "2026-10-09T10:00:00Z"
}

TestWebhook

POST/v1/webhook-endpoints/{id}/test

Sandbox only. Organisation/application scoped, authenticated and rate limited. Idempotent management writes; signing secrets are never recoverable. Dispatch attempts one due delivery without bypassing its retry schedule. Live API disabled.

Required scope: webhooks:write

Parameters

NameLocationMeaning
id
required
path
Idempotency-Key
required
header8–128 ASCII letters, digits, underscore, dot, colon or hyphen. Account/environment/operation scoped; never reuse for a different request. Sandbox retains keys until reset.

Request body

FieldTypeDescription
shipment_id
required
string
Response schema
FieldTypeDescription
event_id
required
string
queued
required
boolean
HTTP responses and errors
200Sandbox operation result.
400Malformed JSON, cursor or idempotency header.
401Missing, invalid, expired or revoked key.
403Required scope not granted.
404Resource unavailable in this account and environment, or label format unavailable.
409Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable.
422Schema or capability validation failure.
429Enforced sandbox rate limit reached.
500Unexpected PX failure.
503Provider unavailable or live API not released.

Request example

curl --request POST \
  --url "$PX_BASE_URL/webhook-endpoints/$PX_WEBHOOK_ID/test" \
  --header "Authorization: Bearer $PX_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $PX_IDEMPOTENCY_KEY" \
  --data '{
  "shipment_id": "77777777-7777-4777-8777-777777777777"
}'

Response example

{
  "event_id": "evt_example",
  "queued": true
}

ReplayWebhook

POST/v1/webhook-endpoints/{id}/replay

Sandbox only. Organisation/application scoped, authenticated and rate limited. Idempotent management writes; signing secrets are never recoverable. Dispatch attempts one due delivery without bypassing its retry schedule. Live API disabled.

Required scope: webhooks:write

Parameters

NameLocationMeaning
id
required
path
Idempotency-Key
required
header8–128 ASCII letters, digits, underscore, dot, colon or hyphen. Account/environment/operation scoped; never reuse for a different request. Sandbox retains keys until reset.

Request body

FieldTypeDescription
event_id
required
stringPattern: ^evt_[a-f0-9]{64}$
Response schema
FieldTypeDescription
event_id
required
string
queued
required
boolean
HTTP responses and errors
200Sandbox operation result.
400Malformed JSON, cursor or idempotency header.
401Missing, invalid, expired or revoked key.
403Required scope not granted.
404Resource unavailable in this account and environment, or label format unavailable.
409Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable.
422Schema or capability validation failure.
429Enforced sandbox rate limit reached.
500Unexpected PX failure.
503Provider unavailable or live API not released.

Request example

curl --request POST \
  --url "$PX_BASE_URL/webhook-endpoints/$PX_WEBHOOK_ID/replay" \
  --header "Authorization: Bearer $PX_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $PX_IDEMPOTENCY_KEY" \
  --data '{
  "event_id": "evt_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}'

Response example

{
  "event_id": "evt_example",
  "queued": true
}

DispatchWebhook

POST/v1/webhook-endpoints/{id}/dispatch

Sandbox only. Organisation/application scoped, authenticated and rate limited. Idempotent management writes; signing secrets are never recoverable. Dispatch attempts one due delivery without bypassing its retry schedule. Live API disabled. Each call processes at most one due delivery or returns idle; this worker diagnostic does not cache/replay its response. Repeated calls may claim different events. Retry eligibility remains enforced and consumers deduplicate event IDs.

Required scope: webhooks:write

Parameters

NameLocationMeaning
id
required
path
Idempotency-Key
required
header8–128 ASCII letters, digits, underscore, dot, colon or hyphen. Account/environment/operation scoped; never reuse for a different request. Sandbox retains keys until reset.

Request body

FieldTypeDescription
Response schema
FieldTypeDescription
HTTP responses and errors
200Sandbox operation result.
400Malformed JSON, cursor or idempotency header.
401Missing, invalid, expired or revoked key.
403Required scope not granted.
404Resource unavailable in this account and environment, or label format unavailable.
409Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable.
422Schema or capability validation failure.
429Enforced sandbox rate limit reached.
500Unexpected PX failure.
503Provider unavailable or live API not released.

Request example

curl --request POST \
  --url "$PX_BASE_URL/webhook-endpoints/$PX_WEBHOOK_ID/dispatch" \
  --header "Authorization: Bearer $PX_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $PX_IDEMPOTENCY_KEY" \
  --data '{}'

Response example

{
  "idle": true
}