List All Affiliates

GET

/v1/affiliates

Retrieves a paginated list of all affiliates.


Filter parameters

store_id

Filter affiliates by the ID of the store they belong to.


user_email

Filter affiliates by user_email field.


curl "https://api.lemonsqueezy.com/v1/affiliates" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}' 
curl "https://api.lemonsqueezy.com/v1/affiliates?filter[user_email][email protected]" \
  -H 'Accept: application/vnd.api+json'  \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'

Returns

Returns a paginated list of Affiliate objects ordered by created_at field in descending order.

{
  "meta": {
    "page": {
      "currentPage": 1,
      "from": 1,
      "lastPage": 1,
      "perPage": 10,
      "to": 1,
      "total": 1
    }
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "http://api.lemonsqueezy.com/v1/affiliates?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=-createdAt",
    "last": "http://api.lemonsqueezy.com/v1/affiliates?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=-createdAt"
  },
  "data": [
    {
      "type": "affiliates",
      "id": "1",
      "attributes": {
        "store_id": 1,
        "user_id": 2,
        "user_name": "John Doe",
        "user_email": "[email protected]",
        "share_domain": "example.com",
        "status": "active",
        "products": null,
        "application_note": "I'm a digital content creator and marketer promoting B2B solutions via my newsletter",
        "total_earnings": 169550,
        "unpaid_earnings": 132000,
        "created_at": "2023-11-22T04:15:17.000000Z",
        "updated_at": "2023-11-22T04:15:17.000000Z"
      },
      "relationships": {
        "store": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/affiliates/1/store",
            "self": "https://api.lemonsqueezy.com/v1/affiliates/1/relationships/store"
          }
        },
        "user": {
          "links": {
            "related": "https://api.lemonsqueezy.com/v1/affiliates/1/user",
            "self": "https://api.lemonsqueezy.com/v1/affiliates/1/relationships/user"
          }
        }
      },
      "links": {
        "self": "https://api.lemonsqueezy.com/v1/affiliates/1"
      }
    }
  ]
}

Was this page helpful?