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.
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
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
| Name | Location | Meaning |
|---|---|---|
| Idempotency-Key required | header | 8–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
| Field | Type | Description |
|---|---|---|
urlrequired | string | Public HTTPS destination. Private, local, link-local, metadata addresses and unsafe redirects are rejected; DNS is checked again and pinned at delivery. |
event_typesrequired | array |
Response schema
| Field | Type | Description |
|---|---|---|
idrequired | string | Endpoint ID. |
urlrequired | string | HTTPS URL. |
event_typesrequired | array | |
statusrequired | string | active |
created_atrequired | string | ISO 8601 UTC timestamp. Database-backed responses may use +00:00; tracking events and signed webhook payloads use Z. |
signing_secretrequired | string | Show once. Save in your secret manager. |
HTTP responses and errors
| 201 | Resource created in local sandbox. No live purchase. |
| 400 | Malformed JSON, cursor or idempotency header. |
| 401 | Missing, invalid, expired or revoked key. |
| 403 | Required scope not granted. |
| 404 | Resource unavailable in this account and environment, or label format unavailable. |
| 405 | Method not supported. |
| 409 | Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable. |
| 413 | Body exceeds 256 KiB. |
| 422 | Schema or capability validation failure. |
| 429 | Enforced sandbox rate limit reached. |
| 500 | Unexpected PX failure. |
| 502 | Provider operation not confirmed. No blind booking retry. |
| 503 | Provider 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
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
| Field | Type | Description |
|---|---|---|
datarequired | array | |
data[].idrequired | string | Endpoint identifier. |
data[].urlrequired | string | HTTPS delivery URL. |
data[].event_typesrequired | array | |
data[].statusrequired | string | Values: active, disabled |
data[].created_atrequired | string | ISO 8601 UTC timestamp. Database-backed responses may use +00:00; tracking events and signed webhook payloads use Z. |
data[].signing_secretoptional | string | One-time first registration/rotation only. Never returned by lists or idempotent replay. |
HTTP responses and errors
| 200 | Success. |
| 400 | Malformed JSON, cursor or idempotency header. |
| 401 | Missing, invalid, expired or revoked key. |
| 403 | Required scope not granted. |
| 404 | Resource unavailable in this account and environment, or label format unavailable. |
| 405 | Method not supported. |
| 409 | Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable. |
| 413 | Body exceeds 256 KiB. |
| 422 | Schema or capability validation failure. |
| 429 | Enforced sandbox rate limit reached. |
| 500 | Unexpected PX failure. |
| 502 | Provider operation not confirmed. No blind booking retry. |
| 503 | Provider 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
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
| Name | Location | Meaning |
|---|---|---|
| id required | path | |
| Idempotency-Key required | header | 8–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
| Field | Type | Description |
|---|---|---|
enabledrequired | boolean |
Response schema
| Field | Type | Description |
|---|---|---|
idrequired | string | Endpoint identifier. |
urlrequired | string | HTTPS delivery URL. |
event_typesrequired | array | |
statusrequired | string | Values: active, disabled |
created_atrequired | string | ISO 8601 UTC timestamp. Database-backed responses may use +00:00; tracking events and signed webhook payloads use Z. |
signing_secretoptional | string | One-time first registration/rotation only. Never returned by lists or idempotent replay. |
HTTP responses and errors
| 200 | Sandbox operation result. |
| 400 | Malformed JSON, cursor or idempotency header. |
| 401 | Missing, invalid, expired or revoked key. |
| 403 | Required scope not granted. |
| 404 | Resource unavailable in this account and environment, or label format unavailable. |
| 409 | Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable. |
| 422 | Schema or capability validation failure. |
| 429 | Enforced sandbox rate limit reached. |
| 500 | Unexpected PX failure. |
| 503 | Provider 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
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
| Name | Location | Meaning |
|---|---|---|
| id required | path |
Response schema
| Field | Type | Description |
|---|---|---|
datarequired | array | |
data[].idrequired | string | |
data[].event_idrequired | string | |
data[].event_typerequired | string | |
data[].statusrequired | string | Values: queued, delivering, retry, delivered, dead |
data[].attemptsrequired | integer | Minimum: 0 |
data[].response_statusrequired | integer | null | |
data[].next_attempt_atrequired | string | null | |
data[].error_coderequired | string | null | |
data[].historyrequired | array | |
data[].history[].attemptrequired | integer | Minimum: 0 |
data[].history[].response_statusrequired | integer | null | |
data[].history[].error_coderequired | string | null | |
data[].history[].created_atrequired | string |
HTTP responses and errors
| 200 | Sandbox operation result. |
| 400 | Malformed JSON, cursor or idempotency header. |
| 401 | Missing, invalid, expired or revoked key. |
| 403 | Required scope not granted. |
| 404 | Resource unavailable in this account and environment, or label format unavailable. |
| 409 | Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable. |
| 422 | Schema or capability validation failure. |
| 429 | Enforced sandbox rate limit reached. |
| 500 | Unexpected PX failure. |
| 503 | Provider 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
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
| Name | Location | Meaning |
|---|---|---|
| id required | path | |
| Idempotency-Key required | header | 8–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
| Field | Type | Description |
|---|
Response schema
| Field | Type | Description |
|---|---|---|
idrequired | string | Endpoint identifier. |
urlrequired | string | HTTPS delivery URL. |
event_typesrequired | array | |
statusrequired | string | Values: active, disabled |
created_atrequired | string | ISO 8601 UTC timestamp. Database-backed responses may use +00:00; tracking events and signed webhook payloads use Z. |
signing_secretoptional | string | One-time first registration/rotation only. Never returned by lists or idempotent replay. |
HTTP responses and errors
| 200 | Sandbox operation result. |
| 400 | Malformed JSON, cursor or idempotency header. |
| 401 | Missing, invalid, expired or revoked key. |
| 403 | Required scope not granted. |
| 404 | Resource unavailable in this account and environment, or label format unavailable. |
| 409 | Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable. |
| 422 | Schema or capability validation failure. |
| 429 | Enforced sandbox rate limit reached. |
| 500 | Unexpected PX failure. |
| 503 | Provider 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
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
| Name | Location | Meaning |
|---|---|---|
| id required | path | |
| Idempotency-Key required | header | 8–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
| Field | Type | Description |
|---|---|---|
shipment_idrequired | string |
Response schema
| Field | Type | Description |
|---|---|---|
event_idrequired | string | |
queuedrequired | boolean |
HTTP responses and errors
| 200 | Sandbox operation result. |
| 400 | Malformed JSON, cursor or idempotency header. |
| 401 | Missing, invalid, expired or revoked key. |
| 403 | Required scope not granted. |
| 404 | Resource unavailable in this account and environment, or label format unavailable. |
| 409 | Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable. |
| 422 | Schema or capability validation failure. |
| 429 | Enforced sandbox rate limit reached. |
| 500 | Unexpected PX failure. |
| 503 | Provider 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
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
| Name | Location | Meaning |
|---|---|---|
| id required | path | |
| Idempotency-Key required | header | 8–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
| Field | Type | Description |
|---|---|---|
event_idrequired | string | Pattern: ^evt_[a-f0-9]{64}$ |
Response schema
| Field | Type | Description |
|---|---|---|
event_idrequired | string | |
queuedrequired | boolean |
HTTP responses and errors
| 200 | Sandbox operation result. |
| 400 | Malformed JSON, cursor or idempotency header. |
| 401 | Missing, invalid, expired or revoked key. |
| 403 | Required scope not granted. |
| 404 | Resource unavailable in this account and environment, or label format unavailable. |
| 409 | Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable. |
| 422 | Schema or capability validation failure. |
| 429 | Enforced sandbox rate limit reached. |
| 500 | Unexpected PX failure. |
| 503 | Provider 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
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
| Name | Location | Meaning |
|---|---|---|
| id required | path | |
| Idempotency-Key required | header | 8–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
| Field | Type | Description |
|---|
Response schema
| Field | Type | Description |
|---|
HTTP responses and errors
| 200 | Sandbox operation result. |
| 400 | Malformed JSON, cursor or idempotency header. |
| 401 | Missing, invalid, expired or revoked key. |
| 403 | Required scope not granted. |
| 404 | Resource unavailable in this account and environment, or label format unavailable. |
| 409 | Idempotency conflict, request in progress, expired/mismatched quote or cancellation unavailable. |
| 422 | Schema or capability validation failure. |
| 429 | Enforced sandbox rate limit reached. |
| 500 | Unexpected PX failure. |
| 503 | Provider 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
}