FIG. D-00 — DEVELOPER PLATFORM / REST + WEBHOOKS

Integrate your application with the 4PL platform.

One REST API for orders, inventory, tracking, returns and COD — with signed webhooks for every movement a parcel makes. Connect your store, app or ERP in an afternoon.

0
CORE ENDPOINTS
0
UPTIME 12-MO
0
P95 LATENCY
4PL_API — SANDBOX TERMINAL ● CONNECTED
# create your first order
$
HTTP/2 201 CREATED · 142 MS
{
  "id": "ord_88104",
  "status": "received",
  "tracking_url": "https://4pl.global/t/ord_88104",
  "cod": { "amount": 4850, "currency": "LKR" }
}
WEBHOOK FIRED → order.received ✓
POST /v1/ordersGET /v1/orders/:idGET /v1/inventoryPOST /v1/inboundPOST /v1/returnsGET /v1/cod/statementPOST /v1/webhooks
POST /v1/ordersGET /v1/orders/:idGET /v1/inventoryPOST /v1/inboundPOST /v1/returnsGET /v1/cod/statementPOST /v1/webhooks
FIG. D-01 — QUICKSTART

Live in three commits.

01
CREATE_KEYS
Request a sandbox + live keypair. Scoped, revocable, rate-limited — usable from your first curl.
sk_test_4pl_·············
02
POST_ORDER
Push orders from your app, store or ERP. Idempotency keys prevent duplicates on retry.
POST /v1/orders → 201
03
LISTEN_WEBHOOKS
Subscribe once — every pick, dispatch, delivery and COD event lands on your endpoint, signed.
order.delivered
FIG. D-02 — CORE ENDPOINTS

Seven endpoints. The whole operation.

METHODPATHDESCRIPTION
POST/v1/ordersCreate a fulfilment order
GET/v1/orders/:idLive status, events and tracking URL
GET/v1/inventoryStock on hand, by SKU and location
POST/v1/inboundAnnounce inbound stock (GRN)
POST/v1/returnsStart a return or exchange
GET/v1/cod/statementCOD reconciliation statement, per period
POST/v1/webhooksSubscribe to network events
# create an order — COD, 2 items
curl -X POST https://api.4pl.global/v1/orders \
  -H "Authorization: Bearer sk_live_····" \
  -H "Content-Type: application/json" \
  -d '{
    "reference": "SHOP-1042",
    "customer": { "name": "Nadeesha P.", "phone": "+94 77 123 4567" },
    "address": "22/4 Galle Road, Colombo 03",
    "items": [ { "sku": "TEE-BLK-M", "qty": 2 } ],
    "payment": { "method": "cod", "amount": 4850, "currency": "LKR" }
  }'
RESPONSE — GET /v1/orders/ord_88104
{
  "id": "ord_88104",
  "status": "in_transit",
  "hub": "KADAWATHA",
  "eta": "16:00–18:00",
  "events": [
    { "t": "10:12", "e": "received" },
    { "t": "09:41", "e": "packed" },
    { "t": "11:05", "e": "dispatched" }
  ],
  "cod": { "amount": 4850, "status": "pending" }
}
IDEMPOTENT RETRIES CURSOR PAGINATION SANDBOX = FULL LIFECYCLE
FIG. D-03 — EVENT STREAM

Every movement, pushed to you.

Seven event types cover the full parcel lifecycle. Signed with HMAC-SHA256, retried ×5 with backoff, replayable from the dashboard.

order.receivedaccepted into the network
order.packedpicked, scanned and sealed
order.dispatchedhanded to the delivery partner
order.deliveredproof of delivery captured
order.returnedreturn received and restocked
cod.collectedcash collected at the doorstep
cod.reconciledpayment matched, to the rupee
PAYLOAD — cod.reconciled
{
  "event": "cod.reconciled",
  "order_id": "ord_88104",
  "at": "2026-08-09T16:42:11+05:30",
  "courier": "KOOMBIYO",
  "expected": 4850,
  "received": 4850,
  "variance": 0,
  "statement": "cst_2026_08"
}
X-4PL-SIGNATURE: sha256=9f2c… VERIFY → REPLAY → ACK
FIG. D-04 — INTEGRATION PATHS

Integrate your application with the 4PL platform.

Whatever you've built — a storefront, a POS, an ERP, your own app — there's a direct path into the network.

SHOPIFY
Install the app — orders, stock and tracking sync both ways automatically.
PATH: ONE_CLICK
WOOCOMMERCE
A plugin and ten minutes — fulfilment status written back to every order.
PATH: PLUGIN
MARKETPLACES
Daraz and regional marketplaces — one channel feed into the same workflow.
PATH: CHANNEL_SYNC
YOUR OWN APP
Mobile or web — create orders and stream live status straight from the REST API and SDKs.
PATH: REST + SDK
ERP / POS
Push from SAP, Odoo or your POS over REST — batch or real-time, your call.
PATH: REST_BATCH
AI AGENT API
Embed the order-status AI agent in your own chat, app or WhatsApp flow.
PATH: AGENT_EMBED
FIG. D-05 — SANDBOX ACCESS

Ship your integration this week.

Sandbox keys simulate the full parcel lifecycle — orders, events, returns and COD statements — with no real parcels moved.

sk_test_4pl_9f2ca41b··· — issued in minutes, no card
DEV PORTAL← SITE