AdminReturnsResource
This class is used to send requests to Admin Return API Routes. All its method
are available in the JS Client under the medusa.admin.returns
property.
All methods in this class require user authentication.
A return can be created by a customer or an admin to return items in an order. Admins can manage these returns and change their state.
Related Guide: How to manage returns.
Methods
cancel
Registers a return as canceled. The return can be associated with an order, claim, or swap.
Example
Parameters
id
stringRequiredcustomHeaders
Record<string, any>RequiredDefault: {}
Returns
Resolves to the details of the order associated with the return. If the return is associated with a claim or a swap, then it'll be the order
that the claim or swap belongs to.
list
Retrieve a list of Returns. The returns can be paginated.
Example
To list returns:
By default, only the first 50
records are retrieved. You can control pagination by specifying the limit
and offset
properties:
Parameters
Paignation configurations to be applied on the retrieved returns.
customHeaders
Record<string, any>RequiredDefault: {}
Returns
Resolves to the list of returns with pagination fields.
receive
Mark a return as received. This also updates the status of associated order, claim, or swap accordingly.
Example
Parameters
id
stringRequiredThe received return.
customHeaders
Record<string, any>RequiredDefault: {}