Returns API Routes
Admin users create a return when a customer returns an item to them.
Returns can also be created by customers through the storefront, and admins will be able to manage them and make refunds, if necessary. Refunds are made through the Payment API Routes
These API routes allow admin users to manage returns.
GET /admin/returns#
List Returns
Retrieve a list of returns. The returns can be filtered by fields such as id. The returns can also be sorted or paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.idstring | string[]Optionalstatusstring | string[]Optionalcreated_atobjectOptionalupdated_atobjectOptionalwith_deletedbooleanOptionalorder_idstring | string[] | objectOptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberreturnsobject[]The return's returns.
returnsobject[]400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns#
Create Return
Create a return. The return can later be requested or confirmed.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
order_idstringlocation_idstringOptionaldescriptionstringOptionalinternal_notestringOptionalno_notificationbooleanOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
orderobjectThe order change's order.
orderobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
GET /admin/returns/{id}#
Get a Return
Retrieve a return by its ID. You can expand the return's relations or select the fields that should be returned.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
returnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}#
Update a Return
Update a return's details.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
location_idstringOptionalno_notificationbooleanOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/cancel#
Cancel a return.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest body (application/json)
no_notificationbooleanOptionalRequest examples
Responses
200 OK
returnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/dismiss-items#
Add Damaged Items to Return
Add damaged items, whose quantity is to be dismissed, to a return. These items will have the action RECEIVE_DAMAGED_RETURN_ITEM.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
itemsobject[]OptionalThe items details.
itemsobject[]OptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/dismiss-items/{action_id}#
Update Damaged Item of Return
Update a damaged item, whose quantity is to be dismissed, in the return by the ID of the item's RECEIVE_DAMAGED_RETURN_ITEM action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property. return.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringRECEIVE_DAMAGED_RETURN_ITEM action.Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
quantitynumberOptionalinternal_notestringOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/returns/{id}/dismiss-items/{action_id}#
Remove Damaged Item from Return
Remove a damaged item, whose quantity is to be dismissed, in the return by the ID of the item's RECEIVE_DAMAGED_RETURN_ITEM action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property. return.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringRECEIVE_DAMAGED_RETURN_ITEM action.Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.idstring | string[] | objectOptionalorder_idstring | string[] | objectOptionalstatusstring | string[] | objectOptionalFilter by a return's status.
statusstring | string[] | objectOptionalupdated_atobjectOptionallimitnumberOptionaloffsetnumberOptionalorderstringOptional-.with_deletedbooleanOptionalcreated_atobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/receive#
Start Return Receival
Start a return receival process to be later confirmed using the /admin/returns/:id/receive/confirm API route.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
internal_notestringOptionaldescriptionstringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
orderobjectThe order change's order.
orderobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/returns/{id}/receive#
Cancel Return Receival
Cancel the receival process previously started, and hasn't been confirmed, of a return.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "return"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/receive-items#
Add Received Items to Return
Add received items in a return. These items will have the action RECEIVE_RETURN_ITEM.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
itemsobject[]OptionalThe items details.
itemsobject[]OptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/receive-items/{action_id}#
Update a Received Item in a Return
Update a received item in the return by the ID of the item's RECEIVE_RETURN_ITEM action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property. return.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringRECEIVE_RETURN_ITEM action.Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
quantitynumberOptionalinternal_notestringOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/returns/{id}/receive-items/{action_id}#
Remove a Received Item from Return
Remove a received item in the return by the ID of the item's RECEIVE_RETURN_ITEM action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property. return.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringRECEIVE_RETURN_ITEM action.Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.idstring | string[] | objectOptionalorder_idstring | string[] | objectOptionalstatusstring | string[] | objectOptionalFilter by a return's status.
statusstring | string[] | objectOptionalupdated_atobjectOptionallimitnumberOptionaloffsetnumberOptionalorderstringOptional-.with_deletedbooleanOptionalcreated_atobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/receive/confirm#
Confirm Return Receival
Confirm that a return has been received. This updates the quantity of the items received, if not damaged, and reflects the changes on the order.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
no_notificationbooleanOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
order.return_received: Emitted when a return is marked as received.inventory-level.updated: Emitted when inventory levels are updated. This includes adjustments to the stocked or reserved quantity, such as during order fulfillment.
POST /admin/returns/{id}/request#
Confirm Return Request
Confirm a requested return. The changes are applied on the inventory quantity and the order only after the return has been confirmed as received using the /admin/returns/:id/received/confirm.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
no_notificationbooleanOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
order.return_requested: Emitted when a return request is confirmed.
DELETE /admin/returns/{id}/request#
Cancel Return Request
Cancel a requested return.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "return"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/request-items#
Add Requested Items to Return
Add items that are requested to be returned. These items will have the action RETURN_ITEM.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
itemsobject[]The items' details.
itemsobject[]Request examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/request-items/{action_id}#
Update Requested Item in Return
Update a requested item to be returned by the ID of the item's RETURN_ITEM action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property. return.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringRETURN_ITEM action.Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
quantitynumberOptionalinternal_notestringOptionalreason_idstringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/returns/{id}/request-items/{action_id}#
Remove Item from Return
Remove a requested item to be returned by the ID of the item's RETURN_ITEM action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property. return.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringRETURN_ITEM action.Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.idstring | string[] | objectOptionalorder_idstring | string[] | objectOptionalstatusstring | string[] | objectOptionalFilter by a return's status.
statusstring | string[] | objectOptionalupdated_atobjectOptionallimitnumberOptionaloffsetnumberOptionalorderstringOptional-.with_deletedbooleanOptionalcreated_atobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/shipping-method#
Add a Shipping Method to a Return
Add a shipping method to a return. The shipping method will have a SHIPPING_ADD action.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
shipping_option_idstringcustom_amountnumberOptionaldescriptionstringOptionalinternal_notestringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/returns/{id}/shipping-method/{action_id}#
Update a Shipping Method of a Return
Update a shipping method of the return by the ID of the item's SHIPPING_ADD action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringSHIPPING_ADD action.Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
custom_amountnumberOptionalinternal_notestringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/returns/{id}/shipping-method/{action_id}#
Remove Shipping Method from Return
Remove a shipping method of the return by the ID of the item's SHIPPING_ADD action.
Every item has an actions property, whose value is an array of actions. You can check the action's name using its action property, and use the value of the id property.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringaction_idstringSHIPPING_ADD action.Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.idstring | string[] | objectOptionalorder_idstring | string[] | objectOptionalstatusstring | string[] | objectOptionalFilter by a return's status.
statusstring | string[] | objectOptionalupdated_atobjectOptionallimitnumberOptionaloffsetnumberOptionalorderstringOptional-.with_deletedbooleanOptionalcreated_atobjectOptionalRequest examples
Responses
200 OK
order_previewobjectA preview of an order if a change, such as exchange, return, edit, or claim is applied on it.
order_previewobjectreturnobjectThe return's details.
returnobject400, 401, 404, 409, 422, 500: an error response is returned.