curl --request POST \
--url https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": 0,
"message": "string",
"outgoing_parcel": 0,
"service_point": {
"id": 10875349
},
"refund": {
"refund_type": {
"code": "money"
},
"message": "string"
},
"delivery_option": "drop_off_point",
"products": [
{
"product_id": "1234",
"quantity": 1,
"description": "golden pen",
"value": 1,
"return_reason": 1
}
],
"incoming_parcel": {
"collo_count": 1,
"from_address_1": "string",
"from_address_2": "string",
"from_city": "string",
"from_company_name": "string",
"from_country": "IT",
"from_email": "string",
"from_house_number": "string",
"from_country_state": "IT-AN",
"from_name": "string",
"from_postal_code": "string",
"from_telephone": "string"
},
"selected_functionalities": {
"first_mile": "dropoff"
},
"selected_carrier_code": "string",
"pickup_date": "string"
}
'import requests
url = "https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming"
payload = {
"reason": 0,
"message": "string",
"outgoing_parcel": 0,
"service_point": { "id": 10875349 },
"refund": {
"refund_type": { "code": "money" },
"message": "string"
},
"delivery_option": "drop_off_point",
"products": [
{
"product_id": "1234",
"quantity": 1,
"description": "golden pen",
"value": 1,
"return_reason": 1
}
],
"incoming_parcel": {
"collo_count": 1,
"from_address_1": "string",
"from_address_2": "string",
"from_city": "string",
"from_company_name": "string",
"from_country": "IT",
"from_email": "string",
"from_house_number": "string",
"from_country_state": "IT-AN",
"from_name": "string",
"from_postal_code": "string",
"from_telephone": "string"
},
"selected_functionalities": { "first_mile": "dropoff" },
"selected_carrier_code": "string",
"pickup_date": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reason: 0,
message: 'string',
outgoing_parcel: 0,
service_point: {id: 10875349},
refund: {refund_type: {code: 'money'}, message: 'string'},
delivery_option: 'drop_off_point',
products: [
{
product_id: '1234',
quantity: 1,
description: 'golden pen',
value: 1,
return_reason: 1
}
],
incoming_parcel: {
collo_count: 1,
from_address_1: 'string',
from_address_2: 'string',
from_city: 'string',
from_company_name: 'string',
from_country: 'IT',
from_email: 'string',
from_house_number: 'string',
from_country_state: 'IT-AN',
from_name: 'string',
from_postal_code: 'string',
from_telephone: 'string'
},
selected_functionalities: {first_mile: 'dropoff'},
selected_carrier_code: 'string',
pickup_date: 'string'
})
};
fetch('https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming', 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/incoming",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 0,
'message' => 'string',
'outgoing_parcel' => 0,
'service_point' => [
'id' => 10875349
],
'refund' => [
'refund_type' => [
'code' => 'money'
],
'message' => 'string'
],
'delivery_option' => 'drop_off_point',
'products' => [
[
'product_id' => '1234',
'quantity' => 1,
'description' => 'golden pen',
'value' => 1,
'return_reason' => 1
]
],
'incoming_parcel' => [
'collo_count' => 1,
'from_address_1' => 'string',
'from_address_2' => 'string',
'from_city' => 'string',
'from_company_name' => 'string',
'from_country' => 'IT',
'from_email' => 'string',
'from_house_number' => 'string',
'from_country_state' => 'IT-AN',
'from_name' => 'string',
'from_postal_code' => 'string',
'from_telephone' => 'string'
],
'selected_functionalities' => [
'first_mile' => 'dropoff'
],
'selected_carrier_code' => 'string',
'pickup_date' => 'string'
]),
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://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming"
payload := strings.NewReader("{\n \"reason\": 0,\n \"message\": \"string\",\n \"outgoing_parcel\": 0,\n \"service_point\": {\n \"id\": 10875349\n },\n \"refund\": {\n \"refund_type\": {\n \"code\": \"money\"\n },\n \"message\": \"string\"\n },\n \"delivery_option\": \"drop_off_point\",\n \"products\": [\n {\n \"product_id\": \"1234\",\n \"quantity\": 1,\n \"description\": \"golden pen\",\n \"value\": 1,\n \"return_reason\": 1\n }\n ],\n \"incoming_parcel\": {\n \"collo_count\": 1,\n \"from_address_1\": \"string\",\n \"from_address_2\": \"string\",\n \"from_city\": \"string\",\n \"from_company_name\": \"string\",\n \"from_country\": \"IT\",\n \"from_email\": \"string\",\n \"from_house_number\": \"string\",\n \"from_country_state\": \"IT-AN\",\n \"from_name\": \"string\",\n \"from_postal_code\": \"string\",\n \"from_telephone\": \"string\"\n },\n \"selected_functionalities\": {\n \"first_mile\": \"dropoff\"\n },\n \"selected_carrier_code\": \"string\",\n \"pickup_date\": \"string\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": 0,\n \"message\": \"string\",\n \"outgoing_parcel\": 0,\n \"service_point\": {\n \"id\": 10875349\n },\n \"refund\": {\n \"refund_type\": {\n \"code\": \"money\"\n },\n \"message\": \"string\"\n },\n \"delivery_option\": \"drop_off_point\",\n \"products\": [\n {\n \"product_id\": \"1234\",\n \"quantity\": 1,\n \"description\": \"golden pen\",\n \"value\": 1,\n \"return_reason\": 1\n }\n ],\n \"incoming_parcel\": {\n \"collo_count\": 1,\n \"from_address_1\": \"string\",\n \"from_address_2\": \"string\",\n \"from_city\": \"string\",\n \"from_company_name\": \"string\",\n \"from_country\": \"IT\",\n \"from_email\": \"string\",\n \"from_house_number\": \"string\",\n \"from_country_state\": \"IT-AN\",\n \"from_name\": \"string\",\n \"from_postal_code\": \"string\",\n \"from_telephone\": \"string\"\n },\n \"selected_functionalities\": {\n \"first_mile\": \"dropoff\"\n },\n \"selected_carrier_code\": \"string\",\n \"pickup_date\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": 0,\n \"message\": \"string\",\n \"outgoing_parcel\": 0,\n \"service_point\": {\n \"id\": 10875349\n },\n \"refund\": {\n \"refund_type\": {\n \"code\": \"money\"\n },\n \"message\": \"string\"\n },\n \"delivery_option\": \"drop_off_point\",\n \"products\": [\n {\n \"product_id\": \"1234\",\n \"quantity\": 1,\n \"description\": \"golden pen\",\n \"value\": 1,\n \"return_reason\": 1\n }\n ],\n \"incoming_parcel\": {\n \"collo_count\": 1,\n \"from_address_1\": \"string\",\n \"from_address_2\": \"string\",\n \"from_city\": \"string\",\n \"from_company_name\": \"string\",\n \"from_country\": \"IT\",\n \"from_email\": \"string\",\n \"from_house_number\": \"string\",\n \"from_country_state\": \"IT-AN\",\n \"from_name\": \"string\",\n \"from_postal_code\": \"string\",\n \"from_telephone\": \"string\"\n },\n \"selected_functionalities\": {\n \"first_mile\": \"dropoff\"\n },\n \"selected_carrier_code\": \"string\",\n \"pickup_date\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"poller_url": "https://panel.sendcloud.sc/api/v2/brand/sendcloud-development/return-portal/label/polling?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MzQyMjA3MDgsImlkIjoxMTg1MDgyfQ.vSkcEU2wChq5Tq5_lGSRLtC03S4ZG_HgRk5JU7i3ZH4",
"return": 1185082,
"incoming_parcels": [
133726727
],
"payment_url": "https://mollie.com/paymen-url/pm_213123123"
}{
"error": {
"code": "invalid_postal_code",
"request": "api/v2/brand/devtest/return-portal/outgoing",
"message": "The postal code you provided is invalid."
}
}Create a return
Create a new return parcel based on an outgoing parcel.
curl --request POST \
--url https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": 0,
"message": "string",
"outgoing_parcel": 0,
"service_point": {
"id": 10875349
},
"refund": {
"refund_type": {
"code": "money"
},
"message": "string"
},
"delivery_option": "drop_off_point",
"products": [
{
"product_id": "1234",
"quantity": 1,
"description": "golden pen",
"value": 1,
"return_reason": 1
}
],
"incoming_parcel": {
"collo_count": 1,
"from_address_1": "string",
"from_address_2": "string",
"from_city": "string",
"from_company_name": "string",
"from_country": "IT",
"from_email": "string",
"from_house_number": "string",
"from_country_state": "IT-AN",
"from_name": "string",
"from_postal_code": "string",
"from_telephone": "string"
},
"selected_functionalities": {
"first_mile": "dropoff"
},
"selected_carrier_code": "string",
"pickup_date": "string"
}
'import requests
url = "https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming"
payload = {
"reason": 0,
"message": "string",
"outgoing_parcel": 0,
"service_point": { "id": 10875349 },
"refund": {
"refund_type": { "code": "money" },
"message": "string"
},
"delivery_option": "drop_off_point",
"products": [
{
"product_id": "1234",
"quantity": 1,
"description": "golden pen",
"value": 1,
"return_reason": 1
}
],
"incoming_parcel": {
"collo_count": 1,
"from_address_1": "string",
"from_address_2": "string",
"from_city": "string",
"from_company_name": "string",
"from_country": "IT",
"from_email": "string",
"from_house_number": "string",
"from_country_state": "IT-AN",
"from_name": "string",
"from_postal_code": "string",
"from_telephone": "string"
},
"selected_functionalities": { "first_mile": "dropoff" },
"selected_carrier_code": "string",
"pickup_date": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reason: 0,
message: 'string',
outgoing_parcel: 0,
service_point: {id: 10875349},
refund: {refund_type: {code: 'money'}, message: 'string'},
delivery_option: 'drop_off_point',
products: [
{
product_id: '1234',
quantity: 1,
description: 'golden pen',
value: 1,
return_reason: 1
}
],
incoming_parcel: {
collo_count: 1,
from_address_1: 'string',
from_address_2: 'string',
from_city: 'string',
from_company_name: 'string',
from_country: 'IT',
from_email: 'string',
from_house_number: 'string',
from_country_state: 'IT-AN',
from_name: 'string',
from_postal_code: 'string',
from_telephone: 'string'
},
selected_functionalities: {first_mile: 'dropoff'},
selected_carrier_code: 'string',
pickup_date: 'string'
})
};
fetch('https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming', 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/incoming",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 0,
'message' => 'string',
'outgoing_parcel' => 0,
'service_point' => [
'id' => 10875349
],
'refund' => [
'refund_type' => [
'code' => 'money'
],
'message' => 'string'
],
'delivery_option' => 'drop_off_point',
'products' => [
[
'product_id' => '1234',
'quantity' => 1,
'description' => 'golden pen',
'value' => 1,
'return_reason' => 1
]
],
'incoming_parcel' => [
'collo_count' => 1,
'from_address_1' => 'string',
'from_address_2' => 'string',
'from_city' => 'string',
'from_company_name' => 'string',
'from_country' => 'IT',
'from_email' => 'string',
'from_house_number' => 'string',
'from_country_state' => 'IT-AN',
'from_name' => 'string',
'from_postal_code' => 'string',
'from_telephone' => 'string'
],
'selected_functionalities' => [
'first_mile' => 'dropoff'
],
'selected_carrier_code' => 'string',
'pickup_date' => 'string'
]),
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://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming"
payload := strings.NewReader("{\n \"reason\": 0,\n \"message\": \"string\",\n \"outgoing_parcel\": 0,\n \"service_point\": {\n \"id\": 10875349\n },\n \"refund\": {\n \"refund_type\": {\n \"code\": \"money\"\n },\n \"message\": \"string\"\n },\n \"delivery_option\": \"drop_off_point\",\n \"products\": [\n {\n \"product_id\": \"1234\",\n \"quantity\": 1,\n \"description\": \"golden pen\",\n \"value\": 1,\n \"return_reason\": 1\n }\n ],\n \"incoming_parcel\": {\n \"collo_count\": 1,\n \"from_address_1\": \"string\",\n \"from_address_2\": \"string\",\n \"from_city\": \"string\",\n \"from_company_name\": \"string\",\n \"from_country\": \"IT\",\n \"from_email\": \"string\",\n \"from_house_number\": \"string\",\n \"from_country_state\": \"IT-AN\",\n \"from_name\": \"string\",\n \"from_postal_code\": \"string\",\n \"from_telephone\": \"string\"\n },\n \"selected_functionalities\": {\n \"first_mile\": \"dropoff\"\n },\n \"selected_carrier_code\": \"string\",\n \"pickup_date\": \"string\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": 0,\n \"message\": \"string\",\n \"outgoing_parcel\": 0,\n \"service_point\": {\n \"id\": 10875349\n },\n \"refund\": {\n \"refund_type\": {\n \"code\": \"money\"\n },\n \"message\": \"string\"\n },\n \"delivery_option\": \"drop_off_point\",\n \"products\": [\n {\n \"product_id\": \"1234\",\n \"quantity\": 1,\n \"description\": \"golden pen\",\n \"value\": 1,\n \"return_reason\": 1\n }\n ],\n \"incoming_parcel\": {\n \"collo_count\": 1,\n \"from_address_1\": \"string\",\n \"from_address_2\": \"string\",\n \"from_city\": \"string\",\n \"from_company_name\": \"string\",\n \"from_country\": \"IT\",\n \"from_email\": \"string\",\n \"from_house_number\": \"string\",\n \"from_country_state\": \"IT-AN\",\n \"from_name\": \"string\",\n \"from_postal_code\": \"string\",\n \"from_telephone\": \"string\"\n },\n \"selected_functionalities\": {\n \"first_mile\": \"dropoff\"\n },\n \"selected_carrier_code\": \"string\",\n \"pickup_date\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/brand/{brand_domain}/return-portal/incoming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": 0,\n \"message\": \"string\",\n \"outgoing_parcel\": 0,\n \"service_point\": {\n \"id\": 10875349\n },\n \"refund\": {\n \"refund_type\": {\n \"code\": \"money\"\n },\n \"message\": \"string\"\n },\n \"delivery_option\": \"drop_off_point\",\n \"products\": [\n {\n \"product_id\": \"1234\",\n \"quantity\": 1,\n \"description\": \"golden pen\",\n \"value\": 1,\n \"return_reason\": 1\n }\n ],\n \"incoming_parcel\": {\n \"collo_count\": 1,\n \"from_address_1\": \"string\",\n \"from_address_2\": \"string\",\n \"from_city\": \"string\",\n \"from_company_name\": \"string\",\n \"from_country\": \"IT\",\n \"from_email\": \"string\",\n \"from_house_number\": \"string\",\n \"from_country_state\": \"IT-AN\",\n \"from_name\": \"string\",\n \"from_postal_code\": \"string\",\n \"from_telephone\": \"string\"\n },\n \"selected_functionalities\": {\n \"first_mile\": \"dropoff\"\n },\n \"selected_carrier_code\": \"string\",\n \"pickup_date\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"poller_url": "https://panel.sendcloud.sc/api/v2/brand/sendcloud-development/return-portal/label/polling?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MzQyMjA3MDgsImlkIjoxMTg1MDgyfQ.vSkcEU2wChq5Tq5_lGSRLtC03S4ZG_HgRk5JU7i3ZH4",
"return": 1185082,
"incoming_parcels": [
133726727
],
"payment_url": "https://mollie.com/paymen-url/pm_213123123"
}{
"error": {
"code": "invalid_postal_code",
"request": "api/v2/brand/devtest/return-portal/outgoing",
"message": "The postal code you provided is invalid."
}
}Authorizations
The JWT generated when starting the Return Portal process
Path Parameters
The domain you defined in the brand settings.
Body
OK
The return reason identifier matching the ones provided from Sendcloud.
A message relating to the return.
The ID of the outgoing parcel for this return.
Details about the refund the customer is requesting
Show child attributes
Show child attributes
The options the customer has for returning this parcel:
- drop_off_point: At a drop-off point - Print at home
- drop_off_labelless: At a drop-off point - No printer needed
- in_store: Return in store
- pickup: Arrange a pick-up
drop_off_point, in_store, pickup 1The products or items being returned
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The service point that the customer has selected for returning the parcel
Show child attributes
Show child attributes
Shipping functionalities that need to be used for this return.
Show child attributes
Show child attributes
The identifier of the carrier that needs to be used for this return. Available carriers are listed in the response from the /brand/{brand_domain}/return-portal/outgoing endpoint
1The chosen date for the return parcel to be picked up
A list of images to attach to the return
10Show child attributes
Show child attributes
Optional customs information that should be provided for international returns. This information is used for generating customs documents.
Show child attributes
Show child attributes
{ "customs_invoice_nr": "INV-123", "export_type": "private", "invoice_date": "2023-08-24", "discount_granted": "14.99", "freight_costs": "4.65", "insurance_costs": "3.60", "other_costs": "1.20", "general_notes": "Compliance: Goods comply with international safety standards (CE certified).", "additional_declaration_statements": [ "With reference to the above shipment, I understate that the content is not made of leather parts of animal species protected by the Washington Convention.", "I solemnly declare that the contents of this document represent a true and accurate account of the events as they occurred. I acknowledge my responsibility for the information presented herein and understand that any misrepresentation or falsification may result in legal consequences or other penalties as applicable." ], "importer_of_record": { "name": "John Doe", "company_name": "ImporterCo", "address_1": "Maple Avenue", "house_number": "123", "postal_code": "90210", "city": "Springfield", "country_code": "US", "country_state": "US-MA", "telephone": "+15551234567", "email": "info@importer-of-record-example.com" }, "tax_numbers": { "sender": [ { "name": "VAT", "country_code": "NL", "value": "NL123456789B01" }, { "name": "EORI", "country_code": "NL", "value": "NL123456789" } ], "receiver": [ { "name": "EIN", "country_code": "US", "value": "123456789" } ], "importer_of_record": [ { "name": "EIN", "country_code": "US", "value": "987654321" } ] }, "return_data": { "return_postal_code": "1111 AA", "outbound_tracking_number": "JT1234567890", "outbound_shipment_date": "2023-08-14", "outbound_carrier_name": "UPS" } }
Response
OK
1The payment URL will be available when paid returns is enabled and a payment provider is connected. For more info on how it works please take a look at at our help center article.