Your first shipment
Four calls take a shipment from a price to its delivery: quote, order, waybill and tracking.
The operations used here are marked coming soon. The flow and the shapes are the published contract; they can still change until the operations are released.
1. Get offers
Describe the shipment and ask for a quotation. You get one offer per carrier available to you, best price first. Every offer has an offer_code that you can order once.
Create a quotation
curl -X POST "https://api.parcelabs.com/easyparcel/quotations" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"shipment_type": "DOMESTIC",
"goods_type": "GOODS",
"content_description": "Biscuits",
"packages": [{ "quantity": 1, "total_weight_kg": 3, "length_cm": 20, "width_cm": 30, "height_cm": 15 }],
"sender": { "postal_code": "00175", "city": "ROMA", "province": "RM", "country_code": "IT" },
"recipient": { "postal_code": "20121", "city": "MILANO", "province": "MI", "country_code": "IT" }
}'Optional services (cash on delivery, insurance, pickup) appear in each offer with their fee and limits. A coupon can be checked beforehand with POST /coupon-checks.
2. Buy the shipment
Order the offer you chose and add the full sender and recipient data. The Idempotency-Key makes the call safe to retry: send the same key and body again after a timeout and you get the first answer back, not a second purchase.
Create a shipment from an offer
curl -X POST "https://api.parcelabs.com/easyparcel/shipments" \
-H "X-API-Key: $API_KEY" \
-H "Idempotency-Key: 6f1c1f0e-0000-4000-8000-000000000001" \
-H "Content-Type: application/json" \
-d '{
"offer_code": "offer_example_0001",
"client_reference": "REF-0001",
"sender": { "name": "Test Sender", "address": "Via Esempio 1", "postal_code": "00175", "city": "Roma", "province": "RM", "country_code": "IT", "email": "sender@example.com", "mobile": "0000000001" },
"recipient": { "name": "Test Recipient", "address": "Via Esempio 2", "postal_code": "20121", "city": "Milano", "province": "MI", "country_code": "IT", "email": "recipient@example.com", "mobile": "0000000002" }
}'The price is charged to your prepaid credit. An order and its shipment are the same thing here: there is one resource, shipments, and one id. If you already know the carrier, you can skip step 1 and send carrier_code instead of offer_code: quotation, order and waybill happen in one call.
3. Get the waybill
The waybill (the transport document with the label) is generated asynchronously. If the shipment answers waybill_status: PENDING, it exists anyway: read the waybill later, or wait for the shipment.waybill_ready webhook (see Webhooks).
Read the waybill
curl "https://api.parcelabs.com/easyparcel/shipments/1234567/waybill" \
-H "X-API-Key: $API_KEY"The answer carries the waybill_number, the label and a signed link to the pickup manifest (manifest_url) when there is one.
4. Follow the shipment
Read the tracking of one shipment, look up several waybills at once, or list the tracking of your recent shipments. You only ever see shipments that are yours or belong to your network: anything else is NOT_FOUND.
Track a shipment
curl "https://api.parcelabs.com/easyparcel/tracking/EX0000000001" \
-H "X-API-Key: $API_KEY"Instead of polling, you can receive each change on your own endpoint with the tracking.updated webhook of Order-Direct customers. The carrier status codes you find in tracking_events are listed in Carrier status codes.