curl --request POST \
--url https://panel.sendcloud.sc/api/v3/dsf/tickets/lost \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"tracking_number": "3SABCD1234567",
"carrier_contract_id": 123,
"contents_sales_price": {
"price": 10.55,
"currency": "EUR"
},
"contents_purchase_price": {
"price": 8,
"currency": "EUR"
},
"contents_description": "The parcel contains 3 t-shits and 1 pair of shoes.",
"parcel_exterior_description": "The box has our branding.",
"additional_remarks": "<string>",
"sales_invoice": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"purchase_invoice": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"customer_confirmation": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"carrier_claim_form": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
}
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/dsf/tickets/lost"
payload = {
"tracking_number": "3SABCD1234567",
"carrier_contract_id": 123,
"contents_sales_price": {
"price": 10.55,
"currency": "EUR"
},
"contents_purchase_price": {
"price": 8,
"currency": "EUR"
},
"contents_description": "The parcel contains 3 t-shits and 1 pair of shoes.",
"parcel_exterior_description": "The box has our branding.",
"additional_remarks": "<string>",
"sales_invoice": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"purchase_invoice": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"customer_confirmation": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"carrier_claim_form": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" }
}
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',
carrier_contract_id: 123,
contents_sales_price: {price: 10.55, currency: 'EUR'},
contents_purchase_price: {price: 8, currency: 'EUR'},
contents_description: 'The parcel contains 3 t-shits and 1 pair of shoes.',
parcel_exterior_description: 'The box has our branding.',
additional_remarks: '<string>',
sales_invoice: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
purchase_invoice: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
customer_confirmation: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
carrier_claim_form: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
}
})
};
fetch('https://panel.sendcloud.sc/api/v3/dsf/tickets/lost', 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/lost",
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',
'carrier_contract_id' => 123,
'contents_sales_price' => [
'price' => 10.55,
'currency' => 'EUR'
],
'contents_purchase_price' => [
'price' => 8,
'currency' => 'EUR'
],
'contents_description' => 'The parcel contains 3 t-shits and 1 pair of shoes.',
'parcel_exterior_description' => 'The box has our branding.',
'additional_remarks' => '<string>',
'sales_invoice' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'purchase_invoice' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'customer_confirmation' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'carrier_claim_form' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
]
]),
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/lost"
payload := strings.NewReader("{\n \"tracking_number\": \"3SABCD1234567\",\n \"carrier_contract_id\": 123,\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\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 \"additional_remarks\": \"<string>\",\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 \"customer_confirmation\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"carrier_claim_form\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\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/lost")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"tracking_number\": \"3SABCD1234567\",\n \"carrier_contract_id\": 123,\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\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 \"additional_remarks\": \"<string>\",\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 \"customer_confirmation\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"carrier_claim_form\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/dsf/tickets/lost")
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 \"carrier_contract_id\": 123,\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\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 \"additional_remarks\": \"<string>\",\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 \"customer_confirmation\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"carrier_claim_form\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n }\n}"
response = http.request(request)
puts response.read_bodyCreate a ticket for a lost parcel
Create a ticket for a lost parcel. It works with both your own contract and parcels created using Sendcloud rates.
curl --request POST \
--url https://panel.sendcloud.sc/api/v3/dsf/tickets/lost \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"tracking_number": "3SABCD1234567",
"carrier_contract_id": 123,
"contents_sales_price": {
"price": 10.55,
"currency": "EUR"
},
"contents_purchase_price": {
"price": 8,
"currency": "EUR"
},
"contents_description": "The parcel contains 3 t-shits and 1 pair of shoes.",
"parcel_exterior_description": "The box has our branding.",
"additional_remarks": "<string>",
"sales_invoice": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"purchase_invoice": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"customer_confirmation": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
},
"carrier_claim_form": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
}
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/dsf/tickets/lost"
payload = {
"tracking_number": "3SABCD1234567",
"carrier_contract_id": 123,
"contents_sales_price": {
"price": 10.55,
"currency": "EUR"
},
"contents_purchase_price": {
"price": 8,
"currency": "EUR"
},
"contents_description": "The parcel contains 3 t-shits and 1 pair of shoes.",
"parcel_exterior_description": "The box has our branding.",
"additional_remarks": "<string>",
"sales_invoice": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"purchase_invoice": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"customer_confirmation": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" },
"carrier_claim_form": { "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" }
}
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',
carrier_contract_id: 123,
contents_sales_price: {price: 10.55, currency: 'EUR'},
contents_purchase_price: {price: 8, currency: 'EUR'},
contents_description: 'The parcel contains 3 t-shits and 1 pair of shoes.',
parcel_exterior_description: 'The box has our branding.',
additional_remarks: '<string>',
sales_invoice: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
purchase_invoice: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
customer_confirmation: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
},
carrier_claim_form: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
}
})
};
fetch('https://panel.sendcloud.sc/api/v3/dsf/tickets/lost', 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/lost",
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',
'carrier_contract_id' => 123,
'contents_sales_price' => [
'price' => 10.55,
'currency' => 'EUR'
],
'contents_purchase_price' => [
'price' => 8,
'currency' => 'EUR'
],
'contents_description' => 'The parcel contains 3 t-shits and 1 pair of shoes.',
'parcel_exterior_description' => 'The box has our branding.',
'additional_remarks' => '<string>',
'sales_invoice' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'purchase_invoice' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'customer_confirmation' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
],
'carrier_claim_form' => [
'file_token' => 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
]
]),
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/lost"
payload := strings.NewReader("{\n \"tracking_number\": \"3SABCD1234567\",\n \"carrier_contract_id\": 123,\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\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 \"additional_remarks\": \"<string>\",\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 \"customer_confirmation\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"carrier_claim_form\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\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/lost")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"tracking_number\": \"3SABCD1234567\",\n \"carrier_contract_id\": 123,\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\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 \"additional_remarks\": \"<string>\",\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 \"customer_confirmation\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"carrier_claim_form\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v3/dsf/tickets/lost")
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 \"carrier_contract_id\": 123,\n \"contents_sales_price\": {\n \"price\": 10.55,\n \"currency\": \"EUR\"\n },\n \"contents_purchase_price\": {\n \"price\": 8,\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 \"additional_remarks\": \"<string>\",\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 \"customer_confirmation\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n },\n \"carrier_claim_form\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\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 own contract parcel and parcels created using Sendcloud rates is different. Please refer to relevant examples below.
- Own contract parcel
- Sendcloud rates parcel
Parcel tracking number
"3SABCD1234567"
The ID of the carrier contract associated with the parcel. Required when creating a ticket for a support only parcel that is not tracked in the Sendcloud system. The contract must belong to the authenticated user.
123
Sales value of the contents of the parcel
Show child attributes
Show child attributes
{ "price": 10.55, "currency": "EUR" }
Purchase value of the contents of the parcel
Show child attributes
Show child attributes
{ "price": 8, "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."
Measurements of the parcel in cm (L × W × H)
Show child attributes
Show child attributes
Additional remarks about the parcel
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" }
Written confirmation about the problem by the intended receiver
Show child attributes
Show child attributes
{ "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" }
Filled in carrier claim form file
Show child attributes
Show child attributes
{ "file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466" }
Response
Accepted
Create ticket response