Skip to content
GROWTH DEPT.MTA
DocsList metrics

API reference

List metrics

Lists every metric id an export can request, with its label.

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

Request#

Request
curl "https://mta.growthdept.ai/api/v1/exports/metrics" \
  -H "Authorization: $MTA_API_KEY" \
  -H "Data-Client-ID: $MTA_BRAND_ID"

Response#

Response 200 (the first 3 of 537 entries)
{
  "metrics": [
    { "id": "allTouchpointsPerOrder", "label": "Touchpoints (All, All)" },
    { "id": "allTouchpointsPerOrderNew", "label": "Touchpoints (All, New)" },
    {
      "id": "allTouchpointsPerOrderReturning",
      "label": "Touchpoints (All, Returning)"
    }
  ]
}

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
metrics[].idstringThe id to send in metrics[].id.
metrics[].labelstring or nullThe metric's label. 9 ids have none.

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." }

What the list covers#

The list is the same for every brand: 537 ids, of which 331 carry data. The other 206 are accepted and export as empty columns, and the export result's warn names them.

The label is not the CSV header. A metric's column in an export file is headed by its column name, such as attributed_revenue for revAttributed, unless your request gives it a label.

Metrics lists every id with its column, format, accounting mode, and whether it carries data.

Questions about the API: support@growthdept.ai.