Buy label

Creates an order using rate_id and purchases the label. The amount is deducted from the balance in advance; if the label creation fails, the money is automatically refunded.

POST /shipments

Parameters

NameTypeRequiredDescription
rate_id string yes Rate ID from the POST /rates response, valid for 15 minutes.
from.country string yes Country, two-letter ISO 3166-1 code (US, DE).
from.postal_code string yes Postal code.
from.name string yes Recipient's or sender's name.
from.line1 string yes Address: street and house number.
from.city string yes City.
from.line2 string no Apartment, office, floor.
from.state string no State or region, e.g., NY.
from.company string no Company.
from.phone string no Phone number in international format.
from.email string no Email address.
to.country string yes Country, two-letter ISO 3166-1 code (US, DE).
to.postal_code string yes Postal code.
to.name string yes Recipient's or sender's name.
to.line1 string yes Address: street and house number.
to.city string yes City.
to.line2 string no Apartment, office, floor.
to.state string no State or region, e.g., NY.
to.company string no Company.
to.phone string no Phone number in international format.
to.email string no Email address.
parcel.weight_g integer yes Weight in grams, integer, no more than 70000.
parcel.length_mm integer yes Length in millimeters, integer, no more than 2000.
parcel.width_mm integer yes Width in millimeters, integer, no more than 2000.
parcel.height_mm integer yes Height in millimeters, integer, no more than 2000.
items[].description string no Product description.
items[].quantity integer no Quantity, from 1.
items[].unit_value_cents integer no Price per item in cents.
items[].origin_country string no Country of origin, two-letter code.
items[].hs_code string no HS code (optional).
items[].category string no Product category (optional).
declared_value_cents integer no Declared value in US cents. In the purchase method, defaults to the sum of the items.
reference string no Your order number (up to 64 characters). Optional when creating and unique within the account; in the list, this is an exact filter.

Important to know

Request example

curl -X POST https://api.shippickup.com/v1/shipments \
  -H "Authorization: Bearer $SHIPPICKUP_API_KEY" \
  -H "Idempotency-Key: order-10452-label-v1" \
  -H "Content-Type: application/json" \
  -d '{
    "rate_id": "<rate_id>",
    "from": {
        "name": "Acme Store",
        "company": "Acme Inc",
        "line1": "350 5th Ave",
        "city": "New York",
        "state": "NY",
        "postal_code": "10001",
        "country": "US",
        "phone": "+12125550100",
        "email": "shipping@example.com"
    },
    "to": {
        "name": "Anna Schmidt",
        "line1": "Unter den Linden 1",
        "city": "Berlin",
        "postal_code": "10117",
        "country": "DE",
        "phone": "+493012345678",
        "email": "anna@example.com"
    },
    "parcel": {
        "weight_g": 800,
        "length_mm": 250,
        "width_mm": 180,
        "height_mm": 80
    },
    "items": [
        {
            "description": "T-shirts",
            "quantity": 2,
            "unit_value_cents": 2500,
            "origin_country": "US"
        }
    ],
    "declared_value_cents": 5000,
    "reference": "ORDER-10452"
}'

Response example 201

JSON
{
    "data": {
        "id": "4f2a9c1e7b3d48a6c5e0f1d2b3",
        "reference": "ORDER-10452",
        "status": "label_ready",
        "carrier": "UPS",
        "service": "Express Saver",
        "tracking_number": "1Z999AA10123456784",
        "price_cents": 4120,
        "currency": "USD",
        "from": {
            "name": "Acme Store",
            "company": "Acme Inc",
            "line1": "350 5th Ave",
            "line2": "",
            "city": "New York",
            "state": "NY",
            "postal_code": "10001",
            "country": "US"
        },
        "to": {
            "name": "Anna Schmidt",
            "company": "",
            "line1": "Unter den Linden 1",
            "line2": "",
            "city": "Berlin",
            "state": "",
            "postal_code": "10117",
            "country": "DE"
        },
        "declared_value_cents": 5000,
        "chargeable_weight_g": 800,
        "label_available": true,
        "eta_from": "2026-12-10",
        "eta_to": "2026-12-12",
        "source": "api",
        "created_at": "2026-12-04T10:15:30+00:00",
        "delivered_at": null,
        "cancelled_at": null,
        "pickup": null
    },
    "meta": {
        "duplicate": false
    }
}

When repeating a request with the same Idempotency-Key, the response returns status 200 and meta.duplicate: true, the order is the same, money is not charged twice.

Possible errors

HTTPCodeDescription
403test_key_cannot_buyTest key does not purchase labels or order pickups, use a live key.
422idempotency_key_requiredMissing or invalid Idempotency-Key header: must be 16–64 characters A-Za-z0-9_-.
422validation_failedError in request fields. error.details specifies the reason for each field.
402insufficient_fundsInsufficient funds on balance. Please top up your balance and retry.
409rate_expiredRate is outdated or calculated for a different parcel or route. Request rates again.
409conflictAction is currently not possible for this order (e.g., order cannot be canceled or pickup already ordered). Reason text in error.message.
502provider_errorThe carrier did not complete the operation. The money has been refunded automatically.
403insufficient_scopeKey lacks the required permission, specified in error.details.required_scope.

Full list of error codes →