SellAuth

Affiliates

List Affiliates

Returns the shop's affiliates (customers with an affiliate code) with their stats.

GET
/v1/shops/{shopId}/affiliates

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonOptional
pageinteger
perPageinteger

Must be at least 1. Must not be greater than 100.

searchstring

Must not be greater than 100 characters.

tier_idinteger
segmentstring
Value in: "active" | "inactive" | "new"
orderColumnstring
Value in: "id" | "email" | "affiliate_code" | "affiliate_referrer_earnings" | "affiliate_balance" | "affiliate_code_set_at" | "referrals_count"
orderDirectionstring
Value in: "asc" | "desc"

Path Parameters

shopIdRequiredinteger

The shop ID.

curl -X GET "https://api.sellauth.com/v1/shops/{shopId}/affiliates" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "page": 12,
    "perPage": 1,
    "search": "syzwszwtxpeqqik",
    "tier_id": 12,
    "segment": "inactive",
    "orderColumn": "affiliate_balance",
    "orderDirection": "asc"
  }'

{
  "message": "Unauthenticated."
}

Affiliate Stats

Aggregate stats for the shop's affiliate program, with 30-day deltas.

GET
/v1/shops/{shopId}/affiliates/stats

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Path Parameters

shopIdRequiredinteger

The shop ID.

curl -X GET "https://api.sellauth.com/v1/shops/{shopId}/affiliates/stats" \
  -H "Authorization: Bearer <token>"

{
  "message": "Unauthenticated."
}

Get Affiliate

Detail view: referrals, attributed orders, affiliate wallet ledger and payout requests.

GET
/v1/shops/{shopId}/affiliates/{customerId}

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Path Parameters

shopIdRequiredinteger

The shop ID.

customerIdRequiredinteger

The shop customer ID.

curl -X GET "https://api.sellauth.com/v1/shops/{shopId}/affiliates/{customerId}" \
  -H "Authorization: Bearer <token>"

{
  "message": "Unauthenticated."
}

Assign Tier

Assigns an affiliate to a tier. Pass a null tier_id to use the default tier.

PUT
/v1/shops/{shopId}/affiliates/{customerId}/tier

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonOptional
tier_idinteger

The tier ID, or null for the default tier.

Path Parameters

shopIdRequiredinteger

The shop ID.

customerIdRequiredinteger

The shop customer ID.

curl -X PUT "https://api.sellauth.com/v1/shops/{shopId}/affiliates/{customerId}/tier" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "tier_id": 12
  }'

Invite Affiliate

Creates (or reuses) a customer by email and assigns them an affiliate code, making them an affiliate.

POST
/v1/shops/{shopId}/affiliates/invite

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonRequired
emailRequiredstring

The affiliate's email.

affiliate_codeRequiredstring

The code to assign.

tier_idinteger

Optional tier to place them in.

Path Parameters

shopIdRequiredinteger

The shop ID.

curl -X POST "https://api.sellauth.com/v1/shops/{shopId}/affiliates/invite" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "partner@example.com",
    "affiliate_code": "PARTNER10",
    "tier_id": 12
  }'