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.
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 toend_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 unlessproduct_id,skuorproduct_textis given; must be an item ofsales_order_id(reasonline_not_foundotherwise).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'spiecesfrom 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 reasonpiece_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,replateorreplace.
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
- 201
- 401
- 403
- 404
- 422
- 429
Created
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.