JSON API » people » people/update
Updates an existing person.
Input parameters
Requires authentication and the user or wholesale role privileges. If you don't have the administrator or wholesale role privileges, you may only update restricted fields within your own person.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
id | Integer | ID of person to update. | Yes | |
company | String | Company name. | No | Current value. |
country | String | Two letter country code. | No | Current value. |
date_format | String | Date format. "DD/MM/YYYY", "MM/DD/YYYY", or "YYYY-MM-DD". | No | Current value. |
description | String | Description. | No | Current value. |
String | Email address(es). | No | Current value. | |
extension | String | Number for forward to in dial by name. Empty string for none. | No | Current value. |
fax | String | Fax number. | No | Current value. |
forename | String | First name. | No | Current value. |
language | String | Language code. Empty string for default. | No | Current value. |
mobile | String | Mobile (cellular) number. | No | Current value. |
password | String | Password. | No | Current value. |
public_key | String | GPG public key. | No | Current value. |
role | Integer | ID of role. | No | Current value. |
source | String | Source IP address(es). Empty string for any. | No | Current value. |
surname | String | Last name. | No | Current value. |
telephone | String | Telephone number. | No | Current value. |
time_format | String | Time format. "12" or "24". | No | Current value. |
timezone | String | Time zone. Empty string for default. | No | Current value. |
title | String | Title. | No | Current value. |
username | String | User name. | No | Current value. |
validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
Code | Description |
---|---|
201 | Input passed validation. Only returned if validation=1. |
204 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
403 | Your rate plan does not allow this. |
404 | The person does not exist, or you do not have permission to update them. |
Data returned
No data is returned.
Example: Changing the username
http://enswitch.example.com/api/json/people/update/?auth_username=user;auth_password=password;id=123;username=user@example.com{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
3.13 | Function added. |