Plixstar
API Reference

Admin shipping

POST
/api/v1/admin/shipments/{id}/book

Loads sub-order + pickup + items, dispatches via the carrier adapter (pos_laju | ninja_van), updates orders.tracking_* + status=awaiting_pickup, upserts shipment_bookings with success | pending_retry | failed. Retryable on 5xx with backoff 5m→15m→1h→6h→24h (max 5 attempts). MOCK_CARRIERS=true short-circuits the live API in non-prod.

Authorization

better-auth.session_token
better-auth.session_token<token>

In: cookie

Path Parameters

id*string

Response Body

application/json

curl -X POST "https://example.com/api/v1/admin/shipments/string/book"
{  "success": true,  "status": {},  "trackingNumber": "string",  "labelUrl": "string",  "error": "string"}
GET
/api/v1/admin/shipments/{id}/label-url

Calls ensureLabelStored (no-op if already cached in shipping-labels bucket), then returns a 1-hour signed URL. Pos Laju fetches PDF bytes from the booking response label_url; Ninja Van calls /reports/waybill on demand.

Authorization

better-auth.session_token
better-auth.session_token<token>

In: cookie

Path Parameters

id*string

Response Body

curl -X GET "https://example.com/api/v1/admin/shipments/string/label-url"
Empty