N1Developer docsv1

Job cards · v1

QUERY

jobCards

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.

The shop’s job cards, paged, filterable and searchable

The shop’s job cards, paged. Search matches PO number, customer, part and QR value. Owner, admin, accountant, supervisor and QC. Operators use myJobs.

POST/graphqlapp audience

Who can call this. Owner, admin, accountant, supervisor, QC.

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

  • 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

  • afterStringOptional

    endCursor of the previous page.

  • beforeStringOptional

    startCursor of the next page, when paging backwards.

  • filterJobCardFilterOptional

    Narrow by status, order, operator or machine.

    Show children
    • machineIdIDOptional

      Only cards with a step on this machine.

    • operatorIdIDOptional

      Only cards with a step assigned to this operator.

    • orderIdIDOptional

      Only this order’s cards.

    • statusJobCardStatusOptional

      Only cards in this state.

  • firstIntOptional

    Page size, 1–100 (default 20).

    Example: 3

  • lastIntOptional

    Page size when paging backwards, 1–100.

  • searchStringOptional

    Free text, 1–100 characters.

  • sortJobCardSortOptional

    Order (default: due date, soonest first).

    Show children

Returns

  • jobCardsJobCardConnection!Required

    The shop’s job cards, paged. Search matches PO number, customer, part and QR value. Owner, admin, accountant, supervisor and QC. Operators use myJobs.

    Show children
    • edges[JobCardEdge!]!Required

      The rows on this page, in order.

      Example: [{"cursor":"WyIyMDI2LTA5LTMwIiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDIwMDBiIl0","node":{"id":"0192f0c1-0000-7000-8000-000000d2000b","qrValue":"JC-00001","poNumber":"PO-2026-0001","customerName":"Alpha Auto Components 1","part":"Bush 25x30","quantity":40,"dueDate":"2026-09-30","status":"IN_PROGRESS","lastActivityAt":"2026-10-12T00:30:00.000Z"}},{"cursor":"WyIyMDI2LTA5LTMwIiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDIwMDBjIl0","node":{"id":"0192f0c1-0000-7000-8000-000000d2000c","qrValue":"JC-00002","poNumber":"PO-2026-0001","customerName":"Alpha Auto Components 1","part":"Pulley 90","quantity":60,"dueDate":"2026-09-30","status":"IN_PROGRESS","lastActivityAt":"2026-10-10T21:30:00.000Z"}},{"cursor":"WyIyMDI2LTEwLTAyIiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDIwMDE1Il0","node":{"id":"0192f0c1-0000-7000-8000-000000d20015","qrValue":"JC-00003","poNumber":"PO-2026-0002","customerName":"Bharat Hydraulics 2","part":"Pulley 90","quantity":60,"dueDate":"2026-10-02","status":"IN_PROGRESS","lastActivityAt":"2026-10-10T20:30:00.000Z"}}]

      Show children
      • cursorString!Required

        Opaque position of this row in the list.

        Example: "WyIyMDI2LTA5LTMwIiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDIwMDBiIl0"

      • nodeJobCard!Required

        The JobCard.

        Example: {"id":"0192f0c1-0000-7000-8000-000000d2000b","qrValue":"JC-00001","poNumber":"PO-2026-0001","customerName":"Alpha Auto Components 1","part":"Bush 25x30","quantity":40,"dueDate":"2026-09-30","status":"IN_PROGRESS","lastActivityAt":"2026-10-12T00:30:00.000Z"}

        Show children
        • createdAtString!Required

          UTC time the card was made.

        • customerNameString!Required

          The customer’s name.

          Example: "Alpha Auto Components 1"

        • dueDateString!Required

          The order’s promised date, YYYY-MM-DD in the shop’s timezone.

          Example: "2026-09-30"

        • idID!Required

          Stable id (UUIDv7).

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

        • lastActivityAtString!Required

          UTC time anything on the card last moved. “Stuck” is measured from here.

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

        • operations[JobOperation!]!Required

          The steps, in order.

          Show children
          • endedAtStringOptional

            UTC time the step finished.

          • idID!Required

            Stable id (UUIDv7).

          • machineIdIDOptional

            The machine it runs on, if one is assigned.

          • machineNameStringOptional

            That machine’s name.

          • nameString!Required

            What the step does.

          • operatorIdIDOptional

            The operator it is assigned to, if any.

          • operatorNameStringOptional

            That operator’s name.

          • seqInt!Required

            Order of the step, from 1.

          • startedAtStringOptional

            UTC time the step started.

          • statusJobOperationStatus!Required

            Where the step is.

            • DONEFinished.
            • PENDINGNot started.
            • RUNNINGBeing worked on now.
        • orderIdID!Required

          The order (see order).

        • orderLineIdID!Required

          The order line it was made for.

        • partString!Required

          Part name or number.

          Example: "Bush 25x30"

        • poNumberString!Required

          The order’s PO number.

          Example: "PO-2026-0001"

        • qrValueString!Required

          The text printed as a QR code on the card. Unique in the shop; jobCardByQr resolves it.

          Example: "JC-00001"

        • quantityInt!Required

          Pieces to make.

          Example: 40

        • statusJobCardStatus!Required

          Worked out from the operations.

          Example: "IN_PROGRESS"

          • DONEEvery operation is done.
          • IN_PROGRESSAt least one operation has started and not every one is done.
          • QUEUEDNo operation has started.
    • pageInfoPageInfo!Required

      Whether more pages exist, and the cursors to reach them.

      Example: {"hasNextPage":true,"hasPreviousPage":false,"endCursor":"WyIyMDI2LTEwLTAyIiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDIwMDE1Il0"}

      Show children
      • endCursorStringOptional

        Cursor of the last row; pass it as after to get the next page. Null when the page is empty.

        Example: "WyIyMDI2LTEwLTAyIiwiMDE5MmYwYzEtMDAwMC03MDAwLTgwMDAtMDAwMDAwZDIwMDE1Il0"

      • hasNextPageBoolean!Required

        Whether another page follows this one.

        Example: true

      • hasPreviousPageBoolean!Required

        Whether another page comes before this one.

        Example: false

      • startCursorStringOptional

        Cursor of the first row; pass it as before to page backwards. Null when the page is empty.

    • totalCountInt!Required

      All rows matching the filter and search, not just this page.

      Example: 48

Errors

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