Review a quality check

View as Markdown

Rules on the products a production partner photographed. Find tickets waiting for you with list_qc_tickets?needs_your_action=true or the qc_ticket.needs_your_action webhook, and look at each product's photos before deciding. Accepting every product approves the ticket and lets the order ship; a refusal goes to 3DAPI, which rules on it.

What you need

  • ticket_idstringRequired

    The quality check to rule on (qct_...).

  • verdictsarray of objectRequired

    One verdict per product in review: { "item": "qci_...", "verdict": "accept" }, or { "item": "qci_...", "verdict": "refuse", "reason": "...", "photos": ["qcp_..."] } pointing at the photos that show the problem.

Step 1: Get a QC ticket

GET/v2/qc-tickets/{id}

Read the ticket: it is waiting for you when needs_your_action is true. The products to rule on are the items with status: in_review, each with its photos.

Parameters
{
  "path id": "$inputs.ticket_id"
}

Succeeds when:

  • $statusCode == 200
  • $response.body#/needs_your_action == true

Keeps for the next steps:

  • items: $response.body#/items
  • status: $response.body#/status

Step 2: Review a quality check

POST/v2/qc-tickets/{id}/review

Send every verdict at once: all are recorded or none is. not_awaiting_review (409) means the ticket or a product is no longer in review; photo_not_on_item (422) means a refusal points at a photo of another product or round.

Parameters
{
  "path id": "$inputs.ticket_id"
}
Request body
{
  "items": "$inputs.verdicts"
}

Succeeds when:

  • $statusCode == 200

Otherwise:

  • not_awaiting_review: stop the workflow when $statusCode == 409.
  • photo_not_on_item: stop the workflow when $statusCode == 422.

Keeps for the next steps:

  • status: $response.body#/status
  • blocks_shipping: $response.body#/blocks_shipping

As a workflow file

The workflow returns:

  • status: $steps.submit_review.outputs.status

Values starting with $ are filled in as you go: $inputs.x is something you provide, $steps.s.outputs.o is a value an earlier step returned, and $response.body#/path a field of this response.

This recipe is the workflow review_quality_check of arazzo.json, an Arazzo 1.0 document that tools and AI agents can follow step by step.