▪️More API methods

circle-info

This document describes how to get a list of affiliates, a list of available destination links and a list of pixel definitions, update affiliate details, build a tracking link for affiliates via API.

triangle-exclamation

Working with affiliates' profiles

Get a list of all affiliates

The HTTP GET method can be used to get a list of all affiliates in the system.


curl --location --globoff 'https://boapi.smartico.ai/api/af2_aff_op' \
--header 'authorization: your-private-api-key'

You can pass additional query parameters to filter the results:

//Filter by affiliate status
    "aff_status_id": number[]; 
//Set false to skip and true to include balance calculations
    "without_money": boolean;
circle-exclamation
circle-exclamation

Example of a filtered request:

Example of response:

The field "default_deal_info" represent basic details of the latest version of the default deal for each affiliate. The deal_type_id field represents a bit mask of the deal type, as defined below

The field extra_role_ids represents permissions to the additional measurements that are visible for the affiliate or access to the "Registrations report". Possible values are:

Possible statuses of affiliate: aff_status_id

Update affiliate details

You should do a PUT API call with the ID of the Affiliate that you want to update in the URL.

You can include only fields that you want to update, e.g. example of updating just the first name of the affiliate

circle-exclamation

Full list of supported properties

Possible payment methods (payment_method_id)

Possible payment method details (payment_method_details):

The operator can use the HTTP POST method to build a tracking link for specific affilite_id and specific destination link_id.

The API key is the same as described herearrow-up-right

The operator can use the HTTP GET method to get a list of destination links.

The API key is the same as described herearrow-up-right

Example of response:

Manage pixel definitions (postbacks)

The operator can use the HTTP GET method to manage pixel definitions for the affiliate.

The API key is the same as described herearrow-up-right.

To get a list of pixel definitions for the specific affiliate:

Example of response:

To create a new pixel definition

To update existing pixel definition (pay attention that the ID of the definition should be passed in the URL, 2888 in our example)

Manage promo codes

The operator can use the HTTP API to manage promo codes for affiliates. The API key is the same as described herearrow-up-right.

Get a list of promo codes

Use the HTTP GET method to get a list of promo codes.

You can pass optional query parameters to filter the results:

Example of a filtered request:

Example of response:

Get a single promo code by ID

Use the HTTP GET method with the promo code ID in the URL:

The response will contain a single promo code object with the same structure as described above.

Create a new promo code

Use the HTTP POST method to create a new promo code.

Full list of request body fields below:

Important to know:

  • The following fields are mandatory: "promocode", "affiliate_id", "deal_id", "status"

  • The "promocode" must be unique. If a promo code with the same name already exists, the API will return an error: "The promocode with this name already exists. Please use a different promocode."

  • The "deal_id| must be a valid deal for the specified "affiliate_id" . If the deal does not belong to the affiliate, the API will return an error: "Invalid deal for selected affiliate".

Update an existing promo code

Use the HTTP PUT method with the promo code ID in the URL.

You only need to include the fields you want to update. All fields from the create request are supported except affiliate_id and deal_id , which cannot be changed independently without the other (both must be provided together for re-validation).

Full list of supported properties:

Example of an API call for deactivation of promo code:

Last updated

Was this helpful?