List attribution models
Lists the attribution models enabled for the brand, with the id an export request uses for each.
GET
https://mta.growthdept.ai/api/v1/exports/attribution-modelsRequest#
Request
curl "https://mta.growthdept.ai/api/v1/exports/attribution-models" \
-H "Authorization: $MTA_API_KEY" \
-H "Data-Client-ID: $MTA_BRAND_ID"Every model, enabled or not
curl "https://mta.growthdept.ai/api/v1/exports/attribution-models?include_disabled=true" \
-H "Authorization: $MTA_API_KEY" \
-H "Data-Client-ID: $MTA_BRAND_ID"Response#
Response 200
{
"attribution_models": [
{ "id": "northbeam_custom", "name": "Clicks only" },
{ "id": "first_touch", "name": "First touch" },
{ "id": "last_touch", "name": "Last touch" },
{ "id": "last_touch_non_direct", "name": "Last non-direct touch" },
{ "id": "linear", "name": "Linear" }
]
}Response 200 with include_disabled=true
{
"attribution_models": [
{ "id": "northbeam_custom", "name": "Clicks only", "enabled": true },
{ "id": "first_touch", "name": "First touch", "enabled": true },
{ "id": "last_touch", "name": "Last touch", "enabled": true },
{
"id": "last_touch_non_direct",
"name": "Last non-direct touch",
"enabled": true
},
{ "id": "linear", "name": "Linear", "enabled": true },
{
"id": "northbeam_custom__enh",
"name": "Clicks + Deterministic Views",
"enabled": false
},
{
"id": "northbeam_custom__va",
"name": "Clicks + Modeled Views",
"enabled": false
}
]
}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. |
Parameters#
| Name | In, type | Description |
|---|---|---|
include_ | query, boolean | true (or 1) lists every model the API knows, each with enabled: the enabled models first, in the brand's order, then the others by name. |
Response fields#
| Field | Type | Description |
|---|---|---|
attribution_ | string | The id to send in attribution_options.attribution_models. |
attribution_ | string | The model's name. Export files carry this name in their attribution_model column. |
attribution_ | boolean | Only with include_disabled: whether the brand has the model switched on. |
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." } |
Models that are switched off#
An export may ask for a model the brand has switched off. Dates computed while it was on keep their rows until they are recomputed, and dates after it was switched off have none. The export result's warn says so.
Brands switch models on and off in the app, under Settings > Model settings. The two view models are off for a new brand.
Model ids#
| id | Name | On for a new brand |
|---|---|---|
northbeam_custom | Clicks only | Yes |
northbeam_custom__enh | Clicks + Deterministic Views | No |
northbeam_custom__va | Clicks + Modeled Views | No |
first_touch | First touch | Yes |
last_touch | Last touch | Yes |
last_touch_non_direct | Last non-direct touch | Yes |
linear | Linear | Yes |
What each model does, and how the windows and accounting modes work: Attribution models.
Questions about the API: support@growthdept.ai.