E096: Check if location is in use
GET /api/locations/:id/in-use
Returns per-domain usage counts for the given location. Used by the UI before exposing the delete action (W095).
Authentication
Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.
Request
No body. Broad check — looks across SOs, POs, WOs, and ledger entries.
Response — 200 OK
{ "inUse": true, "references": { "poCount": 0, "woCount": 0, "soCount": 1, "ledgerCount": 0 } }
Errors
| HTTP | code | Condition |
|---|---|---|
| 404 | not_found | No such location. |