Admin APIAnalytics
Get the attribution report
Paid and fulfilled orders created in the window, grouped by the source / medium / campaign of their first or last touch, with the store's totals as the denominator.
Authorization
bearer_auth AuthorizationBearer <token>
Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.
In: header
Path Parameters
store_id*string
Store id
Format
uuidQuery Parameters
from?string
Start of the window (inclusive). Defaults to 30 days ago.
Format
date-timeto?string
End of the window (inclusive). Defaults to now.
Format
date-timetouch?string
Defaults to last_touch.
Value in
"first_touch" | "last_touch"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/marketing/insights"{
"attributed_orders": 0,
"attributed_revenue_cents": 0,
"from": "2019-08-24T14:15:22Z",
"rows": [
{
"campaign": "string",
"capi_meta_sent": 0,
"google_ads_sent": 0,
"medium": "string",
"orders": 0,
"revenue_cents": 0,
"source": "string"
}
],
"to": "2019-08-24T14:15:22Z",
"total_orders": 0,
"total_revenue_cents": 0,
"touch": "first_touch"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}