# Developers - [Seller API](/seller-api/llms-full.txt): Catalogue, stock, orders and webhooks - [Seller API](/seller-api.md): Connect your own website, ERP or scripts to your Bhakti Baazar seller account. - [Getting started](/seller-api/getting-started.md): Create an API key in the seller portal and make your first call. - [Keys and scopes](/seller-api/keys-and-scopes.md): What each scope allows, and how keys made by team members work. - [Errors and limits](/seller-api/errors-and-limits.md): The error body, the codes you can rely on, rate limits and request size limits. - [Idempotency and paging](/seller-api/idempotency-and-paging.md): Retry creates safely with Idempotency-Key, and sync lists with cursors and updated_since. - **Guides** - [Catalogue and stock](/seller-api/catalogue.md): Create products, keep stock and prices in sync, and avoid overwriting stock after an order. - [Orders and self-ship](/seller-api/orders.md): Read, accept and cancel orders, prepare COD invoices, download documents, and add tracking for parcels you ship with your own courier. - [Webhooks](/seller-api/webhooks.md): Get a signed HTTPS request when an order or product changes, and catch up on anything you missed. - [Verify webhooks](/seller-api/verify-webhooks.md): A dependency-free Node.js function that checks a webhook's signature and timestamp. - [Customer details](/seller-api/customer-details.md): Which scopes reach customer names, addresses and phone numbers, and how long they stay available. - [Postman collection](/seller-api/postman.md): Every Seller API endpoint as a ready-made Postman collection. - **Reference** - API reference - [Overview](/seller-api/reference.md): Every Seller API endpoint, generated from the API's OpenAPI document. - Account - [Check a key](/seller-api/reference/account/ping.md): Confirms the key works and lists the scopes it can use right now. - Reference data - [List a subcategory’s attributes](/seller-api/reference/reference-data/list-attribute-definitions.md): The attributes a product in this subcategory can have, which are required, and their allowed values. Products and variants are checked against this list. - [List your brands](/seller-api/reference/reference-data/list-brands.md): Brands are added and verified in the seller portal. A product needs one of these brandIds. - [List categories](/seller-api/reference/reference-data/list-categories.md): Every category and subcategory you can list products in. A product needs a subcategoryId. - Products - [Count products](/seller-api/reference/products/count-products.md): How many products (and variants) match a status, using the same rule as GET /products?status=. Deleted products are never counted. - [Create a product](/seller-api/reference/products/create-product.md): Creates a product with its variants. It starts as pending_review and goes on sale only after Bhakti Baazar approves it (and you publish it). Attributes are checked against the subcategory; image URLs are copied to our CDN first, and a URL we cannot use fails the request with nothing saved. - [Add a variant to a product](/seller-api/reference/products/create-variant.md) - [Get a product by your product code](/seller-api/reference/products/get-product-by-code.md): Matches ignoring letter case and surrounding spaces. - [Get a product](/seller-api/reference/products/get-product.md) - [List products](/seller-api/reference/products/list-products.md): Your products, oldest change first, so a sync can page through with cursor and come back later with updated_since. - [Update a product](/seller-api/reference/products/update-product.md): Changes only the fields you send. Category and brand are changed in the seller portal. As in the portal, editing an approved product does not send it back for review. - [Update a variant](/seller-api/reference/products/update-variant.md): Changes only the fields you send. Set stock with PUT /inventory. - Stock and prices - [Set stock](/seller-api/reference/stock-and-prices/update-inventory.md): Sets each variant's stock to an absolute number. Up to 100 lines. Each line succeeds or fails on its own, so the response is 200 even when some lines fail: check status on every line. Stock is reduced the moment an order is confirmed; send expectedStock so a stock count taken before an order came in cannot overwrite it. - [Set prices](/seller-api/reference/stock-and-prices/update-prices.md): Sets each variant's selling price and MRP. The discount shown to shoppers is worked out from them. Up to 100 lines. Each line succeeds or fails on its own, so the response is 200 even when some lines fail: check status on every line. - Orders - [Accept an order](/seller-api/reference/orders/accept-order.md): 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. - [Cancel an order or some of its lines](/seller-api/reference/orders/cancel-order.md): Cancels the lines in lineIds, or the whole order when it is left out, through the same cancellation as the portal: the customer is refunded and told, and a credit note is raised where an invoice exists. Single lines can be cancelled until pickup is scheduled; the whole order until the courier collects it. Later answers 409 ORDER_NOT_CANCELLABLE. Lines already cancelled are skipped, so retries are safe: once nothing is left to do the order is returned unchanged. - [Get an order](/seller-api/reference/orders/get-order.md) - [List orders](/seller-api/reference/orders/list-orders.md): Your orders, oldest change first, so a sync can page through with cursor and come back later with updated_since. A change to an order, one of its lines, its shipment (courier scans included) or one of its returns moves it. The customer’s name, phone number and address (customer) come only with the orders:read_pii scope, and only until 90 days after the order closes. - [Prepare the invoice for a cash-on-delivery order](/seller-api/reference/orders/prepare-invoice.md): A cash-on-delivery order gets its tax invoice just before the parcel is handed over, as the portal’s “Prepare COD invoice” button does. Call this once the order is accepted, then print the invoice (GET /orders/{orderId}/invoice) and pack it. The order comes back with invoice filled in. Calling it again returns the same invoice, so retries are safe; so does calling it for an order that already has one. A prepaid order is invoiced when its payment is confirmed: 409 INVOICE_NOT_READY until then. 409 ORDER_NOT_ACCEPTED before the order is accepted, and 409 ORDER_NOT_INVOICEABLE once a COD order has moved past accepted without an invoice, or was cancelled. - Fulfilment - [Correct self-ship tracking](/seller-api/reference/fulfilment/correct-shipment.md): Fixes a mistyped courier or tracking number. Allowed until your courier’s first pickup scan. Sending the tracking already on the order changes nothing. - [Add self-ship tracking](/seller-api/reference/fulfilment/create-shipment.md): For a parcel you booked with your own courier and have handed over: records the courier and tracking number, starts tracking, and marks the order dispatched, exactly as the portal’s self-ship form does. The order must be accepted. Safe to retry: the same courier and tracking number again returns the order with 200. Different tracking answers 409 SHIPMENT_EXISTS; correct it with PATCH. Cash on delivery also needs the COD invoice prepared in the seller portal (409 COD_INVOICE_REQUIRED), codCollectionConfirmed: true and the exact codAmount. - [List self-ship couriers](/seller-api/reference/fulfilment/list-couriers.md): The couriers you can name when you add your own tracking. - Documents - [Download the tax invoice](/seller-api/reference/documents/get-order-invoice.md): A link to the invoice PDF, valid for an hour. The PDF shows the customer’s name and address, so this works only until 90 days after the order closes (410 CUSTOMER_DATA_EXPIRED). 409 INVOICE_NOT_READY until the invoice exists. - [Download the shipping label](/seller-api/reference/documents/get-order-label.md): For a parcel booked through Bhakti Baazar’s couriers: a link to the label PDF, valid for an hour. Self-ship orders answer 409 SELF_SHIP_DOCUMENT (print from your courier); an order with no booking 409 NO_SHIPMENT. The same 90-day rule as the invoice applies. - [Download the manifest](/seller-api/reference/documents/get-order-manifest.md): The courier handover sheet for this order’s parcel, as for the label: a link valid for an hour, Bhakti Baazar bookings only. - Returns - [Get a return](/seller-api/reference/returns/get-return.md) - [List returns](/seller-api/reference/returns/list-returns.md): Returns on your orders, oldest change first; page with cursor and come back with updated_since. Approving, rejecting and confirming receipt stay in the seller portal. A parcel the courier sent back undelivered is not a return: see rto on the order. - Webhooks - [Add a webhook endpoint](/seller-api/reference/webhooks/create-webhook-endpoint.md): Up to five per seller. The signing secret is in this response only. Each request is a POST with a JSON body { id, type, created, data }, signed the Standard Webhooks way (https://www.standardwebhooks.com): headers webhook-id (the event id, the same on every retry), webhook-timestamp and webhook-signature. Any 2xx answer counts as received. Others are retried with growing waits for 24 hours; an endpoint that fails every attempt for 24 hours is switched off. Delivery is at least once and not in order: deduplicate on webhook-id, and read GET /orders/:id for the current state. - [Delete a webhook endpoint](/seller-api/reference/webhooks/delete-webhook-endpoint.md) - [Get a webhook endpoint](/seller-api/reference/webhooks/get-webhook-endpoint.md) - [List events](/seller-api/reference/webhooks/list-events.md): Every event of the last 30 days, oldest first, whether or not a webhook received it: use it to catch up after downtime. The newest few seconds are held back so a page never skips one. - [List webhook endpoints](/seller-api/reference/webhooks/list-webhook-endpoints.md) - [Replace the signing secret](/seller-api/reference/webhooks/rotate-webhook-secret.md): The new secret is in this response only. For 24 hours requests carry signatures from both secrets, so you can switch over without missing one. - [Send a test event](/seller-api/reference/webhooks/test-webhook-endpoint.md): Sends a signed webhook.test event now and reports how your endpoint answered. Nothing is retried or kept. - [Change a webhook endpoint](/seller-api/reference/webhooks/update-webhook-endpoint.md): Change its URL, events or description, or switch it off and on. Switching off ends waiting deliveries; events in between are not queued, so read them from GET /events.