For the complete documentation index, see llms.txt. This page is also available as Markdown.

Affiliates

Affiliate management

List affiliates

get

Retrieve a paginated list of affiliates

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Query parameters
pageintegerOptional

Page number

Example: 1
per_pageinteger · max: 100Optional

Items per page (max 100)

Example: 25
searchstringOptional

Search across: name_first, name_last, email, slug, paypal_email

Example: search term
filter[id]stringOptional

Filter by id (exact match).

filter[id.gte]stringOptional

Filter by id (greater than or equal)

filter[id.lte]stringOptional

Filter by id (less than or equal)

filter[id.in]stringOptional

Filter by id (comma-separated list). Fetches many records in one request instead of one request per id.

Example: 101,102,103
filter[id.nin]stringOptional

Filter by id (excluding a comma-separated list)

filter[email]stringOptional

Filter by email (exact match).

filter[email.contains]stringOptional

Filter by email (contains)

filter[name_first]stringOptional

Filter by name_first (exact match).

filter[name_first.contains]stringOptional

Filter by name_first (contains)

filter[name_last]stringOptional

Filter by name_last (exact match).

filter[name_last.contains]stringOptional

Filter by name_last (contains)

filter[slug]stringOptional

Filter by slug (exact match).

filter[slug.contains]stringOptional

Filter by slug (contains)

filter[paypal_email]stringOptional

Filter by paypal_email (exact match).

filter[paypal_email.contains]stringOptional

Filter by paypal_email (contains)

filter[is_ready_for_payout]stringOptional

Filter by is_ready_for_payout (exact match).

filter[performance_digest_frequency_days]stringOptional

Filter by performance_digest_frequency_days (exact match). Valid values: 0, 1, 7, 30.

filter[performance_digest_frequency_days.gte]stringOptional

Filter by performance_digest_frequency_days (greater than or equal)

filter[performance_digest_frequency_days.lte]stringOptional

Filter by performance_digest_frequency_days (less than or equal)

filter[performance_digest_frequency_days.in]stringOptional

Filter by performance_digest_frequency_days (comma-separated list). Fetches many records in one request instead of one request per id.

Example: 0,1
filter[performance_digest_frequency_days.nin]stringOptional

Filter by performance_digest_frequency_days (excluding a comma-separated list)

filter[created_at]stringOptional

Filter by created_at (exact match).

filter[created_at.gte]stringOptional

Filter by created_at (greater than or equal)

filter[created_at.lte]stringOptional

Filter by created_at (less than or equal)

filter[updated_at]stringOptional

Filter by updated_at (exact match).

filter[updated_at.gte]stringOptional

Filter by updated_at (greater than or equal)

filter[updated_at.lte]stringOptional

Filter by updated_at (less than or equal)

sortstringOptional

Sort field (prefix with - for descending)

Example: -created_at
Responses
200

Successful response with paginated list

application/json
get/v2/affiliates
GET /v2/affiliates HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "pages": 6
  }
}

Create affiliates

post

Create one or more affiliates (batch). Optionally assign them to programs via program_ids.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Body
program_idsnumber[]Optional
Responses
201

Created successfully

application/json
any · nullableOptional
post/v2/affiliates
POST /v2/affiliates HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "affiliates": [
    {
      "name_first": "text",
      "name_last": "text",
      "email": "text",
      "paypal_email": "text",
      "slug": "text"
    }
  ],
  "program_ids": [
    1
  ]
}

No content

Check affiliate slug availability

put

Check whether one or more affiliate slugs are available.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Body
slugsstring[]Required
Responses
200

Successful response

application/json
any · nullableOptional
put/v2/affiliates/checkslugs
PUT /v2/affiliates/checkslugs HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "slugs": [
    "text"
  ]
}

No content

Add affiliates to a program

post

Create one or more affiliates (batch) and add them to the program in the path. Existing affiliates matched by email are added to the program. program_ids may list additional programs to add them to.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
program_idstringRequired

ID of the affiliate program to add the affiliates to

Body
program_idsnumber[]Optional
Responses
201

Created successfully

application/json
any · nullableOptional
post/v2/affiliates/programs/{program_id}/affiliates
POST /v2/affiliates/programs/{program_id}/affiliates HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "affiliates": [
    {
      "name_first": "text",
      "name_last": "text",
      "email": "text",
      "paypal_email": "text",
      "slug": "text"
    }
  ],
  "program_ids": [
    1
  ]
}

No content

Get affiliates

get

Retrieve a single affiliates by ID

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idintegerRequired

affiliates ID

Example: 12345
Query parameters
includestringOptional

Comma-separated list of expansions: stats, gravatar, customer, cards

Example: stats,gravatar
Responses
200

Successful response

application/json
idintegerRequired
customer_idintegerRequired
paypal_emailstring · max: 255 · nullableOptional
slugstring · max: 255 · nullableOptional
performance_digest_frequency_daysinteger · nullableOptional
last_performance_digest_sent_atstring · date-time · nullableOptional
is_ready_for_payoutbooleanRequired
created_atstring · date-time · nullableOptional
updated_atstring · date-time · nullableOptional
gravatarstring · nullableOptional
get/v2/affiliates/{id}
GET /v2/affiliates/{id} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "customer_id": 1,
  "paypal_email": "text",
  "slug": "text",
  "performance_digest_frequency_days": 1,
  "last_performance_digest_sent_at": "2026-01-01T00:00:00.000Z",
  "is_ready_for_payout": true,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "customer": {
    "ANY_ADDITIONAL_PROPERTY": null
  },
  "stats": {
    "ANY_ADDITIONAL_PROPERTY": null
  },
  "gravatar": "text",
  "cards": [
    {
      "ANY_ADDITIONAL_PROPERTY": null
    }
  ]
}

Update an affiliate

put

Update affiliate fields such as email, name, paypal_email, slug, payout readiness, and performance digest cadence.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Affiliate ID

Body
emailstringOptional
paypal_emailstringOptional
name_firststringOptional
name_laststringOptional
slugstringOptional
is_ready_for_payoutbooleanOptional
performance_digest_frequency_daysintegerOptional

How often this affiliate is emailed their performance digest, in days. One of 0, 1, 7, 30, where 0 means never. The affiliate can also change this themselves from their portal, so this is their current preference rather than a merchant-only setting.

Responses
200

Successful response

application/json
idintegerRequired
customer_idintegerRequired
paypal_emailstring · max: 255 · nullableOptional
slugstring · max: 255 · nullableOptional
performance_digest_frequency_daysinteger · nullableOptional
last_performance_digest_sent_atstring · date-time · nullableOptional
is_ready_for_payoutbooleanRequired
created_atstring · date-time · nullableOptional
updated_atstring · date-time · nullableOptional
gravatarstring · nullableOptional
put/v2/affiliates/{id}
PUT /v2/affiliates/{id} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 156

{
  "email": "text",
  "paypal_email": "text",
  "name_first": "text",
  "name_last": "text",
  "slug": "text",
  "is_ready_for_payout": true,
  "performance_digest_frequency_days": 1
}
{
  "id": 1,
  "customer_id": 1,
  "paypal_email": "text",
  "slug": "text",
  "performance_digest_frequency_days": 1,
  "last_performance_digest_sent_at": "2026-01-01T00:00:00.000Z",
  "is_ready_for_payout": true,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "customer": {
    "ANY_ADDITIONAL_PROPERTY": null
  },
  "stats": {
    "ANY_ADDITIONAL_PROPERTY": null
  },
  "gravatar": "text",
  "cards": [
    {
      "ANY_ADDITIONAL_PROPERTY": null
    }
  ]
}

Check affiliate slug availability

put

Check whether one or more affiliate slugs are available.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Body
slugsstring[]Required
Responses
200

Successful response

application/json
any · nullableOptional
put/v2/affiliates/{id}/checkslugs
PUT /v2/affiliates/{id}/checkslugs HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "slugs": [
    "text"
  ]
}

No content

Last updated