curl --request POST \
--url https://panel.sendcloud.sc/api/v3/dsf/tickets/delay \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"tracking_number": "3SABCD1234567",
"contents_sales_price": {
"price": 10.55,
"currency": "EUR"
},
"contents_description": "The parcel contains 3 t-shits and 1 pair of shoes.",
"parcel_exterior_description": "The box has our branding.",
"sales_invoice": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"purchase_invoice": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"contents_purchase_price": {
"price": 8,
"currency": "EUR"
}
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/dsf/tickets/delay"
payload = {
"tracking_number": "3SABCD1234567",
"contents_sales_price": {
"price": 10.55,
"currency": "EUR"
},
"contents_description": "The parcel contains 3 t-shits and 1 pair of shoes.",
"parcel_exterior_description": "The box has our branding.",
"sales_invoice": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"purchase_invoice": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"contents_purchase_price": {
"price": 8,
"currency": "EUR"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tracking_number: '3SABCD1234567',
contents_sales_price: {price: 10.55, currency: 'EUR'},
contents_description: 'The parcel contains 3 t-shits and 1 pair of shoes.',
parcel_exterior_description: 'The box has our branding.',
sales_invoice: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
purchase_invoice: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
contents_purchase_price: {price: 8, currency: 'EUR'}
})
};
fetch('https://panel.sendcloud.sc/api/v3/dsf/tickets/delay', 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/v3/dsf/tickets/delay",
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([
'tracking_number' => '3SABCD1234567',
'contents_sales_price' => [
'price' => 10.55,
'currency' => 'EUR'
],
'contents_description' => 'The parcel contains 3 t-shits and 1 pair of shoes.',
'parcel_exterior_description' => 'The box has our branding.',
'sales_invoice' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'purchase_invoice' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'contents_purchase_price' => [
'price' => 8,
'currency' => 'EUR'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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/v3/dsf/tickets/delay"
payload := strings.NewReader("{\n \"tracking_number\": \"3SABCD1234567\",\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_description\": \"The parcel contains 3 t-shits and 1 pair of shoes.\",\n \"parcel_exterior_description\": \"The box has our branding.\",\n \"sales_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"purchase_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\n \"currency\": \"EUR\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/v3/dsf/tickets/delay")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"tracking_number\": \"3SABCD1234567\",\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_description\": \"The parcel contains 3 t-shits and 1 pair of shoes.\",\n \"parcel_exterior_description\": \"The box has our branding.\",\n \"sales_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"purchase_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\n \"currency\": \"EUR\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/dsf/tickets/delay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tracking_number\": \"3SABCD1234567\",\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_description\": \"The parcel contains 3 t-shits and 1 pair of shoes.\",\n \"parcel_exterior_description\": \"The box has our branding.\",\n \"sales_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"purchase_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\n \"currency\": \"EUR\"\n }\n}"
response = http.request(request)
puts response.read_bodyCreate a ticket for a delayed parcel
Create a ticket for a delayed parcel. This support type is only available for parcels created using Sendcloud rates.
curl --request POST \
--url https://panel.sendcloud.sc/api/v3/dsf/tickets/delay \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"tracking_number": "3SABCD1234567",
"contents_sales_price": {
"price": 10.55,
"currency": "EUR"
},
"contents_description": "The parcel contains 3 t-shits and 1 pair of shoes.",
"parcel_exterior_description": "The box has our branding.",
"sales_invoice": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"purchase_invoice": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"contents_purchase_price": {
"price": 8,
"currency": "EUR"
}
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/dsf/tickets/delay"
payload = {
"tracking_number": "3SABCD1234567",
"contents_sales_price": {
"price": 10.55,
"currency": "EUR"
},
"contents_description": "The parcel contains 3 t-shits and 1 pair of shoes.",
"parcel_exterior_description": "The box has our branding.",
"sales_invoice": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"purchase_invoice": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"contents_purchase_price": {
"price": 8,
"currency": "EUR"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tracking_number: '3SABCD1234567',
contents_sales_price: {price: 10.55, currency: 'EUR'},
contents_description: 'The parcel contains 3 t-shits and 1 pair of shoes.',
parcel_exterior_description: 'The box has our branding.',
sales_invoice: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
purchase_invoice: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
contents_purchase_price: {price: 8, currency: 'EUR'}
})
};
fetch('https://panel.sendcloud.sc/api/v3/dsf/tickets/delay', 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/v3/dsf/tickets/delay",
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([
'tracking_number' => '3SABCD1234567',
'contents_sales_price' => [
'price' => 10.55,
'currency' => 'EUR'
],
'contents_description' => 'The parcel contains 3 t-shits and 1 pair of shoes.',
'parcel_exterior_description' => 'The box has our branding.',
'sales_invoice' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'purchase_invoice' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'contents_purchase_price' => [
'price' => 8,
'currency' => 'EUR'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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/v3/dsf/tickets/delay"
payload := strings.NewReader("{\n \"tracking_number\": \"3SABCD1234567\",\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_description\": \"The parcel contains 3 t-shits and 1 pair of shoes.\",\n \"parcel_exterior_description\": \"The box has our branding.\",\n \"sales_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"purchase_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\n \"currency\": \"EUR\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/v3/dsf/tickets/delay")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"tracking_number\": \"3SABCD1234567\",\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_description\": \"The parcel contains 3 t-shits and 1 pair of shoes.\",\n \"parcel_exterior_description\": \"The box has our branding.\",\n \"sales_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"purchase_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\n \"currency\": \"EUR\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/dsf/tickets/delay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tracking_number\": \"3SABCD1234567\",\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_description\": \"The parcel contains 3 t-shits and 1 pair of shoes.\",\n \"parcel_exterior_description\": \"The box has our branding.\",\n \"sales_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"purchase_invoice\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\n \"currency\": \"EUR\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Basic Authentication using API key and secrets is currently the main authentication mechanism.
Query Parameters
Set to true to force a portal claim. Supported for Colissimo, Chronopost, Colis Privé, Mondial Relay, InPost ES, and DHL Express carriers only. Requires a carrier contract setup.
Body
Data that is needed for creation of a ticket for a delayed parcel created using Sendcloud rates.
Parcel tracking number
"3SABCD1234567"
Sales value of the contents of the parcel
Show child attributes
Show child attributes
{ "price": 10.55, "currency": "EUR" }
Description of the contents of the parcel
"The parcel contains 3 t-shits and 1 pair of shoes."
Parcel exterior description
"The box has our branding."
The sales invoice
Show child attributes
Show child attributes
{ "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" }
The purchase invoice
Show child attributes
Show child attributes
{ "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" }
Purchase value of the contents of the parcel
Show child attributes
Show child attributes
{ "price": 8, "currency": "EUR" }
Response
Accepted
Create ticket response