Skip to main content

Update Repair Cost

PUT 

/api/repairs/:repair/costs/:cost

Edits a cost line. Send only the fields to change.

Required scope: repairs:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Fields (all optional):

  • description (string, max 255).
  • quantity (number, > 0, max 100000).
  • unit_cost (number, ≥ 0).
  • bill_price (number or null, ≥ 0).
  • bill_to (string) — warranty, goodwill, customer, supplier. On a posted line this reclasses the journal and reason is required.
  • reason (string, max 500) — why the bill-to changed; logged on the repair.

Posted (consumed) lines can only be changed by users with the "Repairs: manage costs" permission (403 otherwise). On a consumed part only the description and bill price can change; un-consume it to change quantity or cost. Posted lines dated inside a locked accounting period are refused with 422.

Authentication: Bearer token with the repairs:write scope.

Request​

Responses​

OK

Response Headers
    Content-Type