Read where a return is: its state, labels, and refund.
Connect to https://mcp.opencommerce.sh/mcp with your Commerce SDK credentials as Authorization: Bearer <YOUR_CLIENT_ID>:<YOUR_CLIENT_SECRET>. See Connect your agent.
get_return isn’t available on the server yet. Until it is, a call answers order_actions_unavailable.
Behavior: Read-only.
What it does
Reads where a return is: its state, the store’s return labels, and the refund. Get the return_id from a confirmed start_return. When state is label_ready, give the shopper each link in label_urls as is.
Inputs
Field
Type
Description
shopper_id(required)
string
Your own stable id for the shopper. The same value on every call for the same person.
order_id(required)
string
The order’s id, from a buy result, get_conversation, or an order update.
return_id(required)
string
The return_id from a confirmed start_return.
merchant
string
Only when the error is order_id_ambiguous: one of the stores the error names.
Returns
Field
Type
Description
return_id, order_id
string
The return and its order.
state
string
requested, label_ready, denied, or refunded.
label_urls
array of strings
The store’s prepaid return labels once state is label_ready. Give each to the shopper as is.
refund
object or null
{ amount_cents, currency }.
refund_to
object or null
{ brand, last4 }: the card the refund goes back to. null when the order was paid from a balance.