With the Brand Metrics web portal, you can easily book measurements manually. However, if you want to automate this process, you can use the endpoints in the Brand Metrics Management API. These endpoints allow you to create, read, and update booked measurements, saving you time and effort. You can use these endpoints to integrate the booking process into your own systems, allowing you to manage your measurements more efficiently. With the Brand Metrics public API, you can easily automate the booking process, freeing up time and resources to focus on other aspects of your business.
To book a new measurement, make a POST request to the /api/v1/measurement endpoint with a valid JSON payload. Use the following curl command:
curl "<https://api.brandmetrics.com/api/v1/measurement>" -H "Content-Type: application/json" -H "X-API-KEY: {api_key}" -H "Content-Type: application/json" -X POST -d {json_payload}
Note: Some fields are required, while others are optional (check the Swagger documentation for more details).
To add or make changes to a measurement, make a PUT request to the /api/v1/measurement endpoint. Use the following curl command:
curl "<https://api.brandmetrics.com/api/v1/measurement/{measurement_id}>" -H "Content-Type: application/json" -H "X-API-KEY: {api_key}" -H "Content-Type: application/json" -X POST -d {json_payload}
Note: Most data can be changed, but certain fields like measurement name, external id, advertiser, and brand are fixed and cannot be altered. In these cases, a new measurement must be booked with the correct data.
To change the survey question and/or answers in a measurement, you can use the /surveyquestion endpoint:
curl "<https://api.brandmetrics.com/api/v1/measurement/{measurement_id}/surveyquestion>" -H "Content-Type: application/json" -H "X-API-KEY: {api_key}" -H "Content-Type: application/json" -X POST -d {json_payload}
To change the metadata of a measurement, you can use the /properties endpoint:
curl "<https://api.brandmetrics.com/api/v1/measurement/{measurement_id}/properties>" -H "Content-Type: application/json" -H "X-API-KEY: {api_key}" -H "Content-Type: application/json" -X POST -d {json_payload}
To retrieve a list of all active and upcoming measurements, you can use the /measurement endpoint. If you want to fetch a specific measurement, you can include the measurement's ID in your request when using this endpoint:
curl "<https://api.brandmetrics.com/api/v1/measurement>" -H "X-API-KEY: {api_key}" -H "Content-Type: application/json" -X GET
curl "<https://api.brandmetrics.com/api/v1/measurement/284d0cc2-e9d7-4804-9b2c-07016315c844>" -H "X-API-KEY: {api_key}" -H "Content-Type: application/json" -X GET