Unconsume Part on Unit
POST/api/repairs/:repair/lines/:line/parts/:part/unconsume
Returns a consumed part's stock to the FIFO layers it came from (at its consumed cost), puts its serials back in stock and reverses its posting. The line stays on the unit as a planned part. A part that is not consumed is returned unchanged.
repairs:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Refused with 422 when a salvaged (remove) part's stock has since been used, or when the part is dated inside a locked accounting period.
A posted (consumed) part needs the "Repairs: manage costs" permission (403 otherwise); a planned part can be removed by anyone with the repairs:write scope.
Authentication: Bearer token with the repairs:write scope.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden
Response Headers
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.