Retrieve a List of Locations for an Account

This example shows you how to retrieve all the locations associated with an account.

Replace the following placeholders in the example with your own details:

  • VBC_TOKEN - a valid token (see authentication)
  • VBC_ACCOUNT_ID - the account number for the locations you are interested in

Write the code

Add the following to

Copy to Clipboard
curl -H "Authorization: Bearer $VBC_TOKEN" \$VBC_ACCOUNT_ID/locations

View full source

Run your code

Save this file to your machine and run it:

The response is a JSON object containing an array of location objects. See the API documentation for descriptions of the fields in the response.
            "name":"Test Location",
               "address_1":"23 MAIN ST",
               "time_zone":"America/New York"