N1Developer docsv1

Orders · v1

MUTATION

updateOrder

Mock

Mock. 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.

Change an order’s due date or priority

Change the due date or priority. Owner, admin and supervisor. Cancelling an order and editing its lines are not in phase 1. ORDER_NOT_FOUND for an unknown id.

POST/graphqlapp audience

Who can call this. Owner, admin, supervisor.

Headers

  • AuthorizationstringRequired

    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…

  • Content-TypestringRequired

    Always application/json. Only POST is accepted.

    Example: application/json

  • Idempotency-KeystringRequired

    A key you generate once per user action (a UUID). Retrying with the same key never applies the change twice.

    Example: 0192f0c1-9b2a-7d40-8c3e-1f5a6b7c8d9e

  • X-Request-IdstringOptional

    Your 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

  • idID!Required

    The order id.

    Example: "0192f0c1-0000-7000-8000-000000d00003"

  • inputOrderUpdateInput!Required

    The changes.

    Example: {"dueDate":"2026-10-20","priority":"URGENT"}

    Show children

Returns

  • updateOrderOrder!Required

    Change the due date or priority. Owner, admin and supervisor. Cancelling an order and editing its lines are not in phase 1. ORDER_NOT_FOUND for an unknown id.

    Show children
    • createdAtString!Required

      UTC time the order was entered.

    • customerIdID!Required

      The customer (see customer).

    • customerNameString!Required

      The customer’s name, so a list needs no second call.

    • dueDateString!Required

      Promised delivery date, YYYY-MM-DD in the shop’s timezone.

      Example: "2026-10-20"

    • idID!Required

      Stable id (UUIDv7).

      Example: "0192f0c1-0000-7000-8000-000000d00003"

    • lines[OrderLine!]!Required

      The parts ordered, in line order.

      Show children
      • drawingRefStringOptional

        The customer’s drawing reference. The drawing file itself comes with N1C-049.

      • idID!Required

        Stable id (UUIDv7).

      • jobCardIdIDOptional

        The job card made for this line (open it with jobCard).

      • lineNoInt!Required

        Position on the order, from 1.

      • materialStringOptional

        Material to use.

      • partString!Required

        Part name or number.

      • quantityInt!Required

        Pieces ordered.

    • poNumberString!Required

      The customer’s PO number.

      Example: "PO-2026-0003"

    • priorityOrderPriority!Required

      How urgently to take it.

      Example: "URGENT"

      • HIGHAhead of normal orders.
      • LOWFill gaps in the schedule.
      • NORMALThe default.
      • URGENTDrop other work for it.
    • quoteIdIDOptional

      The quote this order was converted from, if any (see quote).

    • statusOrderStatus!Required

      Worked out from the job cards.

      Example: "COMPLETED"

      • 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.
    • updatedAtString!Required

      UTC time of the last change.

      Example: "2026-10-12T04:30:00.000Z"

Errors

CodeHTTPWhen
ORDER_NOT_FOUND404The id is unknown in this shop (another shop's ids answer the same).
VALIDATION_FAILED400Input failed Zod or route schema validation. details lists each field path and problem.
FORBIDDEN403Signed 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.

Search documentation

Search operations, types and errors from the generated contract.