Admin API
Conditions
Create a return
Create a return by items. Return line statuses and conditions can be specified. If an item is in an existing return and has not active rentals, the endpoint updates the return line. If the item has multiple active rentals, the rental ID must be specified (return rental IDs with error).
curl --request POST \
--url https://app.supercycle.com/api/v1/return_orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"data": [
{
"rentalId": 123,
"status": null
}
],
"quantity": 99,
"serials": [
"<string>"
],
"visibility": "available"
}'
{
"errors": [
"Invalid request body"
],
"returnOrders": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"creditStatus": "uncredited",
"customer": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"defaultAddress": null,
"email": null,
"firstName": null,
"lastName": null,
"shopifyId": 123
},
"returnLines": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"condition": null,
"rentalId": 123,
"requestedAt": null,
"restockedAt": null,
"status": "awaiting"
}
],
"requestedAt": null,
"sequentialId": 123,
"status": "requested"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Number of items to create.
x < 100
Serials will be picked from the list and assigned to items.
available
, unavailable
, retired
, sold
Response
Numeric ID of the return.
uncredited
, partially_recredited
, recredited
Numeric ID of the customer.
Default address of the customer.
Numeric ID of the customer.
Numeric ID of the return line.
Status of the return line.
awaiting
, received
, missing
Numeric ID of the condition.
Date and time the condition was created.
Severity key of the condition.
Tone of the condition.
Title of the condition.
Sequential ID of the return.
Status of the return.
requested
, expected
, received
, in_progress
, completed
, cancelled
curl --request POST \
--url https://app.supercycle.com/api/v1/return_orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"data": [
{
"rentalId": 123,
"status": null
}
],
"quantity": 99,
"serials": [
"<string>"
],
"visibility": "available"
}'
{
"errors": [
"Invalid request body"
],
"returnOrders": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"creditStatus": "uncredited",
"customer": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"defaultAddress": null,
"email": null,
"firstName": null,
"lastName": null,
"shopifyId": 123
},
"returnLines": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"condition": null,
"rentalId": 123,
"requestedAt": null,
"restockedAt": null,
"status": "awaiting"
}
],
"requestedAt": null,
"sequentialId": 123,
"status": "requested"
}
]
}