Carrier configurations
Retrieve Carrier Configurations
Lists the carriers configured in your account (Settings > Carriers).
Use it to discover the carrier_reference values accepted by Create
Shipment and Create Booking, and the carrier_id values used as
filters in List Shipments and PUDO locations.
The same carrier (carrier_id) can appear multiple times with
different carrier_reference values — one per configuration, for
example two UPS accounts. No configured carriers returns HTTP 200 with
count: 0 and empty data.
GET
/
v5
/
carrier-configs
/
Retrieve Carrier Configurations
curl --request GET \
--url https://api.perform.ai/v5/carrier-configs/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.perform.ai/v5/carrier-configs/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.perform.ai/v5/carrier-configs/', 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.perform.ai/v5/carrier-configs/",
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.perform.ai/v5/carrier-configs/"
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.perform.ai/v5/carrier-configs/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perform.ai/v5/carrier-configs/")
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{
"api_response": "200",
"message": "Total pages: 1",
"count": 2,
"pages": 1,
"data": [
{
"carrier_id": "dhleco",
"carrier_name": "DHL eCommerce",
"carrier_reference": "dhl-ecommerce-de",
"carrier_description": "outbound Germany"
},
{
"carrier_id": "upsglo",
"carrier_name": "UPS",
"carrier_reference": "ups-returns",
"carrier_description": "return booking"
}
]
}{
"api_response": "<string>",
"message": "<string>",
"errors": {}
}{
"api_response": 403,
"message": "Key not authorized"
}{
"api_response": 429,
"message": "Throttled"
}{
"api_response": "500",
"message": "System error"
}Authorizations
Used by every functional endpoint. Generate the token with POST /auth/oauth/token/ and send it as Authorization: Bearer {token}.
Query Parameters
Configurations per page. Default 25, maximum 2000.
Required range:
x <= 2000Page number.
⌘I
Retrieve Carrier Configurations
curl --request GET \
--url https://api.perform.ai/v5/carrier-configs/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.perform.ai/v5/carrier-configs/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.perform.ai/v5/carrier-configs/', 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.perform.ai/v5/carrier-configs/",
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.perform.ai/v5/carrier-configs/"
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.perform.ai/v5/carrier-configs/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perform.ai/v5/carrier-configs/")
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{
"api_response": "200",
"message": "Total pages: 1",
"count": 2,
"pages": 1,
"data": [
{
"carrier_id": "dhleco",
"carrier_name": "DHL eCommerce",
"carrier_reference": "dhl-ecommerce-de",
"carrier_description": "outbound Germany"
},
{
"carrier_id": "upsglo",
"carrier_name": "UPS",
"carrier_reference": "ups-returns",
"carrier_description": "return booking"
}
]
}{
"api_response": "<string>",
"message": "<string>",
"errors": {}
}{
"api_response": 403,
"message": "Key not authorized"
}{
"api_response": 429,
"message": "Throttled"
}{
"api_response": "500",
"message": "System error"
}