List carrier agents in postal code.
curl --request GET \
--url 'https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=' \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token="
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=', 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://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=",
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://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token="
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://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=")
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{
"data": [
{
"id": "c5540f2b-3eea-45c4-957a-9d7b53f899e7",
"agent_no": "2134",
"carrier": "postnord",
"company": "Kiosk 88",
"address_line1": "Nordre Frihavnsgade",
"postal_code": "2100",
"city": "Copenhagen",
"country": "DK",
"type": "agent",
"distance": 1.22,
"name_line1": "John",
"name_line2": "Doe",
"address_line2": "88",
"coordinates": {
"latitude": 55.702632904052734,
"longitude": 12.58386516571045
},
"opening_hours": [
{
"opens": "07:30:00",
"closes": "17:30:00"
}
]
}
],
"meta": {
"current_page": "1",
"from": "1",
"path": "https://example.com/api/example",
"per_page": "15",
"to": "15",
"last_page": "10",
"total": "140"
}
}{
"message": "Description of the error will be inserted here.",
"code": "ValidationException",
"id": "",
"errors": {},
"links": {}
}{
"message": "Description of the error will be inserted here.",
"code": "ValidationException",
"id": "",
"errors": {},
"links": {}
}Agents
List carrier agents in postal code.
This endpoint is used to index all agents for a given carrier in a given postal code.
GET
/
v1
/
website
/
{team}
/
agents
/
carrier
/
{carrier}
/
country
/
{country}
/
postalcode
/
{postalCode}
List carrier agents in postal code.
curl --request GET \
--url 'https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=' \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token="
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=', 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://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=",
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://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token="
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://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}/postalcode/{postalCode}?api_token=")
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{
"data": [
{
"id": "c5540f2b-3eea-45c4-957a-9d7b53f899e7",
"agent_no": "2134",
"carrier": "postnord",
"company": "Kiosk 88",
"address_line1": "Nordre Frihavnsgade",
"postal_code": "2100",
"city": "Copenhagen",
"country": "DK",
"type": "agent",
"distance": 1.22,
"name_line1": "John",
"name_line2": "Doe",
"address_line2": "88",
"coordinates": {
"latitude": 55.702632904052734,
"longitude": 12.58386516571045
},
"opening_hours": [
{
"opens": "07:30:00",
"closes": "17:30:00"
}
]
}
],
"meta": {
"current_page": "1",
"from": "1",
"path": "https://example.com/api/example",
"per_page": "15",
"to": "15",
"last_page": "10",
"total": "140"
}
}{
"message": "Description of the error will be inserted here.",
"code": "ValidationException",
"id": "",
"errors": {},
"links": {}
}{
"message": "Description of the error will be inserted here.",
"code": "ValidationException",
"id": "",
"errors": {},
"links": {}
}Authorizations
Provide API Token as Bearer authentication
Query API Token
Path Parameters
The domain of the website making the agent lookup request
The carrier code
Available options:
postnord, gls, dao, bifrost, bring ISO3166 Alpha2 country code
Required string length:
2The postal code
Was this page helpful?
⌘I