This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Users in Zoho Books
Overview
The following operations allow you to work with users. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with users, see Sample configuration.
Operation | Description |
---|---|
Creates a user. | |
getUser | Retrieves the details of a user. |
listUsers | Retrieves all the users in the organization. |
Operation details
This section provides further details on the operations related to time users.
Creating a user
The createUser
operation creates a user for the organization.
<zohobooks.createUser> <email>{$ctx:email}</email> <name>{$ctx:name}</name> <userRole>{$ctx:userRole}</userRole> </zohobooks.createUser>
Properties
The e-mail address of the user.email:
The name of the user.name:
The role of the user. Sets the privileges for a user. Allowed Values: staff, admin and timesheetstaff.userRole:
Sample request
Following is a sample REST/JSON request that can be handled by the createUser operation.
{ "apiUrl":"https://books.zoho.com", "authToken":"45bf59aede45cbd3e4248af901efa39a", "organizationId":"48848129", "email":"depp@gmail.com", "name":"Johnny", "userRole":"timesheetstaff" }
Related Zoho Books documentation
https://www.zoho.com/books/api/v3/projects/users/#assign-users
Retrieving the details of a user
The
operation retrieves the details of a user.getUser
<zohobooks.getUser> <userId>{$ctx:userId}</userId> </zohobooks.getUser>
Properties
The ID of the user to be retrieved.userId:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.getUser
{ "apiUrl":"https://books.zoho.com", "authToken":"45bf59aede45cbd3e4248af901efa39a", "organizationId":"48848129", "userId":"128419000000068013" }
Related Zoho Books documentation
https://www.zoho.com/books/api/v3/projects/users/#get-a-user
Retrieving all users
The
operation retrieves the list of all the users in the organization.listUsers
<zohobooks.listUsers> <sortColumn>{$ctx:sortColumn}</sortColumn> <page>{$ctx:page}</page> <perPage>{$ctx:perPage}</perPage> <filterBy>{$ctx:filterBy}</filterBy> </zohobooks.listUsers>
Properties
sortColumn:
Sort users. Allowed Values: name, email, user_role and status.page:
The number of the page to be returned - Pagination value.perPage:
Specifies how many entries should be returned in the response.filterBy:
Filter through users with user status. Allowed Values: Status.All, Status.Active, Status.Inactive, Status.Invited and Status.Deleted.
Sample request
Following is a sample REST/JSON request that can be handled by the listUsers
operation.
{ "apiUrl":"https://books.zoho.com", "authToken":"45bf59aede45cbd3e4248af901efa39a", "organizationId":"48848129", "sortColumn":"email", "page":"1", "perPage":"200", "filterBy":"Status.Active" }
Related Zoho Books documentation
https://www.zoho.com/books/api/v3/projects/users/#list-users
Sample configuration
Following is a sample proxy service that illustrates how to connect to Zoho Books with the init
operation and use the createUser
operation. The sample request for this proxy can be found in the createUser sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="zohobooks_createUser" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="authToken" expression="json-eval($.authToken)"/> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="organizationId" expression="json-eval($.organizationId)"/> <property name="email" expression="json-eval($.email)"/> <property name="name" expression="json-eval($.name)"/> <property name="userRole" expression="json-eval($.userRole)"/> <zohobooks.init> <authToken>{$ctx:authToken}</authToken> <apiUrl>{$ctx:apiUrl}</apiUrl> <organizationId>{$ctx:organizationId}</organizationId> </zohobooks.init> <zohobooks.createUser> <email>{$ctx:email}</email> <name>{$ctx:name}</name> <userRole>{$ctx:userRole}</userRole> </zohobooks.createUser> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>