SellAuth

Affiliate Tiers

List Tiers

Returns the shop's affiliate tiers with their product overrides and member counts.

GET
/v1/shops/{shopId}/affiliate-tiers

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}/affiliate-tiers" \
  -H "Authorization: Bearer <token>"

{
  "message": "Unauthenticated."
}

Create Tier

POST
/v1/shops/{shopId}/affiliate-tiers

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Request Body

application/jsonRequired
nameRequiredstring

The tier name.

percentageRequirednumber

Commission percentage for the tier.

discount_percentageRequirednumber

Discount buyers get when using a code of this tier.

is_publicRequiredboolean

Public tiers are shown on the storefront affiliate page.

sort_orderinteger

Must be at least 0. Must not be greater than 1000.

Path Parameters

shopIdRequiredinteger

The shop ID.

curl -X POST "https://api.sellauth.com/v1/shops/{shopId}/affiliate-tiers" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Gold",
    "percentage": 10,
    "discount_percentage": 5,
    "is_public": null,
    "sort_order": 12
  }'

Delete Tier

Deletes a tier. Its members fall back to the default tier. The default tier cannot be deleted.

DELETE
/v1/shops/{shopId}/affiliate-tiers/{tierId}

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.

tierIdRequiredinteger

The tier ID.

curl -X DELETE "https://api.sellauth.com/v1/shops/{shopId}/affiliate-tiers/{tierId}" \
  -H "Authorization: Bearer <token>"

Update Tier

PUT
/v1/shops/{shopId}/affiliate-tiers/{tierId}

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Request Body

application/jsonRequired
nameRequiredstring

Must not be greater than 100 characters.

percentageRequirednumber

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

discount_percentageRequirednumber

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

is_publicRequiredboolean
sort_orderinteger

Must be at least 0. Must not be greater than 1000.

Path Parameters

shopIdRequiredinteger

The shop ID.

tierIdRequiredinteger

The tier ID.

curl -X PUT "https://api.sellauth.com/v1/shops/{shopId}/affiliate-tiers/{tierId}" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "pasyzwszwtxpeqq",
    "percentage": 9,
    "discount_percentage": 10,
    "is_public": false,
    "sort_order": 12
  }'

Set Tier Product Overrides

Replaces the tier's per-product percentage overrides. An override of 0 excludes the product for this tier.

PUT
/v1/shops/{shopId}/affiliate-tiers/{tierId}/products

Authorization

AuthorizationRequiredBearer <token>

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

In: header

Request Body

application/jsonRequired
productsRequiredarray<object>

The overrides.

Path Parameters

shopIdRequiredinteger

The shop ID.

tierIdRequiredinteger

The tier ID.

curl -X PUT "https://api.sellauth.com/v1/shops/{shopId}/affiliate-tiers/{tierId}/products" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "products": [
      {
        "product_id": 123,
        "percentage": 0
      }
    ]
  }'