Return Reasons API Routes
A return reason is a possible reason that an item is returned from the customer, such as when returning an item.
These API routes allow admin users to manage return reasons.
GET /admin/return-reasons#
List Return Reasons
Retrieve a list of return reasons. The return reasons can be filtered by fields such as id. The return reasons 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-.qstringOptionalidstring | string[]Optionalvaluestring | string[]Optionallabelstring | string[]Optionaldescriptionstring | string[]Optionalq query parameter instead.parent_return_reason_idstring | string[]Optionalcreated_atobjectOptionalupdated_atobjectOptionaldeleted_atobjectOptional$andobject[]Optional$orobject[]Optionalwith_deletedbooleanOptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberreturn_reasonsobject[]The list of return reasons.
return_reasonsobject[]estimate_countnumberOptional400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/return-reasons#
Create Return Reason
Create a return reason.
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)
valuestringlabelstringdescriptionstringOptionalparent_return_reason_idstringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
return_reasonobjectThe return reason's details.
return_reasonobject400, 401, 404, 409, 422, 500: an error response is returned.
GET /admin/return-reasons/{id}#
Get a Return Reason
Retrieve a return reason by its ID. You can expand the return reason'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
return_reasonobjectThe return reason's details.
return_reasonobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/return-reasons/{id}#
Update a Return Reason
Update a return reason'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)
labelstringvaluestringdescriptionstringOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
return_reasonobjectThe return reason's details.
return_reasonobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/return-reasons/{id}#
Delete a Return Reason
Delete a return reason.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "return_reason"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.