Permanently retire a location slot
POST/locations/:locationCode/decommissionings
Marks the slot Decommissioned. This is a genuine domain command, not a CRUD update, which is why it is modelled as a transition resource (decommissionings) of the slot rather than a PATCH (REST API guideline 1.3 d). A retry with the same Idempotency-Key replays the stored 204 with Idempotency-Replayed: true instead of answering 409. A refusal that can still change (location-slot-not-found for a code not registered yet, concurrent-modification) is not stored: the key is released and the retry executes again.
The transition is one-way in v1: there is no reactivation use case, calling it twice is a 409, and re-registering the same LocationCode afterwards is rejected as a duplicate rather than quietly resurrecting the slot. Publishes LocationSlotDecommissioned. Returns 204 with no body — there is nothing to say beyond "done".
Request
Responses
- 204
- 400
- 404
- 409
- 500
Slot decommissioned. No body.
Response Headers
true when this response is the stored answer of an earlier request with the same Idempotency-Key (a 2xx or a refusal that cannot change on a retry); never present on the first execution, and never on a refusal that releases the key.
Malformed input: a body that is not valid JSON, a location code that is not seven [A-Z0-9] segments, a missing required identifier, a query parameter outside its documented enum, an invalid limit / cursor or an undeclared query parameter on a paged collection, or a missing / malformed Idempotency-Key on a POST.
The named site, zone, aisle, slot, location type or placement rule does not exist.
A state conflict: a code already taken, a GS1 Global Location Number already assigned to another location (gln-already-assigned, ADR-0045), an aisle that already holds an active AutomatedStorage location (automated-storage-already-in-aisle, ADR-0048), a parent that exists but is no longer Active, or a slot already decommissioned. On a POST it is also the answer to an Idempotency-Key reused with a different method, path or body (idempotency-key-reused); the problem type tells the two apart.
An unexpected failure, e.g. the datastore is unavailable.