get
https://sandbox-api.viantinc.com/{basePath}/agency/getAllAgencies
Returns details about all of the agencies under the account.
Request
GET /agency/getAllAgencies
Response
{
messages: [ <message object> ],
entity: [ <agency object> ]
}
Agency Object
{
id: <integer>,
name: <string>,
contact_name: <string>,
street: <string>,
city: <string>,
state: <string>,
zip: <string>,
country: <string>,
phone: <string>,
fax: <string>,
email: <string>,
description: <string>,
externalAgencyId: <string>
}
Example
Request
curl -u <user>:<password> https://sandbox-api.viant.com/v1/agency/getAllAgencies
Response
{
"messages": [],
"entity": [
{
"name": "My new agency",
"contact_name": "John Smith",
"street": "123 Any St",
"city": "New York",
"state": "NY",
"zip": "10018",
"country": "USA",
"phone": "555-555-5555",
"fax": "444-444-4444",
"email": "[email protected]",
"description": "This is my new agency",
"externalAgencyId": "123#Test"
}
]
}
Get By External Agency ID
Request
GET /v1/agency?externalAgencyId=123#Test
Response
{
"messages": [],
"entity": [
{
"name": "My new agency",
"contact_name": "John Smith",
"street": "123 Any St",
"city": "New York",
"state": "NY",
"zip": "10018",
"country": "USA",
"phone": "555-555-5555",
"fax": "444-444-4444",
"email": "[email protected]",
"description": "This is my new agency",
"externalAgencyId": "123#Test"
}
]
}