Skip to main content
Parcel Events Sandbox Docs

Search documentation

Type to search this documentation.

Create a shipment

POST/v1/shipmentsCreate a shipment

Parameters

Idempotency-Keystring · uuidheaderrequired

Request body

required
application/json
objectCreateShipmentRequest
delivery_instructionsnull | string

maxLength 500

metadataobject

maxProperties 20

parcelsarray of objectrequired

maxItems 20 · minItems 1

Show child attributes

maxItems 20 · minItems 1

Show array items
contentsarray of object

maxItems 50

Show child attributes

maxItems 50

Show array items
customs_codenull | string
descriptionstringrequired
quantityintegerrequired

minimum 1

unit_valueobjectrequired
Show child attributes
amountstringrequired

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

currencystringrequired

pattern ^[A-Z]{3}$

height_cmnumberrequired

exclusiveMinimum 0

length_cmnumberrequired

exclusiveMinimum 0

weight_gramsintegerrequired

minimum 1

width_cmnumberrequired

exclusiveMinimum 0

recipientobjectrequired
Show child attributes
citystringrequired
companynull | string
countrystringrequired

pattern ^[A-Z]{2}$

line1stringrequired
line2null | string
namestringrequired

minLength 1

phonenull | string
postal_codestringrequired
regionnull | string
referencestringrequired

maxLength 80

senderobjectrequiredAddress ↑
servicestringrequired

one of "economy", "express", "same_day"

Example request
{
  "delivery_instructions": "Leave with the synthetic reception desk",
  "metadata": {
    "additionalProp1": "string"
  },
  "parcels": [
    {
      "contents": [
        {
          "customs_code": "610910",
          "description": "Synthetic cotton shirt",
          "quantity": 2,
          "unit_value": {
            "amount": "12.50",
            "currency": "XTS"
          }
        }
      ],
      "height_cm": 12,
      "length_cm": 30.5,
      "weight_grams": 1750,
      "width_cm": 20
    }
  ],
  "recipient": {
    "city": "Exampleton",
    "company": "Northstar Supplies",
    "country": "ZZ",
    "line1": "14 Fictional Quay",
    "line2": "Unit 7",
    "name": "Rowan Example",
    "phone": "+00000000000",
    "postal_code": "EX4 2PL",
    "region": "Test Province"
  },
  "reference": "synthetic-order-1042",
  "sender": {
    "city": "Exampleton",
    "company": "Northstar Supplies",
    "country": "ZZ",
    "line1": "14 Fictional Quay",
    "line2": "Unit 7",
    "name": "Rowan Example",
    "phone": "+00000000000",
    "postal_code": "EX4 2PL",
    "region": "Test Province"
  },
  "service": "economy"
}

Responses

201Shipment createdapplication/json

Headers

Location
objectShipment
created_atstring · date-timerequired
delivery_instructionsnull | string
idstringrequired
metadataobject
objectvaluerequired

const "shipment"

parcelsarray of objectrequired
Show child attributes

Items: Parcel ↑

recipientobjectrequiredAddress ↑
referencestringrequired
senderobjectrequiredAddress ↑
servicestringrequired

one of "economy", "express", "same_day"

statusstringrequired

one of "draft", "label_purchased", "in_transit", "out_for_delivery", "delivered", "exception", "canceled"

tracking_numberstringrequired
updated_atstring · date-timerequired
Example response
{
  "created_at": "2026-09-04T08:15:30Z",
  "delivery_instructions": "string",
  "id": "shp_00000000000000000001",
  "metadata": {
    "additionalProp1": "string"
  },
  "object": "shipment",
  "parcels": [
    {
      "contents": [
        {
          "customs_code": "610910",
          "description": "Synthetic cotton shirt",
          "quantity": 2,
          "unit_value": {
            "amount": "12.50",
            "currency": "XTS"
          }
        }
      ],
      "height_cm": 12,
      "length_cm": 30.5,
      "weight_grams": 1750,
      "width_cm": 20
    }
  ],
  "recipient": {
    "city": "Exampleton",
    "company": "Northstar Supplies",
    "country": "ZZ",
    "line1": "14 Fictional Quay",
    "line2": "Unit 7",
    "name": "Rowan Example",
    "phone": "+00000000000",
    "postal_code": "EX4 2PL",
    "region": "Test Province"
  },
  "reference": "synthetic-order-1042",
  "sender": {
    "city": "Exampleton",
    "company": "Northstar Supplies",
    "country": "ZZ",
    "line1": "14 Fictional Quay",
    "line2": "Unit 7",
    "name": "Rowan Example",
    "phone": "+00000000000",
    "postal_code": "EX4 2PL",
    "region": "Test Province"
  },
  "service": "economy",
  "status": "canceled",
  "tracking_number": "PE-000000000001",
  "updated_at": "2026-09-04T08:16:12Z"
}
400Request syntax or parameters are invalidapplication/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_00000000000000000001",
  "status": 400,
  "title": "Synthetic request is invalid",
  "type": "https://parcel-events.example/problems/bad-request"
}
409Current resource state prevents the operationapplication/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_00000000000000000005",
  "status": 409,
  "title": "Synthetic resource state conflicts",
  "type": "https://parcel-events.example/problems/conflict"
}

Documentation menu