Orders · v1
createOrder
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.
Enter an order; each line gets a QUEUED job card
Enter an order and make a QUEUED job card for each line. Owner, admin and supervisor. CUSTOMER_NOT_FOUND for an unknown customer; VALIDATION_FAILED for an inactive one.
/graphqlapp audienceWho can call this. Owner, admin, 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 order.
Example:
{"customerId":"0192f0c1-0000-7000-8000-0000000c0002","poNumber":"PO-DEMO-5001","dueDate":"2026-11-15","priority":"HIGH","lines":[{"part":"Shaft 40x200","drawingRef":"DRG-5001A","quantity":120,"material":"EN8"},{"part":"Bush 25x30","quantity":300,"material":"Brass"}]}Show children
The customer.
Promised delivery date, YYYY-MM-DD.
The parts, 1–50 lines.
The customer’s PO number.
Default NORMAL.
Returns
Enter an order and make a QUEUED job card for each line. Owner, admin and supervisor.
CUSTOMER_NOT_FOUNDfor an unknown customer;VALIDATION_FAILEDfor an inactive one.Show children
UTC time the order was entered.
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"Promised delivery date, YYYY-MM-DD in the shop’s timezone.
Example:
"2026-11-15"Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-e00000000001"The parts ordered, in line order.
Example:
[{"id":"0192f0c1-0000-7000-8000-e00000000003","lineNo":1,"part":"Shaft 40x200","drawingRef":"DRG-5001A","quantity":120,"material":"EN8","jobCardId":"0192f0c1-0000-7000-8000-e00000000002"},{"id":"0192f0c1-0000-7000-8000-e00000000008","lineNo":2,"part":"Bush 25x30","drawingRef":null,"quantity":300,"material":"Brass","jobCardId":"0192f0c1-0000-7000-8000-e00000000007"}]Show children
The customer’s drawing reference. The drawing file itself comes with N1C-049.
Example:
"DRG-5001A"Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-e00000000003"The job card made for this line (open it with
jobCard).Example:
"0192f0c1-0000-7000-8000-e00000000002"Position on the order, from 1.
Example:
1Material to use.
Example:
"EN8"Part name or number.
Example:
"Shaft 40x200"Pieces ordered.
Example:
120
The customer’s PO number.
Example:
"PO-DEMO-5001"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:
"OPEN"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.
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). |
VALIDATION_FAILED | 400 | Input failed Zod or route schema validation. details lists each field path and problem. |
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.