Skip to main content

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.

Required scope: repairs:write

Grant 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​

OK

Response Headers
    Content-Type