Retrieve a shipping method
curl --request GET \
--url https://panel.sendcloud.sc/api/v2/shipping_methods/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://panel.sendcloud.sc/api/v2/shipping_methods/{id}"
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/shipping_methods/{id}', 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/shipping_methods/{id}",
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/shipping_methods/{id}"
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/shipping_methods/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/shipping_methods/{id}")
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{
"shipping_method": {
"id": 117,
"name": "DHLForYou Drop Off",
"carrier": "dhl",
"min_weight": "0.001",
"max_weight": "20.000",
"service_point_input": "none",
"price": 0,
"countries": [
{
"id": 1,
"name": "Belgium",
"price": 7.9,
"currency": "EUR",
"converted_price": null,
"iso_2": "BE",
"iso_3": "BEL",
"lead_time_hours": 24
},
{
"id": 2,
"name": "Netherlands",
"price": 5.2,
"currency": "EUR",
"converted_price": null,
"iso_2": "NL",
"iso_3": "NLD",
"lead_time_hours": 24
}
]
}
}{
"error": {
"request": "api/v2/shipping_methods/0",
"code": 404,
"message": "Not found."
}
}Shipping methods API
Retrieve a shipping method
Get information about a shipping method based on its id and your default sender address.
GET
/
shipping_methods
/
{id}
Retrieve a shipping method
curl --request GET \
--url https://panel.sendcloud.sc/api/v2/shipping_methods/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://panel.sendcloud.sc/api/v2/shipping_methods/{id}"
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/shipping_methods/{id}', 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/shipping_methods/{id}",
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/shipping_methods/{id}"
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/shipping_methods/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://panel.sendcloud.sc/api/v2/shipping_methods/{id}")
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{
"shipping_method": {
"id": 117,
"name": "DHLForYou Drop Off",
"carrier": "dhl",
"min_weight": "0.001",
"max_weight": "20.000",
"service_point_input": "none",
"price": 0,
"countries": [
{
"id": 1,
"name": "Belgium",
"price": 7.9,
"currency": "EUR",
"converted_price": null,
"iso_2": "BE",
"iso_3": "BEL",
"lead_time_hours": 24
},
{
"id": 2,
"name": "Netherlands",
"price": 5.2,
"currency": "EUR",
"converted_price": null,
"iso_2": "NL",
"iso_3": "NLD",
"lead_time_hours": 24
}
]
}
}{
"error": {
"request": "api/v2/shipping_methods/0",
"code": 404,
"message": "Not found."
}
}OAuth2 scopes required:
read:shipping-method. See Scopes for OAuth apps.API v2 is entering maintenance mode. New users should start with API v3 to access our latest features and improved performance. Already using v2? Don’t worry, your current integration remains fully functional. Read more about maintenance mode, or check out the migration guide for API v3.
sender_address id.
To see zonal carrier shipping methods, you need to provide the
to_country, from_postal_code and to_postal_code query parameters.Authorizations
HTTPBasicAuthOAuth2ClientCreds
Query Parameters
A country ISO 2 code for the recipient country. A country represented by its ISO 3166-1 alpha-2 code
Available options:
AW, AF, AO, AI, AX, AL, AD, AE, AR, AM, AS, AQ, TF, AG, AU, AT, AZ, BI, BE, BJ, BQ, BF, BD, BG, BH, BS, BA, BL, BY, BZ, BM, BO, BR, BB, BN, BT, BV, BW, CF, CA, CC, CH, CL, CN, CI, CM, CD, CG, CK, CO, KM, CV, CR, CU, CW, CX, KY, CY, CZ, DE, DJ, DM, DK, DO, DZ, EC, EG, ER, EH, ES, EE, ET, FI, FJ, FK, FR, FO, FM, GA, GB, GE, GG, GH, GI, GN, GP, GM, GW, GQ, GR, GD, GL, GT, GF, GU, GY, HK, HM, HN, HR, HT, HU, ID, IM, IN, IO, IE, IR, IQ, IS, IL, IT, JM, JE, JO, JP, KZ, KE, KG, KH, KI, KN, KR, KW, LA, LB, LR, LY, LC, LI, LK, LS, LT, LU, LV, MO, MF, MA, MC, MD, MG, MV, MX, MH, MK, ML, MT, MM, ME, MN, MP, MZ, MR, MS, MQ, MU, MW, MY, YT, NA, NC, NE, NF, NG, NI, NU, NL, NO, NP, NR, NZ, OM, PK, PA, PN, PE, PH, PW, PG, PL, PR, KP, PT, PY, PS, PF, QA, RE, RO, RU, RW, SA, SD, SN, SG, GS, SH, SJ, SB, SL, SV, SM, SO, PM, RS, SS, ST, SR, SK, SI, SE, SZ, SX, SC, SY, TC, TD, TG, TH, TJ, TK, TM, TL, TO, TT, TN, TR, TV, TW, TZ, UG, UA, UM, UY, US, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, ZA, ZM, ZW, IC, XK Example:
"NL"