N1Developer docsv1

QC · v1

MUTATION

attachQcReport

Live

attachQcReport

Append a report to an existing check without changing its recorded outcome. Owner, admin, supervisor, QC. Idempotent and audited.

POST/graphqlapp audience

Who can call this. Owner, admin, 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

  • 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

    QC record id.

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

  • Uploaded inspection report reference.

    Example: {"id":"0192f0c1-0000-7000-8000-000000ee0001","name":"synthetic-report.pdf","kind":null,"sizeBytes":1024}

    Show children
    • idID!Required

      File id.

    • kindStringOptional

      Category.

    • nameString!Required

      Filename.

    • sizeBytesFloat!Required

      Size in bytes.

Returns

  • attachQcReportQcRecord!Required

    Append a report to an existing check without changing its recorded outcome. Owner, admin, supervisor, QC. Idempotent and audited.

    Show children
    • idID!Required

      Stable id (UUIDv7).

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

    • inspectorStringOptional

      Inspector’s name.

    • jobCardIdID!Required

      The job card checked.

    • jobOperationIdIDOptional

      The step checked; null for a raw material check.

    • kindQcKind!Required

      What was checked.

      • MACHINEA finished operation.
      • RMThe raw material, before the first operation.
    • operationNameStringOptional

      What the step does; null for a raw material check.

    • qrValueString!Required

      The job card’s QR text.

    • recordedAtString!Required

      UTC time the check was recorded.

    • recordedByIdID!Required

      Who made the check (User.id).

    • recordedByNameString!Required

      That person’s name.

    • rejectedMaterialRejectedMaterialOptional

      Set on a raw material rejection.

      Show children
      • gradeString!Required

        Raw material grade.

      • heatNumberString!Required

        Heat number.

      • sizeString!Required

        Raw material size.

    • remarkStringOptional

      Inspector’s remark.

    • reportAppFileReferenceOptional

      The inspection report.

      Show children
      • idID!Required

        File id; obtain authorised download URL from files API.

      • kindStringOptional

        Document category.

      • nameString!Required

        Display filename.

      • sizeBytesFloat!Required

        Size in bytes, safe integer.

    • reports[AppFileReference!]!Required

      Latest 50 audited report attachments, newest first.

      Show children
      • idID!Required

        File id; obtain authorised download URL from files API.

      • kindStringOptional

        Document category.

      • nameString!Required

        Display filename.

      • sizeBytesFloat!Required

        Size in bytes, safe integer.

    • resultQcResult!Required

      The outcome.

      Example: "PASSED"

      • ACCEPTEDRaw material accepted.
      • FAILEDOperation failed.
      • PASSEDOperation passed.
      • REJECTEDRaw material rejected.
    • stageString!Required

      Label shown in the app: “Incoming inspection”, “In-process QC” or “Final QC”.

Errors

CodeHTTPWhen
QC_RECORD_NOT_FOUND404Attaching a report to an unknown or other-shop QC record.

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.