- 1
Pick a carrier. Use an API key with Allow changes (write access) and ask which carriers and delivery methods you can use for the destination country:
curl "https://api.orderkrab.com/api/v1/shipment_services?country_code=DE" \ -H "Authorization: Bearer ok_your_key"Each carrier comes with its
shipping_option_idand its methods - courier or parcel locker - with theirshipping_method_id, plus the products to choose from where a carrier needs one. The answer also gives your sender address and whether the parcel needs customs data. - 2
For a parcel locker, find the locker.
GET /api/v1/pickup_pointswith the carrier'sshipping_option_id, thecountry_codeand acityor aquery(a street, the locker's name or a postcode) lists lockers with theirshipping_point_id. - 3
Prepare a draft. Send the carrier, the method, the receiver and the parcel to
POST /api/v1/shipment_drafts. Nothing is booked yet:curl -X POST "https://api.orderkrab.com/api/v1/shipment_drafts" \ -H "Authorization: Bearer ok_your_key" -H "Content-Type: application/json" \ -d '{"shipping_option_id": 12, "shipping_method_id": 34, "receiver_name": "Anna Weber", "receiver_phone": "+4915123456789", "receiver_email": "anna.weber@example.com", "country_code": "DE", "city": "Berlin", "address1": "Hauptstraße 5", "zip_code": "10115", "content_description": "Coffee samples", "weight_grams": 800}'The answer,
201, holds thedraft_id, asummaryto check, anywarningsand thecharges. A draft is kept for 24 hours. Invalid input answers422withinvalid_shipmentand every problem at once indetails. - 4
Book it. Send the
draft_idtoPOST /api/v1/shipments:curl -X POST "https://api.orderkrab.com/api/v1/shipments" \ -H "Authorization: Bearer ok_your_key" -H "Content-Type: application/json" \ -d '{"draft_id": 501}'OrderKrab books the parcel with the carrier and answers
201with the shipment, its tracking code and tracking link and, once the label is ready, a label link. Sending the samedraft_idagain books nothing new: it answers200with"created": falseand the same shipment, so a retry after a timeout is safe. - 5
Get the label. The label link works for 15 minutes without signing in. Later, download the label with
GET /api/v1/shipments/{id}/label.pdf- orlabel.zplfor a thermal printer - or get a fresh link withGET /api/v1/shipments/{id}.
Good to know
- Billing: every booked shipment counts as one fulfillment on your plan, exactly like an order's label, and your free fulfillments are used first. The carrier bills the parcel under your own contract; OrderKrab doesn't know its price.
- Only carriers connected with your own contract are offered, and only with a courier or parcel locker method switched on for the destination country on the Delivery tab - store pick-up and local delivery aren't. One parcel per shipment, without cash on delivery.
- The receiver's full address is required even for a parcel locker. Missing customs details - an export reason or an HS code for a parcel that crosses a customs border, or a state for countries such as the US - come back as
warnings, not errors, and the draft is still saved. POST /api/v1/shipments/{id}/voidvoids a shipment in OrderKrab only: the API stops serving its label, but the carrier isn't told and the shipment stays billed. Cancel the parcel with the carrier as well if it hasn't been handed over.GET /api/v1/shipmentslists your shipments without an order, newest first - those made with Create shipment in OrderKrab included. Search them withquery(a tracking number or the receiver's name).- In OrderKrab, shipments booked through the API are listed on the Shipments tab of the Shipping page, and each shipment's details name the API key and the person it acts for: Created through ERP sync by ….
- A read-only key can list carriers, lockers and shipments, but preparing, booking and voiding answer
403withinsufficient_scope. An organization can book up to 200 shipments an hour through the API. - The API reference lists every field -
address2,state,total_price,currency(EUR, USD or GBP),hs_code,export_reasonandnoteamong them - and every error code.