Decide a warranty claim
Records a decision of covered, partly covered, goodwill, paid repair or declined with a reason, plus any supplied fix plan, goodwill share and warranty order lines. Pricing those lines needs Enter and correct costs. Supplied lines create or update the warranty order; the decision saves even if that fails, with the reason in order_error. Customer emails count toward the key’s Emails per day cap.
Required access
- API key
- Refunds and returnspermission
- Request limit
- Counts as 5 requests. Each key has a capacity of 15, restored at 0.6 a second.
Idempotent-Replayed: true. Responses are saved for 24 hours.Headers
Bearer and your key, opk_….
Up to 100 characters (letters, digits, - _ : .). Kept for 24 hours.
application/json. A body is at most 256 KB.
Parameters
The claim’s id from the list.
Body
JSONDeclined: the message the customer gets. Up to 5,000 characters.
One of covered, partly_covered, goodwill, paid_repair, declined.
Required to decline: an id from the claim’s decline_reasons (get_warranty_claim), or from decline_reasons in GET /warranty/claims.
Covered: the delivery date of each unit claimed with no delivery on record, offered (the order’s or Shopify’s) or typed (needs Override warranty coverage).
One of offered, typed.
YYYY-MM-DD.
A unit’s id from the claim.
Email the customer the decision. Needs Email customers.
Goodwill as an amount instead of a share. Part of the plan: saved with planned_fix (the claim’s own when left out).
Goodwill: the share the store covers, 1–100 (default 100). Part of the plan: saved with planned_fix (the claim’s own when left out).
The warranty order’s lines: what is needed, what it is worth and who pays. Sent, they replace the claim’s costs and make or update its warranty order. Left out while the plan is sent, the Decide dialog’s starting lines are used (see planned_fix).
At most 2 decimals.
One of part, labour, shipping, other, replacement.
Up to 255 characters.
One of store, vendor, customer.
An internal note. Up to 2,000 characters.
Money back or a workshop repair: the product is collected first. Part of the plan: saved with planned_fix (the claim’s own when left out).
How the claim is fixed (the plan). The replacement or part to order is a replacement or part line in lines, which POST /warranty/claims/{id}/goods then orders. Sent without lines, the lines are the ones the claim page’s Decide starts from: the claim’s own, plus the fix’s (a replacement line, a part line named after the claimed part, or a labour line “Repair visit”, each at 0) paid as the decision pays; send lines to say otherwise.
One of repair_visit, part, replacement, refund, store_credit, pickup.
Returns
OK: decision, email_error, id, order_error, planned_fix, status
Errors
Errors use { "error": { "code", "message" } }. Use code to handle the error. View all error codes.
The request isn’t valid (see error.code), or the API version isn’t supported.
No valid access token or API key.
The store’s subscription isn’t active.
Not allowed: the API is off for this store, or the caller lacks the scope or permission.
Not found, or not visible to this caller.
Wrong method for this path; Allow lists every method the path takes.
The request body didn’t arrive in time.
The same Idempotency-Key is still being processed (REQUEST_IN_PROGRESS), its outcome is unknown (OUTCOME_UNKNOWN: check the record), or the record changed since it was read.
The request body is too large.
The request is valid JSON but can’t be done (a rule of the store refuses it), or the Idempotency-Key was used with a different body.
The app is older than the oldest version still served (error.code CLIENT_TOO_OLD); see error.min_version and error.upgrade_url.
Over a rate limit; wait Retry-After seconds.
Something went wrong on our side. A write may have partly happened: check the record before retrying it.
Busy, switched off, or billing couldn’t be checked; wait Retry-After seconds.