Skip to main content

Create Repair Request

POST 

/api/portal/repairs

Send a repair claim for the active Location, created in the requested status for the merchant to review. A claim holds up to 100 items; each one is an item of one of the Location's orders (sales_order_id + lines.*.sales_order_line_id), a product by id (lines.*.product_id), a product by SKU or barcode (lines.*.sku), or a free-text description (lines.*.product_text) the merchant matches to a product later. Repair claims are not limited by the return window.

Buyer portal token

Called by a B2B portal buyer with the bearer token POST /api/portal/auth/login returns (or the buyer's feed key) — not with a staff Personal Access Token.

Fields:

  • sales_order_id (integer, optional) — required when any line names an order item; must be an order of the active Location (404 otherwise).
  • reference (string, optional, max 120) — your own claim reference. notes (string, optional, max 5000).
  • end_customer.name (string, optional, max 190), end_customer.email (email, optional, max 190), end_customer.phone (string, optional, max 40) — the end customer the claim is for. Repair updates go to end_customer.email, or to the signed-in buyer's email when it is not given.
  • lines (array, required, 1–100).
  • lines.*.sales_order_line_id (integer) — required unless product_id, sku or product_text is given; must be an item of sales_order_id (reason line_not_found otherwise).
  • lines.*.product_id (integer, optional, must exist), lines.*.sku (string, optional, max 190 — a SKU or barcode), lines.*.product_text (string, optional, max 255).
  • lines.*.component_product_id (integer, optional) — one piece of a set (bundle or kit). Must be one of the item's pieces from Get Returnable Lines; the claim is then for that single piece (quantity 1). A piece that is not part of the set is refused with reason piece_not_in_set.
  • lines.*.quantity (integer, optional, 1–10000, default 1). Forced to 1 when a known serial number or a piece of a set is given.
  • lines.*.serial_number (string, optional, max 190) — matched to the product's serial numbers on file; one that is not on file is kept with the description.
  • lines.*.issue_type_ids (array of integers, optional) — ids from List Repair Issue Types; ids not shown on the portal are ignored.
  • lines.*.description (string, required, max 5000) — what is wrong with the item.
  • lines.*.requested_service (string, optional): repair, replate or replace.

Responds 201 with the new repair (same shape as Get Repair Request, without shipments). For a piece of a set, the line shows the set's sku and name. Refusals return error, a machine reason (order_not_found → 404; line_not_found, piece_not_in_set, no_warehouse → 422) and context.line (the zero-based index of the offending line, when it applies). Field validation errors return the standard 422 message + errors body.

Paid-repair quotes on portal repairs default to on-account billing.

Authentication: portal Bearer token.

Request​

Responses​

Created

Response Headers
    Content-Type