# Tapfiliate

> Run your Tapfiliate affiliate program: add and approve affiliates and groups, record sales and customers, review and approve commissions, and check what you owe in payments.

App · 30 actions. Web page: https://docs.lodol.com/docs/integrations/tapfiliate

## Actions

### Add affiliate to program

Add an existing affiliate to a program, approved unless you choose otherwise. The result has their referral link.

**Inputs**

- Program (`program_id`, text, required): The program. Pick one, or give its id from an earlier step.
- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its id from an earlier step.
- Approval (`approval`, text): Whether they can earn straight away. Defaults to approved. One of: `approved` (Approved (default)), `pending`, `disapproved`.
- Coupon code (`coupon`, text): A coupon code for this affiliate in the program, if you use them.

**Outputs**

- `membership` (object): The affiliate in the program
- `program_id` (text): The program

**Example output**

```json
{
  "membership": {
    "affiliate_group_id": null,
    "applied_at": "2026-10-01T09:00:00+0000",
    "approved": true,
    "coupon": "JANE10",
    "created_at": "2026-10-01T09:00:00+0000",
    "email": "jane@example.com",
    "firstname": "Jane",
    "id": "janejameson",
    "lastname": "Jameson",
    "parent_id": null,
    "referral_link": {
      "asset_id": "ref",
      "link": "https://example.com/?ref=janejameson",
      "source_id": "janejameson"
    }
  },
  "program_id": "my-program"
}
```

### Add note to affiliate

Add a private note to an affiliate. Only your team sees it.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its id from an earlier step.
- Note (`message`, text, required): The text of the note.

**Outputs**

- `note` (object): The new note

**Example output**

```json
{
  "note": {
    "created_at": "2026-10-01T09:00:00+0000",
    "created_by": {
      "firstname": "Alex",
      "id": "adminuser",
      "lastname": "Admin"
    },
    "id": 12,
    "message": "Met at the conference."
  }
}
```

### Approve or disapprove affiliate in program

Approve an affiliate so they earn commission in a program, or disapprove them to stop it.

**Inputs**

- Program (`program_id`, text, required): The program. Pick one, or give its id from an earlier step.
- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its id from an earlier step.
- Approval (`approval`, text, required): Approve or disapprove. One of: `approved`, `disapproved`.

**Outputs**

- `affiliate_id` (text): The affiliate
- `approval` (text): What was set
- `membership` (object): The affiliate in the program
- `program_id` (text): The program

**Example output**

```json
{
  "affiliate_id": "janejameson",
  "approval": "approved",
  "membership": {
    "affiliate_group_id": null,
    "applied_at": "2026-10-01T09:00:00+0000",
    "approved": true,
    "coupon": "JANE10",
    "created_at": "2026-10-01T09:00:00+0000",
    "email": "jane@example.com",
    "firstname": "Jane",
    "id": "janejameson",
    "lastname": "Jameson",
    "parent_id": null,
    "referral_link": {
      "asset_id": "ref",
      "link": "https://example.com/?ref=janejameson",
      "source_id": "janejameson"
    }
  },
  "program_id": "my-program"
}
```

### Approve or disapprove commission

Approve a commission so it can be paid, or disapprove it. Accounts that pay through Tapfiliate Pay cannot undo an approval.

**Inputs**

- Commission ID (`commission_id`, text, required): The commission's number, from 'List commissions' or a conversion.
- Approval (`approval`, text, required): Approve or disapprove. One of: `approved`, `disapproved`.

**Outputs**

- `commission` (object): The commission

**Example output**

```json
{
  "commission": {
    "affiliate": {
      "firstname": "Jane",
      "id": "janejameson",
      "lastname": "Jameson"
    },
    "amount": 10,
    "approved": true,
    "comment": null,
    "commission_name": "default",
    "commission_type": "default",
    "conversion": {
      "id": 7
    },
    "conversion_sub_amount": 100,
    "created_at": "2026-10-02T09:00:00+0000",
    "currency": "USD",
    "final": null,
    "id": 1,
    "kind": "regular"
  }
}
```

### Create affiliate

Add an affiliate. They are not in any program yet: use 'Add affiliate to program'. Without a password Tapfiliate makes one and returns it.

**Inputs**

- Email (`email`, text, required): The affiliate's email address.
- First name (`firstname`, text, required): The affiliate's first name.
- Last name (`lastname`, text, required): The affiliate's last name.
- Password (`password`, text): Leave empty to have one made for you.
- Company (`company_name`, text): The affiliate's company name.
- Company description (`company_description`, text): A short description of the company.

**Outputs**

- `affiliate` (object): The new affiliate

**Example output**

```json
{
  "affiliate": {
    "address": null,
    "affiliate_group_id": null,
    "company": {
      "description": null,
      "name": "Jane Co"
    },
    "created_at": "2026-10-01T09:00:00+0000",
    "custom_fields": {},
    "email": "jane@example.com",
    "firstname": "Jane",
    "id": "janejameson",
    "lastname": "Jameson",
    "meta_data": {},
    "parent_id": null,
    "password": "generated-password",
    "promoted_at": null,
    "promotion_method": null
  }
}
```

### Create affiliate group

Create an affiliate group.

**Inputs**

- Name (`title`, text, required): The group's name.

**Outputs**

- `group` (object): The new group

**Example output**

```json
{
  "group": {
    "affiliate_count": 3,
    "id": "ag_eXampl3",
    "title": "VIPs"
  }
}
```

### Create conversion

Record a sale and credit the affiliate it traces back to. Give one way to find the affiliate: a customer ID, referral code, coupon, click ID or tracking ID. Tapfiliate works out the commission.

**Inputs**

- Customer ID (`customer_id`, text): Your own id for a customer already tracked in Tapfiliate (the one you gave 'Create customer'). It only works in a program with lifetime or recurring commissions turned on; otherwise give a coupon, referral code or click ID.
- Referral code (`referral_code`, text): The affiliate's referral code, such as the end of their referral link.
- Coupon code (`coupon`, text): A coupon code assigned to the affiliate in the program.
- Click ID (`click_id`, text): A click id from Tapfiliate's tracking, if you have one.
- Tracking ID (`tracking_id`, text): The tracking id Tapfiliate's script stored for the visitor.
- External ID (`external_id`, text): Your own id for the sale, such as an order number. It must be unique; Tapfiliate refuses a repeat.
- Amount (`amount`, number): The sale amount in the program's currency. Commission is a share of it. At least 0.
- Currency (`currency`, text): A 3-letter code such as USD, if different from the program's.
- Commission type (`commission_type`, text): The program's commission type to use. Leave empty for its default.
- Metadata (`meta_data`, object): Your own keys and values to keep on the record.

**Outputs**

- `conversion` (object): The new conversion

**Example output**

```json
{
  "conversion": {
    "affiliate": {
      "firstname": "Jane",
      "id": "janejameson",
      "lastname": "Jameson"
    },
    "amount": 100,
    "click": null,
    "commissions": [
      {
        "affiliate": {
          "firstname": "Jane",
          "id": "janejameson",
          "lastname": "Jameson"
        },
        "amount": 10,
        "approved": null,
        "comment": null,
        "commission_name": "default",
        "commission_type": "default",
        "conversion": {
          "id": 7
        },
        "conversion_sub_amount": 100,
        "created_at": "2026-10-02T09:00:00+0000",
        "currency": "USD",
        "final": null,
        "id": 1,
        "kind": "regular"
      }
    ],
    "created_at": "2026-10-02T09:00:00+0000",
    "customer": {
      "customer_id": "user-42",
      "id": "cu_0Th3r",
      "status": "new"
    },
    "external_id": "order-1001",
    "id": 7,
    "meta_data": {},
    "program": {
      "currency": "USD",
      "id": "my-program",
      "title": "My program"
    },
    "tracking_source": "coupon-api",
    "warnings": null
  }
}
```

### Create customer

Track a customer and tie them to the affiliate who referred them, so later sales and recurring commissions go to that affiliate. Give one way to find the affiliate: a referral code, coupon, click ID or tracking ID.

**Inputs**

- Your customer ID (`customer_id`, text, required): Your own id for this customer, such as a user id. It must be unique.
- Referral code (`referral_code`, text): The affiliate's referral code, such as the end of their referral link.
- Coupon code (`coupon`, text): A coupon code assigned to the affiliate in the program.
- Click ID (`click_id`, text): A click id from Tapfiliate's tracking, if you have one.
- Tracking ID (`tracking_id`, text): The tracking id Tapfiliate's script stored for the visitor.
- Status (`status`, text): Where the customer starts. Defaults to new. One of: `new` (New (default)), `lead`, `trial`.
- Metadata (`meta_data`, object): Your own keys and values to keep on the record.

**Outputs**

- `customer` (object): The new customer

**Example output**

```json
{
  "customer": {
    "affiliate": {
      "firstname": "Jane",
      "id": "janejameson",
      "lastname": "Jameson"
    },
    "click": null,
    "created_at": "2026-10-02T09:00:00+0000",
    "customer_id": "user-42",
    "id": "cu_0Th3r",
    "meta_data": {},
    "program": {
      "currency": "USD",
      "id": "my-program",
      "title": "My program"
    },
    "status": "new"
  }
}
```

### Delete affiliate

Delete an affiliate and their program memberships. This cannot be undone.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its id from an earlier step.

**Outputs**

- `affiliate_id` (text): The affiliate deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "affiliate_id": "janejameson",
  "deleted": true
}
```

### Delete conversion

Delete a conversion and its commissions. This cannot be undone.

**Inputs**

- Conversion ID (`conversion_id`, text, required): The conversion's number, from 'List conversions' or 'Create conversion'.

**Outputs**

- `conversion_id` (text): The conversion deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "conversion_id": "7",
  "deleted": true
}
```

### Delete customer

Delete a customer. This cannot be undone.

**Inputs**

- Customer ID (`customer_id`, text, required): Tapfiliate's id for the customer (it starts with cu_), from 'List customers' or 'Create customer'.

**Outputs**

- `customer_id` (text): The customer deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "customer_id": "cu_0Th3r",
  "deleted": true
}
```

### Get affiliate

Get one affiliate with their company, address, group and parent.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its id from an earlier step.

**Outputs**

- `affiliate` (object): The affiliate

**Example output**

```json
{
  "affiliate": {
    "address": null,
    "affiliate_group_id": null,
    "company": {
      "description": null,
      "name": "Jane Co"
    },
    "created_at": "2026-10-01T09:00:00+0000",
    "custom_fields": {},
    "email": "jane@example.com",
    "firstname": "Jane",
    "id": "janejameson",
    "lastname": "Jameson",
    "meta_data": {},
    "parent_id": null,
    "promoted_at": null,
    "promotion_method": null
  }
}
```

### Get affiliate balances

Get what Tapfiliate owes one affiliate, with one amount per currency.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its id from an earlier step.

**Outputs**

- `affiliate_id` (text): The affiliate
- `balances` (object): Amount owed by currency code, like {"USD": 5}

**Example output**

```json
{
  "affiliate_id": "janejameson",
  "balances": {
    "USD": 5
  }
}
```

### Get commission

Get one commission with its amount, status, affiliate and conversion.

**Inputs**

- Commission ID (`commission_id`, text, required): The commission's number, from 'List commissions' or a conversion.

**Outputs**

- `commission` (object): The commission

**Example output**

```json
{
  "commission": {
    "affiliate": {
      "firstname": "Jane",
      "id": "janejameson",
      "lastname": "Jameson"
    },
    "amount": 10,
    "approved": null,
    "comment": null,
    "commission_name": "default",
    "commission_type": "default",
    "conversion": {
      "id": 7
    },
    "conversion_sub_amount": 100,
    "created_at": "2026-10-02T09:00:00+0000",
    "currency": "USD",
    "final": null,
    "id": 1,
    "kind": "regular"
  }
}
```

### Get conversion

Get one conversion with its commissions, affiliate and customer.

**Inputs**

- Conversion ID (`conversion_id`, text, required): The conversion's number, from 'List conversions' or 'Create conversion'.

**Outputs**

- `conversion` (object): The conversion

**Example output**

```json
{
  "conversion": {
    "affiliate": {
      "firstname": "Jane",
      "id": "janejameson",
      "lastname": "Jameson"
    },
    "amount": 100,
    "click": null,
    "commissions": [
      {
        "affiliate": {
          "firstname": "Jane",
          "id": "janejameson",
          "lastname": "Jameson"
        },
        "amount": 10,
        "approved": null,
        "comment": null,
        "commission_name": "default",
        "commission_type": "default",
        "conversion": {
          "id": 7
        },
        "conversion_sub_amount": 100,
        "created_at": "2026-10-02T09:00:00+0000",
        "currency": "USD",
        "final": null,
        "id": 1,
        "kind": "regular"
      }
    ],
    "created_at": "2026-10-02T09:00:00+0000",
    "customer": {
      "customer_id": "user-42",
      "id": "cu_0Th3r",
      "status": "new"
    },
    "external_id": "order-1001",
    "id": 7,
    "meta_data": {},
    "program": {
      "currency": "USD",
      "id": "my-program",
      "title": "My program"
    },
    "tracking_source": "coupon-api",
    "warnings": null
  }
}
```

### Get customer

Get one customer with their status, program and affiliate.

**Inputs**

- Customer ID (`customer_id`, text, required): Tapfiliate's id for the customer (it starts with cu_), from 'List customers' or 'Create customer'.

**Outputs**

- `customer` (object): The customer

**Example output**

```json
{
  "customer": {
    "affiliate": {
      "firstname": "Jane",
      "id": "janejameson",
      "lastname": "Jameson"
    },
    "click": null,
    "created_at": "2026-10-02T09:00:00+0000",
    "customer_id": "user-42",
    "id": "cu_0Th3r",
    "meta_data": {},
    "program": {
      "currency": "USD",
      "id": "my-program",
      "title": "My program"
    },
    "status": "new"
  }
}
```

### Get program

Get one program with its currency, cookie time and recurring settings.

**Inputs**

- Program (`program_id`, text, required): The program. Pick one, or give its id from an earlier step.

**Outputs**

- `program` (object): The program

**Example output**

```json
{
  "program": {
    "contact_email": null,
    "cookie_time": 30,
    "currency": "USD",
    "currency_symbol": "$",
    "default_landing_page_url": "https://example.com",
    "id": "my-program",
    "recurring": false,
    "recurring_cap": null,
    "recurring_period_days": null,
    "status": "active",
    "title": "My program"
  }
}
```

### List affiliate groups

List every affiliate group with how many affiliates it holds.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `groups` (list): The groups

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "affiliate_count": 3,
      "id": "ag_eXampl3",
      "title": "VIPs"
    }
  ]
}
```

### List affiliate notes

List the private notes on one affiliate.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its id from an earlier step.

**Outputs**

- `count` (number): How many
- `notes` (list): The notes

**Example output**

```json
{
  "count": 1,
  "notes": [
    {
      "created_at": "2026-10-01T09:00:00+0000",
      "created_by": {
        "firstname": "Alex",
        "id": "adminuser",
        "lastname": "Admin"
      },
      "id": 12,
      "message": "Met at the conference."
    }
  ]
}
```

### List affiliates

List affiliates, 25 to a page, optionally by email, referral code, group or parent. Pass 'next_page' as 'Page' for more.

**Inputs**

- Email (`email`, text): Only the affiliate with this email.
- Referral code (`referral_code`, text): Only this referral code's.
- In affiliate group (`affiliate_group_id`, text): The affiliate group. Pick one, or give its id from an earlier step.
- Affiliate (`parent_id`, text): Only this affiliate's. Pick one, or give its id from an earlier step.
- Page (`page`, number): Which page of 25 to get, starting at 1. The result's 'next_page' is the next one. At least 1.

**Outputs**

- `affiliates` (list): The affiliates
- `count` (number): How many are on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): The number to give as 'Page' for more, empty on the last
- `page` (number): The page number returned

**Example output**

```json
{
  "affiliates": [
    {
      "address": null,
      "affiliate_group_id": null,
      "company": {
        "description": null,
        "name": "Jane Co"
      },
      "created_at": "2026-10-01T09:00:00+0000",
      "custom_fields": {},
      "email": "jane@example.com",
      "firstname": "Jane",
      "id": "janejameson",
      "lastname": "Jameson",
      "meta_data": {},
      "parent_id": null,
      "promoted_at": null,
      "promotion_method": null
    }
  ],
  "count": 1,
  "has_more": false,
  "next_page": null,
  "page": 1
}
```

### List affiliates in program

List the affiliates in a program, 25 to a page, with their referral links and coupons.

**Inputs**

- Program (`program_id`, text, required): The program. Pick one, or give its id from an earlier step.
- Email (`email`, text): Only the affiliate with this email.
- In affiliate group (`affiliate_group_id`, text): The affiliate group. Pick one, or give its id from an earlier step.
- Page (`page`, number): Which page of 25 to get, starting at 1. The result's 'next_page' is the next one. At least 1.

**Outputs**

- `affiliates` (list): The affiliates
- `count` (number): How many are on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): The number to give as 'Page' for more, empty on the last
- `page` (number): The page number returned

**Example output**

```json
{
  "affiliates": [
    {
      "affiliate_group_id": null,
      "applied_at": "2026-10-01T09:00:00+0000",
      "approved": true,
      "coupon": "JANE10",
      "created_at": "2026-10-01T09:00:00+0000",
      "email": "jane@example.com",
      "firstname": "Jane",
      "id": "janejameson",
      "lastname": "Jameson",
      "parent_id": null,
      "referral_link": {
        "asset_id": "ref",
        "link": "https://example.com/?ref=janejameson",
        "source_id": "janejameson"
      }
    }
  ],
  "count": 1,
  "has_more": false,
  "next_page": null,
  "page": 1
}
```

### List balances

List every affiliate who is owed money, with the amount per currency. Tapfiliate allows this ten times a minute.

**Inputs**: None.

**Outputs**

- `balances` (list): The balances
- `count` (number): How many

**Example output**

```json
{
  "balances": [
    {
      "affiliate_id": "janejameson",
      "balances": {
        "USD": 5
      }
    }
  ],
  "count": 1
}
```

### List commissions

List commissions, 25 to a page, by affiliate, status or whether they are paid. Pass 'next_page' as 'Page' for more.

**Inputs**

- Affiliate (`affiliate_id`, text): Only this affiliate's. Pick one, or give its id from an earlier step.
- Status (`status`, text): Only commissions in this state. One of: `approved`, `pending`, `disapproved`.
- Paid (`paid`, text): Only paid, or only unpaid, commissions. One of: `1` (Paid), `0` (Not paid).
- Page (`page`, number): Which page of 25 to get, starting at 1. The result's 'next_page' is the next one. At least 1.

**Outputs**

- `commissions` (list): The commissions
- `count` (number): How many are on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): The number to give as 'Page' for more, empty on the last
- `page` (number): The page number returned

**Example output**

```json
{
  "commissions": [
    {
      "affiliate": {
        "firstname": "Jane",
        "id": "janejameson",
        "lastname": "Jameson"
      },
      "amount": 10,
      "approved": null,
      "comment": null,
      "commission_name": "default",
      "commission_type": "default",
      "conversion": {
        "id": 7
      },
      "conversion_sub_amount": 100,
      "created_at": "2026-10-02T09:00:00+0000",
      "currency": "USD",
      "final": null,
      "id": 1,
      "kind": "regular"
    }
  ],
  "count": 1,
  "has_more": false,
  "next_page": null,
  "page": 1
}
```

### List conversions

List conversions (sales), 25 to a page, by program, affiliate, external id or date. Pass 'next_page' as 'Page' for more.

**Inputs**

- Program (`program_id`, text): Only this program's. Pick one, or give its id from an earlier step.
- Affiliate (`affiliate_id`, text): Only this affiliate's. Pick one, or give its id from an earlier step.
- External ID (`external_id`, text): Only the conversion with this id from your own system.
- Only pending (`pending`, true/false): Only conversions with commissions waiting for approval.
- From date (`date_from`, date): Only those created on or after this day (UTC).
- To date (`date_to`, date): Only those created on or before this day (UTC).
- Page (`page`, number): Which page of 25 to get, starting at 1. The result's 'next_page' is the next one. At least 1.

**Outputs**

- `conversions` (list): The conversions
- `count` (number): How many are on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): The number to give as 'Page' for more, empty on the last
- `page` (number): The page number returned

**Example output**

```json
{
  "conversions": [
    {
      "affiliate": {
        "firstname": "Jane",
        "id": "janejameson",
        "lastname": "Jameson"
      },
      "amount": 100,
      "click": null,
      "commissions": [
        {
          "affiliate": {
            "firstname": "Jane",
            "id": "janejameson",
            "lastname": "Jameson"
          },
          "amount": 10,
          "approved": null,
          "comment": null,
          "commission_name": "default",
          "commission_type": "default",
          "conversion": {
            "id": 7
          },
          "conversion_sub_amount": 100,
          "created_at": "2026-10-02T09:00:00+0000",
          "currency": "USD",
          "final": null,
          "id": 1,
          "kind": "regular"
        }
      ],
      "created_at": "2026-10-02T09:00:00+0000",
      "customer": {
        "customer_id": "user-42",
        "id": "cu_0Th3r",
        "status": "new"
      },
      "external_id": "order-1001",
      "id": 7,
      "meta_data": {},
      "program": {
        "currency": "USD",
        "id": "my-program",
        "title": "My program"
      },
      "tracking_source": "coupon-api",
      "warnings": null
    }
  ],
  "count": 1,
  "has_more": false,
  "next_page": null,
  "page": 1
}
```

### List customers

List customers, 25 to a page, by program, affiliate, your own customer id or date. Pass 'next_page' as 'Page' for more.

**Inputs**

- Program (`program_id`, text): Only this program's. Pick one, or give its id from an earlier step.
- Affiliate (`affiliate_id`, text): Only this affiliate's. Pick one, or give its id from an earlier step.
- Your customer ID (`customer_id`, text): Only the customer with this id from your own system.
- From date (`date_from`, date): Only those created on or after this day (UTC).
- To date (`date_to`, date): Only those created on or before this day (UTC).
- Page (`page`, number): Which page of 25 to get, starting at 1. The result's 'next_page' is the next one. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `customers` (list): The customers
- `has_more` (true/false): Whether another page follows
- `next_page` (number): The number to give as 'Page' for more, empty on the last
- `page` (number): The page number returned

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "affiliate": {
        "firstname": "Jane",
        "id": "janejameson",
        "lastname": "Jameson"
      },
      "click": null,
      "created_at": "2026-10-02T09:00:00+0000",
      "customer_id": "user-42",
      "id": "cu_0Th3r",
      "meta_data": {},
      "program": {
        "currency": "USD",
        "id": "my-program",
        "title": "My program"
      },
      "status": "new"
    }
  ],
  "has_more": false,
  "next_page": null,
  "page": 1
}
```

### List payments

List the payments made to affiliates.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `payments` (list): The payments

**Example output**

```json
{
  "count": 1,
  "payments": [
    {
      "affiliate": {
        "firstname": "Jane",
        "id": "janejameson",
        "lastname": "Jameson"
      },
      "amount": 25,
      "created_at": "2026-10-03T09:00:00+0000",
      "currency": "USD",
      "id": "pa_eXampl3"
    }
  ]
}
```

### List programs

List every affiliate program in the account.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `programs` (list): The programs

**Example output**

```json
{
  "count": 1,
  "programs": [
    {
      "contact_email": null,
      "cookie_time": 30,
      "currency": "USD",
      "currency_symbol": "$",
      "default_landing_page_url": "https://example.com",
      "id": "my-program",
      "recurring": false,
      "recurring_cap": null,
      "recurring_period_days": null,
      "status": "active",
      "title": "My program"
    }
  ]
}
```

### Put affiliate in group

Put an affiliate in an affiliate group, replacing any group they were in.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its id from an earlier step.
- Affiliate group (`group_id`, text, required): The affiliate group. Pick one, or give its id from an earlier step.

**Outputs**

- `affiliate_id` (text): The affiliate
- `group_id` (text): The group they are now in
- `result` (object): What Tapfiliate answered

**Example output**

```json
{
  "affiliate_id": "janejameson",
  "group_id": "ag_eXampl3",
  "result": {}
}
```

### Rename affiliate group

Change an affiliate group's name.

**Inputs**

- Affiliate group (`group_id`, text, required): The affiliate group. Pick one, or give its id from an earlier step.
- New name (`title`, text, required): The group's new name.

**Outputs**

- `group` (object): The group

**Example output**

```json
{
  "group": {
    "affiliate_count": 3,
    "id": "ag_eXampl3",
    "title": "Top partners"
  }
}
```

### Update conversion

Change a conversion's amount, external id or metadata. Only the fields given change.

**Inputs**

- Conversion ID (`conversion_id`, text, required): The conversion's number, from 'List conversions' or 'Create conversion'.
- Amount (`amount`, number): The corrected sale amount. At least 0.
- External ID (`external_id`, text): A new id from your own system.
- Recalculate commissions (`recalculate_commissions`, true/false): Also recalculate the commissions when the amount changes.
- Metadata (`meta_data`, object): Your own keys and values to keep on the record.

**Outputs**

- `conversion` (object): The conversion

**Example output**

```json
{
  "conversion": {
    "affiliate": {
      "firstname": "Jane",
      "id": "janejameson",
      "lastname": "Jameson"
    },
    "amount": 120,
    "click": null,
    "commissions": [
      {
        "affiliate": {
          "firstname": "Jane",
          "id": "janejameson",
          "lastname": "Jameson"
        },
        "amount": 10,
        "approved": null,
        "comment": null,
        "commission_name": "default",
        "commission_type": "default",
        "conversion": {
          "id": 7
        },
        "conversion_sub_amount": 100,
        "created_at": "2026-10-02T09:00:00+0000",
        "currency": "USD",
        "final": null,
        "id": 1,
        "kind": "regular"
      }
    ],
    "created_at": "2026-10-02T09:00:00+0000",
    "customer": {
      "customer_id": "user-42",
      "id": "cu_0Th3r",
      "status": "new"
    },
    "external_id": "order-1001",
    "id": 7,
    "meta_data": {},
    "program": {
      "currency": "USD",
      "id": "my-program",
      "title": "My program"
    },
    "tracking_source": "coupon-api",
    "warnings": null
  }
}
```
