Users
Users are various individuals/entities that are a part of an organisation. Each user will have a different role to play, like admin, staff etc., .
Create a user
Create a user for your organization. oauthscope : ZohoInvoice.settings.CREATE
Arguments
Admin
, Timesheet User
etc.$ curl https://invoice.zoho.com/api/v3/users
-X POST
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Content-Type: application/json;charset=UTF-8"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
-d '{"field":"value","field":"value"}'
{
"name": "David Sujin",
"email": "test@zylker.org",
"user_role": "admin"
}
{
"code": 0,
"message": "Your invitation has been sent."
}
List Users
Get the list of all users in the organization. oauthscope : ZohoInvoice.settings.READ
Query Parameters
name, email, user_role and status
$ curl https://invoice.zoho.com/api/v3/users
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"users": [
{
"user_id": "982000000554041",
"role_id": "982000000006005",
"name": "David Sujin",
"email": "test@zylker.org",
"user_role": "admin",
"status": "active",
"is_current_user": true,
"photo_url": "https://contacts.zoho.com/file?ID=d27344a22bad8bb83a03722b4aa5bc6967c3135f24307fe40db8572782432fd6aae0110f8bb9c4c79e8e0f0cca5904aecfacbf079f13b48c295bacc89ae91fca&fs=thumb",
"is_customer_segmented": false,
"is_vendor_segmented": false,
"user_type": "zoho"
},
{...},
{...}
]
}
Update a user
Update the details of a user. oauthscope : ZohoInvoice.settings.UPDATE
Arguments
Admin
, Timesheet User
etc.$ curl https://invoice.zoho.com/api/v3/users/{user_id}
-X PUT
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Content-Type: application/json;charset=UTF-8"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
-d '{"field":"value","field":"value"}'
{
"name": "David Sujin",
"email": "test@zylker.org",
"user_role": "admin"
}
{
"code": 0,
"message": "The user information has been updated."
}
Get a user
Get the details of a user. oauthscope : ZohoInvoice.settings.READ
$ curl https://invoice.zoho.com/api/v3/users/{user_id}
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"user": {
"user_id": "982000000554041",
"name": "David Sujin",
"email_ids": [
{
"email": "test@zylker.org",
"is_selected": true
}
],
"status": "active",
"user_role": "admin",
"user_type": "zoho",
"role_id": "982000000006005",
"photo_url": "https://contacts.zoho.com/file?ID=d27344a22bad8bb83a03722b4aa5bc6967c3135f24307fe40db8572782432fd6aae0110f8bb9c4c79e8e0f0cca5904aecfacbf079f13b48c295bacc89ae91fca&fs=thumb",
"is_employee": true,
"created_time": "2016-06-05T02:30:08-0700",
"custom_fields": ""
}
}
Delete a user
Delete a user associated to the organization. oauthscope : ZohoInvoice.settings.DELETE
$ curl https://invoice.zoho.com/api/v3/users/{user_id}
-X DELETE
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "The user has been removed from your organization."
}
Get current user
Get the details of the current user. oauthscope : ZohoInvoice.settings.READ
$ curl https://invoice.zoho.com/api/v3/users/me
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"user": {
"user_id": "982000000554041",
"name": "David Sujin",
"email_ids": [
{
"email": "test@zylker.org",
"is_selected": true
}
],
"status": "active",
"user_role": "admin",
"user_type": "zoho",
"role_id": "982000000006005",
"photo_url": "https://contacts.zoho.com/file?ID=d27344a22bad8bb83a03722b4aa5bc6967c3135f24307fe40db8572782432fd6aae0110f8bb9c4c79e8e0f0cca5904aecfacbf079f13b48c295bacc89ae91fca&fs=thumb",
"is_employee": true,
"created_time": "2016-06-05T02:30:08-0700",
"custom_fields": ""
}
}
Invite a user
Send invitation email to a person, you wish to add as a user to your organisation. For example- an accountant. oauthscope : ZohoInvoice.settings.CREATE
$ curl https://invoice.zoho.com/api/v3/users/{user_id}/invite
-X POST
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "Your invitation has been sent."
}
Mark user as active
Mark an inactive user as active. oauthscope : ZohoInvoice.settings.CREATE
$ curl https://invoice.zoho.com/api/v3/users/{user_id}/active
-X POST
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "The user has been marked as active."
}
Mark user as inactive
Mark an active user as inactive. oauthscope : ZohoInvoice.settings.CREATE
$ curl https://invoice.zoho.com/api/v3/users/{user_id}/inactive
-X POST
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "The user has been marked as inactive."
}