Orders and self-ship
Read, accept and cancel orders, prepare COD invoices, download documents, and add tracking for parcels you ship with your own courier.
| Scope | For |
|---|---|
orders:read | Reading orders |
orders:write | Accepting orders and preparing cash-on-delivery invoices |
orders:cancel | Cancelling orders or single lines |
fulfillment:write | Listing couriers, and adding or correcting self-ship tracking |
documents:read | Downloading the tax invoice |
labels:read | Downloading the shipping label and manifest |
returns:read | Reading returns |
orders:read_pii | The customer's name, phone number, email and address on orders |
Reading orders
GET /orderslists your orders, oldest change first, and syncs withupdated_sinceandcursor(see Idempotency and paging). Filter with:status;placed_fromandplaced_to, onplacedAt;line_id: one or more line ids separated by commas (up to 100), for systems that work line by line. Only your own orders come back.
GET /orders/{orderId}reads one order. Use the orderid, not the order number.
An order has:
id,orderNumber,status,paymentMethod(codorprepaid) andcodAmount(the amount your courier collects;nullfor prepaid orders).invoicePrepared: whether the tax invoice exists, andinvoice(itsnumberanddate) once it does. A cash-on-delivery order needs it before you add self-ship tracking.lines: one per item, with the lineid, product and variant ids, our SKU, your SKU and product code as they were when ordered, name, attributes, quantity, unit price paid and MRP, andshippable. Ship only the lines markedshippable: true. A line that was cancelled or refunded isfalse. One shipment covers all shippable lines. Each line also has:status: see Line status;returnedQuantity: units returned and refunded so far;hsnCodeandgstRate(in percent);tax: the line's taxable value, GST and total as the tax invoice shows them, with the CGST/SGST or IGST split. It isnulluntil the invoice exists.gstTypeand its parts arenullwhen the invoice did not record the split (some older invoices).
shipment: courier, AWB, status and tracking link, ornull.fulfilmentisself_shipwhen you booked your own courier andbhakti_baazarwhen it was booked through us in the portal.returns: the returns raised on the order (id,status,requestedAt), oldest first. Read one in full withGET /returns/{returnId}.rto: set when the courier turned the parcel around (return to origin). Restock once itsstatusisdeliveredorreceived.customer: the customer and delivery address. Only for keys withorders:read_pii, and only until 90 days after the order closes;nullotherwise. See Customer details.placedAt,dispatchDueAt(dispatch is due by),cancelledAt,completedAtandupdatedAt.
Order status
status is one of ordered, accepted, pickup_scheduled, shipped, delivered, completed,
cancelled or failed. A new order is ordered until you accept it. Orders still at checkout are
never shown.
Line status
Each line has its own status, because the lines of one order can end differently:
status | Meaning |
|---|---|
pending | Not shipped yet. |
shipped | The courier has it. |
delivered | Delivered. A partly returned line stays delivered; see returnedQuantity. |
cancelled | Cancelled before shipping. |
rto | The courier is bringing it back to you, or did. |
return_in_progress | The customer asked to return it. |
returned | Every unit came back. |
A change of line status is sent as an order.item.updated event.
Accepting an order
POST /orders/{orderId}/accept moves an ordered order to accepted, as the portal's Accept button
does.
- Accepting an order that is already accepted, or further along, changes nothing and returns it, so retries are safe.
- A cancelled order answers
409 ORDER_NOT_ACCEPTABLE.
Cancelling
POST /orders/{orderId}/cancel cancels the lines in lineIds, or the whole order when you leave
lineIds out. It runs the same cancellation as the portal: the customer is refunded and told, and a
credit note is raised where an invoice exists.
{
"lineIds": ["5d2c…"],
"reason": "Out of stock"
}reasonis optional, 1 to 255 characters. The customer sees it.- Whole lines only: to send fewer units of a line, cancel the line. Naming every line still open cancels the whole order.
- Single lines can be cancelled until pickup is scheduled; the whole order until the courier collects
it. After that you get
409 ORDER_NOT_CANCELLABLE, with the reason inmessage. - A line id that is not on the order answers
422 UNKNOWN_LINE. - Safe to retry. Lines already cancelled are skipped; once nothing is left to do, the order is returned unchanged.
- The response is the order without
customer, even for a key withorders:read_pii. Read the order again to get it.
Self-ship: adding tracking
For a parcel you booked with your own courier and have handed over.
- Accept the order. Tracking can only be added to an
acceptedorder (409 ORDER_NOT_ACCEPTEDotherwise). - Pick the courier.
GET /courierslists the codes you can use. - Add the tracking with
POST /orders/{orderId}/shipment:
{
"courierCode": "DTDC",
"awbCode": "D12345678",
"packageWeight": 0.5,
"shipmentType": "Surface",
"estimatedDeliveryDate": "2026-12-08"
}This records the courier and tracking number, starts tracking and marks the order dispatched, exactly as the portal's self-ship form does.
awbCodeis the tracking number exactly as your courier issued it: 6 to 25 letters, digits or dashes.packageWeightis in kilograms.shipmentTypeisAirorSurface(defaultSurface).estimatedDeliveryDateis optional, aYYYY-MM-DDdate, today or later. It is shown to the customer.- Safe to retry. The first call answers
201. Sending the same courier and tracking number again answers200with the order. Different tracking answers409 SHIPMENT_EXISTS. - If the order is booked with a courier through Bhakti Baazar, you get
409 COURIER_BOOKING_EXISTS. Cancel that booking in the seller portal first. - Package photos can be added only in the seller portal.
Cash on delivery
A cash-on-delivery order also needs:
- Its invoice prepared first, with
POST /orders/{orderId}/invoiceor in the seller portal. Until then you get409 COD_INVOICE_REQUIRED; the order'sinvoicePreparedtells you whether it is done. "codCollectionConfirmed": true, to confirm your courier collects the COD amount and pays it to you."codAmount"equal to the order'scodAmount, in rupees.
Without the last two you get 400 COD_CONFIRMATION_REQUIRED.
Correcting tracking
PATCH /orders/{orderId}/shipment fixes a mistyped courier or tracking number. Send courierCode,
awbCode and a reason (kept on the audit trail), plus the COD fields for a cash-on-delivery order.
- Allowed until your courier's first pickup scan.
- Sending the tracking already on the order changes nothing.
- An order without self-ship tracking answers
409 NO_SELF_SHIP_SHIPMENT.
After dispatch
Tracking updates arrive as order.shipment.updated events,
delivery as order.delivered, and each line's changes as order.item.updated. Returns arrive as
order.return.requested and then order.return.updated for each later step. You can also read the
order again.
Returns
GET /returns lists the returns raised on your orders, oldest change first, and syncs with
updated_since and cursor like orders. GET /returns/{returnId} reads one. Both need
returns:read. Approving, rejecting and confirming receipt stay in the seller portal.
A return has:
orderIdandorderNumber, andstatus.received_by_sellermeans you confirmed the parcel is back,completedmeans refunded and closed, andqc_failedmeans the courier refused it at the customer's door.resolution:pickup(the goods come back to you) orrefund_only(the customer keeps them).exceptional: raised by our team after the return window, rather than by the customer.lines: the order line, your SKU, the quantity, the reason the customer chose, the line's status and its refund.refundAmount, in rupees, andpickup: the return courier, AWB, status, pickup date and the doorstep check (qcStatus).requestedAt,approvedAt,pickedUpAt,receivedAt,refundedAt,completedAtandupdatedAt.
The customer's free-text reason and photos are not included. A parcel the courier brought back
undelivered is not a return: see rto on the order.
A new courier scan on the return pickup does not yet move the return's updatedAt, so in an
updated_since sync the pickup's status can lag until the return itself changes.
Cash-on-delivery invoices
A cash-on-delivery order gets its tax invoice just before the parcel is handed over.
POST /orders/{orderId}/invoice prepares it, as the portal's Prepare COD invoice button does.
Call it once the order is accepted, then download the invoice (below) and pack it. The order comes
back with invoice filled in.
- Safe to retry. Calling it again, or for an order that already has an invoice, returns the same invoice.
- A prepaid order is invoiced when its payment is confirmed:
409 INVOICE_NOT_READYuntil then.
| Status | code | Why |
|---|---|---|
| 409 | ORDER_NOT_ACCEPTED | Accept the order first. |
| 409 | INVOICE_NOT_READY | The order is prepaid and its invoice is not created yet. |
| 409 | ORDER_NOT_INVOICEABLE | The COD order moved past accepted without an invoice, or was cancelled. |
| 409 | INVOICE_BLOCKED | Something on your account blocks the invoice, for example missing GST states. The message says what. |
Documents
Each document endpoint answers with a download link, valid for one hour:
| Endpoint | Scope | Returns |
|---|---|---|
GET /orders/{orderId}/invoice | documents:read | The tax invoice PDF, with invoiceNumber and invoiceDate |
GET /orders/{orderId}/label | labels:read | The shipping label PDF |
GET /orders/{orderId}/manifest | labels:read | The courier handover sheet for the order's parcel |
For example, the invoice:
{
"url": "https://…",
"expiresAt": "2026-12-04T11:30:00.000Z",
"invoiceNumber": "…",
"invoiceDate": "…"
}Anyone holding the link can read the file until it expires, so don't log or share it. Ask for a new link each time you need the file.
- Labels and manifests exist only for parcels booked through Bhakti Baazar's couriers. A self-ship
order answers
409 SELF_SHIP_DOCUMENT(print from your own courier), and an order with no booking409 NO_SHIPMENT. - The invoice answers
409 INVOICE_NOT_READYuntil it exists. - The documents print the customer's name and address, so they follow the
90-day rule: after it, they
answer
410 CUSTOMER_DATA_EXPIRED. - If the document cannot be made right now, you get
503 DOCUMENT_UNAVAILABLE. Retry later.