Ship across India through Shiprocket, a courier aggregator. You book with Shiprocket, and it hands the parcel to one of its partner couriers.
Before you start
- A Shiprocket account, with a pickup location registered in the Shiprocket panel
- A dedicated API user, created in the Shiprocket panel under Settings → API
Set up Shiprocket
1. Fill in Shiprocket Shipping Settings
| Field | Value |
|---|---|
| Email, Password | The API user's login |
| Pickup Location Nickname | The pickup location's nickname, exactly as registered in Shiprocket |
| Pickup Address | An ERPNext Address for the same place. Checkout quotes from its pincode. |
| Channel ID | Optional. Your Shiprocket channel. |
| Currency | INR |
| Volumetric Divisor | 5000, unless your Shiprocket contract says otherwise |
| Rates Timeout (seconds) | How long checkout waits for rates. Default: 10. |
| Webhook Token (x-api-key) | A token you choose. See step 3. |
2. Create a Shipping Provider Profile with a neutral name such as India Courier, set Provider Settings to Shiprocket Shipping Settings, and tick Enabled.
To check your credentials and pickup nickname, run this in bench console:
frappe.get_single("Shiprocket Shipping Settings").test_connection()
3. Add the webhook in the Shiprocket panel's webhook settings:
- URL:
https://your.site/api/v2/method/bwh_shipping.bwh_shipping.webhook.handle?provider=India%20Courier - Token (x-api-key): the same value as Webhook Token
4. Create Shipping Services. Set each one's Service Code to a Shiprocket courier id (courier_company_id).
How it behaves
- Rates come from Shiprocket's serviceability check, using both pincodes and the billable weight. Couriers without a price are dropped.
- Booking takes three calls: create the order, assign an AWB, then generate the label. If the AWB step fails, the order is saved and Book Shipment becomes Resume Booking, which finishes the booking without creating a second order.
- Pickups and manifests are supported.
- Cancelling cancels the Shiprocket order.
| Shiprocket status | Shipping Request status |
|---|---|
| New, Invoiced, AWB Assigned, Label Generated, Ready To Ship | Ready To Ship |
| Pickup Scheduled, Pickup Generated, Pickup Queued, Pickup Rescheduled | Pickup Scheduled |
| Picked Up, Shipped, In Transit, Reached Destination Hub, Misroute | In Transit |
| Out For Delivery | Out For Delivery |
| Undelivered, Delivery Exception | Undelivered |
| RTO Initiated, RTO In Transit, RTO Acknowledged, RTO Delivered | RTO |
| Delivered | Delivered |
| Canceled, Cancelled | Cancelled |
| Lost, Damaged | Lost |
Good to know
- Webhooks aren't signed. Shiprocket echoes your token in the
X-Api-Keyheader, and every delivery without the right token is rejected. Keep the token secret. - Each order is sent to Shiprocket as a single line item, "Order <order reference>", worth the declared value.
- Enabled in these settings isn't used. The profile's Enabled switches the carrier on.
- Parcels are combined into one box: lengths are added, and the widest width and height are used.
Next steps
- Use it in your app: quote at checkout and book shipments
- Webhooks and security: debug a delivery that isn't arriving
Last updated 3 weeks ago
Was this helpful?