API reference
Labels
Download authenticated PDF bytes. The local sandbox returns a void A4 fixture. Thermal format is accepted as a query value but returns label_not_available for sandbox shipments.
Set PX_BASE_URL to http://127.0.0.1:4010/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.
Download label
Authenticated binary PDF download. Sandbox supports a4 only and prominently marks labels VOID. Live thermal availability varies. No supplier URL is exposed. Production access remains disabled. Unreleased server adapters and database controls are under certification; hosted test credentials are unavailable.
Required scope: labels:read
Parameters
| Name | Location | Meaning |
|---|---|---|
| id required | path | PX resource ID, scoped to account and environment. |
| format optional | query | Requested label format. Default a4. |
Response schema
Binary application/pdf. Requires labels:read and shipment ownership.
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/shipments/$PX_SHIPMENT_ID/label" \
--header "Authorization: Bearer $PX_API_KEY" \
--output VOID-test-label.pdf