Quotes · v1
createQuote
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.
Price a part and number the quote
Make a DRAFT quote and give it the next number in the quote series. Owner, admin, accountant and supervisor. CUSTOMER_NOT_FOUND for an unknown customer; VALIDATION_FAILED for an inactive one.
/graphqlapp audienceWho can call this. Owner, admin, accountant, supervisor.
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
The quote.
Example:
{"customerId":"0192f0c1-0000-7000-8000-0000000c0002","part":"Shaft 40x200","quantity":120,"material":"EN8","gstRate":18,"lines":[{"operation":"Turning","description":"Rough and finish","minutesPerPiece":4.5,"setupMinutes":30,"ratePerMinute":1200},{"operation":"Drilling","minutesPerPiece":1.5,"ratePerMinute":900}]}Show children
The customer.
GST percentage, 0–28. Ignored when the shop has no GSTIN.
The operations to price, 1–30 lines.
Material to use.
Part name or number.
Pieces quoted, 1–1,000,000.
Returns
Make a DRAFT quote and give it the next number in the quote series. Owner, admin, accountant and supervisor.
CUSTOMER_NOT_FOUNDfor an unknown customer;VALIDATION_FAILEDfor an inactive one.Show children
UTC time the quote was made.
Example:
"2026-10-12T04:30:00.000Z"The customer (see
customer).Example:
"0192f0c1-0000-7000-8000-0000000c0002"The customer’s name, so a list needs no second call.
Example:
"Bharat Hydraulics 2"The GST percentage asked for. The rate applied is
totals.gstRate.Example:
18Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-b00000000003"The priced operations, in the order given.
Example:
[{"id":"0192f0c1-0000-7000-8000-b00000000001","operation":"Turning","description":"Rough and finish","minutesPerPiece":4.5,"setupMinutes":30,"ratePerMinute":1200,"amount":684000},{"id":"0192f0c1-0000-7000-8000-b00000000002","operation":"Drilling","description":"","minutesPerPiece":1.5,"setupMinutes":0,"ratePerMinute":900,"amount":162000}]Show children
Integer paise: (quantity × minutesPerPiece + setupMinutes) × ratePerMinute, rounded half up to a whole paisa. Computed by the server.
Example:
684000Free text for the customer; empty when none was given.
Example:
"Rough and finish"Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-b00000000001"Machine minutes for one piece.
Example:
4.5The operation priced, such as Turning.
Example:
"Turning"Paise per machine minute.
Example:
1200One-off machine minutes to set up, charged once per line.
Example:
30
Material to use.
Example:
"EN8"The quote number, such as
QTN/26-27/0001. Assigned by the server.Example:
"QTN/26-27/0011"The order made from this quote; null until converted (see
order).Example:
nullPart name or number.
Example:
"Shaft 40x200"Pieces quoted.
Example:
120DRAFT or SENT. Whether it became an order is
orderId.Example:
"DRAFT"DRAFTBeing prepared; it can still be edited.SENTSent to the customer; no longer editable.
Subtotal, GST and total, all in paise, worked out by the server.
Example:
{"subtotal":846000,"discount":0,"taxable":846000,"gstRate":18,"supply":"INTER","cgst":0,"sgst":0,"igst":152280,"gst":152280,"total":998280}Show children
Central GST; 0 unless
supplyis INTRA.Example:
0The discount applied. Never more than the subtotal.
Example:
0Total GST: cgst + sgst + igst.
Example:
152280The GST percentage applied; 0 when
supplyis NONE.Example:
18Integrated GST; 0 unless
supplyis INTER.Example:
152280State GST; 0 unless
supplyis INTRA.Example:
0Sum of the line amounts.
Example:
846000Whether CGST + SGST or IGST applies.
Example:
"INTER"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:
846000Taxable plus GST.
Example:
998280
UTC time of the last change.
Example:
"2026-10-12T04:30:00.000Z"
Errors
| Code | HTTP | When |
|---|---|---|
CUSTOMER_NOT_FOUND | 404 | The id is unknown in this shop (another shop's ids answer 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.