---
title: "The drawer: the row, the balances, the referred users, the payouts."
method: GET
path: "/api/v1/admin/affiliates/{affiliate_id}"
tags: ["Affiliate Admin"]
---

# The drawer: the row, the balances, the referred users, the payouts.

`GET /api/v1/admin/affiliates/{affiliate_id}`

## Request

- Base URL: `https://api.avatarfactory.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.avatarfactory.io/api/v1/admin/affiliates/{affiliate_id}`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

<br/>`gross_revenue_cents` and `net_commission_cents` are the same two numbers<br/>the affiliate's own portal shows, under the same names, so the admin and<br/>the affiliate never read different figures for the same referral.

## Path parameters

- `affiliate_id` integer, required

## Response `200`

OK

- AdminAffiliateDetailResponse: The drawer: the row, the balances, the referred users, the payouts.
  - `affiliate` AdminAffiliateItem, required: One affiliate as the admin queue sees it. Wider than the affiliate's own `AffiliateView`: it carries `user_id` and `decided_by_user_id` so the queue can link to the account and show who decided. `payout_details` is masked here exactly as it is everywhere else.
    - `applied_at` string, date-time, nullable
    - `channels` string[]
    - `code` string, required
    - `code_renamed` boolean, required
    - `commission_rate_bps` integer, required
    - `decided_at` string, date-time, nullable
    - `decided_by_user_id` integer, nullable
    - `decline_reason` string, nullable
    - `email` string, required
    - `full_name` string, required
    - `id` integer, required
    - `payout_details` object
    - `payout_method` string, required
    - `phone` string, nullable
    - `status` string, required
    - `terms_accepted_at` string, date-time, nullable
    - `terms_version` string, nullable
    - `user_id` integer, required
  - `balances` BalancesView, required
    - `available_cents` integer
    - `lifetime_cents` integer
    - `paid_cents` integer
    - `pending_cents` integer
  - `payouts` PayoutItem[]
    - `amount_cents` integer, required
    - `currency` string, required
    - `id` integer, required
    - `method` string, required
    - `note` string, nullable
    - `paid_at` string, date-time, nullable
    - `period_end` string, date, required
    - `period_start` string, date, required
    - `reference` string, nullable
    - `status` string, required
  - `referrals` ReferralItem[]
    - `first_paid_at` string, date-time, nullable
    - `gross_revenue_cents` integer, required
    - `interval` string, nullable
    - `last_paid_at` string, date-time, nullable
    - `masked_email` string, required
    - `net_commission_cents` integer, required
    - `plan_slug` string, nullable
    - `signed_up_at` string, date-time, nullable
    - `status` 'signed_up' | 'trial' | 'paying' | 'past_due' | 'churned' | 'refunded', required

## Other responses

- `404`: Not Found
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/avatarfactory/apis/avatarfactory-api.md) · [All operations](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/revisions/66fc7aa3f296?raw)
