Step 2: Retrieve Accounts
This section only applies to Partner Portal Accounts.
To retrieve a complete list of Accounts that you have access to, you can make the below call.
GET
https://api.yextapis.com/v2/accounts?api_key=API_KEY&v=YYYYMMDD
Response Body:
{
"meta": {
"uuid": "3e253b15-dbe1-4ac1-b082-b3bf6ba44fd1",
"errors": []
},
"response": {
"count": 3,
"accounts": [
{
"accountId": "830447",
"locationCount": 0,
"subAccountCount": 1
},
{
"accountId": "CBB-4251158",
"locationCount": 1,
"subAccountCount": 0,
"parentAccountId": "830447"
}
]
}
}
All services are provisioned at the top-level account (830447 in the example above), so all calls should use the top-level account ID when constructing the URL.
For more information, see the documentation for the List Accounts endpoint .
Feedback
<% elem.innerText %>