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": "awaiting"
}
],
"returnMethodAttributes": "<unknown>",
"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",
"shopifyId": 123,
"defaultAddress": "<unknown>",
"email": "<unknown>",
"firstName": "<unknown>",
"lastName": "<unknown>"
},
"returnLines": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"rentalId": 123,
"status": "awaiting",
"condition": "<unknown>",
"item": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"activeRentalId": "<unknown>",
"productTitle": "<string>",
"serial": "<unknown>",
"sequentialId": 123,
"shopifyVariantId": "<unknown>",
"status": "processed",
"tags": [
"<string>"
],
"variantTitle": "<unknown>",
"visibility": "available",
"activeReturnId": "<unknown>",
"condition": "<unknown>",
"conditionId": "<unknown>",
"imageUrl": "<unknown>",
"location": "<unknown>",
"pickLocation": "<unknown>",
"shopifyProductId": "<unknown>",
"timelineEvents": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
]
},
"requestedAt": "<unknown>",
"restockedAt": "<unknown>"
}
],
"sequentialId": 123,
"status": "requested",
"receivalStatus": "unreceived",
"requestedAt": "<unknown>",
"returnMethod": "<unknown>",
"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": "awaiting"
}
],
"returnMethodAttributes": "<unknown>",
"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",
"shopifyId": 123,
"defaultAddress": "<unknown>",
"email": "<unknown>",
"firstName": "<unknown>",
"lastName": "<unknown>"
},
"returnLines": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"rentalId": 123,
"status": "awaiting",
"condition": "<unknown>",
"item": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"activeRentalId": "<unknown>",
"productTitle": "<string>",
"serial": "<unknown>",
"sequentialId": 123,
"shopifyVariantId": "<unknown>",
"status": "processed",
"tags": [
"<string>"
],
"variantTitle": "<unknown>",
"visibility": "available",
"activeReturnId": "<unknown>",
"condition": "<unknown>",
"conditionId": "<unknown>",
"imageUrl": "<unknown>",
"location": "<unknown>",
"pickLocation": "<unknown>",
"shopifyProductId": "<unknown>",
"timelineEvents": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
]
},
"requestedAt": "<unknown>",
"restockedAt": "<unknown>"
}
],
"sequentialId": 123,
"status": "requested",
"receivalStatus": "unreceived",
"requestedAt": "<unknown>",
"returnMethod": "<unknown>",
"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.
Show child attributes
Return method attributes for creating return with specific method
Show child attributes
Number of items to create.
x <= 100Serials will be picked from the list and assigned to items.
available, unavailable, retired, sold Was this page helpful?