Partners & Directory Owners

Finding your API token

Partners and directory owners can request a directory token directly from their dedicated customer success rep.

πŸ“˜

Directory token

The directory token can be used for APIs dedicated to partners and directory owners, like the Create Business API, or alternately, in order to send API requests on behalf of a specific business that lives under the directory. For example, getting all clients of a given business, as demonstrated in the next section below.

πŸ“˜

x-on-behalf-of

The x-on-behalf-of header lets you send API requests on behalf of specific businesses using the directory token. By specifying the business id in the x-on-behalf-of header we will return only the results for that business as shown in the example below.

Sending your first API request to inTandem platform

Example of an API request for getting business clients:

GET https://api.vcita.biz/platform/v1/clients

headers: {"Authorization": "Bearer YOUR_DIRECTORY_TOKEN"}

curl --location --request GET 'https://api.vcita.biz/platform/v1/clients' \
--header 'x-on-behalf-of: {BUSINESS_ID}' \
--header 'Authorization: Bearer {DIRECTORY_TOKEN}' \

Example of API Response

{
    "status": "OK",
    "data": {
        "clients": [
            {
                "id": "6vc9t1hthvlvz34f",
                "first_name": "My",
                "last_name": "Name",
                "mobile_phone": null,
                "email": "[email protected]",
                "address": null,
                "created_at": "2021-08-12T13:03:47Z",
                "updated_at": "2021-10-13T09:37:37Z",
                "customer_status": "lead",
                "tags": [],
                "opt_in": null,
                "source": "Facebook",
                "source_url": null,
                "channel": null,
                "campaign": null,
                "business_uid": "ua123a14yoqqz3r3"
            }
         [
     }
}