API used to review (approve, reject, or offer alternatives to) a buyer’s return request.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
Request Body
Section titled “Request Body”object
Decisions to apply to aftersales requests.
object
Identifies the object upon which this decision is made.
Type of identifier provided in request_id. Possible values:
AFTERSALESRMA
Decisions applied at the line item level. One SKU may only have one decision, so all line items (corresponding to that same SKU) should fall under the same decision object. Different line item decisions for the same SKU will soon be supported in the future.
object
Line items for which this decision applies. Decision details apply to each line item individually (e.g. a partial refund amount of $1.00 for 3 line items will result in a total partial refund amount of $3.00).
object
Unique identifier for this item in the return. In the case of virtual bundle, this corresponds to the id of the original parent item bundle.
Unique identifier for this item in the return. In the case of virtual bundle, this corresponds to the id of the current child item being returned.
Action/decision to be applied. Possible values:
APPROVE_REQUESTAPPROVE_RETURN_PACKAGEREJECT_REQUESTREJECT_RETURN_PACKAGEREFUND_INSTEADOFFER_PARTIAL_REFUNDOFFER_PARTIAL_REFUND_AFTER_RECEIVING_PKG
Details for an alternative resolution (if applicable).
object
Proposed refund amount.
Currency of the refund amount (ISO 4217). Must match the currency of the forward order.
To justify the action/decision (generally required for rejection).
object
Seller’s reason for rejecting the aftersales request. Use the Get Review Decision endpoint to retrieve the currently available rejection options for the same request, and submit the returned rejection reason name in this field. Note: The available decisions and rejection reasons can change depending on the current request status, so fetch eligibility again before calling this API.
Additional explanation for the decision.
Supporting evidence (such as images).
object
Image URI obtained from the Upload Product Image API.
MIME type of the media (such as image/jpeg).
The timestamp at which the decision/action was made (in unix seconds).
The idempotency key is a unique value generated by the client which the server uses to recognize the same request. How you create unique keys is up to you, but we suggest using UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
Example
{ "aftersales_request_decisions": [ { "request_id": "4035319218955782461", "request_id_type": "AFTERSALES", "line_item_decisions": [ { "line_items": [ { "return_line_item_id": "4035227657962164811", "sub_return_line_item_id": "4035227657962164815" } ], "action": "APPROVE_REQUEST", "alternative_solution_details": { "partial_refund_amount": "12.34", "currency": "USD" }, "reason": { "reason_id": "seller_reject_apply_package_has_not_exceeded_estimated_delivery_time", "text": "I have reached an agreement with the buyer", "media": { "uri": "tos-maliva-i-o3syd03w52-us/57a1c8908fe74572861ea5e50887d8d1", "mime_type": "image/png" } } } ], "action_unix_time": 1774486592, "idempotency_key": "40b456b1-78e7-412d-9fe6-82181496e1bd&app_key=38abcd" } ]}Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
Lists errors for partially failed requests. For example, if a request reviews multiple orders or items and only some fail, individual error details are returned here.
IMPORTANT: Partial failures still return a top-level success code (0), so clients must also check this field to detect partial errors. For complete failures (e.g. validation errors), the top-level response code and message will indicate a failure, but this field will remain empty.
object
Error Code
Error Description
Example
{ "code": 0, "data": { "errors": [ { "code": "98001004", "message": "Invalid parameters. Please verify your input before retrying" } ] }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}