UGCBloom Logo MarkUGCBloom Wordmark

Tracking & referrals

/api/promolink

The pixel uses this internally, but you can call it yourself if you'd rather drive everything server-side (skip the cookie entirely, look up codes based on your own URL params). It's a public anonymous endpoint scoped by org id and rate-limited per IP.

Always returns 200. Unknown codes return both fields as explicit null.

GET/api/promolink

Resolve a promo code to its creator, campaign, and discount for your org

Looks up the active promo code by exact match on (organization_id, promo_code) and returns the creator, campaign, and discount details bound to it.
inflstring

The code as it appears in the ?infl= URL param (e.g. ANNIE50).

orgstring

Your organization id (the one you put in the pixel's data-org).

const response = await fetch(
  "https://ugcbloom.com/api/promolink?infl=ANNIE50&org=org_your_org_id"
);

const data = await response.json();
Example response
response.json
json
{
  "creator": {
    "id": "user_abc123",
    "handle": "annie",
    "avatar_url": "https://…/annie.jpg"
  },
  "code": {
    "code": "ANNIE50",
    "promo_code_id": "f1a2…",
    "campaign_id": "550e8400-…",
    "campaign_title": "Summer drop",
    "discount_type": "percent_off",
    "discount_value": 20
  }
}