Retrieve a carrier
curl --request GET \
--url https://api.example.com/v1/carriers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/carriers/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/carriers/{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://api.example.com/v1/carriers/{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: Bearer <token>"
],
]);
$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://api.example.com/v1/carriers/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/carriers/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/carriers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "carrier",
"name": "<string>",
"capabilities": [
"<string>"
],
"logo_url": "<string>",
"status": "available",
"countries": {
"origin": [
"<string>"
],
"destination": [
"<string>"
]
},
"services": [
{
"code": "<string>",
"name": "<string>",
"level": "same_day",
"carrier_code": "<string>",
"domestic": true,
"international": true,
"countries": [
"<string>"
]
}
],
"packagings": [
{
"code": "<string>",
"name": "<string>",
"max_weight": {
"value": 123,
"unit": "g"
},
"dimensions": {
"length": 123,
"width": 123,
"height": 123,
"unit": "mm"
}
}
],
"label": {
"formats": [
"<string>"
],
"sizes": [
"<string>"
]
},
"standardized_features": [
"<string>"
],
"shipment_config_schema": {},
"manifest_config_schema": {},
"manifest": {
"required": true,
"scope": [
"connection"
],
"modes": [
"explicit"
],
"async": true,
"multiple_per_request": true,
"ship_date_policies": [
"<string>"
],
"cutoff_local_time": "<string>",
"carrier_auto_close": true,
"void_after": true,
"reprint": true,
"max_shipments": 123,
"documents": [
"<string>"
]
},
"carrier_metadata_schema": {},
"pickup_config_schema": {},
"pickup": {
"requires": [
"<string>"
],
"same_day_cutoff": "<string>"
},
"tracking": {
"number_patterns": [
"<string>"
],
"public_url_template": "<string>"
},
"connection_methods": [
{
"type": "credentials",
"label": "<string>",
"issuer": "<string>",
"authorization_endpoint": "<string>",
"token_endpoint": "<string>",
"openid": true,
"scopes": [
"<string>"
],
"grant_after_callback": "authorization_code",
"app": {
"required": true,
"system_app": true,
"dynamic_registration": true
},
"credentials_schema": {},
"config_schema": {}
}
],
"inbound": {
"supported": true,
"registration": "automatic",
"signature": "<string>",
"header": "<string>"
},
"test_environment": "sandbox"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}Carriers
Retrieve a carrier
GET
/
v1
/
carriers
/
{id}
Retrieve a carrier
curl --request GET \
--url https://api.example.com/v1/carriers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/carriers/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/carriers/{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://api.example.com/v1/carriers/{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: Bearer <token>"
],
]);
$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://api.example.com/v1/carriers/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/carriers/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/carriers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "carrier",
"name": "<string>",
"capabilities": [
"<string>"
],
"logo_url": "<string>",
"status": "available",
"countries": {
"origin": [
"<string>"
],
"destination": [
"<string>"
]
},
"services": [
{
"code": "<string>",
"name": "<string>",
"level": "same_day",
"carrier_code": "<string>",
"domestic": true,
"international": true,
"countries": [
"<string>"
]
}
],
"packagings": [
{
"code": "<string>",
"name": "<string>",
"max_weight": {
"value": 123,
"unit": "g"
},
"dimensions": {
"length": 123,
"width": 123,
"height": 123,
"unit": "mm"
}
}
],
"label": {
"formats": [
"<string>"
],
"sizes": [
"<string>"
]
},
"standardized_features": [
"<string>"
],
"shipment_config_schema": {},
"manifest_config_schema": {},
"manifest": {
"required": true,
"scope": [
"connection"
],
"modes": [
"explicit"
],
"async": true,
"multiple_per_request": true,
"ship_date_policies": [
"<string>"
],
"cutoff_local_time": "<string>",
"carrier_auto_close": true,
"void_after": true,
"reprint": true,
"max_shipments": 123,
"documents": [
"<string>"
]
},
"carrier_metadata_schema": {},
"pickup_config_schema": {},
"pickup": {
"requires": [
"<string>"
],
"same_day_cutoff": "<string>"
},
"tracking": {
"number_patterns": [
"<string>"
],
"public_url_template": "<string>"
},
"connection_methods": [
{
"type": "credentials",
"label": "<string>",
"issuer": "<string>",
"authorization_endpoint": "<string>",
"token_endpoint": "<string>",
"openid": true,
"scopes": [
"<string>"
],
"grant_after_callback": "authorization_code",
"app": {
"required": true,
"system_app": true,
"dynamic_registration": true
},
"credentials_schema": {},
"config_schema": {}
}
],
"inbound": {
"supported": true,
"registration": "automatic",
"signature": "<string>",
"header": "<string>"
},
"test_environment": "sandbox"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"carrier": {
"id": "<string>",
"connection": "<string>",
"code": "<string>",
"message": "<string>"
},
"shipment": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}
}Authorizations
apiKeyoauth2
sk_test_ / sk_live_ / rk_test_ / rk_live_ keys
Headers
Act on behalf of a connected account (acct_...)
Path Parameters
Response
OK
Available options:
carrier Available options:
available, beta, deprecated Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
JSON Schema 2020-12 document, may use x-ui-* and x-secret hints
JSON Schema 2020-12 document, may use x-ui-* and x-secret hints
Show child attributes
Show child attributes
JSON Schema 2020-12 document, may use x-ui-* and x-secret hints
JSON Schema 2020-12 document, may use x-ui-* and x-secret hints
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
sandbox, simulator, none