Resolve an inventory exception
POST
Closes an open inventory exception. Send applyMovement: true to post the missed stock movement now; otherwise it is acknowledged without moving stock. Safe against double movement: if the stock already moved or the document no longer exists, it closes without touching stock.
How to use it
- Find the exception in List inventory exceptions; check replayable before asking for a stock movement.
- Send applyMovement true to post the missed movement, or false after you fixed the cause elsewhere; add an optional note.
- Read outcome: APPLIED moved stock; ACKNOWLEDGED, ALREADY_MOVED and DOCUMENT_MISSING closed it without moving stock; REPLAY_FAILED leaves it open.
- applyMovement true on a non-replayable exception is rejected. Closed exceptions return ALREADY_CLOSED.
BearerAuthheader
AuthorizationBearer <JWT>id*stringID of the record (UUID).
Format
uuidapplication/json- body
applyMovement*booleantrue posts the missed stock movement now; false (default) closes it as acknowledged without moving stock.
note?|Optional note recorded with the resolution; up to 500 characters are kept.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request worked, ERROR when it did not.
message*stringShort human-readable message describing the result, for logs or display; do not parse it.
data?What the resolve call actually did (outcome) and the exception as it now stands.
Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/inventory/exceptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/resolve' \ -H 'Content-Type: application/json' \ -d '{ "applyMovement": true}'Example Response
{ "status": "string", "message": "string", "data": { "outcome": "string", "exception": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "exceptionType": "REGISTER_LOCATION_UNSET", "exceptionTypeLabel": "string", "status": "OPEN", "referenceType": "string", "referenceId": "string", "itemId": "string", "itemName": "string", "locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54", "locationName": "string", "quantity": 0, "adjustmentType": "string", "movementReason": "string", "businessDate": "2019-08-24", "detail": "string", "occurrenceCount": 0, "replayable": true, "firstSeenAt": "2019-08-24T14:15:22Z", "lastSeenAt": "2019-08-24T14:15:22Z", "raisedBy": "string", "resolvedAt": "2019-08-24T14:15:22Z", "resolvedBy": "string", "resolution": "APPLIED", "resolutionNote": "string" } }}