Affiliate Users

Operations for affiliate users

Find All

GET /v1/networks/affiliates/:affiliateId/users

Path Parameters

Parameter Description
affiliateId The ID of the affiliate whose users you want to fetch

Relationships

This endpoint supports the following additional relationships. Refer to our User Guide for usage.

This endpoint supports additional relationships. You can ask for them using the relationship query parameter. Multiple relationships can be supplied repeating the relationship query parameter.

Value Description
logins Includes the users’ list of logins
password_history Includes the users’ password changes history
api Includes the users’ API key and whitelisted IPs
affiliate_status Include the status of the affiliate to which the user belong
customizations Includes the users’ customizations

cURL
curl --request GET 'https://api.eflow.team/v1/networks/affiliates/7/users' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
    "users": [
        {
            "network_affiliate_user_id": 17,
            "network_id": 1,
            "network_affiliate_id": 1,
            "first_name": "Bob",
            "last_name": "Smith",
            "email": "my.everflow@gmail.com",
            "title": "",
            "work_phone": "9655433513",
            "cell_phone": "",
            "instant_messaging_id": 0,
            "instant_messaging_identifier": "",
            "language_id": 1,
            "timezone_id": 75,
            "currency_id": "USD",
            "account_status": "active",
            "relationship": 
                {
                    "affiliate_account_status": "active"
                }
        }
    ]
}

Find By ID

GET /v1/networks/affiliates/:affiliateId/users/:userId

Path Parameters

Parameter Description
affiliateId The ID of the affiliate whose user you want to fetch
userId The ID of the user you want to fetch

Relationships

This endpoint supports the following additional relationships. Refer to our User Guide for usage.

This endpoint supports additional relationships. You can ask for them using the relationship query parameter. Multiple relationships can be supplied repeating the relationship query parameter.

Value Description
logins Includes the user’s list of logins
password_history Includes the user’s password changes history
api Includes the user’s API key and whitelisted IPs
affiliate_status Include the status of the affiliate to which the user belong
customizations Includes the users’ customizations

cURL
curl --request GET 'https://api.eflow.team/v1/networks/affiliates/1/users/17' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
    "network_affiliate_user_id": 17,
    "network_id": 1,
    "network_affiliate_id": 13,
    "first_name": "Bob",
    "last_name": "Smith",
    "email": "my.everflow@gmail.com",
    "title": "CEO",
    "work_phone": "9655433513",
    "cell_phone": "",
    "instant_messaging_id": 0,
    "instant_messaging_identifier": "",
    "language_id": 1,
    "timezone_id": 75,
    "currency_id": "USD",
    "account_status": "active",
    "relationship": 
        {
            "affiliate_account_status": "active"
        }   
}

Create

POST /v1/networks/affiliates/:affiliateId/users

Path Parameters

Parameter Description
affiliateId The ID of the affiliate for whom to create a user

first_name string

The affiliate user’s first name

last_name string

The affiliate user’s last name

email string

The affiliate user’s email. Must be unique among all affiliate users. Is used to log in the platform.

title string

The affiliate user’s title.

work_phone string

The affiliate user’s work phone number.

cell_phone string

The affiliate user’s cell phone number.

instant_messaging_id int

The id of an instant messaging platform. Allows you to save their identifier for further reference.

instant_messaging_identifier string

The affiliate user’s instant messaging identifier, if instant_messaging_id was different than 0.

language_id int

The affiliate user’s language id. This is limited to the value 1 (English).

timezone_id int

The affiliate user’s timezone id. Can be found using the metadata API.

currency_id string

The affiliate user’s currency id. Can be found using the metadata API (insert link)

account_status string

The affiliate user’s account status. Can be either active or inactive.

initial_password string

The affiliate user’s login password. If left empty, the affiliate will be sent an email asking to set their password. If supplied, the password must meet the following requirements :

  • At least 8 characters
  • One non-alphanumeric character
  • At least one uppercase
  • At least one lowercase

{
    "currency_id": "USD",
    "instant_messaging_id": 0,
    "account_status": "active",
    "language_id": 1,
    "timezone_id": 90,
    "initial_password": "",
    "first_name": "Bob",
    "last_name": "Smith",
    "title": "CEO",
    "work_phone": "1234567788",
    "email": "my.everflow@gmail.com",
    "relationship": 
        {
            "affiliate_account_status": "active"
        }
}

Update

PUT /v1/networks/affiliates/:affiliateId/users/:userId

You must specify all the fields, not only the ones you wish to update.
If you omit a field that is not marked as required, its default value will be used.

Path Parameters

Parameter Description
affiliateId The ID of the affiliate whose user you want to update
userId The ID of the user you want to update

first_name string

The affiliate user’s first name

last_name string

The affiliate user’s last name

email string

The affiliate user’s email. Must be unique among all affiliate users. Is used to log in the platform.

title string

The affiliate user’s title.

work_phone string

The affiliate user’s work phone number.

cell_phone string

The affiliate user’s cell phone number.

instant_messaging_id int

The id of an instant messaging platform. Allows you to save their identifier for further reference.

instant_messaging_identifier string

The affiliate user’s instant messaging identifier, if instant_messaging_id was different than 0.

language_id int

The affiliate user’s language id. This is limited to the value 1 (English).

timezone_id int

The affiliate user’s timezone id. Can be found using the metadata API.

currency_id string

The affiliate user’s currency id. Can be found using the metadata API (insert link)

account_status string

The affiliate user’s account status. Can be either active or inactive.

initial_password string

The affiliate user’s login password.

{
    "currency_id": "USD",
    "instant_messaging_id": 0,
    "account_status": "active",
    "language_id": 1,
    "timezone_id": 90,
    "initial_password": "",
    "first_name": "Bob",
    "last_name": "Smith",
    "title": "CEO",
    "work_phone": "1234567788",
    "email": "my.everflow@gmail.com",
    "relationship": 
        {
            "affiliate_account_status": "active"
        }
}