Skip to Content
Bhakti BaazarDevelopers

Errors and limits

The error body, the codes you can rely on, rate limits and request size limits.

The error body

Every error from the Seller API has the same body:

{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "This API key does not have the \"orders:read\" scope.",
    "statusCode": 403,
    "requestId": "6f1c2d9e-…"
  }
}
FieldMeaning
codeA stable code for your program to act on.
messageText for people. It can change; don't parse it.
statusCodeThe HTTP status, repeated.
requestIdAlso sent as the X-Request-Id header on every response. Quote it if you contact support.
detailsOnly on some errors, such as validation errors: one entry per problem.

Errors with status 500 or above never include internal details. The message asks you to quote the request id.

Codes

Act on code, and fall back on the HTTP status for a code you don't know.

Any endpoint

StatuscodeMeaning
400VALIDATION_FAILEDThe request breaks a rule: an unknown field, a value of the wrong type, a missing required field, price above MRP and so on. details lists each problem.
400INVALID_JSONThe body is not valid JSON.
400INVALID_CURSORcursor is not a value from the previous page's nextCursor.
401UNAUTHORIZEDNo key, or the key is not valid, revoked or expired. See Keys and scopes.
403FORBIDDENThe key lacks the scope, or its creator or the seller account cannot use the API.
404NOT_FOUNDNo such endpoint, or no record with this id in your account.
413PAYLOAD_TOO_LARGEThe body is larger than 1 MB.
429TOO_MANY_REQUESTSOver a rate limit. Wait for the number of seconds in Retry-After.
500INTERNAL_SERVER_ERROROur fault. Retry later, and quote the requestId if it keeps happening.

Products, stock and prices

StatuscodeMeaning
400IDEMPOTENCY_KEY_REQUIREDA create was sent without an Idempotency-Key header.
400INVALID_IDEMPOTENCY_KEYThe Idempotency-Key is not 1 to 255 visible ASCII characters without spaces.
409IDEMPOTENCY_IN_PROGRESSA request with this Idempotency-Key is still running, or stopped before it finished.
422IDEMPOTENCY_KEY_REUSEDThis Idempotency-Key was already used with a different request.
422IMAGE_FETCH_FAILEDOne or more image URLs could not be used. Nothing was saved.
409AMBIGUOUS_SELLER_REFERENCEMore than one of your products has this product code. Use the product id.

PUT /inventory and PUT /prices report problems per line instead, in each line's error.code: NOT_FOUND, AMBIGUOUS_SELLER_SKU, DUPLICATE_LINE, STALE_STOCK, STOCK_MANAGED_EXTERNALLY, VALIDATION_FAILED or INTERNAL_ERROR (retry that line). See Catalogue and stock.

Orders and self-ship

StatuscodeMeaning
409ORDER_NOT_ACCEPTABLEThe order cannot be accepted, for example because it was cancelled.
409ORDER_NOT_ACCEPTEDAccept the order before adding tracking or preparing its invoice.
409ORDER_NOT_SHIPPABLEThe order is in a status that cannot be shipped.
409ORDER_NOT_CANCELLABLEThe order or line can no longer be cancelled, for example because pickup is scheduled. message says why.
422UNKNOWN_LINEA lineIds entry is not a line of this order.
409INVOICE_NOT_READYThe invoice does not exist yet: a prepaid order before its payment is confirmed, or a COD order before you prepare it.
409ORDER_NOT_INVOICEABLEA COD order moved past accepted without an invoice, or was cancelled.
409INVOICE_BLOCKEDSomething on your account blocks the invoice, such as missing GST states. message says what.
400UNKNOWN_COURIERcourierCode is not one from GET /couriers.
409COD_INVOICE_REQUIREDA cash-on-delivery order needs its invoice prepared first, with POST /orders/{orderId}/invoice or in the seller portal.
400COD_CONFIRMATION_REQUIREDCash on delivery: send codCollectionConfirmed: true and codAmount equal to the order's codAmount.
409COURIER_BOOKING_EXISTSThe order is booked with a courier through Bhakti Baazar. Cancel that booking in the seller portal first.
409SHIPMENT_EXISTSThe order already has different tracking. Correct it with PATCH.
409NO_SELF_SHIP_SHIPMENTThere is no self-ship tracking to correct.

Documents and customer details

StatuscodeMeaning
410CUSTOMER_DATA_EXPIREDThe order closed more than 90 days ago, so its documents are no longer available through the API. See Customer details.
409SELF_SHIP_DOCUMENTLabels and manifests exist only for parcels booked through Bhakti Baazar. Print yours from your courier.
409NO_SHIPMENTNo parcel is booked through Bhakti Baazar for this order yet.
503DOCUMENT_UNAVAILABLEThe document could not be made right now. Retry later.

Webhooks

StatuscodeMeaning
400INVALID_WEBHOOK_URLThe URL is not a public https:// address on the standard port.
409WEBHOOK_ENDPOINT_LIMITYou already have 5 endpoints. Delete one first.

Some write requests pass through the same checks the seller portal uses, so you may also see other codes from those checks. Their message explains them, and the status tells you whether to fix the request (4xx) or retry (5xx).

Strict requests

  • Unknown fields are refused. A body or query field that the endpoint does not list gets 400 VALIDATION_FAILED, with one details line per field, such as variants.0.sku is not a field of this request. Check the field names in the API reference.
  • Values are never converted. Send numbers as JSON numbers and booleans as true/false. "stock": "5" is refused.

Rate limits

LimitRequests per minute
Per key120
Per seller, all keys together300
Per partner, all keys with the same partner label together3,000

The partner limit applies only to keys created with a partner label (an ERP or order-management system such as Unicommerce; see Keys and scopes). It is shared by every seller using that partner. A request refused by its key or seller limit does not count towards the partner limit.

The limits count requests in fixed one-minute windows. Over a limit you get 429 TOO_MANY_REQUESTS with a Retry-After header: the number of seconds to wait. The message names the limit. These numbers may be adjusted after the pilot.

To stay under them, use webhooks or updated_since instead of re-reading everything, and send stock and price changes in batches.

Size limits

LimitValue
Request body1 MB
Lines in one PUT /inventory or PUT /prices100
Variants in one POST /products50
Images per product (thumbnail and gallery)10
Images per variant6
Page size (limit)1 to 100, default 50
SKUs in one GET /products?sku=50
Line ids in one GET /orders?line_id=100
Lines in one POST /orders/{orderId}/cancel100
Webhook endpoints per seller5

On this page