Supercommerce API Docs
Vendor API

Invoice Module — Vendor

HTTP surface for a vendor to download and regenerate the GST tax invoice for their own sub-order.

HTTP surface for a vendor to download the invoice for one of their own sub-orders. Each vendor is the seller of record on its invoice (its own GSTIN), so a vendor only ever sees its own sub-order's invoice — never a sibling vendor's.

Source: api-modules/invoice/src/controllers/vendor-invoices.controller.ts.

Scoped to the active vendor (resolveActiveVendorId). A sub-order belonging to another vendor returns 404. Vendors may regenerate their own invoice — it re-renders against the same, immutable serial.


Conventions

Authentication

All endpoints require a Better-Auth vendor session. The sub-order (orderVendorId) must belong to the active vendor.

Response shape

Endpoints return raw application/pdf bytes (not the JSON envelope) with Content-Disposition: attachment. A sub-order whose parent order is still in pending_payment returns 409.


Endpoints

Download my sub-order's invoice

GET /vendor/orders/:orderVendorId/invoice

Returns the invoice PDF for the vendor's own sub-order. Filename: invoice-{serial}.pdf (e.g. invoice-INV-2526-000001.pdf).

Regenerate my sub-order's invoice

POST /vendor/orders/:orderVendorId/invoice/regenerate

Re-renders the invoice against its existing serial, overwrites the cached PDF, and returns the fresh PDF.

On this page