Invoices · v1
sendInvoice
LiveEmail the invoice PDF to the customer
Email the invoice PDF to the customer (to defaults to the customer’s email) with cc; any status, again whenever needed. Logged in the customer’s activity. Owner, admin and accountant. At most 5 sends per invoice an hour and 200 recipients (to plus cc) per shop a day (RATE_LIMITED). INVOICE_NOT_FOUND for an unknown id; CUSTOMER_EMAIL_MISSING without to for a customer with no email.
/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/jsonA key you generate once per user action (a UUID). Retrying with the same key never applies the change twice.
Example:
0192f0c1-9b2a-7d40-8c3e-1f5a6b7c8d9eYour 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
Up to 5 copy recipients.
Example:
["accounts@demo-customer.example"]The invoice id.
Example:
"0192f0c1-0000-7000-8000-000000b10001"Recipient email. Default: the customer’s email.
Returns
Email the invoice PDF to the customer (
todefaults to the customer’s email) withcc; any status, again whenever needed. Logged in the customer’s activity. Owner, admin and accountant. At most 5 sends per invoice an hour and 200 recipients (to plus cc) per shop a day (RATE_LIMITED).INVOICE_NOT_FOUNDfor an unknown id;CUSTOMER_EMAIL_MISSINGwithouttofor a customer with no email.Show children
UTC time the invoice was made.
The customer (see
customer).The customer’s name, so a list needs no second call.
Paise discount asked for. The amount applied is
totals.discount.Payment due date, YYYY-MM-DD. Defaults to the issue date plus the customer’s payment terms.
The GST percentage asked for. The rate applied is
totals.gstRate.Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-000000b10001"Invoice date, YYYY-MM-DD.
The job card this was raised from (see
jobCard); null for a manual invoice.The work-order number (
WO-<n>, the order’snumber) this bills; null for a manual invoice.The priced operations, in the order given.
Show children
Integer paise: (quantity × minutesPerPiece + setupMinutes) × ratePerMinute, rounded half up to a whole paisa. Computed by the server.
Free text for the customer; empty when none was given.
Stable id (UUIDv7).
Machine minutes for one piece.
The operation priced, such as Turning.
Paise per machine minute.
One-off machine minutes to set up, charged once per line.
Printed on the invoice.
The invoice number. Assigned by the server; gaps never happen.
Example:
"DPW/26-27/0012"The order this bills (see
order).Part name or number.
Set once the invoice is paid; null before that.
Show 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.
The invoice as a PDF (TAX INVOICE), rendered by the server on first ask and again whenever what it prints changes. Download it with
POST /files/{id}/download-url. Ask on one invoice (invoice(id)or a mutation result): on a list it answersVALIDATION_FAILED.NOT_IMPLEMENTEDwhen Core has no files bucket.Paise: the amount on the customer’s PO, to compare against
totals.total.Pieces billed.
The quote this was priced from, if any (see
quote).The route card number printed on the job card.
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.
Show children
Central GST; 0 unless
supplyis INTRA.The discount applied. Never more than the subtotal.
Total GST: cgst + sgst + igst.
The GST percentage applied; 0 when
supplyis NONE.Integrated GST; 0 unless
supplyis INTER.State GST; 0 unless
supplyis INTRA.Sum of the line amounts.
Whether CGST + SGST or IGST applies.
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.
Taxable plus GST.
UTC time of the last change.
Errors
| Code | HTTP | When |
|---|---|---|
INVOICE_NOT_FOUND | 404 | The id is unknown in this shop (another shop's invoice answers the same). |
FORBIDDEN | 403 | Signed in, but the role or tenant does not allow the action. |
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.