Skip to content
GROWTH DEPT.MTA
DocsList breakdowns

API reference

List breakdowns

Lists the four breakdown keys and every value the brand's data carries for each.

GEThttps://mta.growthdept.ai/api/v1/exports/breakdowns

Request#

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.

HeaderTypeDescription
AuthorizationrequiredstringThe API key. See Authentication.
Data-Client-IDrequireduuidThe brand id.

Response fields#

FieldTypeDescription
breakdowns[].keystringThe key to send in an export's breakdowns[].key, exactly as written here.
breakdowns[].valuesarray of stringsEvery value the brand's rows carry for the key, sorted. Rows with no value are listed as an empty string.

Status codes#

StatusMeaningBody
200The list, as above.
401No 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." }
403The key is valid but lacks export:read.{ "detail": "This API key lacks the export:read scope." }
429More 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." }
500Something failed on our side. Retry later.{ "detail": "Internal server error." }

The four keys#

KeyCSV columnName in the app
Platform (Northbeam)breakdown_platform_northbeamPlatform
Category (Northbeam)breakdown_category_northbeamCategory
Revenue Source (Northbeam)breakdown_revenue_source_northbeamRevenue Source
Targeting (Northbeam)breakdown_targeting_northbeamTargeting

Using the values in an export#

  • A key in an export's breakdowns adds its column to the file and keeps only the rows whose value is in values.
  • A key with an empty values list 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.