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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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));Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.