Orders · v1
orders
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.
The shop’s orders, paged, filterable and searchable
The shop’s orders, paged. Search matches PO number, customer name and part. Owner, admin, accountant and supervisor.
/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/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
endCursor of the previous page.
startCursor of the next page, when paging backwards.
Narrow by status, customer or due date.
Show children
Only this customer’s orders.
Due on or after this date, YYYY-MM-DD.
Due on or before this date, YYYY-MM-DD.
Only orders in this state.
Page size, 1–100 (default 20).
Example:
3Page size when paging backwards, 1–100.
Free text, 1–100 characters.
Order (default: due date, soonest first).
Show children
Ascending or descending.
What to order by.
Returns
The shop’s orders, paged. Search matches PO number, customer name and part. Owner, admin, accountant and supervisor.
Show children
The rows on this page, in order.
Example:
[{"cursor":"WyIyMDI2LTA5LTMwIiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDAwMDAxIl0","node":{"id":"0192f0c1-0000-7000-8000-000000d00001","poNumber":"PO-2026-0001","customerName":"Alpha Auto Components 1","status":"IN_PRODUCTION","priority":"HIGH","dueDate":"2026-09-30","lines":[{"lineNo":1,"part":"Bush 25x30","quantity":40},{"lineNo":2,"part":"Pulley 90","quantity":60}]}},{"cursor":"WyIyMDI2LTEwLTAyIiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDAwMDAyIl0","node":{"id":"0192f0c1-0000-7000-8000-000000d00002","poNumber":"PO-2026-0002","customerName":"Bharat Hydraulics 2","status":"IN_PRODUCTION","priority":"NORMAL","dueDate":"2026-10-02","lines":[{"lineNo":1,"part":"Pulley 90","quantity":60},{"lineNo":2,"part":"Spindle Nut","quantity":100},{"lineNo":3,"part":"Valve Body","quantity":140}]}},{"cursor":"WyIyMDI2LTEwLTA0IiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDAwMDAzIl0","node":{"id":"0192f0c1-0000-7000-8000-000000d00003","poNumber":"PO-2026-0003","customerName":"Cauvery Pumps 3","status":"COMPLETED","priority":"LOW","dueDate":"2026-10-04","lines":[{"lineNo":1,"part":"Spindle Nut","quantity":80}]}}]Show children
Opaque position of this row in the list.
Example:
"WyIyMDI2LTA5LTMwIiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDAwMDAxIl0"The Order.
Example:
{"id":"0192f0c1-0000-7000-8000-000000d00001","poNumber":"PO-2026-0001","customerName":"Alpha Auto Components 1","status":"IN_PRODUCTION","priority":"HIGH","dueDate":"2026-09-30","lines":[{"lineNo":1,"part":"Bush 25x30","quantity":40},{"lineNo":2,"part":"Pulley 90","quantity":60}]}Show children
UTC time the order was entered.
The customer (see
customer).The customer’s name, so a list needs no second call.
Example:
"Alpha Auto Components 1"Promised delivery date, YYYY-MM-DD in the shop’s timezone.
Example:
"2026-09-30"Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-000000d00001"The parts ordered, in line order.
Example:
[{"lineNo":1,"part":"Bush 25x30","quantity":40},{"lineNo":2,"part":"Pulley 90","quantity":60}]Show children
The customer’s drawing reference. The drawing file itself comes with N1C-049.
Stable id (UUIDv7).
The job card made for this line (open it with
jobCard).Position on the order, from 1.
Example:
1Material to use.
Part name or number.
Example:
"Bush 25x30"Pieces ordered.
Example:
40
The customer’s PO number.
Example:
"PO-2026-0001"How urgently to take it.
Example:
"HIGH"HIGHAhead of normal orders.LOWFill gaps in the schedule.NORMALThe default.URGENTDrop other work for it.
The quote this order was converted from, if any (see
quote).Worked out from the job cards.
Example:
"IN_PRODUCTION"COMPLETEDEvery job card is done.IN_PRODUCTIONAt least one job card has started and not every one is done.OPENAccepted; no job card has started.
UTC time of the last change.
Whether more pages exist, and the cursors to reach them.
Example:
{"hasNextPage":true,"hasPreviousPage":false,"endCursor":"WyIyMDI2LTEwLTA0IiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDAwMDAzIl0"}Show children
Cursor of the last row; pass it as
afterto get the next page. Null when the page is empty.Example:
"WyIyMDI2LTEwLTA0IiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDAwMDAzIl0"Whether another page follows this one.
Example:
trueWhether another page comes before this one.
Example:
falseCursor of the first row; pass it as
beforeto page backwards. Null when the page is empty.
All rows matching the filter and search, not just this page.
Example:
24
Errors
| Code | HTTP | When |
|---|---|---|
VALIDATION_FAILED | 400 | Input failed Zod or route schema validation. details lists each field path and problem. |
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.