Update an affiliate program

POST https://api.tamio.com/v2/affiliate-programs/update/{uuid}

Updates an existing affiliate program. Requires the program uuid in the path and all required fields in the body (this is a full replacement, not a partial update).

The update schema adds label, is_active, description, and promo fields compared to the create schema.

When subscription_commission_type is set to repeating, the duration field is required and must be greater than 0.

Path Parameters

uuid string*

UUID of the affiliate program to update.

Body Parameters

label string

Short display name for the program.

is_active boolean

Whether the program is active.

description string

Detailed description of the program.

promo string

Promotional text or special offer details.

currency string*

ISO 4217 currency code. Must be enabled on your account.

commission_amount integer*

Fixed commission in smallest currency unit.

commission_percent number*

Percentage-based commission rate (0–100).

payout_delay integer

Days to wait before processing payouts.

first_takes_all string

Whether the first referring affiliate gets all credit.

enableddisabled
cookie_expiry integer

Days tracking cookies remain valid (max 90).

subscription_commission_type string

How subscription commissions are handled.

onceforeverrepeating
duration integer

Months for repeating commissions. Required and > 0 when type is repeating.

languages object*

Multilingual content keyed by language code. Each entry requires label and description.

payments array of string*

Payment method identifiers for payouts.

destinations array of string*

Country/region codes where the program is available.

is_public boolean

Whether the program is publicly visible.

auto_approve boolean

Whether affiliate applications are automatically approved.

is_listed boolean

Whether the program appears in public directories.

affiliate_notifications boolean

Whether to send email notifications to affiliates.

banners array of string

Banner asset UUIDs for affiliates.

products array of string

Product UUIDs included in the program.

domain string

UUID of the domain associated with this program.

Example
{
  "commission_amount": 500,
  "commission_percent": 10.5,
  "languages": {
    "en": {
      "label": "Updated Program",
      "description": "Updated description"
    }
  },
  "destinations": [
    "worldwide"
  ],
  "currency": "EUR",
  "payments": [
    "stripe"
  ]
}

Responses

200 Program updated successfully

Program updated successfully

status integer
program AffiliateProgram
400 Validation or business logic error. Returned when:
401 Missing or invalid API key
/affiliate-programs/update/{uuid}
1const response = await fetch("https://api.tamio.com/v2/affiliate-programs/update/{uuid}", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 // ... request body
9 })
10});
11const data = await response.json();
Responses
{
  "status": 200,
  "program": {
    "object": "affiliate_program",
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "label": "Premium Affiliate Program",
    "created_at": 1709500800,
    "currency": "EUR",
    "commission_amount": 500,
    "commission_percent": 0.1,
    "description": "string",
    "payout_delay": 30,
    "subscription_commission_type": "once",
    "destinations": [
      "worldwide"
    ],
    "payments": [
      "stripe"
    ],
    "payment_count": 0,
    "approved": true,
    "auto_approve": false,
    "is_active": true,
    "products": [],
    "languages": {},
    "domain": {},
    "signup_url": "string",
    "is_listed": false,
    "banners": [],
    "affiliates": 0,
    "sales": 0,
    "javascript_url": "string",
    "is_public": false,
    "cookie_expiry": 30,
    "first_takes_all": "enabled",
    "affiliate_notifications": false
  }
}