Skip to main content
November 9, 2026
Tapfiliate’s REST API integration lets you automate and manage affiliates, commissions, and conversions in real time from any platform. ✏️ In this article, we’ll discuss:

Why REST API is the most flexible tracking solution😍

REST API ensures robust and adaptable integration between systems due to its unique aspects:
  • 🔒 Secure authorization (via the API key) - The system will only accept the authorized calls to the Tapfiliate API. Any attempts to create an action without a secret API key will fail, ensuring the safety of your setup.
  • 🎨 Customizable requests (you can collect more data when tracking) - Unlike some of our pre-made integrations, the REST API is very flexible in terms of data that can be passed along with your API requests - whether it defines an alternate commission type, referrer information, or any additional data passed within the meta_data parameter.
  • 🥊 Ad-blockers resistant (accurate tracking) - REST API is a backend (server-side) integration, which means you don’t have to add any tracking script inside your website pages. Therefore, any ad-blocking software or extension will not affect the tracking process, as it only applies to the third-party tracking codes on the website.
  • 💻 No need to install the tracking code — This factor makes the REST API an excellent fit for CMS-based websites where it’s not allowed to add custom code. It also makes it an excellent solution for connecting the applications (if your affiliate campaign is not website-oriented), so you can integrate the web/mobile app with Tapfiliate via API endpoints.
  • ↕️ Avoids cross-domain limitations - Assuming you don’t need to rely on the tracking code, the REST API also helps cover the cases where your customer’s flow includes multiple instances located on different domains/systems, which is not natively possible within code-based integrations.

What do you need to set up the REST API tracking in Tapfiliate 🔧

To successfully integrate, ensure you have the following:
  • A live Tapfiliate account with access to your API key. Your API key is generated and stored at the bottom of your Profile page:
  • Admin/developer access to your server - required to process the API scenarios and send the data on tracking events from your side to the Tapfiliate server.
  • A test affiliate added to your account ( 👉 here’s how you can create one).

The essential integration steps ⚙️

Step 1. Locate your affiliate referral link
In your Affiliates overview, you can choose a test affiliate and copy their referral link. You will need the code that goes after ?ref=abcdefg to attribute the further actions to a specific affiliate in the program.
Step 2. Create a click
Using your affiliate’s referral code, create a click via this API endpoint:
Request example:
The response contains the click’s id, as in {"id": "…"} below. Pass this value as click_id when you create a conversion (Step 3) or a customer for this click. 💡 Store the click’s id in your database: you will send it as click_id later.
Step 3. Create a conversion
Now that you have a click_id that records the visitor’s data upon their access to the website/app, you can attach a conversion action via the REST API. Here is an endpoint to call:
Attach and save more information within the conversion API call
  • referral_code (optional) - An affiliate’s referral code. This corresponds to the value of ref= in their referral link.
  • tracking_id (optional) - Used if you are tracking a conversion with the help of a hybrid (REST API + JavaScript) integration.
  • click_id (optional) - The value that was created within the click event. If you have attached any additional information to a click event, it will also be included in the conversion call response.
  • coupon (optional) - An alternative parameter to track the conversion by (used in cases when you attribute conversions not by a referral code or a click_id, but via the affiliate coupon value).
  • currency (optional) - The three-letter ISO currency code. Override the program’s default currency for this conversion by explicitly passing a currency code.
  • asset_id (optional) - Matching the tap_a parameter, if you are using anonymized referral links.
  • source_id (optional) - Matching the tap_s parameter, if you are using anonymized referral links.
  • external_id (optional) - A unique identifier for this conversion. It can be anything meaningful to you, like an order number, user ID, or email address. After a conversion occurs, you can find this ID alongside the conversion on our platform. This makes it very easy to cross-reference data on our platform with your own database. This ID must be unique for each conversion.
  • amount (optional) - The conversion amount
  • customer_id (optional) - The ID for the current customer in your system. Depending on your program settings, this can be used for recurring / lifetime commissions.
  • commission_type (optional) - If no commission type is supplied, the program’s default commission type is used.
  • commissions (optional) - Will override the amount and commission_type parameters if set.
  • meta_data (optional) - Metadata for this transaction, used if you need to attach additional information to a conversion (such as product characteristics, category, quantity, etc.) that is not listed within the existing parameters above. Child Arguments
  • user_agent (optional) - The client’s user agent string. Used for statistics and fraud detection.
  • ip (optional) - The client’s IP address. Used for fraud detection, and the conversion’s country in your reports is the location of this IP. If you leave it out, or it isn’t a valid IP address, Tapfiliate uses the IP saved for a known customer (customer_id), then the IP of the click the conversion is matched to, and otherwise the IP the request came from – for a server-side call that is your server, so the country would be your server’s. A customer created by a conversion is saved with the IP the request came from, not with the conversion’s ip: with server-side calls, every later conversion of that customer sent without ip gets your server’s country too. To report your buyers’ countries, pass the buyer’s IP here in every conversion, including later conversions of the same customer. Conversions imported from a CSV file get no country, even with an ip column.
An example of the conversion API request
The API response example
You will be able to see the results of your API calls inside the Conversions section of your Tapfiliate account:

Verify your REST API connection 👍

The REST API integration requires you to make a test purchase via a test affiliate’s referral code. Use a test affiliate, not a real one: the test conversion creates a real commission for the affiliate it is credited to. You can use it during testing and follow the Steps 1-3 we described above. If you’ll see the integration step marked as completed in the Getting Started Guide, and the conversion/click data populating in your Tapfiliate Reporting, you’re all set 🎊 After the test, disapprove the test commission in the conversion, and cancel the test customer on the Customers page, so that in a program with lifetime or recurring commissions they don’t keep earning a commission every period.

What else can be covered by the REST API (Advanced Use-Cases) 🆙

As highlighted above, the REST API supports a wide range of advanced tracking scenarios. Below, we will go over some of these.
Tracking different commissions per product/different actions
When you need to assign a conversion with a different commission rate (for example, if this conversion represents a different in-platform action, a separate product, or a category), add the commission_type identifier to your API request when tracking the conversion. API endpoint URL:
https://api.tapfiliate.com/1.6/conversions/
Request example:
Here, we have added the commission type identifier you created to the API request to override the standard commission rate. In a response, you will see the respective commission amount. 👌
Pass additional information with a conversion/customer data
If you need to attach additional information to a conversion or a customer while tracking, the best solution is to include metadata in the conversion/customer creation call. You can also add metadata when tracking a click. It is not copied into the conversion’s own meta_data. When a conversion is created from that click_id (and the same request has no coupon, no attribution_id and no customer_id of an existing customer with lifetime/recurring commissions), it stays linked to the click: the click’s metadata appears with the conversion as affiliate_meta_data (in the API response, the conversion details and the conversion export), is counted under the click’s SubIDs in your affiliate’s SubID report (if your plan includes it), and is sent in postbacks by the ${click_subid} macro with the SubID’s name as the content key. If you need a value on every conversion, or in the conversion’s meta_data (for example for the ${conversion_meta_data} macro with a content key), pass it in the conversion call. API endpoint URL: Each of the three calls takes its own body, and the example below is for customers only. The developer portal has a request example for each call: Create a conversion, Create a customer and Create a click.
Request example (Create a customer):
You can view the metadata attached to the Customer details in your Tapfiliate account.
Manage affiliate payouts
It’s possible to automate affiliate payments through Tapfiliate’s REST API as follows:
  1. Get the outstanding balances via this endpoint: https://api.tapfiliate.com/1.6/balances/ (GET method)
  2. Get the affiliate’s payout information: https://api.tapfiliate.com/1.6/affiliates/janejameson/payout-methods/
  3. Complete the payment with your preferred payment provider using its API.
  4. Create a new payment for the affiliate for the paid out amount using this endpoint:
    https://api.tapfiliate.com/1.6/payments/ (POST method)
If an affiliate’s primary payout method is a Trolley one and they have completed the setup for automated payouts, don’t pay them in step 3: creating the payment in step 4 also creates it in your Trolley account, and you send it from Trolley (Step 7 of the Trolley article). Paying them with your provider as well pays them twice. After you record the payment, check the Trolley batches: a payment that isn’t in any of them wasn’t sent to Trolley (for example, when the affiliate’s Trolley payout method was added through the REST API), and it is marked Settled all the same: pay it another way or cancel it.

Complete REST API library 📚

Here, you will find all endpoints available in Tapfiliate’s REST API, grouped by the areas they affect and the actions they process.

General 🌐

Authentication

Every request carries your API key in the X-Api-Key header and goes over HTTPS. How to send the key, and what a 401 or a 403 error means, is on the developer portal: Authentication. If the API refuses your requests, see Why the Tapfiliate API Refuses Your Request.

Pagination

Requests that return multiple items will be paginated to 25 items by default. You can specify further pages with the ?page parameter.
Page numbering is 1-based. Omitting the ?page parameter will return the first page. The pagination info is included in the Link Header.
Linebreak is included for readability. Possible ref values: 👉 If you need to view over 400 pages, you can use a special pagination parameter from the X-Pagination-Cursor header.
How it works:
  1. Make an initial API call to the required endpoint (for example, List all clicks: https://api.tapfiliate.com/1.6/clicks/)
  2. A successful API response will return the X-Pagination-Cursor: XXXXXXXXXXXXX (digital value).
  3. To view the next page, you can use the value you received in the next API call, as https://api.tapfiliate.com/1.6/clicks/?searchFrom=XXXXXXXXXXXXX.
  4. The API will return the new batch of clicks and a new X-Pagination-Cursor value.
  5. Using the new pagination value, you can repeat steps 2-4 as long as required to list all data.

Limits

Most endpoints have rate limits. Rate limits are communicated through the following headers:

By account sections 📄

Clicks

Сreate a click
Method: POST
Endpoint URL:
https://api.tapfiliate.com/1.6/clicks/
Request example:
Response example:
Arguments you can add to the request:
  • referral_code (required) - The affiliate’s referral code, obtained from the URL
  • source_id (optional) - aaaaaa (string, optional) - The source ID used by the affiliate (if any). Obtained from the URL.
  • meta_data (optional) - Any metadata parameters passed by the affiliate.
    Child Arguments
    • key (required) - A key value pair. Multiple allowed types.
  • referrer (optional) - The HTTP referrer. Will be used in reporting.
  • landing_page (optional) - The current page. Will be used in reporting.
  • user_agent (optional) - The whole user agent string for the client, which identifies their browser and device. Will be used in reporting.
  • ip (optional) - The user’s IP address. Will be used in reporting.
Passing your affiliates’ SubIDs from an app or a server. When the tracking script records a click, it takes every tm_ parameter from the page address and saves it without the prefix: tm_subid1=abc becomes subid1: abc. A click created with this endpoint isn’t read from a page address, so pass the SubIDs yourself in meta_data, without the prefix, for example "meta_data": {"subid1": "abc"}. The click then carries the same SubID name as clicks recorded by the script, and it is counted under it in the affiliate’s SubID report (if your plan includes it) and sent in postbacks by the ${click_subid} macro with the content key subid1. A name sent with the prefix, such as tm_subid1, is saved as is, as a different SubID.
List all clicks (included in the Enterprise plan)
Lists the clicks on your programs with GET https://api.tapfiliate.com/1.6/clicks/. This call is part of Detailed API Click Reporting, which is included in the Enterprise plan. An account without it is refused on this call and on the next one only: see Only the click endpoints are refused. The developer portal describes the filters, the response and the errors: List all clicks.
Get detailed information about the click (included in the Enterprise plan)
Returns one click with GET https://api.tapfiliate.com/1.6/clicks/{id}/, where {id} is the click’s id in the path. Like listing clicks, it is part of Detailed API Click Reporting, which is included in the Enterprise plan. The developer portal describes the response and the errors: Get detailed information about click.

Conversions

Create a conversion
To create a conversion, you must provide one of the following parameters: referral code, customer_id, click_id, coupon, tracking_id, or a combination of asset_id and source_id. A customer_id on its own is enough only for a customer that already exists in Tapfiliate, has an affiliate and is in a program with lifetime/recurring commissions; for a new customer, or without these commissions, also send one of the other identifiers, or the conversion is rejected.
If multiple identifiers are included, Tapfiliate decides the affiliate in this order:
1. customer_id of a customer that already exists in Tapfiliate. If that customer has no affiliate, the conversion is rejected, whatever else you send. If lifetime/recurring commissions are switched on in that customer’s program, the conversion goes to that customer’s affiliate, even if a coupon or click ID is also sent; it is rejected if the customer is canceled or has reached the recurring limit (number of conversions or period), or if that affiliate can no longer be credited (for example, they are no longer approved in the program, their account was deleted, or the program is archived).
2. coupon code, 3. click ID, 4. referral code, 5. asset_id + source_id, 6. tracking ID.
Without lifetime/recurring commissions, an existing customer’s customer_id doesn’t decide the affiliate: the conversion is attributed by the next identifier. A customer_id Tapfiliate doesn’t know yet doesn’t decide it either. Of identifiers 2–6, only the first one you send in this order counts: if it isn’t valid (for example, an unknown coupon or click ID), the conversion is rejected, even if a later one is valid. See also How to Use and Track Coupon Codes.
Method: POST
Endpoint URL:
https://api.tapfiliate.com/1.6/conversions/
URI parameters:
  • override_max_cookie_time (optional) - A boolean value that defines whether your program’s cookie lifetime should be overridden when creating a conversion. If set to False, a conversion will not be created outside the cookie lifetime; if set to True, a conversion will be recorded regardless of the cookie lifetime. Set to False by default.
Arguments you can use in the request are listed above 👆 Request example - see above.
Response example - see above.
Retrieve a conversion
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/conversions/29877192/
URI parameters:
  • conversion_id (required) - Example: 29877192. The numeric identifier of the conversion to apply the action to. Retrieved from the API, does not match the External ID in Tapfiliate.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Update a conversion
Updates a conversion with PATCH https://api.tapfiliate.com/1.6/conversions/{conversion_id}/, where {conversion_id} is the conversion’s numeric id from the API, not its External ID. amount in the body is the new amount of the conversion, not of a commission. With API version 1.6, as in this address, the conversion’s commissions keep their amounts unless you also add recalculate_commissions=true to the address, and even then some commissions are not recalculated. The developer portal describes the arguments, which commissions are recalculated and how, and the errors: Update a conversion.
Delete a conversion
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/conversions/29877192/
URI parameters:
  • conversion_id (required) - Example: 29877192. The numeric identifier of the conversion to apply the action to. Retrieved from the API, does not match the External ID in Tapfiliate.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.
List all conversions
Lists your conversions with their commissions with GET https://api.tapfiliate.com/1.6/conversions/. The developer portal describes the filters, the response and the errors: List all conversions.
Add commissions to a conversion
Used when you want to attach additional commission to an existing conversion. Method: POST
Endpoint URL:
https://api.tapfiliate.com/1.6/conversions/28905353/commissions/
URI parameters:
  • conversion_id (required) - Example: 28905353. The numeric identifier of the conversion to apply the action to. Retrieved from the API, do not match the External ID in Tapfiliate.
Arguments for the request:
  • conversion_sub_amount (required) - The amount used to calculate the commission, according to the given or default commission type.
  • commission_type (optional) - If no commission type is supplied, the programs default commission type is used
  • comment (optional) - A comment for this commission. The comment will be visible to the affiliate - great way to explain the changes made.
Request example:
Response example:
Who can receive the commission
The commission goes to the affiliate of the conversion. That affiliate must be approved in the conversion’s program. If the affiliate is disapproved, still pending, not a member of that program, or deleted, the request is refused with a 400 response and no commission is created – including MLM commissions for the affiliate’s parent affiliates.
Error response example:
For a deleted affiliate the message is Affiliate is deleted.💡 Tip: to check an affiliate’s status before sending the request, use Retrieve an affiliate in a program and look at the approved field.
Retrieve metadata
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/conversions/28905353/meta-data/
URI parameters:
  • conversion_id (required) - Example: 29877192. The numeric identifier of the conversion to apply the action to. Retrieved from the API, does not match the External ID in Tapfiliate.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Update (replace) metadata
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/conversions/28905353/meta-data/
URI parameters:
  • conversion_id (required) - Example: 29877192. The numeric identifier of the conversion to apply the action to. Retrieved from the API, does not match the External ID in Tapfiliate.
Arguments for the request body:
  • metadata - You will require a key and the value, for example “product”: “Sample Item Option 73”.
Request example:
Response example:
Retrieve metadata by key
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/conversions/28905353/meta-data/product_qty/
URI parameters:
  • conversion_id (required) - Example: 29877192. The numeric identifier of the conversion to apply the action to. Retrieved from the API, does not match the External ID in Tapfiliate.
  • key (required) - the metadata key. This key will sort the information in the API response.
The request body will be empty, as all the necessary parameters will be added to the request URL as query parameters.
Response example:
Set metadata by key
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/conversions/28905353/meta-data/product_qty/
URI parameters:
  • conversion_id (required) - Example: 29877192. The numeric identifier of the conversion to apply the action to. Retrieved from the API, does not match the External ID in Tapfiliate.
  • key (required) - the metadata key. This key will sort the information in the API response.
Request example:
Response example:
Delete metadata by key
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/conversions/28905353/meta-data/product_qty/
URI parameters:
  • conversion_id (required) - Example: 29877192. The numeric identifier of the conversion to apply the action to. Retrieved from the API, does not match the External ID in Tapfiliate.
  • key (required) - the metadata key. This key will sort the information in the API response.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.

Commissions

Retrieve a commission
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/commissions/38080490/
URI parameters:
  • commission_id (required) - Example: 38080490. The numeric identifier of the commission to fetch. Retrieved from the API.
The request body will be empty, as all the necessary parameters will be added to the request URL as query parameters.
Response example:
Update a commission
Method: PATCH
Endpoint URL:
https://api.tapfiliate.com/1.6/commissions/38080490/
URI parameters:
  • commission_id (required) - Example: 38080490. The numeric identifier of the commission to fetch. Retrieved from the API.
Arguments to use:
  • amount (optional) - The new commission amount.
  • comment (optional) - A comment for this commission. The comment will be visible to the affiliate.
  • approved (optional) - A boolean value (set to true/false) to approve or disapprove commission.
  • conversion_sub_amount (optional) - The new value for the conversion (will be recalculated).
Request example:
Response example:
List all commissions
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/commissions/?affiliate_id=craigstanford&status=approved&paid=0
URI parameters:
  • affiliate_id (optional) - Example: craigstanford. The affiliate ID.
  • status (optional) - Example: approved. An optional approval status to filter by. Valid values are: approved | disapproved | pending.
  • paid (optional) - Example: 0. Only shows commissions that are paid out. Valid values are: 1 and 0.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Approve a commission
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/commissions/38080490/approved/
URI parameters:
  • commission_id (required) - Example: 38080490. The numeric identifier of the commission to fetch. Retrieved from the API.
The request and response bodies will be empty, as all required data will be added to the request URL as query parameters.
Response example:
Disapprove a commission
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/commissions/38080490/approved/
URI parameters:
  • commission_id (required) - Example: 38080490. The numeric identifier of the commission to fetch. Retrieved from the API.
The request and response bodies will be empty, as all required data will be added to the request URL as query parameters.
Response example:

Customers

Create a customer
Creates a customer with POST https://api.tapfiliate.com/1.6/customers/. customer_id is required: without it the API answers 400. Also send one of coupon code, click ID, referral code, asset_id + source_id, or tracking ID. If you send more than one, only the first one in this order counts: if it isn’t valid (for example, an unknown coupon or click ID), the customer is not created, even if a later one is valid. The developer portal describes the arguments, the response and the errors: Create a customer. The optional ip is the client’s IP address. It is used for fraud detection, and it is the IP every later conversion of this customer gets when it is sent without its own ip: the country of those conversions in your reports is the location of this IP. Conversions imported from a CSV file get no country, and renewals that a Time-Based commission type creates automatically get no IP and no country. If you leave it out, or it isn’t a valid IP address, the customer is saved with the IP of the click it is matched to (click_id or tracking_id), and otherwise with the IP the request came from – for a server-side call that is your server, so those conversions would get your server’s country. To report your buyers’ countries, pass the buyer’s IP here, or in every conversion you send for the customer.
Retrieve a customer
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/customers/cu_-cesNVckkOqi2jTgSH/
URI parameters:
  • id (required) - The Tapfiliate-generated id of the Customer to act with. Does not match the Customer_ID in your program. You can find it when creating a customer via the REST API:
The request body will be empty, as all required data will be added to the request URL as query parameters.
Response example:
Update a customer
This method allows you to attach metadata to the customer record and update the Tapfiliate Customer_ID. Method: PATCH
Endpoint URL:
https://api.tapfiliate.com/1.6/customers/cu_-cesNVckkOqi2jTgSH/
URI parameters:
  • id (required) - The Tapfiliate-generated id of the Customer to act with. Does not match the Customer_ID in your program. You can find it when creating a customer via the REST API.
Arguments:
  • customer_id (optional) - The ID for the current customer in your system. Depending on your program settings, this can be used for recurring / lifetime commissions. This ID must be unique for each customer.
  • meta_data (optional) - Metadata for this customer record, used if you need to attach additional information to customer details that is not listed within the existing parameters above.
Request example:
Response example:
List all customers
Lists your customers with GET https://api.tapfiliate.com/1.6/customers/. The developer portal describes the filters, the response and the errors: List all customers.
Cancel a customer
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/customers/cu_-cesNVckkOqi2jTgSH/status/
The request body will be empty, as all required data will be added to the request URL as query parameters.
Response example:
Uncancel a customer
Uncancels a customer with PUT https://api.tapfiliate.com/1.6/customers/{id}/status/, with an empty body. It is the same address that cancels the customer, but a different method: a DELETE there cancels the customer again. The status is not restored from before the cancellation: Tapfiliate sets it again from the customer’s conversions. That is the active status (Paying, Won or Active), the capped status if the customer has already reached the program’s recurring frequency cap, or the initial status (Trial, Lead or New) if it has no conversions. A customer that still has its initial status cannot be activated this way: the API answers 400. The response and the errors are on the developer portal: Uncancel a customer. Whether recurring commissions for an uncanceled customer start again, and when, depends on several things, among them your program’s recurring commission and cap settings and the customer’s conversions. If you need to know it for a customer, contact us at support@tapfiliate.com.
Retrieve metadata
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/customers/cu_-cesNVckkOqi2jTgSH/meta-data/
URI parameters:
  • id (required) - The Tapfiliate-generated id of the Customer to act with. Does not match the Customer_ID in your program. You can find it when creating a customer via the REST API.
The request body will be empty, as all required data will be added to the request URL as query parameters.
Response example:
Update (replace) metadata
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/customers/cu_-cesNVckkOqi2jTgSH/meta-data/
URI parameters:
  • id (required) - The Tapfiliate-generated id of the Customer to act with. Does not match the Customer_ID in your program. You can find it when creating a customer via the REST API.
Request example:
Response example:
Retrieve metadata by key
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/customers/cu_-cesNVckkOqi2jTgSH/meta-data/age/
URI parameters:
  • id (required) - The Tapfiliate-generated id of the Customer to act with. Does not match the Customer_ID in your program. You can find it when creating a customer via the REST API.
  • key (required) - The metadata key.
The request body will be empty, as all required data will be added to the request URL as query parameters.
Response example:
Set metadata by key
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/customers/cu_-cesNVckkOqi2jTgSH/meta-data/segment/
URI parameters:
  • id (required) - The Tapfiliate-generated id of the Customer to act with. Does not match the Customer_ID in your program. You can find it when creating a customer via the REST API.
  • key (required) - Example: segment.The metadata key.
Request example:
Response example:
Delete metadata by key
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/customers/cu_-cesNVckkOqi2jTgSH/meta-data/segment/
URI parameters:
  • id (required) - The Tapfiliate-generated id of the Customer to act with. Does not match the Customer_ID in your program. You can find it when creating a customer via the REST API.
  • key (required) - Example: segment.The metadata key.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.
Delete customer
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/customers/cu_-cesNVckkOqi2jTgSH/
URI parameters:
  • id (required) - The Tapfiliate-generated id of the Customer to act with. Does not match the Customer_ID in your program. You can find it when creating a customer via the REST API.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.

Programs

Retrieve a program
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/programs/my-business/
URI parameters:
  • program_id (required) - Example: my-business. The program ID, located in your account’s Advanced settings.
The request body will be empty, as all required data will be added to the request URL as query parameters.
Response example:
List all programs
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/programs/?asset_id=1-aaaaaa
URI parameters:
  • asset_id (optional) - Matching the tap_a parameter, if you are using anonymized referral links.
The request body will be empty, as all required data will be added to the request URL as query parameters.
Response example:
List all affiliates in a program
Lists the affiliates of a program with GET https://api.tapfiliate.com/1.6/programs/{program_id}/affiliates/. The developer portal describes the filters, the response and the errors: List all affiliates in program.
Add an affiliate to a program
Adds an existing affiliate to a program with POST https://api.tapfiliate.com/1.6/programs/{program_id}/affiliates/. Without approved in the body, the affiliate is added as Approved. send_welcome_email is a query parameter, not part of the request body. This call sends Tapfiliate’s default welcome email only when it adds the affiliate as Approved: when it adds them as Pending ("approved": null) or Disapproved ("approved": false), it sends none, even with send_welcome_email=true. The developer portal describes the arguments, when the email is sent, the response and the errors: Add an affiliate to a program.
Retrieve an affiliate in a program
Returns an affiliate with their details in a program with GET https://api.tapfiliate.com/1.6/programs/{program_id}/affiliates/{affiliate_id}/. Both program_id and affiliate_id are required: without affiliate_id, the same address lists all the affiliates of the program instead, as List all affiliates in a program above. The developer portal describes the response and the errors: Retrieve an affiliate in a program.
Update an affiliate in a program
Changes an affiliate’s coupon code for a program with PATCH https://api.tapfiliate.com/1.6/programs/{program_id}/affiliates/{affiliate_id}/, with coupon in the body. Both program_id and affiliate_id are required. The developer portal describes the argument, the response and the errors: Update an affiliate in a program.
Approve an affiliate in a program
Approves an affiliate in a program with PUT https://api.tapfiliate.com/1.6/programs/{program_id}/affiliates/{affiliate_id}/approved/, with an empty body. Both program_id and affiliate_id are required. The developer portal describes the response, when the affiliate gets an email, and the errors: Approve an affiliate.
Disapprove an affiliate in a program
Disapproves an affiliate in a program with DELETE https://api.tapfiliate.com/1.6/programs/{program_id}/affiliates/{affiliate_id}/approved/, the same address that approves them, with an empty body. Both program_id and affiliate_id are required. The developer portal describes the response and the errors: Disapprove an affiliate.
List program commission types
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/programs/my-business/commission-types/
URI parameters:
  • program_id (required) - Example: my-business. The program ID, located in your account’s Advanced settings.
The request body will be empty, as all the necessary data will be added to the request URL as query parameters.
Response example:
List program MLM levels
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/programs/my-business/levels/
URI parameters:
  • program_id (required) - Example: my-business. The program ID, located in your account’s Advanced settings.
The request body will be empty, as all the necessary data will be added to the request URL as query parameters.
Response example:
List program bonuses
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/programs/my-business/bonuses/
URI parameters:
  • program_id (required) - Example: my-business. The program ID, located in your account’s Advanced settings.
The request body will be empty, as all the necessary data will be added to the request URL as query parameters.
Response example:

Payments

List all balances
This endpoint creates a list of affiliates’ current balances in your Tapfiliate account. Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/balances/
The request body will be empty, as all necessary data will be included in the request URL as query parameters.
Response example:
List all payments
Lists your payments with GET https://api.tapfiliate.com/1.6/payments/. The developer portal describes the response and the errors: List all payments.
Retrieve a payment
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/payments/pa_uPf_7LmUe2gommWYbA/
URI parameters:
  • id (required) - Example: pa_uPf_7LmUe2gommWYbA. The ID of the current payment.
The request body will be empty, as all necessary data will be included in the request URL as query parameters.
Response example:
Create a payment
Method: POST
Endpoint:
https://api.tapfiliate.com/1.6/payments/
Request example:
Response example:
Cancel a payment
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/payments/pa_AeKrm0KUyLh09cOVCl
URI parameters:
  • id (required) - Example: pa_AeKrm0KUyLh09cOVCl. The ID of the current payment.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.

Affiliates

Create an affiliate
At this point, the affiliate id will be created. As long as an affiliate is created, but not yet part of any program, they will be archived. To add an affiliate to a program, please use the respective endpoint. Method: POST
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/
Arguments for this API request:
  • firstname (required) - The affiliate’s first name.
  • lastname (required) - The affiliate’s last name.
  • email (required) - The affiliate’s email address.
  • password (optional) - Password for the new affiliate. If not provided, a password is automatically generated and returned in the response. How the affiliate logs in. Tapfiliate’s default welcome email (see send_welcome_email in “Add an affiliate to a program”) contains the login link and the referral link, but no password. Send the affiliate the password you set, or the one returned in the response, yourself — or ask them to use Forgot password on the login page of your affiliate portal. If your program uses Single Sign-On in SSO Only mode, Forgot password takes the affiliate to your own login page instead, so they sign in there. If you create affiliates without a password, a trigger email can send the generated one: use the event Affiliate created with the filter Sign up source is Api, and the Temporary password variable in the email. The filter also lets through affiliates you created with a password, so use such an email only if you create affiliates through the API without one. Each email the trigger sends uses one of your plan’s trigger events (see Triggers availability). The variable is the affiliate’s password only if Tapfiliate generated it and the affiliate has not changed it yet. For affiliates who chose their own password, signed up with Google, or got a password in your request, it is not their password.
  • company (optional) - Company information for the affiliate.
    Child fields:
    • name (optional) - Company name
  • address (optional) - Affiliate’s address details
    Child fields:
    • address (required) - Street address
    • postal_code (required) - Postal / ZIP code
    • city (required) - City
    • state (optional) - State/region
    • country (required) - Country details
      Child fields:
      • code (required) - ISO-3166-1 country code (e.g., “US”, “NL”)
  • custom_fields (optional) - Key/value pairs for custom affiliate fields.
Request example:
Response example:
Retrieve an affiliate
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Delete an affiliate
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.
List all affiliates
This endpoint returns all affiliates that match the parameters specified in the request URL. Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/?referral_code=mmu0zdy&parent_id=lindaquark/
URI parameters:
  • click_id (optional) - The value that was created within the click event and stores the visitor’s data.
  • email (optional) - An affiliate’s email address.
  • source_id (optional) - Matching the tap_s parameter, if you are using anonymized referral links.
  • referral_code (optional) - Example: mmu0zdy. An affiliate’s referral code. This corresponds to the value of ref= in their referral link.
  • parent_id (optional) - Example: lindaquark. Retrieves child affiliates for a certain parent affiliate.
  • affiliate_group_id (optional) - Example: ag_77WCDy90IMs8m-sXpo. Retrieves affiliates for a particular affiliate group.
The request body will be empty, as all required data will be added to the request URL as query parameters.
Response example:
Set affiliate group
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/group/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
Arguments:
  • group_id (required) - The identifier of an affiliate group, can be found in your Programs > Affiliate Groups section.
Request example:
Response example:
Remove the affiliate from a group
Unassigns an affiliate from a group in your Tapfiliate program. Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/group/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.
Create a note for an affiliate
Method: POST
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/notes/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
Arguments for the request:
  • message (required) - A note to add to an affiliate profile.
Request example:
Response example:
Update note
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/notes/49225/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
  • id (required) - A note ID.
Arguments for the request:
  • message (required) - A note to add to an affiliate profile.
Request example:
Response example:
List notes
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/notes/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Delete note
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/notes/49225/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
  • id (required) - A note ID.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.
Set affiliate metadata by key
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/meta-data/traffic_source/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
  • key (required) - the metadata key. This key will sort the information in the API response.
Request example:
Response example:
Retrieve metadata by key
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/meta-data/traffic_source/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
  • key (required) - the metadata key. This key will sort the information in the API response.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Delete metadata by key
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/rustygoodson/meta-data/traffic_source/
URI parameters:
  • affiliate_id (required) - Example: rustygoodson. The affiliate ID.
  • key (required) - the metadata key.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.
Retrieve metadata
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/jonahsamuelsonjr/meta-data/
URI parameters:
  • affiliate_id (required) - Example: jonahsamuelsonjr. The affiliate ID.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Update (replace) metadata
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/jonahsamuelsonjr/meta-data/
URI parameters:
  • affiliate_id (required) - Example: jonahsamuelsonjr. The affiliate ID.
Arguments for this request:
  • metadata (required) - You will have to add a key and a value for this metadata object.
Request example:
Response example:
Set the affiliate payout method
Method: PUT
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/ritabailando/payout-methods/paypal/
URI parameters:
  • affiliate_id (required) - Example: ritabailando. The affiliate ID.
  • payout_method_id (required) - The identifier of the payment method.
Arguments for this API request:
  • payout method type (required) - Added based on the payout method. Example: for PayPal, you’ll need the paypal_address parameter.
Request example:
Response example:
Get the affiliate’s payout method
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/ritabailando/payout-methods/paypal/
URI parameters:
  • affiliate_id (required) - Example: ritabailando. The affiliate ID.
  • payout_method_id (required) - The identifier of the payment method.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
List the affiliate’s payout methods
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/ritabailando/payout-methods/
URI parameters:
  • affiliate_id (required) - Example: ritabailando. The affiliate ID.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Retrieve an affiliate’s balance
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/ritabailando/balances/
URI parameters:
  • affiliate_id (required) - Example: ritabailando. The affiliate ID.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
List an affiliate’s payments
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/ritabailando/payments/
URI parameters:
  • affiliate_id (required) - Example: ritabailando. The affiliate ID.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Set a parent to an affiliate
Sets an affiliate’s parent with POST https://api.tapfiliate.com/1.6/affiliates/{child_affiliate_id}/parent/, where {child_affiliate_id} is the id of the affiliate that gets the parent. The body names the parent in one of two ways, not both: affiliate_id with the parent’s id, as in {"affiliate_id": "lindaquark"}, or via with the parent’s numeric id. A body with neither is refused. The developer portal describes which affiliates can be a parent, the response and the errors: Set parent.
Remove parent affiliate
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/janejameson/parent/
URI parameters:
  • child_affiliate_id (required) - Example: janejameson. The affiliate ID.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.
Get affiliations
This endpoint retrieves a list of programs to which a given affiliate is (or has been) affiliated. Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/lindaquark/programs/
URI parameters:
  • affiliate_id (required) - Example: lindaquark. The affiliate ID.
The request body will be empty, as all required parameters will be added to the request URL as query parameters.
Response example:
Get affiliates’ custom fields
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliates/custom-fields/
The API request body will be empty, as no URI parameters or arguments are required for this endpoint.
Response example:

Affiliate Groups

Create a new affiliate group
Method: POST
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliate-groups/
Arguments:
  • title (required) - A name for your new affiliate group.
Request example:
Response example:
List all affiliate groups
Lists your affiliate groups with GET https://api.tapfiliate.com/1.6/affiliate-groups/. The developer portal describes the response and the errors: List all affiliate groups.
Update an affiliate group
Renames an affiliate group with PATCH https://api.tapfiliate.com/1.6/affiliate-groups/{affiliate_group_id}/, with the new title in the body. {affiliate_group_id} is the group’s id, and it is a required part of the address. The developer portal describes the argument and the errors: Update affiliate group.

Affiliate Prospects

Create an affiliate prospect
Creates an affiliate prospect with POST https://api.tapfiliate.com/1.6/affiliate-prospects/. firstname, lastname and email are required: if any of them is missing, the API answers 400 Missing mandatory parameter(s). The developer portal describes the call and its errors and has a request example: Create an affiliate prospect.
Retrieve an affiliate prospect
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliate-prospects/peterlaneil/
URI parameters:
  • affiliate_prospect_id (required) - An identifier of an affiliate prospect.
The request body will be empty, as all the necessary data will be added to the request URL as query parameters.
Response example:
List all affiliate prospects
Method: GET
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliate-prospects/?email=peter@example.com&referral_code=mgnmztr&program_id=my-business
URI parameters:
  • email (optional) - Example: peter@example.com. An email address of an affiliate prospect.
  • referral_code (optional) - Example: mgnmztr. An affiliate prospect’s referral code. This corresponds to the value of ref= in their referral link.
  • program_id (optional) - Example: my-business. Retrieves affiliate prospects for a particular program.
  • group_id (optional) - Retrieves affiliate prospects for a certain affiliate group.
The request body will be empty, as all the necessary data will be added to the request URL as query parameters.
Response example:
Delete an affiliate prospect
Method: DELETE
Endpoint URL:
https://api.tapfiliate.com/1.6/affiliate-prospects/peterlaneil/
URI parameters:
  • affiliate_prospect_id (required) - An identifier of an affiliate prospect.
Both the request and response bodies will be empty, as all required data will be added to the request URL as query parameters. The successful request will return the 204 code.
Still need help?
If you have any questions or if something in this guide is unclear, please don’t hesitate to contact us at support@tapfiliate.com—we’re happy to assist!