Skip to main content
GET
/
insights
/
shipping-methods
/
transit-times
Retrieve shipping method transit times
curl --request GET \
  --url https://panel.sendcloud.sc/api/v2/insights/shipping-methods/transit-times \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://panel.sendcloud.sc/api/v2/insights/shipping-methods/transit-times"

headers = {"Authorization": "Basic <encoded-value>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://panel.sendcloud.sc/api/v2/insights/shipping-methods/transit-times', 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/insights/shipping-methods/transit-times",
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: Basic <encoded-value>"
],
]);

$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/insights/shipping-methods/transit-times"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Basic <encoded-value>")

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/insights/shipping-methods/transit-times")
.header("Authorization", "Basic <encoded-value>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://panel.sendcloud.sc/api/v2/insights/shipping-methods/transit-times")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
{
  "transit_times": [
    {
      "user_id": "1234",
      "carrier_code": "postnl",
      "shipping_method_code": "postnl:standard/kg=0-23",
      "from_country": "NL",
      "to_country": "DE",
      "start_date": "2022-12-31",
      "end_date": "2023-12-31",
      "total_parcels": 240,
      "transit_time": 92
    },
    {
      "user_id": "1234",
      "carrier_code": "dhl",
      "shipping_method_code": "dhl:complete/standard",
      "from_country": "DE",
      "to_country": "AT",
      "start_date": "2022-12-31",
      "end_date": "2023-12-31",
      "total_parcels": 752,
      "transit_time": 53
    }
  ]
}
{
"detail": [
{
"loc": [
"query",
"carrier-code"
],
"msg": "field required",
"type": "value_error.missing"
},
{
"loc": [
"query",
"shipping-method-code"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Query Parameters

shipping_method_code
string[]
required

selection of shipping methods

from_country
string

origin country

Example:

"DE"

to_country
string

destination country

Example:

"NL"

start_date
string<date>

first delivery start date

Example:

"2021-12-31"

end_date
string<date>

first delivery end date

Example:

"2022-12-31"

Response

OK

transit_times
object[]
required

array of transit time objects