---
title: "Get affiliate link(s)"
method: GET
path: "/links"
---

# Get affiliate link(s)

`GET /links`

Returns affiliate links for your program, each enriched with its click, referral and sale counts, the revenue it has generated, and a ready-to-share full URL for every base URL configured on your program.

Filter by `id` or `link` for one link, or by `affiliateId` / `affiliateEmail` for every link an affiliate owns. With no parameters, every link in the program is returned.

This endpoint always returns an array. A filter that matches nothing returns `[]`.

## Query parameters

- `id` string, uuid
- `link` string
- `affiliateId` string, uuid
- `affiliateEmail` string, email

## Response `200`

The matching affiliate links. Empty when nothing matched.

- AffiliateLink[]
  - `id` string, uuid — The affiliate link ID
  - `link` string — The affiliate link string
  - `createdAt` string, date-time — Timestamp when the affiliate link was created
  - `updatedAt` string, date-time — Timestamp when the affiliate link was last updated
  - `affiliate` object, nullable — The affiliate who owns this link. `null` if the link has no owner.
    - `id` string, uuid — The affiliate ID
    - `name` string — Full name of the affiliate
    - `email` string, email — Email of the affiliate
  - `program` object, nullable — The program this link belongs to. `null` if the link has no program.
    - `id` string, uuid — The program ID
    - `name` string — Name of the affiliate program
    - `currency` string — Currency used by the program
  - `clicks` integer — Number of clicks on this affiliate link
  - `referrals` integer — Number of referrals generated by this link
  - `sales` integer — Number of sales generated by this link
  - `totalRevenue` number, float — Sum of `totalEarned` across every sale attributed to this link
  - `fullURLs` object[] — One entry per base URL configured on your program, with the affiliate's tracking parameter and any program URL parameters already applied. Share these directly.
    - `baseUrl` string — The base URL
    - `fullUrl` string — The complete affiliate URL with parameters

## Other responses

- `401` — The `Authorization` header is missing, is not a `Bearer` header, or the token is not valid.
- `403` — API access is not enabled for this account.
- `404` — The affiliate program this token belongs to no longer exists.
- `429` — Too many requests for this token on this endpoint. Please slow down.
- `500` — The affiliate links could not be fetched.

---

[API](https://skmtc.net/referly/apis/referly-api.md) · [All operations](https://skmtc.net/referly/apis/referly-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/referly/referly-api/revisions/0f506d61b9c3/schema)
