Create a ticket for a delivered but not received parcel
curl --request POST \
--url https://panel.sendcloud.sc/api/v3/dsf/tickets/delivered-but-not-received \
--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-shirts 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"
},
"carrier_claim_form": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
}
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/dsf/tickets/delivered-but-not-received"
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-shirts 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" },
"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-shirts 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'
},
carrier_claim_form: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
}
})
};
fetch('https://panel.sendcloud.sc/api/v3/dsf/tickets/delivered-but-not-received', 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/delivered-but-not-received",
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-shirts 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'
],
'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/delivered-but-not-received"
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-shirts 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 \"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/delivered-but-not-received")
.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-shirts 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 \"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/delivered-but-not-received")
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-shirts 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 \"carrier_claim_form\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ticket_id": 155
}Tickets
Create a ticket for a delivered but not received parcel
Create a ticket for a delivered but not received parcel. It works with both your own contract and parcels created using Sendcloud rates.
POST
/
dsf
/
tickets
/
delivered-but-not-received
Create a ticket for a delivered but not received parcel
curl --request POST \
--url https://panel.sendcloud.sc/api/v3/dsf/tickets/delivered-but-not-received \
--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-shirts 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"
},
"carrier_claim_form": {
"file_token": "b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466"
}
}
'import requests
url = "https://panel.sendcloud.sc/api/v3/dsf/tickets/delivered-but-not-received"
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-shirts 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" },
"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-shirts 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'
},
carrier_claim_form: {
file_token: 'b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466'
}
})
};
fetch('https://panel.sendcloud.sc/api/v3/dsf/tickets/delivered-but-not-received', 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/delivered-but-not-received",
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-shirts 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'
],
'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/delivered-but-not-received"
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-shirts 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 \"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/delivered-but-not-received")
.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-shirts 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 \"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/delivered-but-not-received")
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-shirts 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 \"carrier_claim_form\": {\n \"file_token\": \"b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ticket_id": 155
}OAuth2 scopes required:
write:support-ticket. See Scopes for OAuth apps.Authorizations
HTTPBasicAuthOAuth2ClientCreds
Query Parameters
Body
application/json
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