Update a return
curl --request PUT \
--url https://app.supercycle.com/api/v1/return_orders/{returnOrderId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"returnLines": [
{
"id": 123
}
]
}
'import requests
url = "https://app.supercycle.com/api/v1/return_orders/{returnOrderId}"
payload = { "returnLines": [{ "id": 123 }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({returnLines: [{id: 123}]})
};
fetch('https://app.supercycle.com/api/v1/return_orders/{returnOrderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.supercycle.com/api/v1/return_orders/{returnOrderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'returnLines' => [
[
'id' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.supercycle.com/api/v1/return_orders/{returnOrderId}"
payload := strings.NewReader("{\n \"returnLines\": [\n {\n \"id\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.supercycle.com/api/v1/return_orders/{returnOrderId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"returnLines\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.supercycle.com/api/v1/return_orders/{returnOrderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"returnLines\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"customer": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"shopifyId": 123,
"defaultAddress": {
"customerId": 123,
"default": true,
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"province": "<string>",
"country": "<string>",
"zip": "<string>",
"phone": "<string>",
"name": "<string>",
"provinceCode": "<string>",
"countryCode": "<string>",
"countryName": "<string>"
},
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"returnLines": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"rentalId": 123,
"condition": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"severityKey": "<string>",
"severityTone": "<string>",
"title": "<string>"
},
"item": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"activeRentalId": 123,
"productTitle": "<string>",
"serial": "<string>",
"sequentialId": 123,
"shopifyVariantId": 123,
"tags": [
"<string>"
],
"variantTitle": "<string>",
"activeReturnId": 123,
"condition": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"severityKey": "<string>",
"severityTone": "<string>",
"title": "<string>"
},
"conditionId": 123,
"imageUrl": "<string>",
"location": {
"shopifyId": 123,
"name": "<string>"
},
"pickLocation": "<string>",
"acquisitionCostCents": 123,
"roiCents": 123,
"shopifyProductId": 123,
"timelineEvents": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
],
"customFields": [
{
"id": 123,
"ownerId": 123,
"definitionId": 123,
"key": "<string>",
"value": "<string>",
"valueJson": "<unknown>"
}
]
},
"requestedAt": "2023-11-07T05:31:56Z",
"restockedAt": "2023-11-07T05:31:56Z"
}
],
"sequentialId": 123,
"requestedAt": "2023-11-07T05:31:56Z",
"returnMethod": {
"trackingUrl": "<string>",
"addressShopifyId": 123,
"collectionDate": "2023-12-25"
},
"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>"
]
}{
"error": "Rate limit exceeded. Retry after 42 seconds."
}ReturnOrders
Update a return
Update the status of a return and its return lines. Allows updating the overall return order status and individual return line statuses.
PUT
/
return_orders
/
{returnOrderId}
Update a return
curl --request PUT \
--url https://app.supercycle.com/api/v1/return_orders/{returnOrderId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"returnLines": [
{
"id": 123
}
]
}
'import requests
url = "https://app.supercycle.com/api/v1/return_orders/{returnOrderId}"
payload = { "returnLines": [{ "id": 123 }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({returnLines: [{id: 123}]})
};
fetch('https://app.supercycle.com/api/v1/return_orders/{returnOrderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.supercycle.com/api/v1/return_orders/{returnOrderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'returnLines' => [
[
'id' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.supercycle.com/api/v1/return_orders/{returnOrderId}"
payload := strings.NewReader("{\n \"returnLines\": [\n {\n \"id\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.supercycle.com/api/v1/return_orders/{returnOrderId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"returnLines\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.supercycle.com/api/v1/return_orders/{returnOrderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"returnLines\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"customer": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"shopifyId": 123,
"defaultAddress": {
"customerId": 123,
"default": true,
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"province": "<string>",
"country": "<string>",
"zip": "<string>",
"phone": "<string>",
"name": "<string>",
"provinceCode": "<string>",
"countryCode": "<string>",
"countryName": "<string>"
},
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"returnLines": [
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"rentalId": 123,
"condition": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"severityKey": "<string>",
"severityTone": "<string>",
"title": "<string>"
},
"item": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"activeRentalId": 123,
"productTitle": "<string>",
"serial": "<string>",
"sequentialId": 123,
"shopifyVariantId": 123,
"tags": [
"<string>"
],
"variantTitle": "<string>",
"activeReturnId": 123,
"condition": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"severityKey": "<string>",
"severityTone": "<string>",
"title": "<string>"
},
"conditionId": 123,
"imageUrl": "<string>",
"location": {
"shopifyId": 123,
"name": "<string>"
},
"pickLocation": "<string>",
"acquisitionCostCents": 123,
"roiCents": 123,
"shopifyProductId": 123,
"timelineEvents": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
],
"customFields": [
{
"id": 123,
"ownerId": 123,
"definitionId": 123,
"key": "<string>",
"value": "<string>",
"valueJson": "<unknown>"
}
]
},
"requestedAt": "2023-11-07T05:31:56Z",
"restockedAt": "2023-11-07T05:31:56Z"
}
],
"sequentialId": 123,
"requestedAt": "2023-11-07T05:31:56Z",
"returnMethod": {
"trackingUrl": "<string>",
"addressShopifyId": 123,
"collectionDate": "2023-12-25"
},
"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>"
]
}{
"error": "Rate limit exceeded. Retry after 42 seconds."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Numeric ID of the return to retrieve.
Body
application/json
Response
Expected response to a valid request
Numeric ID of the return.
Available options:
uncredited, partially_recredited, recredited Show child attributes
Show child attributes
Show child attributes
Show child attributes
Sequential ID of the return.
Status of the return.
Available options:
requested, expected, received, in_progress, completed, cancelled Available options:
unreceived, partially_received, received Return method information
Show child attributes
Show child attributes
Timeline events for this return order
Show child attributes
Show child attributes
Was this page helpful?
⌘I