curl --request GET \
--url 'https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}?api_token=' \
--header 'Authorization: Bearer <token>'{
"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": [
{
"day": "monday",
"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"
}
}This endpoint is used to index all agents for a given carrier in a given country.
curl --request GET \
--url 'https://app.smartsend.io/api/v1/website/{team}/agents/carrier/{carrier}/country/{country}?api_token=' \
--header 'Authorization: Bearer <token>'{
"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": [
{
"day": "monday",
"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"
}
}Provide API Token as Bearer authentication
Query API Token
The domain of the website making the agent lookup request
The carrier code
postnord, gls, dao, bifrost, bring ISO3166 Alpha2 country code
2Successful operation
Data container
Show child attributes
Unique ID
"c5540f2b-3eea-45c4-957a-9d7b53f899e7"
The carriers own number for the agent
"2134"
The carrier code
"postnord"
The company name
"Kiosk 88"
The first address line
"Nordre Frihavnsgade"
The postal code
"2100"
The city
"Copenhagen"
ISO3166 Alpha2 country code
"DK"
The resource type
agent "agent"
The calculated distance to the agent in kilometers
x >= 01.22
The first name line
"John"
The second name line
"Doe"
The second address line
"88"
Opening hours
Show child attributes
The weekday
monday, tuesday, wednesday, thursday, friday, saturday, sunday The time in the format HH:MM:SS also known as partial-time accoridng to RFC 3339, section 5.6.
"07:30:00"
The time in the format HH:MM:SS also known as partial-time accoridng to RFC 3339, section 5.6.
"17:30:00"
Legth Aware Pagination Resource
Show child attributes
The page of the current request
"1"
Results from number
"1"
Path of the api request used when modifying the pagination parameters
"https://example.com/api/example"
The number of results per page
"15"
Results to number
"15"
The last page
"10"
Total number of results
"140"
Was this page helpful?