List breakdowns
Lists the four breakdown keys and every value the brand's data carries for each.
GET
https://mta.growthdept.ai/api/v1/exports/breakdownsRequest#
Request
curl "https://mta.growthdept.ai/api/v1/exports/breakdowns" \
-H "Authorization: $MTA_API_KEY" \
-H "Data-Client-ID: $MTA_BRAND_ID"Response#
Response 200 (shortened; values differ by brand)
{
"breakdowns": [
{
"key": "Platform (Northbeam)",
"values": ["Direct", "Facebook Ads", "Google Ads", "Unattributed"]
},
{
"key": "Category (Northbeam)",
"values": ["Email", "Other", "Paid - Prospecting", "Paid - Retargeting"]
},
{
"key": "Revenue Source (Northbeam)",
"values": ["Online Store Revenue"]
},
{
"key": "Targeting (Northbeam)",
"values": ["", "Paid - Prospecting", "Paid - Retargeting"]
}
]
}Authentication#
Send the API key in Authorization and the brand id in Data-Client-ID. The key needs the export:read scope. See Authentication.
| Header | Type | Description |
|---|---|---|
Authorizationrequired | string | The API key. See Authentication. |
Data-Client-IDrequired | uuid | The brand id. |
Response fields#
| Field | Type | Description |
|---|---|---|
breakdowns[]. | string | The key to send in an export's breakdowns[].key, exactly as written here. |
breakdowns[]. | array of strings | Every value the brand's rows carry for the key, sorted. Rows with no value are listed as an empty string. |
Status codes#
| Status | Meaning | Body |
|---|---|---|
| 200 | The list, as above. | |
| 401 | No key, an unknown or revoked key, or a key that belongs to another brand than Data-Client-ID. | { "detail": "Unauthorized: send a valid API key in Authorization and its brand id in Data-Client-ID." } |
| 403 | The key is valid but lacks export:read. | { "detail": "This API key lacks the export:read scope." } |
| 429 | More than 100 requests in one second from this key. Wait the seconds in Retry-After. | { "detail": "Rate limit exceeded: 100 requests per second per API key. Retry after 1 seconds." } |
| 500 | Something failed on our side. Retry later. | { "detail": "Internal server error." } |
The four keys#
| Key | CSV column | Name in the app |
|---|---|---|
Platform (Northbeam) | breakdown_platform_northbeam | Platform |
Category (Northbeam) | breakdown_category_northbeam | Category |
Revenue Source (Northbeam) | breakdown_revenue_source_northbeam | Revenue Source |
Targeting (Northbeam) | breakdown_targeting_northbeam | Targeting |
Using the values in an export#
- A key in an export's
breakdownsadds its column to the file and keeps only the rows whose value is invalues. - A key with an empty
valueslist matches no rows. To include everything, send every value this endpoint returns, the empty string too. - A key you leave out adds no column and filters nothing, so each line adds up across its values.
Questions about the API: support@growthdept.ai.