Skip to Content
Bhakti BaazarDevelopers

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.

ScopeFor
orders:readReading orders
orders:writeAccepting orders and preparing cash-on-delivery invoices
orders:cancelCancelling orders or single lines
fulfillment:writeListing couriers, and adding or correcting self-ship tracking
documents:readDownloading the tax invoice
labels:readDownloading the shipping label and manifest
returns:readReading returns
orders:read_piiThe customer's name, phone number, email and address on orders

Reading orders

  • GET /orders lists your orders, oldest change first, and syncs with updated_since and cursor (see Idempotency and paging). Filter with:
    • status;
    • placed_from and placed_to, on placedAt;
    • 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 order id, not the order number.

An order has:

  • id, orderNumber, status, paymentMethod (cod or prepaid) and codAmount (the amount your courier collects; null for prepaid orders).
  • invoicePrepared: whether the tax invoice exists, and invoice (its number and date) once it does. A cash-on-delivery order needs it before you add self-ship tracking.
  • lines: one per item, with the line id, product and variant ids, our SKU, your SKU and product code as they were when ordered, name, attributes, quantity, unit price paid and MRP, and shippable. Ship only the lines marked shippable: true. A line that was cancelled or refunded is false. One shipment covers all shippable lines. Each line also has:
    • status: see Line status;
    • returnedQuantity: units returned and refunded so far;
    • hsnCode and gstRate (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 is null until the invoice exists. gstType and its parts are null when the invoice did not record the split (some older invoices).
  • shipment: courier, AWB, status and tracking link, or null. fulfilment is self_ship when you booked your own courier and bhakti_baazar when it was booked through us in the portal.
  • returns: the returns raised on the order (id, status, requestedAt), oldest first. Read one in full with GET /returns/{returnId}.
  • rto: set when the courier turned the parcel around (return to origin). Restock once its status is delivered or received.
  • customer: the customer and delivery address. Only for keys with orders:read_pii, and only until 90 days after the order closes; null otherwise. See Customer details.
  • placedAt, dispatchDueAt (dispatch is due by), cancelledAt, completedAt and updatedAt.

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:

statusMeaning
pendingNot shipped yet.
shippedThe courier has it.
deliveredDelivered. A partly returned line stays delivered; see returnedQuantity.
cancelledCancelled before shipping.
rtoThe courier is bringing it back to you, or did.
return_in_progressThe customer asked to return it.
returnedEvery 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"
}
  • reason is 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 in message.
  • 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 with orders: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.

  1. Accept the order. Tracking can only be added to an accepted order (409 ORDER_NOT_ACCEPTED otherwise).
  2. Pick the courier. GET /couriers lists the codes you can use.
  3. 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.

  • awbCode is the tracking number exactly as your courier issued it: 6 to 25 letters, digits or dashes.
  • packageWeight is in kilograms. shipmentType is Air or Surface (default Surface).
  • estimatedDeliveryDate is optional, a YYYY-MM-DD date, 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 answers 200 with the order. Different tracking answers 409 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:

  1. Its invoice prepared first, with POST /orders/{orderId}/invoice or in the seller portal. Until then you get 409 COD_INVOICE_REQUIRED; the order's invoicePrepared tells you whether it is done.
  2. "codCollectionConfirmed": true, to confirm your courier collects the COD amount and pays it to you.
  3. "codAmount" equal to the order's codAmount, 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:

  • orderId and orderNumber, and status. received_by_seller means you confirmed the parcel is back, completed means refunded and closed, and qc_failed means the courier refused it at the customer's door.
  • resolution: pickup (the goods come back to you) or refund_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, and pickup: the return courier, AWB, status, pickup date and the doorstep check (qcStatus).
  • requestedAt, approvedAt, pickedUpAt, receivedAt, refundedAt, completedAt and updatedAt.

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_READY until then.
StatuscodeWhy
409ORDER_NOT_ACCEPTEDAccept the order first.
409INVOICE_NOT_READYThe order is prepaid and its invoice is not created yet.
409ORDER_NOT_INVOICEABLEThe COD order moved past accepted without an invoice, or was cancelled.
409INVOICE_BLOCKEDSomething 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:

EndpointScopeReturns
GET /orders/{orderId}/invoicedocuments:readThe tax invoice PDF, with invoiceNumber and invoiceDate
GET /orders/{orderId}/labellabels:readThe shipping label PDF
GET /orders/{orderId}/manifestlabels:readThe 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 booking 409 NO_SHIPMENT.
  • The invoice answers 409 INVOICE_NOT_READY until 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.

On this page