Skip to main content

Resolve Issue by ID

PATCH 

/v1/api/quality/inspection/shipment-issue/:issue_id/resolve

Resolves one issue via a keyword action rather than raw JSON traversal of the issue's internal mismatch/annotation data. Each action applies to exactly one issue_type and one set of origin statuses; calling an action against the wrong issue_type or status returns 400.

Covers unidentified_product, wrong_product, overage, and shortage issues. damage/wrong_load/no_identifiers issues are unaffected — use PUT /shipment-issue/unit/{unit_session_id} for those.

Actions:

  • assign (unidentified_product, from open/false_positive → resolved): match sku against the shipment's real line items and assign the annotation there, or, if nothing matches, to the wrong-bucket line item automatically. sku is always recorded on the issue (metadata.entered_sku) even on a no-match fallback.
  • invalid (unidentified_product, from open → false_positive): the detection wasn't a product at all. No count was ever taken, so nothing is decremented. On pick-pack/ multi-layer stations this also deletes the corresponding captured image (one annotation per image on these station types); on a full-unit station nothing else is touched — no evidence existed to remove there beyond the issue itself.
  • keep_in_order (wrong_product OR unidentified_product, from open → resolved): keep the detected off-manifest product on the order for auditing. annotation_id must match the annotation already on the issue (400 if not) — a failsafe against acting on stale/mismatched issue data, not needed to locate anything. Also valid for unidentified_product: the operator scanned a sku that matched nothing on the manifest, which is the same off-manifest judgment call as a pipeline-flagged wrong_product — there's no separate "reassign to a real product" step needed here, since that's just assign with a matching sku. sku is optional and, when present (the value that was entered and didn't match), recorded on the issue (metadata.entered_sku) for audit; a pipeline-detected wrong_product issue never sends one.
  • correct_product (wrong_product only, from open → false_positive): the wrong_product classification itself was wrong — match sku against a real line item and assign there instead (400 if it doesn't match anything — no wrong-bucket fallback here). Same annotation_id failsafe as keep_in_order. Not offered for unidentified_product — there's nothing to "correct back to," since the operator already knows the sku they scanned doesn't match anything.
  • remove_product (wrong_product OR unidentified_product, from open → resolved): the outbound counterpart to keep_in_order — the off-manifest product is being physically taken off the shipment rather than kept on record. Same annotation_id failsafe and optional sku as keep_in_order, and valid for unidentified_product for the same reason. Typically shown instead of keep_in_order on outbound shipments, while correct_product remains available alongside it on wrong_product. Behavior differs by station: on pick-pack/multi-layer (one annotation per captured image) this deletes just that one image. On a true full-unit station (no single annotation to delete) it instead soft-cancels the entire unit — the unit is removed from the active list and every other still-open issue on that same unit session is also auto-resolved, since nothing is left to resolve them against.
  • remove_extra (overage, from open → resolved): the detected identity was correct; the extra unit(s) were physically removed. Takes no fields — resolves the entire current excess in one call (e.g. 3 extra units removed in a single request), not one call per unit. Behavior differs by station: on pick-pack/multi-layer (one annotation per captured image) this removes just the excess annotations and deletes their images — the returned issue's metadata.removed_annotations lists each as {annotation_id, unit_id, file_name}. On a true full-unit station a unit can't be partially removed the way one pick-pack image can, so this instead soft-cancels the whole unit(s) that pushed the count over expected, newest first, until the count is back at/under expected — the returned issue's metadata.cancelled_unit_ids lists which units were cancelled, and every other still-open issue on those units' sessions is also auto-resolved, same as remove_product's full-unit cascade. Any portion of the excess backed by a manual count override rather than a real detection (neither an annotation nor a unit to remove) is decremented directly.
  • reassign (overage, from open → false_positive): one specific detected unit was actually a different product — match target_sku against a real line item and reassign that one annotation there (400 if it doesn't match). Unlike remove_extra, this always targets exactly one annotation per call.
  • missing_added (shortage, from open → resolved): the expected count was right; the missing product was found and added (no request beyond the action itself).
  • wrong_counting (shortage, from open → false_positive): the expected count itself was wrong — push a corrected count directly (no backing detection).

Every sku/target_sku field is matched against the shipment's line items server-side — callers never resolve a line item themselves and send its id.

annotation_id (where required) is the target annotation's own id — it alone identifies which detected instance is meant, regardless of which unit/image it's on.

Auth Required

Required Permissions:

  • quality.inspection.shipment:execute ("Quality Inspection Shipment Execute")

Request​

Responses​

Issue resolved successfully