Update a User

The Update a User by ID method allows to update user information.

PUT /api/vendor/v1/users/{id}.json?api_token={api_token}

Arguments

Name

Parameter Type

Data type

Required/Optional

Description

id

path

integer

Required

A unique identification number of the user.

api_tokenquerystringRequiredAPI token of the manager who perform the operation (see API Token Authentication).
first_name

form

string

Optional

A first name for the user.

middle_name

form

string

Optional

A middle name for the user.

last_name

form

string

Optional

A last name for the user.

password

form

string

Optional

A password for the user. The requirements to the password are set in the Password settings in the ActivePlatform. Operator Control Panel.

custom_attributes[][key]

form

string

Optional

A list of additional attributes (see Managing attributes in the ActivePlatform. Operator Control Panel).

The key that is used to determine the element in API (see Creating an attribute in the ActivePlatform. Operator Control Panel).

custom_attributes[][value]formstringOptionalA value of the attribute.

Response model

Name

Data type

Description

id

integer

A unique identification number of the user.

first_name

string

The first name for the user.

middle_name

string

The middle name for the user.

last_name

string

The last name for the user.

email

string

An email of the user, which is used as a login.

status

string

A user's status for all Accounts, to which it was linked: active or inactive.

custom_attributes

array

A list of additional attributes (see Managing attributes in the ActivePlatform. Operator Control Panel):

  • name - a name of the attribute;

  • value - a value of the attribute.

created_at

date

A date and time of the user's creation.

updated_at

date

A date and time of the last update of the user information.

Request example

PUT http://billing.activeplatform.com:80/api/vendor/v1/users/2002986.json?api_token=654321
{
  "first_name": "John",
  "middle_name": "",
  "last_name": "Doe",
  "password": "N;T@o;y!4TNqlV",
  "custom_attributes": [
     {
       "key": "age",
       "value": "21"
     }
  ]
}

Response example

{
  "id": 2002986,
  "first_name": "John",
  "middle_name": "",
  "last_name": "Doe",
  "email": "john.dooe@activeplatfrom.com",
  "status": "active",
  "custom_attributes": [
    {
      "name": "Age",
      "value": "21"
    }
  ],
  "created_at": "2016-10-03T10:06:38.740+03:00",
  "updated_at": "2016-10-07T14:25:10.924+03:00"
}