Integrations
Merchants' systems reach ParcelKit in four ways: the API, webhooks, their online store (Shopify, WooCommerce), and WhatsApp.
The merchant API (v1)
A merchant's owner makes a key in the portal under Developers → API keys: read, or read and write. It is shown once.
Authorization: Bearer pk_live_… (or X-Api-Key: pk_live_…)
Base URL: https://api.yourcourier.com/api/v1
GET /me |
The merchant and the key's scopes |
GET /pickup-addresses |
Where you collect from |
POST /quotes |
The price of a parcel before booking |
POST /shipments |
Book (write) |
GET /shipments |
The merchant's parcels, newest first: status, q, from, to, limit, offset |
GET /shipments/{ref} |
One parcel and its history, by tracking number, id or order reference |
GET /shipments/{ref}/label |
The 4×6 label as ZPL, or its data as JSON |
POST /shipments/{ref}/cancel |
Cancel before pickup (write) |
POST /shipments/{ref}/ndr |
Decide a failed delivery: another attempt or the return (write) |
PUT /shipments/{ref}/eway-bill |
India: the e-way bill number (write) |
GET/POST/DELETE /webhooks |
The merchant's webhook endpoints (write to change) |
Booking:
curl https://api.yourcourier.com/api/v1/shipments \
-H "Authorization: Bearer pk_live_…" \
-H "Idempotency-Key: order-10482" \
-H "Content-Type: application/json" \
-d '{
"orderRef": "10482",
"service": "standard",
"paymentMode": "cod",
"codAmountMinor": "129900",
"weightGrams": 800,
"consigneeName": "Asha Verma",
"consigneePhone": "+919812345678",
"addressLine1": "14 MG Road",
"city": "Bengaluru",
"postalCode": "560001"
}'
- Amounts are strings, in the currency's smallest unit (
"129900"is ₹1,299.00). service:standard,express,next_day,same_day;paymentMode:prepaidorcod.- The same
Idempotency-Keyreturns the first answer, so a retry never books twice. - 300 requests a minute per key. Another merchant's parcel is "not found".
The full reference, with every field, is served by the API itself at
/docs (Swagger) outside production, or in production with API_DOCS=true.
Webhooks
Under Developers → Webhooks a merchant adds an HTTPS endpoint and picks
events: shipment.created, shipment.status_changed, remittance.paid,
invoice.issued. Each delivery is signed:
X-ParcelKit-Signature: t=1764500000,v1=<hex HMAC-SHA256 of "<t>.<raw body>">
Recompute it with the endpoint's secret (whsec_…, shown once) and refuse a
timestamp more than five minutes old. Failed deliveries are retried; the portal
lists each one with its response and a Redeliver button, and can send a ping
or rotate the secret.
Shopify
Built in; there is no app to install. The merchant creates a custom app in
their Shopify admin with the scopes read_orders,
read_merchant_managed_fulfillment_orders and
write_merchant_managed_fulfillment_orders, then pastes its Admin API access
token and API secret key into the portal (Developers → Online stores).
ParcelKit registers for new orders, books each one (at once, or after the
merchant picks it from the list), fulfils the Shopify order with the tracking
number and link, and adds each later status as a fulfilment event.
Tested against a stand-in for Shopify's Admin API, not yet against a real Shopify store.
WooCommerce
The plug-in is integrations/woocommerce/dist/parcelkit-for-woocommerce-1.0.0.zip
(WordPress → Plugins → Add new → Upload). The merchant enters the API address
and a read and write key. It books orders (one click, in bulk, or on
Processing), downloads labels, cancels, notes each status on the order,
optionally completes delivered orders, and shows the tracking number to the
customer.
The plug-in's logic and signatures are tested, and its calls run against a live ParcelKit; its WordPress screens have not yet been run inside WordPress.
WhatsApp orders
Many shops take orders in WhatsApp chats. With the WhatsApp Business card filled in under Providers (see Payments and providers for the callback URL), a merchant forwards a customer's order message to your WhatsApp number from their registered phone. ParcelKit reads it (name, phone, address, pieces, COD), answers with what it understood and a link, and the order waits under WhatsApp orders in the portal to be checked and booked in one click. Messages from numbers that belong to no merchant are ignored.
The same reading works without WhatsApp: a message pasted into Book fills the form.
integrations/README.md describes how each integration is built and tested.