Resolve Repair Line
POST/api/repairs/:repair/lines/:line/resolve
Resolves a unit with an outcome and creates whatever the outcome needs: a return shipment, a replacement or parts sales order, a refund or store credit, a discount code, a stock capitalization, or a scrap adjustment. The unit moves to the resolved stage and the repair's status rolls up. A unit that is at a repair vendor on an open dispatch can't be resolved (422 on outcome) until it is received back, or claimed as missing if the vendor lost it; the line's resolve_blocked_reason says why. Resolving an already-resolved unit with a different outcome first undoes the previous resolution.
repairs:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Fields:
outcome(string, required) —repaired,parts_sent,replaced,refurbished_to_stock,unrepairable_credited,unrepairable_returned,no_fault_found,declined_by_customer,not_covered_returned,scrapped.notes(string, optional, max 2000) — recorded on the resolution and in the activity log; used as the reason in the unrepairable email.bill_to(string, optional) —warranty,goodwill,customerorsupplier. Defaults to the bill-to already on the unit, else the coverage's default.warehouse_id(integer, optional) — warehouse that ships a replacement or parts order. Defaults to the repair's warehouse.performed_service(string, optional) —repair,replate,replace,parts,credit,none. Derived from the outcome when omitted.
By outcome:
repaired(customer-owned unit) — sends the unit back.create_outbound_shipment(boolean, optional) opens a draft us-to-customer shipment for the unit when it is on hand.repaired(our own unit) /refurbished_to_stock— the unit goes into stock of a target SKU at its refurbished cost. The unit must be received.target_kind(same,blemished,designated),target_product_id(integer, the SKU to stock it as),blemished_sku(string, max 255; defaults to the unit's SKU +-B, created when missing). When the per-unit cost is above the target SKU's average selling price the request is refused with annrverror unlessexpense_nrv_excess(boolean, expense the excess) oraccept_above_nrv(boolean, keep the higher cost) istrue. Use Preview Refurbish Cost first.parts_sent— creates a parts sales order.parts(array, required for this outcome):parts[].product_id(integer, required),parts[].quantity(number > 0, required),parts[].unit_price(number ≥ 0, optional; charged only when bill-to iscustomer).replaced— creates a replacement sales order.replacement_product_id(integer, defaults to the unit's product),replacement_quantity(integer 1–100000, defaults to the unit quantity). When a customer-owned unit is already on hand,ownership_dispositionis required:add_to_stock,blemished,keep_in_repairordiscard(withblemished_skuforblemished).unrepairable_credited—credit_type(required):refund(a sales credit against the original order; needs one),store_creditordiscount_offer.credit_amount(number > 0) is required for refund and store credit when no order price can default it;discount_percent(number, 0–100) is required for a discount offer, which creates a single-use discount code. The customer is emailed the unrepairable notice.unrepairable_returned,no_fault_found,declined_by_customer,not_covered_returned— return the unit as-is.return_method(returnordispose);disposal_consent_note(string, max 1000) is required withdisposeand records the customer's consent.charge_assessment_fee(boolean) adds the warranty policy's assessment fee as a customer cost.create_outbound_shipmentopens a draft return shipment.unrepairable_returnedalso emails the customer.scrapped— writes the unit off with an inventory adjustment (our own units only).
The response holds the resolution with the full unit (line) and every document it created.
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 — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
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.