Planfix API user.changeStatus: Difference between revisions
From Planfix
(Created page with "This function sets a status if the '''status''' parameter is specified. If the parameter is left out, the status is switched to its opposite. This function is available for users with administrator rights. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="user.changeStatus"> <account></account> <sid></sid> <user> <id></id> <status></status> </user> <signature></signature> </request> </source> {| class="wikitable...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
|id ||int ||user identifier || | |id ||int ||user identifier || | ||
|- | |- | ||
|status ||enum ||new status ||optional parameter. See the list of available values in the [[Planfix API: | |status ||enum ||new status ||optional parameter. See the list of available values in the [[Planfix API:user statuses|custom statuses]] section | ||
|- | |- | ||
|signature ||string(32) ||signature || | |signature ||string(32) ||signature || | ||
Line 50: | Line 50: | ||
== Go To == | == Go To == | ||
*[[Planfix API:Employees]] | *[[Planfix API:Employees]] | ||
*[[Error codes]] | *[[Error codes XML API v1|Error codes]] | ||
*[[List of functions]] | *[[List of functions]] |
Latest revision as of 13:47, 14 March 2024
This function sets a status if the status parameter is specified. If the parameter is left out, the status is switched to its opposite. This function is available for users with administrator rights. Request format:
<?xml version="1.0" encoding="UTF-8"?>
<request method="user.changeStatus">
<account></account>
<sid></sid>
<user>
<id></id>
<status></status>
</user>
<signature></signature>
</request>
Name | Type | Value | Note |
---|---|---|---|
id | int | user identifier | |
status | enum | new status | optional parameter. See the list of available values in the custom statuses section |
signature | string(32) | signature |
The response will include the status parameter indicating the set status.
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
<user>
<id></id>
</user>
</response>
Name | Type | Value | Note |
---|---|---|---|
user.id | int | user identifier |
Otherwise, a response with an error will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
<code></code>
</response>