# Affiliate

object type

An Affiliate — the MERCHANT's affiliate/influencer promoter, rewarded for driving retail sales (≠ the platform affiliate, 's note). Org participation is the canned-pool selection (≤ 32; ABSENT = every org). The referral and coupon namespaces are INDEPENDENT: couponId is an INFORMATIONAL link (validated live, same-group) — registering the SAME string in both, linked, is the influencer pattern (use CODE for 10% off — the coupon discounts, the referral attributes). Cancel claws in full; returns claw pro-rata with the cumulative floor (the arm class); payouts are PERIOD reports. SEARCHABLE (the merchant-curated book is name-found — the law); at most 128 ACTIVE per group.

## Fields

| Field | Type | Notes |
| --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (AF-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `Affiliate` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: active \| inactive \| doomed. |
| `parentId` | [ID](/types/#scalars) `ID!` | The parent org group; for an Affiliate parentId === rootId. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/RefCaption/) `[RefCaption!]!` | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
| `organizationIds` | [ID](/types/#scalars) `[ID!]` | The canned-pool org selection — ABSENT = every org in the group participates. |
| `codes` | [AffiliateCode](/types/AffiliateCode/) `[AffiliateCode!]` | The owned referral codes (≤ 8; stored NORMALIZED; each marker-reserved). ABSENT/empty = a code-less (idle) affiliate — legal. |
| `ratePpm` | [Int](/types/#scalars) | The flat earning rate (ppm of ORDER NET, (0, 1000000]). ABSENT = tracking-only (attribution stamps, NO entries). |
| `consumerId` | [ID](/types/#scalars) | The shopper link. OPTIONAL — a link, never an identity merge; flows byte-for-byte unchanged. |
| `handle` | [String](/types/#scalars) | The public influencer handle (trimmed 1..64). ⚠ NOT unique. |
| `bio` | [String](/types/#scalars) | The influencer bio (trimmed ≤2000). |
| `socialLinks` | [String](/types/#scalars) `[String!]` | The social profile links (≤8 trimmed url-ish strings; wholesale-replace on edit — the codes-array class). |
| `audienceSize` | [Int](/types/#scalars) | The self-reported audience figure (≥0 — informational; verification). |
| `nicheTags` | [String](/types/#scalars) `[String!]` | The content-niche descriptors (≤16 plain bounded strings — NOT Tag refs, ruling; wholesale-replace). |

## Used by

- [affiliate](/reference/affiliate/affiliate/)
- [createAffiliate](/reference/affiliate/createAffiliate/)
- [deactivateAffiliate](/reference/affiliate/deactivateAffiliate/)
- [doomAffiliate](/reference/affiliate/doomAffiliate/)
- [reactivateAffiliate](/reference/affiliate/reactivateAffiliate/)
- [updateAffiliate](/reference/affiliate/updateAffiliate/)
