Invoices · v1
invoice
MockMock. This operation is part of the approved contract but its module is not built yet. Run Core with N1_API_MODE=mock N1_DEV_AUTH=stub to get deterministic demo-shop data from it. The real server answers NOT_IMPLEMENTED until it ships; the schema and examples here will not change when it does.
Open one invoice with lines, totals and payment
One invoice by id. Owner, admin and accountant. INVOICE_NOT_FOUND if the id is not in this shop.
/graphqlapp audienceWho can call this. Owner, admin, accountant.
Headers
Bearer <token>, issued for this endpoint's audience. The token decides the shop and roles; nothing in the request body can change them.Example:
Bearer eyJhbGciOiJFZERTQSJ9…Always
application/json. Only POST is accepted.Example:
application/jsonYour id for this request (8–128 characters of A–Z a–z 0–9 . _ : -). Echoed back in the response header and in every error, so you can quote it when reporting a problem. Core makes one if you send none.
Example:
app-7f3c2a9e-checkout
Arguments
The invoice id.
Example:
"0192f0c1-0000-7000-8000-000000b10001"
Returns
One invoice by id. Owner, admin and accountant.
INVOICE_NOT_FOUNDif the id is not in this shop.Show children
UTC time the invoice was made.
Example:
"2026-10-09T05:00:00.000Z"The customer (see
customer).Example:
"0192f0c1-0000-7000-8000-0000000c0001"The customer’s name, so a list needs no second call.
Example:
"Alpha Auto Components 1"Paise discount asked for. The amount applied is
totals.discount.Example:
0Payment due date, YYYY-MM-DD. Defaults to the issue date plus the customer’s payment terms.
Example:
"2026-11-08"The GST percentage asked for. The rate applied is
totals.gstRate.Example:
18Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-000000b10001"Invoice date, YYYY-MM-DD.
Example:
"2026-10-09"The job card this was raised from (see
jobCard); null for a manual invoice.Example:
"0192f0c1-0000-7000-8000-000000d2000b"The priced operations, in the order given.
Example:
[{"id":"0192f0c1-0000-7000-8000-000000b2000b","operation":"Turning","description":"Bush 25x30","minutesPerPiece":1.5,"setupMinutes":20,"ratePerMinute":750,"amount":60000},{"id":"0192f0c1-0000-7000-8000-000000b2000c","operation":"Finishing","description":"","minutesPerPiece":0.5,"setupMinutes":0,"ratePerMinute":600,"amount":12000}]Show children
Integer paise: (quantity × minutesPerPiece + setupMinutes) × ratePerMinute, rounded half up to a whole paisa. Computed by the server.
Example:
60000Free text for the customer; empty when none was given.
Example:
"Bush 25x30"Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-000000b2000b"Machine minutes for one piece.
Example:
1.5The operation priced, such as Turning.
Example:
"Turning"Paise per machine minute.
Example:
750One-off machine minutes to set up, charged once per line.
Example:
20
Printed on the invoice.
Example:
nullThe invoice number. Assigned by the server; gaps never happen.
Example:
"DPW/26-27/0012"The order this bills (see
order).Example:
"0192f0c1-0000-7000-8000-000000d00001"Part name or number.
Example:
"Bush 25x30"Set once the invoice is paid; null before that.
Example:
nullShow children
The day the money arrived, YYYY-MM-DD.
Paise actually received: the invoice total less
tdsAmount.Paise the customer deducted as tax at source; 0 when none.
The income-tax section the deduction was made under, such as 194C.
Paise: the amount on the customer’s PO, to compare against
totals.total.Example:
nullPieces billed.
Example:
40The quote this was priced from, if any (see
quote).Example:
nullThe route card number printed on the job card.
Example:
"JC-00001"NEW, OVERDUE or PAID. Derived from
paymentanddueDate.Example:
"NEW"NEWIssued, not paid, and not yet past its due date.OVERDUENot paid and past its due date.PAIDA payment has been recorded.
Subtotal, GST and total, all in paise, worked out by the server.
Example:
{"subtotal":72000,"discount":0,"taxable":72000,"gstRate":18,"supply":"INTRA","cgst":6480,"sgst":6480,"igst":0,"gst":12960,"total":84960}Show children
Central GST; 0 unless
supplyis INTRA.Example:
6480The discount applied. Never more than the subtotal.
Example:
0Total GST: cgst + sgst + igst.
Example:
12960The GST percentage applied; 0 when
supplyis NONE.Example:
18Integrated GST; 0 unless
supplyis INTER.Example:
0State GST; 0 unless
supplyis INTRA.Example:
6480Sum of the line amounts.
Example:
72000Whether CGST + SGST or IGST applies.
Example:
"INTRA"INTERDifferent states: IGST.INTRAShop and customer are in the same state: CGST + SGST.NONEThe shop has no GSTIN, so no GST is charged.
Subtotal less discount.
Example:
72000Taxable plus GST.
Example:
84960
UTC time of the last change.
Example:
"2026-10-09T05:00:00.000Z"
Errors
| Code | HTTP | When |
|---|---|---|
INVOICE_NOT_FOUND | 404 | The id is unknown in this shop (another shop's invoice answers the same). |
Every error has the same body. See Errors.
Rate limit tier
Tier: per user. Over the limit you get RATE_LIMITED (HTTP 429) with a Retry-After header. See Response handling.