Planfix API user.changeStatus: Difference between revisions
From Planfix
(→Go To) |
No edit summary |
||
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 || |
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>