MENU navbar-image

Introduction

This is the official documentation for the Brandtrack API.

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include a x-customer-api-key header with the value "{YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

If are not sure about how to get your token feel free to contact our team.

Accounts

List accounts

requires authentication

Return a paginated list of accounts available for the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/accounts?page=1&per_page=100&order_by=id&direction=desc" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/accounts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'order_by' => 'id',
            'direction' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET v2/accounts

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

The page requested. Default to 1. Example: 1

per_page   integer  optional  

The number of items per page. Default to 25. Example: 100

order_by   string  optional  

The field to order the results by. Default to id. Example: id

direction   string  optional  

The direction method to sort results. Default to asc. Example: desc

Get an account by its ID

requires authentication

Return a single account by its ID, if available to the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/accounts/19120?using_account_id=0" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/accounts/19120';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'using_account_id' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

GET v2/accounts/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the account. Example: 19120

Query Parameters

using_account_id   integer  optional  

Set this ID to filter records only to this particular account. By not providing anything, results from all accounts will be returned. Default to null. Example: 0

Update an account

requires authentication

Only values provided in the request will be updated.

Example request:
curl --request PATCH \
    "api.brandtrack.fm/v2/accounts/19120" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"lmgyeixauzqovl\"
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/accounts/19120';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'lmgyeixauzqovl',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):

                                        
                    {
    "data": {
        "id": 19120,
        "name": "John's Bakery US",
        "country": "US",
        "suspended": false,
        "source": null
    }
}
                 

Example response (403, Wrong ID):

                                        
                    {
    "message": "This action is unauthorized.",
    "status_code": 403
}
                 

Request      

PATCH v2/accounts/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the account. Example: 19120

Body Parameters

name   string  optional  

Must not be greater than 100 characters. Example: lmgyeixauzqovl

Handle account suspension status

requires authentication

By providing the bool value, you can set or unset the suspension status for an account.

Example request:
curl --request POST \
    "api.brandtrack.fm/v2/accounts/19120/suspension" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"suspended\": false
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/accounts/19120/suspension';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'suspended' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):

                                        
                    {
    "data": {
        "id": 19120,
        "name": "John's Bakery US",
        "country": "US",
        "suspended": false,
        "source": null
    }
}
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Example response (409, Suspension issue):

                                        
                    {
    "message": "You can't set a suspension to an already suspended account.",
    "status_code": 409
}
                 

Request      

POST v2/accounts/{id}/suspension

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the account. Example: 19120

Body Parameters

suspended   boolean   

Example: false

Subscriptions

List subscriptions

requires authentication

Return a paginated list of subscriptions available for the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/subscriptions?page=1&per_page=100&order_by=id&direction=desc" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/subscriptions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'order_by' => 'id',
            'direction' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET v2/subscriptions

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

The page requested. Default to 1. Example: 1

per_page   integer  optional  

The number of items per page. Default to 25. Example: 100

order_by   string  optional  

The field to order the results by. Default to id. Example: id

direction   string  optional  

The direction method to sort results. Default to asc. Example: desc

Get a subscription by its ID

requires authentication

Return a single subscription by its ID, if available to the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/subscriptions/5392?using_account_id=0" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/subscriptions/5392';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'using_account_id' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

GET v2/subscriptions/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the subscription. Example: 5392

Query Parameters

using_account_id   integer  optional  

Set this ID to filter records only to this particular account. By not providing anything, results from all accounts will be returned. Default to null. Example: 0

Users

List users

requires authentication

Return a paginated list of users available for the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/users?page=1&per_page=100&order_by=id&direction=desc" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/users';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'order_by' => 'id',
            'direction' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET v2/users

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

The page requested. Default to 1. Example: 1

per_page   integer  optional  

The number of items per page. Default to 25. Example: 100

order_by   string  optional  

The field to order the results by. Default to id. Example: id

direction   string  optional  

The direction method to sort results. Default to asc. Example: desc

Get a user by its ID

requires authentication

Return a single user by its ID, if available to the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/users/18782?page=1&per_page=100&order_by=id&direction=desc" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/users/18782';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'order_by' => 'id',
            'direction' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

GET v2/users/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the user. Example: 18782

Query Parameters

page   integer  optional  

The page requested. Default to 1. Example: 1

per_page   integer  optional  

The number of items per page. Default to 25. Example: 100

order_by   string  optional  

The field to order the results by. Default to id. Example: id

direction   string  optional  

The direction method to sort results. Default to asc. Example: desc

Invites a user to the platform

requires authentication

It will send automatically an email to the provided email address with a unique link to setup the user's account.

Example request:
curl --request POST \
    "api.brandtrack.fm/v2/users" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": 19120,
    \"email\": \"testexample@example.com\",
    \"firstname\": \"John\",
    \"lastname\": \"Doe\",
    \"role_id\": 74
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/users';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'account_id' => 19120,
            'email' => 'testexample@example.com',
            'firstname' => 'John',
            'lastname' => 'Doe',
            'role_id' => 74,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):

                                        
                    {
    "data": {
        "id": 18782,
        "uuid": "e66f37fd-ac0a-4cb6-adba-33196a5c6f3e",
        "email": "john.doe@brandtrack.fm",
        "firstname": "John",
        "lastname": "Doe",
        "phone_number": "+9332312323",
        "country": "BE",
        "role": "owner",
        "business_category_id": 62,
        "flags": [],
        "created_at": "2024-07-09T13:34:16+00:00"
    }
}
                 

Request      

POST v2/users

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

account_id   integer   

The account where this user will be created. Example: 19120

email   string   

The email to be registered. Example: testexample@example.com

firstname   string   

User's firstname. Example: John

lastname   string   

User's lastname. Example: Doe

role_id   integer   

The role to assign to the new user. Example: 74

Create temporary auth token

requires authentication

Create a one-time token that allows to access to the account by opening the link provided. It lasts only 1 hour and any attempting to use this token after 1 hour will result in a 401 Unauthorized response.

Example request:
curl --request POST \
    "api.brandtrack.fm/v2/users/18782/token?page=1&per_page=100&order_by=id&direction=desc" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/users/18782/token';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'order_by' => 'id',
            'direction' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Sucess):

                                        
                    {
    "data": {
        "user_id": 123456,
        "token": "kz1OrilDejZlzpId2kuxwu91LYdlzi2B",
        "created_at": "2024-08-01T16:03:50Z",
        "expires_at": "2024-08-01T17:03:50Z",
        "url": "https://api.brandtrack.fm/login/token/kz1OrilDejZlzpId2kuxwu91LYdlzi2B",
        "requested_by": 7303
    }
}
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

POST v2/users/{id}/token

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the user. Example: 18782

Query Parameters

page   integer  optional  

The page requested. Default to 1. Example: 1

per_page   integer  optional  

The number of items per page. Default to 25. Example: 100

order_by   string  optional  

The field to order the results by. Default to id. Example: id

direction   string  optional  

The direction method to sort results. Default to asc. Example: desc

Handle user suspension status

requires authentication

By providing the bool value, you can set or unset the suspension status for a user.

Example request:
curl --request POST \
    "api.brandtrack.fm/v2/users/13/suspension" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"suspended\": false
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/users/13/suspension';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'suspended' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):

                                        
                    {
    "id": 18782,
    "uuid": "e66f37fd-ac0a-4cb6-adba-33196a5c6f3e",
    "email": "john.doe@brandtrack.fm",
    "firstname": "John",
    "lastname": "Doe",
    "phone_number": "+9332312323",
    "country": "BE",
    "role": "owner",
    "business_category_id": 62,
    "flags": [],
    "suspended": false,
    "created_at": "2024-07-09T13:34:16+00:00"
}
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Example response (409, Suspension issue):

                                        
                    {
    "message": "You can't set a suspension to an already suspended account.",
    "status_code": 409
}
                 

Request      

POST v2/users/{id}/suspension

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the user. Example: 13

Body Parameters

suspended   boolean   

Example: false

Locations

List locations

requires authentication

Return a paginated list of groups available for the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/locations?page=1&per_page=100&order_by=id&direction=desc" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/locations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'order_by' => 'id',
            'direction' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET v2/locations

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

The page requested. Default to 1. Example: 1

per_page   integer  optional  

The number of items per page. Default to 25. Example: 100

order_by   string  optional  

The field to order the results by. Default to id. Example: id

direction   string  optional  

The direction method to sort results. Default to asc. Example: desc

Return a location by its ID

requires authentication

Return a single location by its ID, if available to the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/locations/26440" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/locations/26440';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

GET v2/locations/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the location. Example: 26440

Create a location

requires authentication

This endpoint is designed to by used by My Brandtrack users.

Example request:
curl --request POST \
    "api.brandtrack.fm/v2/locations" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"ojpraplsvntmeldpdkmp\",
    \"country\": \"cl\",
    \"city\": \"qdddkgyxbjgquhfvasy\",
    \"address\": \"hveyqazuvntjbbskxezycdto\",
    \"zip_code\": \"jvxfuvlanyjkwggywkw\",
    \"phone_number\": \"blfyghkjmrvkjofiajevi\",
    \"email\": \"lindsey52@example.com\",
    \"manager\": \"sfkrcbygpvexfpx\",
    \"type\": \"franchise\",
    \"additional_information\": \"aqlgoitxfc\"
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/locations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'ojpraplsvntmeldpdkmp',
            'country' => 'cl',
            'city' => 'qdddkgyxbjgquhfvasy',
            'address' => 'hveyqazuvntjbbskxezycdto',
            'zip_code' => 'jvxfuvlanyjkwggywkw',
            'phone_number' => 'blfyghkjmrvkjofiajevi',
            'email' => 'lindsey52@example.com',
            'manager' => 'sfkrcbygpvexfpx',
            'type' => 'franchise',
            'additional_information' => 'aqlgoitxfc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Success):

                                        
                    {
    "data": {
        "id": 26440,
        "account_id": 19120,
        "name": "Downtown Bakery",
        "country": "US",
        "address": "176 Berry St, Brooklyn",
        "phone_number": "11002929",
        "email": "john.doe@brandtrack.fm",
        "manager": "John Doe",
        "created_at": "2024-07-31T14:38:34+00:00",
        "timezone": "America/Los_Angeles",
        "type": "own",
        "city": "New York",
        "zip_code": "11249",
        "additional_information": null
    }
}
                 

Example response (403, Wrong ID):

                                        
                    {
    "message": "This action is unauthorized.",
    "status_code": 403
}
                 

Request      

POST v2/locations

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 100 characters. Example: ojpraplsvntmeldpdkmp

country   string   

The iso of an existing record in the countries table. Must be 2 characters. Example: cl

city   string   

Must not be greater than 100 characters. Example: qdddkgyxbjgquhfvasy

address   string   

Must not be greater than 255 characters. Example: hveyqazuvntjbbskxezycdto

zip_code   string   

Must not be greater than 20 characters. Example: jvxfuvlanyjkwggywkw

phone_number   string   

Must not be greater than 40 characters. Example: blfyghkjmrvkjofiajevi

email   string   

Must be a valid email address. Must not be greater than 100 characters. Example: lindsey52@example.com

manager   string   

Must not be greater than 255 characters. Example: sfkrcbygpvexfpx

type   string   

Example: franchise

Must be one of:
  • own
  • franchise
additional_information   string  optional  

Must not be greater than 1024 characters. Example: aqlgoitxfc

Update a location

requires authentication

Only values provided in the request will be updated.

Example request:
curl --request PATCH \
    "api.brandtrack.fm/v2/locations/26440" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"xsw\",
    \"country\": \"ri\",
    \"city\": \"fkvyexjhhenjgyxsfhy\",
    \"address\": \"cndqkxrmxtzntfi\",
    \"zip_code\": \"pmczqek\",
    \"phone_number\": \"jjofnzimjvjdmni\",
    \"email\": \"collins.joesph@example.com\",
    \"manager\": \"pqbscnlbozwmfvhquiwfkly\",
    \"additional_information\": \"ktwxipkm\"
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/locations/26440';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'xsw',
            'country' => 'ri',
            'city' => 'fkvyexjhhenjgyxsfhy',
            'address' => 'cndqkxrmxtzntfi',
            'zip_code' => 'pmczqek',
            'phone_number' => 'jjofnzimjvjdmni',
            'email' => 'collins.joesph@example.com',
            'manager' => 'pqbscnlbozwmfvhquiwfkly',
            'additional_information' => 'ktwxipkm',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):

                                        
                    {
    "data": {
        "id": 26440,
        "account_id": 19120,
        "name": "Downtown Bakery",
        "country": "US",
        "address": "176 Berry St, Brooklyn",
        "phone_number": "11002929",
        "email": "john.doe@brandtrack.fm",
        "manager": "John Doe",
        "created_at": "2024-07-31T14:38:34+00:00",
        "timezone": "America/Los_Angeles",
        "type": "own",
        "city": "New York",
        "zip_code": "11249",
        "additional_information": null
    }
}
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

PATCH v2/locations/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the location. Example: 26440

Body Parameters

name   string  optional  

Must not be greater than 100 characters. Example: xsw

country   string  optional  

The iso of an existing record in the countries table. Must be 2 characters. Example: ri

city   string  optional  

Must not be greater than 100 characters. Example: fkvyexjhhenjgyxsfhy

address   string  optional  

Must not be greater than 255 characters. Example: cndqkxrmxtzntfi

zip_code   string  optional  

Must not be greater than 20 characters. Example: pmczqek

phone_number   string  optional  

Must not be greater than 40 characters. Example: jjofnzimjvjdmni

email   string  optional  

Must be a valid email address. Must not be greater than 100 characters. Example: collins.joesph@example.com

manager   string  optional  

Must not be greater than 255 characters. Example: pqbscnlbozwmfvhquiwfkly

additional_information   string  optional  

Must not be greater than 1024 characters. Example: ktwxipkm

Delete a location

requires authentication

Delete a location using the ID. Any location with at least 1 zone related to, won't be deleted.

Example request:
curl --request DELETE \
    "api.brandtrack.fm/v2/locations/26440" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/locations/26440';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204, Success):

                    Empty response
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

DELETE v2/locations/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the location. Example: 26440

Zones

List zones

requires authentication

Return a paginated list of zones available for the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/zones?page=1&per_page=100&order_by=id&direction=desc" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/zones';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'order_by' => 'id',
            'direction' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET v2/zones

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

The page requested. Default to 1. Example: 1

per_page   integer  optional  

The number of items per page. Default to 25. Example: 100

order_by   string  optional  

The field to order the results by. Default to id. Example: id

direction   string  optional  

The direction method to sort results. Default to asc. Example: desc

Return a zone by its ID

requires authentication

Return a single zone by its ID, if available to the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/zones/17351?page=1&per_page=100&order_by=id&direction=desc" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/zones/17351';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'order_by' => 'id',
            'direction' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

GET v2/zones/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the zone. Example: 17351

Query Parameters

page   integer  optional  

The page requested. Default to 1. Example: 1

per_page   integer  optional  

The number of items per page. Default to 25. Example: 100

order_by   string  optional  

The field to order the results by. Default to id. Example: id

direction   string  optional  

The direction method to sort results. Default to asc. Example: desc

Create a zone

requires authentication

It has an acknowledgement of the creation of the zone. If set to true, the zone will be created even if it is over the limits of the account and the subscription will be updated as well. Be aware with it, because you might update your subscription.

Example request:
curl --request POST \
    "api.brandtrack.fm/v2/zones" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"wksbjvmkcdvigzoocmgbmak\",
    \"normalization_type\": \"2020\",
    \"acknowledgement\": false,
    \"account_id\": \"dolores\",
    \"smart_integration_ids\": [
        \"ittbqvsmn\"
    ],
    \"store\": {
        \"name\": \"nakazflogfmasszhyfusegkj\",
        \"country\": \"ty\",
        \"type\": \"franchise\",
        \"address\": \"eeqr\",
        \"phone_number\": \"smunsajmopwln\",
        \"email\": \"heaney.clair@example.org\",
        \"manager\": \"ulbq\",
        \"timezone\": \"America\\/Argentina\\/San_Luis\",
        \"city\": \"sipfqyniwoqkxoqmqztrraaei\",
        \"zip_code\": \"cvlwjh\",
        \"additional_information\": \"pqidxjf\"
    },
    \"box\": {
        \"recipient\": {
            \"name\": \"fvzwzdfklpkdvrrjiifbesfk\",
            \"address\": \"tttdqjjaflmwugos\",
            \"city\": \"ze\",
            \"zip_code\": \"xxxesuwlwqwcs\",
            \"identification_type\": \"PASSPORT\",
            \"identification_number\": \"qaeu\",
            \"phone\": \"ukgzevuvvrfsoypg\",
            \"additional_information\": \"tyxnhiinvnmylehopb\"
        },
        \"connection_settings\": {
            \"connection_type\": \"ETHERNET\",
            \"network\": \"tecxxs\",
            \"password\": \"faiP]=(ge69\'\",
            \"type_of_network\": \"WEP\",
            \"ip_protocol_assignment\": \"Static\",
            \"ntp_address\": \"voluptatem\",
            \"proxy_address\": \"aliquam\",
            \"additional_information\": \"qjzybxschlooesxpaijvtq\"
        }
    }
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/zones';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'wksbjvmkcdvigzoocmgbmak',
            'normalization_type' => '2020',
            'acknowledgement' => false,
            'account_id' => 'dolores',
            'smart_integration_ids' => [
                'ittbqvsmn',
            ],
            'store' => [
                'name' => 'nakazflogfmasszhyfusegkj',
                'country' => 'ty',
                'type' => 'franchise',
                'address' => 'eeqr',
                'phone_number' => 'smunsajmopwln',
                'email' => 'heaney.clair@example.org',
                'manager' => 'ulbq',
                'timezone' => 'America/Argentina/San_Luis',
                'city' => 'sipfqyniwoqkxoqmqztrraaei',
                'zip_code' => 'cvlwjh',
                'additional_information' => 'pqidxjf',
            ],
            'box' => [
                'recipient' => [
                    'name' => 'fvzwzdfklpkdvrrjiifbesfk',
                    'address' => 'tttdqjjaflmwugos',
                    'city' => 'ze',
                    'zip_code' => 'xxxesuwlwqwcs',
                    'identification_type' => 'PASSPORT',
                    'identification_number' => 'qaeu',
                    'phone' => 'ukgzevuvvrfsoypg',
                    'additional_information' => 'tyxnhiinvnmylehopb',
                ],
                'connection_settings' => [
                    'connection_type' => 'ETHERNET',
                    'network' => 'tecxxs',
                    'password' => 'faiP]=(ge69\'',
                    'type_of_network' => 'WEP',
                    'ip_protocol_assignment' => 'Static',
                    'ntp_address' => 'voluptatem',
                    'proxy_address' => 'aliquam',
                    'additional_information' => 'qjzybxschlooesxpaijvtq',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Success):

                                        
                    {
    "data": {
        "id": 30120,
        "account_id": 19120,
        "account_name": "John's Bakery US",
        "code": "207642",
        "uuid": "d1f91b09-f1f9-41d9-ad59-417f6b37766d",
        "name": "Downtown Bakery",
        "store_id": 26440,
        "storage_info": {
            "available": null,
            "required": null,
            "is_critical": false
        },
        "volume": 100,
        "has_volume_change_pending": false,
        "send_logs": false,
        "reset_state": false,
        "fudo_integration_id": null,
        "created_at": "2024-07-31T14:53:07+00:00",
        "updated_at": "2024-07-31T14:53:07+00:00"
    }
}
                 

Example response (404, Wrong Store ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

POST v2/zones

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: wksbjvmkcdvigzoocmgbmak

normalization_type   string  optional  

Example: 2020

Must be one of:
  • default
  • 2020
  • 2021
acknowledgement   boolean   

Example: false

account_id   string   

Example: dolores

smart_integration_ids   string[]  optional  

Must not be greater than 20 characters.

store_id   string  optional  

This field is required when store is not present. The id of an existing record in the stores table.

store   object  optional  

This field is required when store_id is not present.

account_id   string  optional  

This field is required when store_id is not present. The id of an existing record in the accounts table.

name   string  optional  

This field is required when store_id is not present. Must not be greater than 100 characters. Example: nakazflogfmasszhyfusegkj

country   string  optional  

This field is required when store_id is not present. The iso of an existing record in the countries table. Must be 2 characters. Example: ty

type   string  optional  

This field is required when store_id is not present. Example: franchise

Must be one of:
  • own
  • franchise
address   string  optional  

Must not be greater than 255 characters. Example: eeqr

phone_number   string  optional  

Must not be greater than 40 characters. Example: smunsajmopwln

email   string  optional  

Must be a valid email address. Must not be greater than 100 characters. Example: heaney.clair@example.org

manager   string  optional  

Must not be greater than 255 characters. Example: ulbq

timezone   string  optional  

Example: America/Argentina/San_Luis

Must be one of:
  • Africa/Abidjan
  • Africa/Accra
  • Africa/Addis_Ababa
  • Africa/Algiers
  • Africa/Asmara
  • Africa/Bamako
  • Africa/Bangui
  • Africa/Banjul
  • Africa/Bissau
  • Africa/Blantyre
  • Africa/Brazzaville
  • Africa/Bujumbura
  • Africa/Cairo
  • Africa/Casablanca
  • Africa/Ceuta
  • Africa/Conakry
  • Africa/Dakar
  • Africa/Dar_es_Salaam
  • Africa/Djibouti
  • Africa/Douala
  • Africa/El_Aaiun
  • Africa/Freetown
  • Africa/Gaborone
  • Africa/Harare
  • Africa/Johannesburg
  • Africa/Juba
  • Africa/Kampala
  • Africa/Khartoum
  • Africa/Kigali
  • Africa/Kinshasa
  • Africa/Lagos
  • Africa/Libreville
  • Africa/Lome
  • Africa/Luanda
  • Africa/Lubumbashi
  • Africa/Lusaka
  • Africa/Malabo
  • Africa/Maputo
  • Africa/Maseru
  • Africa/Mbabane
  • Africa/Mogadishu
  • Africa/Monrovia
  • Africa/Nairobi
  • Africa/Ndjamena
  • Africa/Niamey
  • Africa/Nouakchott
  • Africa/Ouagadougou
  • Africa/Porto-Novo
  • Africa/Sao_Tome
  • Africa/Tripoli
  • Africa/Tunis
  • Africa/Windhoek
  • America/Adak
  • America/Anchorage
  • America/Anguilla
  • America/Antigua
  • America/Araguaina
  • America/Argentina/Buenos_Aires
  • America/Argentina/Catamarca
  • America/Argentina/Cordoba
  • America/Argentina/Jujuy
  • America/Argentina/La_Rioja
  • America/Argentina/Mendoza
  • America/Argentina/Rio_Gallegos
  • America/Argentina/Salta
  • America/Argentina/San_Juan
  • America/Argentina/San_Luis
  • America/Argentina/Tucuman
  • America/Argentina/Ushuaia
  • America/Aruba
  • America/Asuncion
  • America/Atikokan
  • America/Bahia
  • America/Bahia_Banderas
  • America/Barbados
  • America/Belem
  • America/Belize
  • America/Blanc-Sablon
  • America/Boa_Vista
  • America/Bogota
  • America/Boise
  • America/Cambridge_Bay
  • America/Campo_Grande
  • America/Cancun
  • America/Caracas
  • America/Cayenne
  • America/Cayman
  • America/Chicago
  • America/Chihuahua
  • America/Ciudad_Juarez
  • America/Costa_Rica
  • America/Creston
  • America/Cuiaba
  • America/Curacao
  • America/Danmarkshavn
  • America/Dawson
  • America/Dawson_Creek
  • America/Denver
  • America/Detroit
  • America/Dominica
  • America/Edmonton
  • America/Eirunepe
  • America/El_Salvador
  • America/Fort_Nelson
  • America/Fortaleza
  • America/Glace_Bay
  • America/Goose_Bay
  • America/Grand_Turk
  • America/Grenada
  • America/Guadeloupe
  • America/Guatemala
  • America/Guayaquil
  • America/Guyana
  • America/Halifax
  • America/Havana
  • America/Hermosillo
  • America/Indiana/Indianapolis
  • America/Indiana/Knox
  • America/Indiana/Marengo
  • America/Indiana/Petersburg
  • America/Indiana/Tell_City
  • America/Indiana/Vevay
  • America/Indiana/Vincennes
  • America/Indiana/Winamac
  • America/Inuvik
  • America/Iqaluit
  • America/Jamaica
  • America/Juneau
  • America/Kentucky/Louisville
  • America/Kentucky/Monticello
  • America/Kralendijk
  • America/La_Paz
  • America/Lima
  • America/Los_Angeles
  • America/Lower_Princes
  • America/Maceio
  • America/Managua
  • America/Manaus
  • America/Marigot
  • America/Martinique
  • America/Matamoros
  • America/Mazatlan
  • America/Menominee
  • America/Merida
  • America/Metlakatla
  • America/Mexico_City
  • America/Miquelon
  • America/Moncton
  • America/Monterrey
  • America/Montevideo
  • America/Montserrat
  • America/Nassau
  • America/New_York
  • America/Nome
  • America/Noronha
  • America/North_Dakota/Beulah
  • America/North_Dakota/Center
  • America/North_Dakota/New_Salem
  • America/Nuuk
  • America/Ojinaga
  • America/Panama
  • America/Paramaribo
  • America/Phoenix
  • America/Port-au-Prince
  • America/Port_of_Spain
  • America/Porto_Velho
  • America/Puerto_Rico
  • America/Punta_Arenas
  • America/Rankin_Inlet
  • America/Recife
  • America/Regina
  • America/Resolute
  • America/Rio_Branco
  • America/Santarem
  • America/Santiago
  • America/Santo_Domingo
  • America/Sao_Paulo
  • America/Scoresbysund
  • America/Sitka
  • America/St_Barthelemy
  • America/St_Johns
  • America/St_Kitts
  • America/St_Lucia
  • America/St_Thomas
  • America/St_Vincent
  • America/Swift_Current
  • America/Tegucigalpa
  • America/Thule
  • America/Tijuana
  • America/Toronto
  • America/Tortola
  • America/Vancouver
  • America/Whitehorse
  • America/Winnipeg
  • America/Yakutat
  • Antarctica/Casey
  • Antarctica/Davis
  • Antarctica/DumontDUrville
  • Antarctica/Macquarie
  • Antarctica/Mawson
  • Antarctica/McMurdo
  • Antarctica/Palmer
  • Antarctica/Rothera
  • Antarctica/Syowa
  • Antarctica/Troll
  • Antarctica/Vostok
  • Arctic/Longyearbyen
  • Asia/Aden
  • Asia/Almaty
  • Asia/Amman
  • Asia/Anadyr
  • Asia/Aqtau
  • Asia/Aqtobe
  • Asia/Ashgabat
  • Asia/Atyrau
  • Asia/Baghdad
  • Asia/Bahrain
  • Asia/Baku
  • Asia/Bangkok
  • Asia/Barnaul
  • Asia/Beirut
  • Asia/Bishkek
  • Asia/Brunei
  • Asia/Chita
  • Asia/Choibalsan
  • Asia/Colombo
  • Asia/Damascus
  • Asia/Dhaka
  • Asia/Dili
  • Asia/Dubai
  • Asia/Dushanbe
  • Asia/Famagusta
  • Asia/Gaza
  • Asia/Hebron
  • Asia/Ho_Chi_Minh
  • Asia/Hong_Kong
  • Asia/Hovd
  • Asia/Irkutsk
  • Asia/Jakarta
  • Asia/Jayapura
  • Asia/Jerusalem
  • Asia/Kabul
  • Asia/Kamchatka
  • Asia/Karachi
  • Asia/Kathmandu
  • Asia/Khandyga
  • Asia/Kolkata
  • Asia/Krasnoyarsk
  • Asia/Kuala_Lumpur
  • Asia/Kuching
  • Asia/Kuwait
  • Asia/Macau
  • Asia/Magadan
  • Asia/Makassar
  • Asia/Manila
  • Asia/Muscat
  • Asia/Nicosia
  • Asia/Novokuznetsk
  • Asia/Novosibirsk
  • Asia/Omsk
  • Asia/Oral
  • Asia/Phnom_Penh
  • Asia/Pontianak
  • Asia/Pyongyang
  • Asia/Qatar
  • Asia/Qostanay
  • Asia/Qyzylorda
  • Asia/Riyadh
  • Asia/Sakhalin
  • Asia/Samarkand
  • Asia/Seoul
  • Asia/Shanghai
  • Asia/Singapore
  • Asia/Srednekolymsk
  • Asia/Taipei
  • Asia/Tashkent
  • Asia/Tbilisi
  • Asia/Tehran
  • Asia/Thimphu
  • Asia/Tokyo
  • Asia/Tomsk
  • Asia/Ulaanbaatar
  • Asia/Urumqi
  • Asia/Ust-Nera
  • Asia/Vientiane
  • Asia/Vladivostok
  • Asia/Yakutsk
  • Asia/Yangon
  • Asia/Yekaterinburg
  • Asia/Yerevan
  • Atlantic/Azores
  • Atlantic/Bermuda
  • Atlantic/Canary
  • Atlantic/Cape_Verde
  • Atlantic/Faroe
  • Atlantic/Madeira
  • Atlantic/Reykjavik
  • Atlantic/South_Georgia
  • Atlantic/St_Helena
  • Atlantic/Stanley
  • Australia/Adelaide
  • Australia/Brisbane
  • Australia/Broken_Hill
  • Australia/Darwin
  • Australia/Eucla
  • Australia/Hobart
  • Australia/Lindeman
  • Australia/Lord_Howe
  • Australia/Melbourne
  • Australia/Perth
  • Australia/Sydney
  • Europe/Amsterdam
  • Europe/Andorra
  • Europe/Astrakhan
  • Europe/Athens
  • Europe/Belgrade
  • Europe/Berlin
  • Europe/Bratislava
  • Europe/Brussels
  • Europe/Bucharest
  • Europe/Budapest
  • Europe/Busingen
  • Europe/Chisinau
  • Europe/Copenhagen
  • Europe/Dublin
  • Europe/Gibraltar
  • Europe/Guernsey
  • Europe/Helsinki
  • Europe/Isle_of_Man
  • Europe/Istanbul
  • Europe/Jersey
  • Europe/Kaliningrad
  • Europe/Kirov
  • Europe/Kyiv
  • Europe/Lisbon
  • Europe/Ljubljana
  • Europe/London
  • Europe/Luxembourg
  • Europe/Madrid
  • Europe/Malta
  • Europe/Mariehamn
  • Europe/Minsk
  • Europe/Monaco
  • Europe/Moscow
  • Europe/Oslo
  • Europe/Paris
  • Europe/Podgorica
  • Europe/Prague
  • Europe/Riga
  • Europe/Rome
  • Europe/Samara
  • Europe/San_Marino
  • Europe/Sarajevo
  • Europe/Saratov
  • Europe/Simferopol
  • Europe/Skopje
  • Europe/Sofia
  • Europe/Stockholm
  • Europe/Tallinn
  • Europe/Tirane
  • Europe/Ulyanovsk
  • Europe/Vaduz
  • Europe/Vatican
  • Europe/Vienna
  • Europe/Vilnius
  • Europe/Volgograd
  • Europe/Warsaw
  • Europe/Zagreb
  • Europe/Zurich
  • Indian/Antananarivo
  • Indian/Chagos
  • Indian/Christmas
  • Indian/Cocos
  • Indian/Comoro
  • Indian/Kerguelen
  • Indian/Mahe
  • Indian/Maldives
  • Indian/Mauritius
  • Indian/Mayotte
  • Indian/Reunion
  • Pacific/Apia
  • Pacific/Auckland
  • Pacific/Bougainville
  • Pacific/Chatham
  • Pacific/Chuuk
  • Pacific/Easter
  • Pacific/Efate
  • Pacific/Fakaofo
  • Pacific/Fiji
  • Pacific/Funafuti
  • Pacific/Galapagos
  • Pacific/Gambier
  • Pacific/Guadalcanal
  • Pacific/Guam
  • Pacific/Honolulu
  • Pacific/Kanton
  • Pacific/Kiritimati
  • Pacific/Kosrae
  • Pacific/Kwajalein
  • Pacific/Majuro
  • Pacific/Marquesas
  • Pacific/Midway
  • Pacific/Nauru
  • Pacific/Niue
  • Pacific/Norfolk
  • Pacific/Noumea
  • Pacific/Pago_Pago
  • Pacific/Palau
  • Pacific/Pitcairn
  • Pacific/Pohnpei
  • Pacific/Port_Moresby
  • Pacific/Rarotonga
  • Pacific/Saipan
  • Pacific/Tahiti
  • Pacific/Tarawa
  • Pacific/Tongatapu
  • Pacific/Wake
  • Pacific/Wallis
  • UTC
city   string  optional  

Must not be greater than 100 characters. Example: sipfqyniwoqkxoqmqztrraaei

zip_code   string  optional  

Must not be greater than 20 characters. Example: cvlwjh

additional_information   string  optional  

Must not be greater than 1024 characters. Example: pqidxjf

box   object  optional  
recipient   object  optional  

This field is required when box is present.

name   string  optional  

This field is required when box is present. Must be at least 3 characters. Must not be greater than 100 characters. Example: fvzwzdfklpkdvrrjiifbesfk

address   string  optional  

This field is required when box is present. Must be at least 6 characters. Must not be greater than 255 characters. Example: tttdqjjaflmwugos

city   string  optional  

This field is required when box is present. Must be at least 6 characters. Must not be greater than 100 characters. Example: ze

zip_code   string  optional  

This field is required when box is present. Must be at least 3 characters. Must not be greater than 20 characters. Example: xxxesuwlwqwcs

identification_type   string  optional  

This field is required when box is present. Example: PASSPORT

Must be one of:
  • DNI
  • ID
  • PASSPORT
identification_number   string  optional  

This field is required when box is present. Must be at least 4 characters. Must not be greater than 20 characters. Example: qaeu

phone   string  optional  

This field is required when box is present. Must be at least 8 characters. Must not be greater than 40 characters. Example: ukgzevuvvrfsoypg

additional_information   string  optional  

Must not be greater than 1024 characters. Example: tyxnhiinvnmylehopb

connection_settings   object  optional  

This field is required when box is present.

connection_type   string  optional  

This field is required when box is present. Example: ETHERNET

Must be one of:
  • WIFI
  • ETHERNET
network   string  optional  

This field is required when box.connection_settings.connection_type is WIFI. Must not be greater than 255 characters. Example: tecxxs

password   string  optional  

This field is required when box.connection_settings.connection_type is WIFI. Must not be greater than 255 characters. Example: faiP]=(ge69'

type_of_network   string  optional  

This field is required when box.connection_settings.connection_type is WIFI. Example: WEP

Must be one of:
  • WEP
  • WPA2
ip_protocol_assignment   string  optional  

This field is required when box.connection_settings.connection_type is WIFI. Example: Static

Must be one of:
  • DHCP
  • Static
ip_address   string  optional  

This field is required when box.connection_settings.ip_protocol_assignment is Static.

dns_1   string  optional  

This field is required when box.connection_settings.ip_protocol_assignment is Static.

dns_2   string  optional  

This field is required when box.connection_settings.ip_protocol_assignment is Static.

netmask   string  optional  

This field is required when box.connection_settings.ip_protocol_assignment is Static.

gateway   string  optional  

This field is required when box.connection_settings.ip_protocol_assignment is Static.

ntp_address   string  optional  

Example: voluptatem

proxy_address   string  optional  

This field is required when proxy_port is present. Example: aliquam

proxy_port   string  optional  

This field is required when proxy_address is present.

additional_information   string  optional  

Must not be greater than 1024 characters. Example: qjzybxschlooesxpaijvtq

Update a zone

requires authentication

Only values provided in the request will be updated.

Example request:
curl --request PATCH \
    "api.brandtrack.fm/v2/zones/17351" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"odvnoazxsgrugbabhxvtekv\"
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/zones/17351';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'odvnoazxsgrugbabhxvtekv',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):

                                        
                    {
    "data": {
        "id": 30120,
        "account_id": 19120,
        "account_name": "John's Bakery US",
        "code": "207642",
        "uuid": "d1f91b09-f1f9-41d9-ad59-417f6b37766d",
        "name": "Downtown Bakery",
        "store_id": 26440,
        "storage_info": {
            "available": null,
            "required": null,
            "is_critical": false
        },
        "volume": 100,
        "has_volume_change_pending": false,
        "send_logs": false,
        "reset_state": false,
        "fudo_integration_id": null,
        "created_at": "2024-07-31T14:53:07+00:00",
        "updated_at": "2024-07-31T14:53:07+00:00"
    }
}
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

PATCH v2/zones/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the zone. Example: 17351

Body Parameters

name   string  optional  

Must not be greater than 255 characters. Example: odvnoazxsgrugbabhxvtekv

Delete a zone

requires authentication

This won't affect your subscription.

Example request:
curl --request DELETE \
    "api.brandtrack.fm/v2/zones/17351" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"MUSICAL_DECISION\"
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/zones/17351';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'MUSICAL_DECISION',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204, Success):

                    Empty response
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

DELETE v2/zones/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the zone. Example: 17351

Body Parameters

reason   string   

Example: MUSICAL_DECISION

Must be one of:
  • STORE_CLOSED
  • TECHNICAL_ISSUES
  • MUSICAL_DECISION

Handle zone suspension status

requires authentication

By providing the bool value, you can set or unset the suspension status for a zone.

Example request:
curl --request POST \
    "api.brandtrack.fm/v2/zones/blanditiis" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"suspended\": false
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/zones/blanditiis';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'suspended' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):

                                        
                    {
    "data": {
        "id": 30120,
        "account_id": 19120,
        "account_name": "John's Bakery US",
        "code": "207642",
        "uuid": "d1f91b09-f1f9-41d9-ad59-417f6b37766d",
        "name": "Downtown Bakery",
        "store_id": 26440,
        "storage_info": {
            "available": null,
            "required": null,
            "is_critical": false
        },
        "volume": 100,
        "has_volume_change_pending": false,
        "send_logs": false,
        "reset_state": false,
        "fudo_integration_id": null,
        "created_at": "2024-07-31T14:53:07+00:00",
        "updated_at": "2024-07-31T14:53:07+00:00"
    }
}
                 

Example response (402, Subscription limit reached):

                                        
                    {
    "message": "Plan limit reached",
    "status_code": 402
}
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Example response (409, Suspension issue):

                                        
                    {
    "message": "You can't set a suspension to an already suspended zone.",
    "status_code": 409
}
                 

Request      

POST v2/zones/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the zone. Example: blanditiis

Body Parameters

suspended   boolean   

Example: false

Update a zone smart data

requires authentication

It will update the zones provided in the request. It might involve 1 up to 100 zones at a time.

Example request:
curl --request POST \
    "api.brandtrack.fm/v2/zones/smart/data" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"provider_key\": \"fudo\",
    \"date\": \"2024-08-01T12:00:00Z\",
    \"data\": {
        \"zones\": [
            {
                \"id\": 123,
                \"current_capacity\": 150,
                \"current_occupied\": 75
            }
        ]
    }
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/zones/smart/data';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'provider_key' => 'fudo',
            'date' => '2024-08-01T12:00:00Z',
            'data' => [
                'zones' => [
                    [
                        'id' => 123,
                        'current_capacity' => 150,
                        'current_occupied' => 75,
                    ],
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204, OK):

                    Empty response
                 

Example response (404, Wrong Zone ID Provided):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Example response (404, Wrong Credentials):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Example response (422, Non-valid payload request):

                                        
                    {
    "message": "422 Unprocessable Content",
    "errors": {
        "data.zones.0.id": [
            "The data.zones.0.id field is required."
        ]
    },
    "status_code": 422
}
                 

Request      

POST v2/zones/smart/data

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

provider_key   string   

The key of the integration you're using. Example: fudo

date   string   

The datetime whenever this information is valid from. It must follow the ISO8601 Example: 2024-08-01T12:00:00Z

data   object   
zones   object[]   

Zones to update.

id   integer   

The Brandtrack Zone ID to update. Example: 123

current_occupation   integer  optional  

A number with the occupation from 0 to 100. It is required if capacity and occupation are not provided.

current_capacity   integer  optional  

It is required with the current_occupied, if provided. It represents the capacity of tables, persons, or whatever the integration measures. Example: 150

current_occupied   integer  optional  

It is required with the current_capacity, if provided. It represents the occupation of tables, persons, or whatever the integration measures. Example: 75

Groups

List groups

requires authentication

Return a paginated list of groups available for the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/groups?page=1&per_page=100&order_by=id&direction=desc" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/groups';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '1',
            'per_page' => '100',
            'order_by' => 'id',
            'direction' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET v2/groups

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

The page requested. Default to 1. Example: 1

per_page   integer  optional  

The number of items per page. Default to 25. Example: 100

order_by   string  optional  

The field to order the results by. Default to id. Example: id

direction   string  optional  

The direction method to sort results. Default to asc. Example: desc

Get a group by its ID

requires authentication

Return a single group by its ID, if available to the authenticated user.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/groups/17351?include=announcements%2Cmixes" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/groups/17351';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'include' => 'announcements,mixes',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

GET v2/groups/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the group. Example: 17351

Query Parameters

include   string  optional  

Any relation to be included, separated by commas. You can use: announcements, mixes, account. Example: announcements,mixes

Create a new group

requires authentication

Create a new group using the provided data.

Example request:
curl --request POST \
    "api.brandtrack.fm/v2/groups" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": 5,
    \"music_profile_id\": 9,
    \"name\": \"ratione\"
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/groups';
$response = $client->post(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'account_id' => 5,
            'music_profile_id' => 9,
            'name' => 'ratione',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Success):

                                        
                    {
    "data": {
        "id": 17351,
        "account_id": 19120,
        "music_profile_id": null,
        "name": "Music",
        "analytics": {
            "data": {
                "players": 0,
                "announcements": 1,
                "mixes": 0,
                "radios": 0
            }
        }
    }
}
                 

Example response (403, Forbidden):

                                        
                    {
    "message": "This action is unauthorized.",
    "status_code": 403
}
                 

Request      

POST v2/groups

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

account_id   integer  optional  

The id of an existing record in the accounts table. Example: 5

music_profile_id   integer  optional  

The id of an existing record in the music_profiles table. Example: 9

name   string   

Example: ratione

Update a group

requires authentication

Update a group with the data provided in the request.

Example request:
curl --request PATCH \
    "api.brandtrack.fm/v2/groups/17351" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_id\": 5,
    \"music_profile_id\": 1,
    \"name\": \"sed\"
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/groups/17351';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'account_id' => 5,
            'music_profile_id' => 1,
            'name' => 'sed',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):

                                        
                    {
    "data": {
        "id": 17351,
        "account_id": 19120,
        "music_profile_id": null,
        "name": "Music",
        "analytics": {
            "data": {
                "players": 0,
                "announcements": 1,
                "mixes": 0,
                "radios": 0
            }
        }
    }
}
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

PATCH v2/groups/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the group. Example: 17351

Body Parameters

account_id   integer  optional  

The id of an existing record in the accounts table. Example: 5

music_profile_id   integer  optional  

The id of an existing record in the music_profiles table. Example: 1

name   string   

Example: sed

Delete a group

requires authentication

Delete a group using the ID. Any zone related will lose the access to the playlists and announcements immediately.

Example request:
curl --request DELETE \
    "api.brandtrack.fm/v2/groups/17351" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/groups/17351';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204, Success):

                    Empty response
                 

Example response (404, Wrong ID):

                                        
                    {
    "message": "404 Not Found",
    "status_code": 404
}
                 

Request      

DELETE v2/groups/{id}

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the group. Example: 17351

Roles

List all roles

requires authentication

Example request:
curl --request GET \
    --get "api.brandtrack.fm/v2/roles" \
    --header "x-customer-api-key: {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/v2/roles';
$response = $client->get(
    $url,
    [
        'headers' => [
            'x-customer-api-key' => '{YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

GET v2/roles

Headers

x-customer-api-key      

Example: {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Other

List all business categories

Return all business categories available in the system.

Example request:
curl --request GET \
    --get "api.brandtrack.fm/business_categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/business_categories';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):

                                        
                    {
    "data": [
        {
            "id": 1,
            "key": "retail",
            "parent_id": null,
            "name": "Retail"
        }
    ]
}
                 

Request      

GET business_categories

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Partner

Accounts

Endpoints for managing accounts.

Create account

It creates a new account based on the provided data. Also, create a user and sends the default email.

Example request:
curl --request POST \
    "api.brandtrack.fm/partner/accounts/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Partner-Key: abc123" \
    --data "{
    \"name\": \"VetShop\",
    \"country\": \"US\",
    \"business_category_id\": 1,
    \"email\": \"john.doe@example.com\",
    \"firstname\": \"John\",
    \"lastname\": \"Doe\",
    \"phone_number\": \"1234567890\"
}"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/partner/accounts/register';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Partner-Key' => 'abc123',
        ],
        'json' => [
            'name' => 'VetShop',
            'country' => 'US',
            'business_category_id' => 1,
            'email' => 'john.doe@example.com',
            'firstname' => 'John',
            'lastname' => 'Doe',
            'phone_number' => '1234567890',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):

                                        
                    {
    "account_id": 1,
    "account_name": "test account name",
    "user_id": 1,
    "url": "https://my.brandtrack.fm/login/token/jnli2jphNEn2G8wvAlPBkXdaULoHzgyh"
}
                 

Request      

POST partner/accounts/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Partner-Key      

Example: abc123

Body Parameters

name   string   

The name of the account to create. Example: VetShop

country   string   

The country in ISO-2 format. Example: US

business_category_id   integer  optional  

The business category id of the account. Example: 1

email   string   

The email of the account owner. Example: john.doe@example.com

firstname   string  optional  

The firstname of the account owner. Example: John

lastname   string  optional  

The lastname of the account owner. Example: Doe

phone_number   string  optional  

The phone number of the account owner. Example: 1234567890

Users

Endpoints for managing users.

Creates a new token for requested user.

It returns a new token for the user provided that lasts 1 hour and can be used only once.

Example request:
curl --request POST \
    "api.brandtrack.fm/partner/users/1/token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Partner-Key: abc123"
$client = new \GuzzleHttp\Client();
$url = 'api.brandtrack.fm/partner/users/1/token';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Partner-Key' => 'abc123',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):

                                        
                    {
    "data": {
        "user_id": 1482,
        "token": "QY2Iqf10lMYRxXToMoqKqwD6wTiPx4EF",
        "created_at": "2025-02-07 10:27:21",
        "expires_at": "2025-02-07 11:27:21",
        "url": "https://my.brandtrack.fm/login/token/QY2Iqf10lMYRxXToMoqKqwD6wTiPx4EF"
    }
}
                 

Request      

POST partner/users/{id}/token

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Partner-Key      

Example: abc123

URL Parameters

id   integer   

The ID of the user. Example: 1