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 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
Register a return as canceled. The return can be associated with an order, claim, or swap.
Example
Parameters
idstringRequiredcustomHeadersRecord<string, any>RequiredDefault: {}
Returns
ResponsePromiseResponsePromise<AdminReturnsCancelRes>RequiredResolves 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.
ResponsePromiseResponsePromise<AdminReturnsCancelRes>Requiredreceive
Mark a return as received. This also updates the status of associated order, claim, or swap accordingly.
Example
Parameters
idstringRequiredThe received return.
customHeadersRecord<string, any>RequiredDefault: {}
Returns
ResponsePromiseResponsePromise<AdminReturnsRes>RequiredResolves to the return's details.
ResponsePromiseResponsePromise<AdminReturnsRes>Requiredlist
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
customHeadersRecord<string, any>RequiredDefault: {}
Paignation configurations to be applied on the retrieved returns.
Returns
ResponsePromiseResponsePromise<AdminReturnsListRes>RequiredResolves to the list of returns with pagination fields.
ResponsePromiseResponsePromise<AdminReturnsListRes>Required