Search Documentation

Search API endpoints, webhooks, tools, and guides

On this page6 sections
Is this helpful?
Quick Actions
Download OpenAPI.json
POST/api/invoices/submit-invoiceInvoicesPermission: invoice.create

Submit Invoice

Validates and persists one POS invoice atomically with tracked inventory deduction (`INVOICE_SALE`). Recomputes item pricing, promotions, totals, outlet, and actor server-side, and guarantees idempotency via `IdempotencyKey` (`SO-<OUTLET>.<YY>.<MM>.<SEQUENCE>`).

Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).

Outlet Scope Enforcement: Results and mutations are automatically scoped to the actor's accessible outlets when the invoice module restriction applies.

Request

Provide the following fields in the request payload.

Body application/json
Invoiceobjectrequired

Invoice parameter.

Invoice.IdempotencyKeystring (uuid)optional

Idempotency Key parameter.

Invoice.idempotencyKeystring (uuid)optional

idempotency Key parameter.

Invoice.IDstringoptional

ID parameter.

Invoice.InvoiceNumberstringrequired

Invoice Number parameter.

Invoice.Rawdatestring | string (date-time)optional

Rawdate parameter.

Invoice.Fulldatestringoptional

Fulldate parameter.

Invoice.Itemsarray<object>required

Items parameter.

Invoice.Outletobject | nulloptional

Outlet parameter.

Invoice.Totalnumber | nulloptional

Total parameter.

Invoice.Paymentsarray<object | null>optional

Payments parameter.

Invoice.Totalsarray<object | null>optional

Totals parameter.

Invoice.Changenumber | nulloptional

Change parameter.

Invoice.Cashierstringoptional

Cashier parameter.

Invoice.Notestringoptional

Note parameter.

Invoice.Memberobject | nulloptional

Member parameter.

Invoice.CreatedByIDstringoptional

Created By ID parameter.

Invoice.CreatedByNamestringoptional

Created By Name parameter.

Responses

Select a status code to inspect schema.

OK — Invoice persisted (or idempotent retry matched existing invoice).application/json
successenum('true')

Success (true).

messagestring

Message.

dataobject | null

Response payload or null.

POST/api/invoices/submit-invoice
curl -X POST "https://api.invoger.com/api/invoices/submit-invoice" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{ "Invoice": { "IdempotencyKey": "a7c28e4b-5f3b-4c2d-9f41-8f8b2d5a0011", "InvoiceNumber": "SO-01.26.11.0042", "Fulldate": "26/11/2026 14:28:12", "Outlet": { "id": "o1a2b3c4-d5e6-7f8a-9b0c-1d2e3f4a5b6c", "code": "01", "name": "Outlet Senopati" }, "Items": [ { "productId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "variantId": "var_1", "quantity": 2, "unitPrice": 25000 } ], "Payments": [ { "method": "CASH", "amount": 50000 } ] } }'
Interactive playground

Response

application/json
{
  "success": true,
  "message": "Invoice saved successfully",
  "data": {
    "ID": "inv_41029412",
    "InvoiceNumber": "SO-01.26.11.0042",
    "Total": 50000,
    "Duplicate": false
  }
}