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): matchskuagainst the shipment's real line items and assign the annotation there, or, if nothing matches, to the wrong-bucket line item automatically.skuis 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_idmust 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 forunidentified_product: the operator scanned a sku that matched nothing on the manifest, which is the same off-manifest judgment call as a pipeline-flaggedwrong_product— there's no separate "reassign to a real product" step needed here, since that's justassignwith a matching sku.skuis optional and, when present (the value that was entered and didn't match), recorded on the issue (metadata.entered_sku) for audit; a pipeline-detectedwrong_productissue never sends one.correct_product(wrong_product only, from open → false_positive): the wrong_product classification itself was wrong — matchskuagainst a real line item and assign there instead (400 if it doesn't match anything — no wrong-bucket fallback here). Sameannotation_idfailsafe askeep_in_order. Not offered forunidentified_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 tokeep_in_order— the off-manifest product is being physically taken off the shipment rather than kept on record. Sameannotation_idfailsafe and optionalskuaskeep_in_order, and valid forunidentified_productfor the same reason. Typically shown instead ofkeep_in_orderon outbound shipments, whilecorrect_productremains available alongside it onwrong_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'smetadata.removed_annotationslists 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'smetadata.cancelled_unit_idslists which units were cancelled, and every other still-open issue on those units' sessions is also auto-resolved, same asremove_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 — matchtarget_skuagainst a real line item and reassign that one annotation there (400 if it doesn't match). Unlikeremove_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
- 200
- 400
- 401
- 403
- 404
- 500
Issue resolved successfully
Bad Request. The request was invalid or cannot be otherwise served.
Unauthorized. User is not authenticated or session is invalid.
Forbidden. User does not have the required permissions.
Resource not found
Internal Server Error