Retrieve a return label
curl --request GET \
--url https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/label/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/label/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/label/download', 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/brand/{brand_domain}/return-portal/label/download",
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: Bearer <token>"
],
]);
$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/brand/{brand_domain}/return-portal/label/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/brand/{brand_domain}/return-portal/label/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/label/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"code": 404,
"request": "api/v2/brand/brand_domain/return-portal",
"message": "No ReturnsPortal matches the given query"
}
}Return portal API
Retrieve a return label
Download a return label as a PDF
GET
/
brand
/
{brand_domain}
/
return-portal
/
label
/
download
Retrieve a return label
curl --request GET \
--url https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/label/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/label/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/label/download', 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/brand/{brand_domain}/return-portal/label/download",
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: Bearer <token>"
],
]);
$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/brand/{brand_domain}/return-portal/label/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/brand/{brand_domain}/return-portal/label/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/label/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"code": 404,
"request": "api/v2/brand/brand_domain/return-portal",
"message": "No ReturnsPortal matches the given query"
}
}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
The JWT generated when starting the Return Portal process
Path Parameters
The domain of the brand configured for your return portal.
Query Parameters
Token that is used to find the right parcel.
Response
OK
The response is of type file.
⌘I