Skip to main content
Parcel Events Sandbox Docs

Search documentation

Type to search this documentation.

Buy and render a shipping label

POST/v1/labelsBuy and render a shipping label

Parameters

Idempotency-Keystring · uuidheaderrequired

Request body

required
application/json
objectCreateLabelRequest
formatstringrequired

one of "pdf", "png", "zpl"

page_sizestring

one of "a4", "letter", "four_by_six" · default "four_by_six"

shipment_idstringrequired
Example request
{
  "format": "pdf",
  "page_size": "four_by_six",
  "shipment_id": "shp_00000000000000000001"
}

Responses

201Label createdapplication/json
objectLabel
download_urlstring · urirequired
expires_atstring · date-timerequired
formatstringrequired

one of "pdf", "png", "zpl"

idstringrequired
objectvaluerequired

const "label"

priceobjectrequired
Show child attributes
amountstringrequired

pattern ^[0-9]+(\.[0-9]{2})$

currencystringrequired

pattern ^[A-Z]{3}$

shipment_idstringrequired
Example response
{
  "download_url": "https://downloads.parcel-events.example/labels/synthetic-label.pdf",
  "expires_at": "2026-06-09T00:00:00Z",
  "format": "pdf",
  "id": "lbl_00000000000000000001",
  "object": "label",
  "price": {
    "amount": "12.50",
    "currency": "XTS"
  },
  "shipment_id": "shp_00000000000000000001"
}
402The synthetic account cannot purchase this labelapplication/problem+json
objectProblem
detailstring
errorsarray of object
Show child attributes
Show array items
messagestringrequired
pathstringrequired
request_idstringrequired
statusintegerrequired

maximum 599 · minimum 400

titlestringrequired
typestring · urirequired
Example response
{
  "request_id": "req_00000000000000000003",
  "status": 402,
  "title": "Synthetic balance is insufficient",
  "type": "https://parcel-events.example/problems/payment-required"
}
422One or more fields failed semantic validationapplication/problem+json
objectProblem
detailstring
errorsarray of object
Show child attributes
Show array items
messagestringrequired
pathstringrequired
request_idstringrequired
statusintegerrequired

maximum 599 · minimum 400

titlestringrequired
typestring · urirequired
Example response
{
  "errors": [
    {
      "message": "must be a synthetic postal code",
      "path": "recipient.postal_code"
    }
  ],
  "request_id": "req_00000000000000000006",
  "status": 422,
  "title": "Synthetic request validation failed",
  "type": "https://parcel-events.example/problems/validation"
}

Documentation menu