Planfix API user.changeStatus: Difference between revisions

From Planfix
Jump to: navigation, search
(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...")
 
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]]

Revision as of 09:29, 6 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>


Go To