Retrieve a list of returns
curl --request GET \
--url https://panel.sendcloud.sc/api/v2/returns \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://panel.sendcloud.sc/api/v2/returns"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://panel.sendcloud.sc/api/v2/returns', 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://panel.sendcloud.sc/api/v2/returns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://panel.sendcloud.sc/api/v2/returns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://panel.sendcloud.sc/api/v2/returns")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/returns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"next": null,
"previous": null,
"returns": [
{
"id": 1,
"created_at": "2022-06-07T16:36:49.419457+02:00",
"reason": 1,
"outgoing_parcel": 1,
"incoming_parcel": 1,
"message": "Not good enough for me",
"refund": {
"total_refund": "\"10.00\"",
"refunded_at": 1654683771746,
"message": "Exchange for size M",
"refund_type": {
"code": "money",
"label": "Money back",
"require_message": true
}
},
"is_cancellable": true,
"return_fee": 3.5,
"return_fee_currency": "EUR",
"label_cost": 6.95,
"label_currency": "EUR",
"items_cost": 48.95,
"delivered_at": "2022-06-07T16:36:49.419457+02:00",
"delivery_option": "drop_off_point",
"store_location": 1,
"images": [],
"rule_modifications": [
{
"rule_name": "my_ship_with_rule",
"field": "ship_with",
"value": "PostNL Return",
"action": "ship_with",
"friendly_name": "Return method",
"priority": 1,
"item_id": null
}
],
"outgoing_parcel_data": {
"tracking_url": "https://tracking.sendcloud.sc/forward?carrier=dhl&code=JVGL1234567800000049",
"tracking_number": "JVGL1234567800000049",
"parcel_status": 11,
"global_status_slug": "delivered",
"brand_name": "My Brand",
"order_number": "EU2548657452",
"from_email": "contact@sendcloud.com",
"deleted": true,
"collo_count": 1,
"from_country": "NL",
"from_name": "Jane Doe",
"shipping_method": 994,
"extra_data": {}
},
"incoming_parcel_data": {
"tracking_url": "https://tracking.sendcloud.sc/forward?carrier=dhl&code=JVGL1234567800000049",
"tracking_number": "JVGL1234567800000049",
"parcel_status": 11,
"global_status_slug": "delivered",
"brand_name": "My Brand",
"order_number": "EU2548657452",
"from_email": "contact@sendcloud.com",
"deleted": true,
"collo_count": 1,
"from_country": "NL",
"from_name": "Jane Doe",
"shipping_method": 994,
"extra_data": {},
"rules": [
{
"name": "my_ship_with_rule",
"priority": 1,
"item_id": null,
"modifications": [
{
"field": "ship_with",
"value": "PostNL Return",
"action": "ship_with",
"friendly_name": "Return method"
}
]
}
]
},
"incoming_parcel_status": {
"id": 1,
"message": "Delivered",
"global_status_slug": "delivered"
}
}
]
}Returns API
Retrieve a list of returns
deprecated
Retrieve a paginated list of all the returns belonging to the authenticated user, sorted by the creation date.
GET
/
returns
Retrieve a list of returns
curl --request GET \
--url https://panel.sendcloud.sc/api/v2/returns \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://panel.sendcloud.sc/api/v2/returns"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://panel.sendcloud.sc/api/v2/returns', 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://panel.sendcloud.sc/api/v2/returns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://panel.sendcloud.sc/api/v2/returns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://panel.sendcloud.sc/api/v2/returns")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/returns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"next": null,
"previous": null,
"returns": [
{
"id": 1,
"created_at": "2022-06-07T16:36:49.419457+02:00",
"reason": 1,
"outgoing_parcel": 1,
"incoming_parcel": 1,
"message": "Not good enough for me",
"refund": {
"total_refund": "\"10.00\"",
"refunded_at": 1654683771746,
"message": "Exchange for size M",
"refund_type": {
"code": "money",
"label": "Money back",
"require_message": true
}
},
"is_cancellable": true,
"return_fee": 3.5,
"return_fee_currency": "EUR",
"label_cost": 6.95,
"label_currency": "EUR",
"items_cost": 48.95,
"delivered_at": "2022-06-07T16:36:49.419457+02:00",
"delivery_option": "drop_off_point",
"store_location": 1,
"images": [],
"rule_modifications": [
{
"rule_name": "my_ship_with_rule",
"field": "ship_with",
"value": "PostNL Return",
"action": "ship_with",
"friendly_name": "Return method",
"priority": 1,
"item_id": null
}
],
"outgoing_parcel_data": {
"tracking_url": "https://tracking.sendcloud.sc/forward?carrier=dhl&code=JVGL1234567800000049",
"tracking_number": "JVGL1234567800000049",
"parcel_status": 11,
"global_status_slug": "delivered",
"brand_name": "My Brand",
"order_number": "EU2548657452",
"from_email": "contact@sendcloud.com",
"deleted": true,
"collo_count": 1,
"from_country": "NL",
"from_name": "Jane Doe",
"shipping_method": 994,
"extra_data": {}
},
"incoming_parcel_data": {
"tracking_url": "https://tracking.sendcloud.sc/forward?carrier=dhl&code=JVGL1234567800000049",
"tracking_number": "JVGL1234567800000049",
"parcel_status": 11,
"global_status_slug": "delivered",
"brand_name": "My Brand",
"order_number": "EU2548657452",
"from_email": "contact@sendcloud.com",
"deleted": true,
"collo_count": 1,
"from_country": "NL",
"from_name": "Jane Doe",
"shipping_method": 994,
"extra_data": {},
"rules": [
{
"name": "my_ship_with_rule",
"priority": 1,
"item_id": null,
"modifications": [
{
"field": "ship_with",
"value": "PostNL Return",
"action": "ship_with",
"friendly_name": "Return method"
}
]
}
]
},
"incoming_parcel_status": {
"id": 1,
"message": "Delivered",
"global_status_slug": "delivered"
}
}
]
}API v2 is entering maintenance mode. New users should start with API v3 to access our latest features and improved performance. Already using v2? Don’t worry, your current integration remains fully functional. Read more about maintenance mode, or check out the migration guide for API v3.
Authorizations
HTTPBasicAuthOAuth2ClientCreds
Basic Authentication using API key and secrets is currently the main authentication mechanism.
Query Parameters
The cursor query string will be used as the pivot value to filter results. If no value is provided, the service must return the first page. The value is Base64 encoded GET parameters. example: For a cursor string there are 3 possible parameters to encode:
- o: Offset
- r: Reverse
- p: Position Combine into GET parameters. Example: r=1&p=300 Base 64 encoded it would become: cj0xJnA9MzAw GET parameter in url would be https://some.url.com/api/endpoint/?cursor=cj0xJnA9MzAw
Example:
"cj0xJnA9MzAw"
⌘I