Skip to content

Attribute a referral

POST/api/v1/attribution

Credits an install to the affiliate whose referral code the merchant carried. Attribution is first-touch under a per-install lock: the first affiliate to claim a shop keeps it, and every submission is logged to the shop’s referral trail either way.

A winning attribution backfills commissions from the shop’s transaction history per the program’s rules. Safe to call more than once; repeating the same winning pair just refreshes the referral date.

appstringrequired
Your app’s slug.
myshopifyDomainstringrequired
The installing shop.
mrefstringrequired
The referral code, from the tracking script or a typed partner code.
200attributed: true when the code won; false with a reason of already attributed or unknown code otherwise.
400A required field is missing.
401Bad or missing X-Api-Key.