Users
On this page:
THE USER OBJECT |
|
GET[base]/users |
|
GET[base]/users/{userId} |
|
POST[base]/users |
|
PUT[base]/users/{userId} |
|
DELETE[base]/users/{userId} |
|
GET[base]/users/{userId}/banners |
|
GET[base]/users/{userId}/banners/{bannerId} |
|
GET[base]/users/{userId}/campaigns |
|
GET[base]/users/{userId}/campaigns/{campaignId} |
|
GET[base]/users/{userId}/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.
{
"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 informationcontacts
— partner contact detailsplatform
— trading platform informationmetrics
— information about clients and reward paymentsgroup
— partnership program informationaccounts
— partner accounts informationwallets
— partner wallets informationmethod
— 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:
the Profile object
an array of Contact objects
the Platform object
an array of
metrics
providing information about clients and reward paymentsthe IB type object
the Account object
the Wallet object
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 informationcontacts
— partner contact detailsplatform
— trading platform informationmetrics
— information about clients and reward paymentsgroup
— partnership program informationaccounts
— partner accounts informationwallets
— partner wallets informationmethod
— 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:
the Profile object
an array of Contact objects
the Platform object
an array of
metrics
providing information about clients and reward paymentsthe IB type object
the Account object
the Wallet object
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 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 informationmetrics
— 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 informationmetrics
— 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.
{
"total": 3,
"metrics": [
{
"key": "clients",
"value": 5
},
{
"key": "paymentVolume",
"value": "49.990000000000000000"
},
{
"key": "paymentAmount",
"value": {
"amount": "2.142831470000000000",
"currency": "BTC"
}
}
]
}