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
}
],
"returnMethodAttributes": null,
"quantity": 99,
"serials": [
"<string>"
],
"visibility": "available"
}'
{
"errors": [
"Invalid request body"
],
"returnOrders": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"creditStatus": "uncredited",
"receivalStatus": "unreceived",
"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,
"item": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"activeRentalId": null,
"activeReturnId": null,
"condition": null,
"conditionId": null,
"imageUrl": null,
"location": null,
"pickLocation": null,
"productTitle": "<string>",
"serial": null,
"sequentialId": 123,
"shopifyProductId": null,
"shopifyVariantId": null,
"status": "processed",
"tags": [
"<string>"
],
"variantTitle": null,
"visibility": "available",
"timelineEvents": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
]
},
"rentalId": 123,
"requestedAt": null,
"restockedAt": null,
"status": "awaiting"
}
],
"requestedAt": null,
"sequentialId": 123,
"status": "requested",
"returnMethod": null,
"timelineEvents": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
],
"tags": [
"<string>"
]
}
]
}
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
}
],
"returnMethodAttributes": null,
"quantity": 99,
"serials": [
"<string>"
],
"visibility": "available"
}'
{
"errors": [
"Invalid request body"
],
"returnOrders": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"creditStatus": "uncredited",
"receivalStatus": "unreceived",
"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,
"item": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"activeRentalId": null,
"activeReturnId": null,
"condition": null,
"conditionId": null,
"imageUrl": null,
"location": null,
"pickLocation": null,
"productTitle": "<string>",
"serial": null,
"sequentialId": 123,
"shopifyProductId": null,
"shopifyVariantId": null,
"status": "processed",
"tags": [
"<string>"
],
"variantTitle": null,
"visibility": "available",
"timelineEvents": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
]
},
"rentalId": 123,
"requestedAt": null,
"restockedAt": null,
"status": "awaiting"
}
],
"requestedAt": null,
"sequentialId": 123,
"status": "requested",
"returnMethod": null,
"timelineEvents": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
],
"tags": [
"<string>"
]
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Expected response to a valid request
The response is of type object
.
Was this page helpful?