AdminReturnReasonsResource
This class is used to send requests to Admin Return Reason API Routes. All its method
are available in the JS Client under the medusa.admin.returnReasons
property.
All methods in this class require authentication.
Return reasons are key-value pairs that are used to specify why an order return is being created. Admins can manage available return reasons, and they can be used by both admins and customers when creating a return.
Related Guide: How to manage return reasons.
Methods
create
Create a return reason.
Example
Parameters
The return reason to create.
customHeaders
Record<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromise
ResponsePromise<AdminReturnReasonsRes>RequiredResolves to the return reason's details.
ResponsePromise
ResponsePromise<AdminReturnReasonsRes>Requiredupdate
Update a return reason's details.
Example
Parameters
id
stringRequiredThe return reason's ID.
The attributes to update in the return reason.
customHeaders
Record<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromise
ResponsePromise<AdminReturnReasonsRes>RequiredResolves to the return reason's details.
ResponsePromise
ResponsePromise<AdminReturnReasonsRes>Requireddelete
Delete a return reason.
Example
Parameters
id
stringRequiredThe ID of the return reason.
customHeaders
Record<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromise
ResponsePromise<DeleteResponse>RequiredResolves to the deletion operation's details.
ResponsePromise
ResponsePromise<DeleteResponse>Requiredretrieve
Retrieve a return reason's details.
Example
Parameters
id
stringRequiredThe return reason's ID.
customHeaders
Record<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromise
ResponsePromise<AdminReturnReasonsRes>RequiredResolves to the return reason's details.
ResponsePromise
ResponsePromise<AdminReturnReasonsRes>Requiredlist
Retrieve a list of return reasons.
Example
Parameters
customHeaders
Record<string, any>RequiredCustom headers to attach to the request.
Default: {}
Returns
ResponsePromise
ResponsePromise<AdminReturnReasonsListRes>RequiredResolves to the list of return reasons.
ResponsePromise
ResponsePromise<AdminReturnReasonsListRes>RequiredWas this section helpful?