Cancel an order claim
Authorizations
A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.
Headers
A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.
Path Parameters
Body
Takes no parameters, and an empty body is expected. THIS FAMILY'S DELETE: no DELETE route exists and none will, because cancelling leaves the row, its lines, its evidence images and its stamps exactly where a chargeback dispute six months later needs to find them. canceled_at is stamped the first time the claim enters cancelled and is never rewritten. LEGAL FROM requested AND approved, so it is what withdraws an approval before it is paid. From resolved it answers 409 invalid_transition and there is no un-resolve: the money has already left, and the honest reversal of an over-refund is a new refund against the order rather than a status flip here. A second cancel, and a cancel of a rejected claim, are 409 as well. NO MONEY MOVES and no stock moves. Cancelling RELEASES the claimed quantity back to the order lines, so those units become claimable again and a fresh claim may cover them. IT EMAILS THE SHOPPER, on the same terms as the approve route: a claim opened through this API cannot suppress the mail, and the mail is best effort, so a 200 is not evidence of delivery. THE BODY IS READ ONLY TO REFUSE IT. refund_amount and refund_amount_minor are refused BY NAME because no figure is settled here and none is the caller's to name, status because the route in the url is the transition, and reason because a transition carries no note of its own. The response is the WHOLE claim in the shape GET /api/v1/order-claims/{claimId} serves.
Response
Success
