Users

On this page:

THE USER OBJECT

A detailed description of the JSON object

GET[base]/users

Get a users list

GET[base]/users/{userId}

Get user details

POST[base]/users

Add a new user

PUT[base]/users/{userId}

Update a user

DELETE[base]/users/{userId}

Delete a user

GET[base]/users/{userId}/banners

Get a list of user banners

GET[base]/users/{userId}/banners/{bannerId}

Get user banner details

GET[base]/users/{userId}/campaigns

Get a list of user campaigns

GET[base]/users/{userId}/campaigns/{campaignId}

Get user campaign details

GET[base]/users/{userId}/metrics

Get user metrics


The User object

This object provides the following data about a partner:

userId string

The partner identifier.

profileId string

The identifier of a client profile.

groupId string

The identifier of a partnership program.

master boolean

If true, the partner is assigned the Master status; by default, false.

masterMaxLevel integer

The maximum number of levels, for Master partners.

masterRatio string

The Master multiplier for reward calculation.

ratio string

The personal multiplier for a partner.

tag string

A string-value tags assigned to a user.

createTime string

The date and time when the object has been created.

updateTime string

The date and time when the object has been last updated.

uuid string

The universally unique identifier of the object (if provided). Refer to Integrations for more information.

THE USER OBJECT
{
  "userId": "6006dda272f002519c3eb505",
  "profileId": "6006dda272f002519c3eb506",
  "groupId": "6006dda272f002519c3eb507",
  "master": true,
  "masterMaxLevel": 100,
  "masterRatio": "1.000000000000000000",
  "ratio": "1.000000000000000000",
  "tag": "12345",
  "createTime": "2021-01-01T00:00:00+00:00",
  "updateTime": "2021-01-01T00:00:00+00:00",
  "uuid": null
}

Get a users list

Use this method to obtain a list of your partners.

To obtain detailed information about a specified partner, use a separate method to get user details.

Request

Header parameters:

  • Authorization: Bearer <token>

Query parameters:

This method supports pagination, sorting, filtering, and query. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering, sorting, and query are listed below. For values description, refer to the User object.

Possible values for the filter parameter:

  • contacts

  • country

  • enabled

  • groupId

  • userName

  • master

  • profileId

  • tag

  • uuid

Possible values for the sort_by parameter:

  • clients

  • createTime

  • master

  • paymentAmount

  • paymentVolume

  • usdPaymentVolume

  • updateTime

  • userId

Possible values for the query parameter:

  • profile — partner profile information

  • contacts — partner contact details

  • platform — trading platform information

  • metrics — information about clients and reward payments

  • group — partnership program information

  • accounts — partner accounts information

  • wallets — partner wallets information

  • method — payment method information

GET[base]/users

curl --location -g --request GET 'https://your.base-url.here/users?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[contacts]=a31b1402@privaterelay.appleid.com&filter[country]=United States&filter[enabled]=1&filter[groupId]=6006dda272f002519c3eb505&filter[userName]=Mary Jane Smith&filter[master]=1&filter[profileId]=6006dda272f002519c3eb505&filter[tag]=61&filter[uuid]=9&query[profile]=1&query[group]=1&query[accounts]=1&query[metrics]=1&query[wallets]=1&query[contacts]=1&query[platform]=1&query[method]=1' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains an array of User objects providing information about all partners that correspond to the query parameters specified in the request.

Additionally, the response body may contain the following information, if any of these were specified in the query parameters of the request:


Get user details

Use this method to obtain detailed information about a specified partner.

To obtain a list of your partners, use a separate method to get a list of users.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

userId required

The partner identifier.

Query parameters:

This method supports query. For details on applying the parameters, refer to the Query parameters section.

Possible values for the query parameter:

  • profile — partner profile information

  • contacts — partner contact details

  • platform — trading platform information

  • metrics — information about clients and reward payments

  • group — partnership program information

  • accounts — partner accounts information

  • wallets — partner wallets information

  • method — payment method information

GET[base]/users/{userId}

curl --location -g --request GET 'https://your.base-url.here/users/60ba407d15951453e60e49f8?query[profile]=1&query[group]=1&query[accounts]=1&query[metrics]=1&query[wallets]=1&query[contacts]=1&query[platform]=1&query[method]=1' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains a User object providing information about the specified partner.

Additionally, the response body may contain the following information, if any of these were specified in the query parameters of the request:


Add a new user

Use this method to add a profile for a partner.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Body:

profileId string required

The identifier of a client profile.

groupId string

The identifier of a partnership program.

master boolean

If true, the partner is assigned the Master status; by default, false.

masterMaxLevel integer

The maximum number of levels, for Master partners.

masterRatio string

The Master multiplier for reward calculation.

ratio string

The personal multiplier for a partner.

tag string

A string-value tags assigned to a user.

wallet array

An array of objects providing information about partner’s wallet.

Expand fields
currencyCode string

The alphabetic code of a wallet currency.

number string

The wallet number.

uuid string

The universally unique identifier of the wallet. Refer to Integrations for more information.

uuid string

The universally unique identifier of the User object. Refer to Integrations for more information.

POST[base]v1/users

curl --location -g --request POST 'https://your.base-url.here/users' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "profileId": "6006dda272f002519c3eb505",
  "groupId": "6006dda272f002519c3eb505",
  "master": false,
  "masterMaxLevel": 100,
  "masterRatio": "1.000000000000000000",
  "ratio": "1.000000000000000000",
  "tag": "61",
  "wallet": [
    {
      "currencyCode": "BTC",
      "number": "12345",
      "uuid": null
    },
    {
      "currencyCode": "USDT",
      "number": "7890",
      "uuid": null
    }
  ],
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a User object providing information about the newly created partner profile.


Update a user

Use this method to update a specified partner.

Note

Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Path parameters:

userId required

The partner identifier.

Body:

Values of the following fields can be updated:

groupId string

The identifier of a partnership program.

enabled boolean

If true, the partner profile is enabled; otherwise, false.

master boolean

If true, the partner is assigned the Master status; by default, false.

masterMaxLevel integer

The maximum number of levels, for Master partners.

masterRatio string

The Master multiplier for reward calculation.

ratio string

The personal multiplier for a partner.

uuid string

The universally unique identifier of the object. Refer to Integrations for more information.

PUT[base]/users/{userId}

curl --location -g --request PUT 'https://your.base-url.here/users/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "groupId": "6006dda272f002519c3eb505",
  "enabled": true,
  "master": true,
  "masterMaxLevel": 100,
  "masterRatio": "1.000000000000000000",
  "ratio": "1.000000000000000000",
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a User object providing information about the updated partner.


Delete a user

Use this method to delete a specified partner profile.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

userId required

The partner identifier.

DELETE[base]/users/{userId}

curl --location --request DELETE 'https://your.base-url.here/users/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, no response body is returned.


Get a list of user banners

Use this method to obtain a list of banners used by your partner.

To obtain detailed information about a specified banner used by your partner, use a separate method to get user banner details.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

userId required

The partner identifier.

Query parameters:

This method supports pagination, sorting, filtering, and query. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering, sorting, and query are listed below. For values description, refer to the Banner object.

Possible values for the filter parameter:

  • languageId

  • sizeId

  • themeId

Possible values for the sort_by parameter:

  • createTime (default)

  • updateTime

Possible values for the query parameter:

  • metrics — the number of clicks and registrations and the click conversion rate of the banner

GET[base]/users/{userId}/banners

curl --location -g --request GET 'https://your.base-url.here/users/60ba407d15951453e60e49f8/banners?limit=10&offset=0&sort_by=createTime&filter[languageId]=6006dda272f002519c3eb505&filter[sizeId]=6006dda272f002519c3eb505&filter[themeId]=6006dda272f002519c3eb505&query[metrics]=1' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains an array of Banner objects providing information about all banners that correspond to the query parameters specified in the request.

Additionally, the response body may contain the following information if it was specified in the query parameters of the request:

  • an array of metrics providing the number of clicks and registrations and the click conversion rate of the banner


Get user banner details

Use this method to obtain detailed information about a specified banner used by your partner.

To obtain a list of user banners, use a separate method to get a list of user banners.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

userId required

The partner identifier.

bannerId required

The banner identifier.

Query parameters:

This method supports query. For details on applying the parameters, refer to the Query parameters section.

Possible values for the query parameter:

  • metrics — the number of clicks and registrations and the click conversion rate of the banner

GET[base]/users/{userId}/banners/{bannerId}

curl --location -g --request GET 'https://your.base-url.here/users/60ba407d15951453e60e49f8/banners/60ba407d15951453e60e49f8?query[metrics]=1' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains a Banner object providing information about the specified banner used by partner.

Additionally, the response body may contain the following information if it was specified in the query parameters of the request:

  • an array of metrics providing the number of clicks and registrations and the click conversion rate of the banner


Get a list of user campaigns

Use this method to obtain a list of marketing campaigns run by your partner.

To obtain detailed information about a specified marketing campaign, use a separate method to get user campaign details.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

userId required

The partner identifier.

Query parameters:

This method supports pagination, sorting, and query. For details on applying the parameters, refer to the Query parameters section. Possible parameters for sorting and query are listed below. For values description, refer to the Campaign object.

Possible values for the sort_by parameter:

  • createTime (default)

  • updateTime

Possible values for the query parameter:

  • link — link information

  • metrics — the number of clicks and registrations and the click conversion rate of the link

GET[base]/users/{userId}/campaigns

curl --location -g --request GET 'https://your.base-url.here/users/60ba407d15951453e60e49f8/campaigns?limit=10&offset=0&sort_by=createTime&sort_order=desc&query[metrics]=1&query[link]=1' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains an array of Campaign objects providing information about all campaigns that correspond to the query parameters specified in the request.

Additionally, the response body may contain the following information if any of these were specified in the query parameters of the request:

  • the Link object

  • the metrics array providing the number of clicks and registrations and the click conversion rate of the campaign link


Get user campaign details

Use this method to obtain detailed information about a specified marketing campaign run by your partner.

To obtain a list of user campaigns, use a separate method to get a list of user campaigns.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

userId required

The partner identifier.

campaignId required

The campaign identifier.

Query parameters:

This method supports query. For details on applying the parameters, refer to the Query parameters section.

Possible values for the query parameter:

  • link — campaign link information

  • metrics — the number of clicks and registrations and the click conversion rate of the banner

GET[base]/users/{userId}/campaigns/{campaignId}

curl --location -g --request GET 'https://your.base-url.here/users/60ba407d15951453e60e49f8/campaigns/60ba407d15951453e60e49f8?query[metrics]=1&query[link]=1' \
--header 'Authorization: Bearer <token>'

In case of success, the response body contains a Campaign object providing information about the specified campaigns.

Additionally, the response body may contain the following information if any of these were specified in the query parameters of the request:

  • the Link object

  • the metrics array providing the number of clicks and registrations and the click conversion rate of the campaign link


Get user metrics

Use this method to obtain a list of user metrics.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

userId required

The partner identifier.

GET[base]/users/{userId}/metrics

curl --location --request GET 'https://your.base-url.here/users/60ba407d15951453e60e49f8/metrics' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains key-value pairs providing information about the number of clients brought by a partner, traded volume for which the partner received rewards, amounts, and currencies of paid rewards.

RESPONSE EXAMPLE
{
  "total": 3,
  "metrics": [
    {
      "key": "clients",
      "value": 5
    },
    {
      "key": "paymentVolume",
      "value": "49.990000000000000000"
    },
    {
      "key": "paymentAmount",
      "value": {
        "amount": "2.142831470000000000",
        "currency": "BTC"
      }
    }
  ]
}