Skip to main content
POST

Authorizations

x-api-key
string
header
required

Your Upstack API key. Starts with upstack_.

x-pixel-id
string
header
required

The pixel id the request targets.

Body

application/json
pixelId
string
required

Must match the x-pixel-id header.

dimension
string
required

Dimension to attribute by (e.g. utm_source).

dateRange
object
required
attributionModel
enum<string>
required
Available options:
first_click,
last_click,
any_click
attributionWindow
enum<integer>
required

Attribution window in days. -1 means unlimited.

Available options:
1,
7,
14,
30,
60,
90,
-1
filters
All of (and) · object

Canonical filter applied to the attribution result set. attribution.utm_* fields and orders.* fields are valid in this context — discover the full set via GET /api/filters.

timezone
string
currency
string
default:USD

ISO 4217 code to convert money measures to (e.g. EUR). Each amount converts at the rate for the day it occurred. Defaults to USD when omitted — if your store sells in another currency, pass this explicitly.

valueSource
enum<string>
default:orders

Source of truth for conversion data.

Available options:
orders,
events
conversionEvent
string
default:purchase

Required when valueSource = events. Defaults to purchase when valueSource = orders.

orderSettings
object

Order-level query settings — exclusion filters, pending/voided handling.

Response

Attribution results.

results is absent when the attribution query couldn't be run — the response is then an empty object with a 200. Treat a missing results as "no answer", not as "no conversions": an empty results array is the real no-data case.

results
object[]