Propose a remedy on a customer thread the way the CS agent proposes one: a partial refund the customer keeps the item fo
Changed onPropose a remedy on a customer thread the way the CS agent proposes one: a partial refund the customer keeps the item for, a full refund on a return, a cancel, a gift card, a single-use discount code on the next order, or a free replacement of named products. It moves no money and calls no shop: the store's own remedy policy (ladder, tier caps, gift-card and discount ceilings, fraud and high-value-customer gates, the photograph rule for a replacement, daily cap) decides it like the agent's own proposal, and the result is one action awaiting approval (evaluation_id) or refused by that policy (blocked with the reason). Nothing runs until it is approved — through the action approval or by a person in the inbox. amount is in the store's currency and required for a refund or gift card; a cancel refunds what the shop computes. percent is required for a discount: it is issued as that share of the thread's order total, as a fixed amount; without an order in the store's currency it stays a percentage whose value nobody can count. line_items (Magistry variant ids and quantities) is required for a replacement and priced at the variants' prices when proposed; defect_evidence names the photograph on the thread that shows the defect, which the policy requires. The result states amount_minor and currency — the merchant's own money, the number an approval or a write grant is checked against — or amount_unknown, which only a person can approve. order_id is the Magistry order id, defaulting to the thread's order; it must be one of the customer's own orders on the thread (order_not_on_thread otherwise), and a refund, cancel or replacement needs one (order_required). Amounts are cut down to the currency's minor units. The result names the order (order_id, order_name). A second call for the same open action returns the first (result: already_proposed) with the earlier proposal's amount; requested_amount is what this call asked, in major units — when the two differ, the requested amount was not proposed. Requires an idempotency_key.
Request
- Base URLhttps://app.magistry.io
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://app.magistry.io/api/oauth/authorizeToken URLhttps://app.magistry.io/api/oauth/tokenScopescs:write
Headers
Required, here or as idempotency_key in the body. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.
Request body
Refund or gift-card amount in the store currency; required for those.
Discount percentage; required for discount_next_order.
The products a replacement sends; required for replacement.
For a replacement: which photograph on the thread shows the defect, and what it shows.
Magistry order id (cs_orders), one of the customer's own orders on the thread; default: the thread's order.
Why — recorded on the proposal and shown to the approver.
Required. A unique string you choose for this request. Send the SAME key when retrying after a timeout and Magistry returns the original outcome instead of performing the write twice. Reusing a key with different arguments is refused rather than replayed.
Response
Tool result
Changes
- warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status - warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status - warning
added the new
method_not_allowedenum value to theerrorresponse property for the response status
11 more changes in this revision
- warning