Follow

How to edit the user via API?

Time to read: 3 min

topic.pngThe article covers the following topics:

General Info

First of all, to get started with API, you need to find your API-key. To do it, just navigate to the 'Users' Tab - > 'Users management' -> 'User edit page'. 

Screenshot_36.png

 import.png Only the General manager has permission to get the 'User edit page'. 

Next thing you need is API URL, you can find it in 'Settings' Tab -> 'Settings' -> 'Tracking domains' -> 'URLs' section.

Markup 2020-07-22 at 13.29.20.png

click__1_.pngFind out more about where you can find your/Affiliate's API-key and API URL here

API Request Structure: GET/POST + api domain + path + ? + api-key=189471975956279174174.

It should be noted that header content-type - application/x-www-form-urlencoded is used on an ongoing basis, and content-type - multipart/form-data is used for uploading files (logo, creative files). 

[POST] Edit user

To edit the user via API, you need to navigate to the 'User managing (admin methods)' section in the API Doc and choose the 'Edit user' method (follow the link):

_______2020_07_22_12_23_58_42.gif

Some user data can be changed by this method:

  • email -  User's Email
  • password  User's password (Available: at least 6 characters)
  • first_name - User's first name
  • last_name -  User's last name
  • roles[] - Array of allowed roles.
  • skype - User's skype
  • work_hours -  User's working time
  • type - User type

import.pngThere is no need to rewrite all parameters, only those parameters that need to be changed.

Below you can find an example on how to edit the user via API:

1) First of all, make sure that headers are entered correctly: 

Screenshot_201.png

2) Enter the needed parameters in the body section: 

Screenshot_202.png

If everything is entered correctly, you will receive the status '1' response.

cURL Request

The example of user editing via cURL request:

curl --location --request POST 'http://api.affise.com/3.0/admin/user/5f17ed6b3e10795af' \
--header 'api-key: c057faba8779ef56bdc493c' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'type=common_manager'

article.pngYou may also find the following articles helpful:

 If you have more questions on how to edit the user via API, feel free to contact the Affise Support Team via support@affise.com or your Dedicated Account Manager.

 Written by Anastasia Deryugina 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.