{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Users", "description": "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., .", "definitions": { "name": { "description": "name of the user", "type": "string", "example": "David John" }, "email": { "description": "email address of the user", "type": "string", "example": "johndavid@zilliuminc.com" }, "user_id": { "description": "Unique ID of the user", "type": "string", "example": "982000000554041" }, "role_id": { "description": "Unique ID of the role, the user is playing", "type": "string", "example": "982000000006005" }, "user_role": { "type": "string", "description": "The role of the user", "example": "admin" }, "photo_url": { "description": "URL to profile photo of user.", "type": "string", "example": "https://contacts.zoho.com/file?ID=d27344a22bad8bb83a03722b4aa5bc6967c3135f24307fe40db8572782432fd6aae0110f8bb9c4c79e8e0f0cca5904aecfacbf079f13b48c295bacc89ae91fca&fs=thumb" }, "status": { "description": "Status of the user, in the project", "type": "string", "example": "active" }, "is_current_user": { "description": "to check if user is currently a part of task", "type": "boolean", "example": true }, "per_page": { "description": "Values per page", "type": "number", "format": "double", "example": 10 }, "page": { "description": "Current page", "type": "number", "format": "double", "example": 1 }, "report_name": { "description": "Name of the report currently run", "type": "string", "example": "Users" }, "has_more_page": { "description": "to check for more pages", "type": "boolean", "example": false }, "sort_order": { "description": "Order used to sort", "type": "string", "example": "A" }, "sort_column": { "description": "Sorting based on column value", "type": "string", "example": "name" }, "is_selected": { "description": "to check is task is selected", "type": "boolean", "example": true }, "email_ids": { "description": "Email Id's of users", "type": "array", "items": { "type": "string" } }, "filter_by": { "description": "Criteria used to filter", "type": "string" }, "is_customer_segmented": { "description": "to check if customer is segmented", "type": "boolean", "example": false }, "is_vendor_segmented": { "description": "To check if vendor is segmented", "type": "boolean", "example": false }, "user_type": { "description": "Type of user", "type": "string", "example": "zoho" }, "is_claimant": { "description": "To check if user is a claimant", "type": "boolean", "example": true }, "created_time": { "description": "Time of task creation", "type": "string", "example": "2016-06-05" }, "custom_fields": { "description": "Additional fields for task", "type": "string", "example": "" }, "create-a-user-request": { "required": [ "name", "email" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/name" }, "email": { "$ref": "#/components/schemas/email" }, "user_role": { "$ref": "#/components/schemas/user_role" } } }, "create-a-user-response": { "type": "object", "properties": { "code": { "type": "integer", "example": 0, "readOnly": true }, "message": { "type": "string", "example": "Your invitation has been sent.", "readOnly": true } } }, "list-users-response": { "type": "object", "properties": { "code": { "type": "integer", "example": 0, "readOnly": true }, "message": { "type": "string", "example": "success", "readOnly": true }, "users": { "type": "array", "items": { "type": "object", "properties": { "user_id": { "$ref": "#/components/schemas/user_id" }, "role_id": { "$ref": "#/components/schemas/role_id" }, "name": { "$ref": "#/components/schemas/name" }, "email": { "$ref": "#/components/schemas/email" }, "user_role": { "$ref": "#/components/schemas/user_role" }, "user_type": { "$ref": "#/components/schemas/user_type" }, "status": { "$ref": "#/components/schemas/status" }, "is_current_user": { "$ref": "#/components/schemas/is_current_user" }, "photo_url": { "$ref": "#/components/schemas/photo_url" } } } } } }, "update-a-user-request": { "required": [ "name", "email" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/name" }, "email": { "$ref": "#/components/schemas/email" }, "user_role": { "$ref": "#/components/schemas/user_role" } } }, "update-a-user-response": { "type": "object", "properties": { "code": { "type": "integer", "example": 0, "readOnly": true }, "message": { "type": "string", "example": "The user information has been updated.", "readOnly": true } } }, "get-a-user-response": { "type": "object", "properties": { "code": { "type": "integer", "example": 0, "readOnly": true }, "message": { "type": "string", "example": "success", "readOnly": true }, "user": { "type": "object", "properties": { "user_id": { "$ref": "#/components/schemas/user_id" }, "name": { "$ref": "#/components/schemas/name" }, "email_ids": { "description": "EmailIDs of an user", "type": "array", "items": { "type": "object", "properties": { "email": { "$ref": "#/components/schemas/email" }, "is_selected": { "$ref": "#/components/schemas/is_selected" } } } }, "status": { "$ref": "#/components/schemas/status" }, "user_role": { "$ref": "#/components/schemas/user_role" }, "user_type": { "$ref": "#/components/schemas/user_type" }, "role_id": { "$ref": "#/components/schemas/role_id" }, "photo_url": { "$ref": "#/components/schemas/photo_url" }, "is_claimant": { "$ref": "#/components/schemas/is_claimant" }, "created_time": { "$ref": "#/components/schemas/created_time" }, "custom_fields": { "$ref": "#/components/schemas/custom_fields" } } } } }, "delete-a-user-response": { "type": "object", "properties": { "code": { "type": "integer", "example": 0, "readOnly": true }, "message": { "type": "string", "example": "The user has been removed from your organization.", "readOnly": true } } }, "get-current-user-response": { "type": "object", "properties": { "code": { "type": "integer", "example": 0, "readOnly": true }, "message": { "type": "string", "example": "success", "readOnly": true }, "user": { "type": "object", "properties": { "user_id": { "$ref": "#/components/schemas/user_id" }, "name": { "$ref": "#/components/schemas/name" }, "email_ids": { "description": "EmailIDs of an user", "type": "array", "items": { "type": "object", "properties": { "email": { "$ref": "#/components/schemas/email" }, "is_selected": { "$ref": "#/components/schemas/is_selected" } } } }, "status": { "$ref": "#/components/schemas/status" }, "user_role": { "$ref": "#/components/schemas/user_role" }, "user_type": { "$ref": "#/components/schemas/user_type" }, "role_id": { "$ref": "#/components/schemas/role_id" }, "photo_url": { "$ref": "#/components/schemas/photo_url" }, "is_claimant": { "$ref": "#/components/schemas/is_claimant" }, "created_time": { "$ref": "#/components/schemas/created_time" }, "custom_fields": { "$ref": "#/components/schemas/custom_fields" } } } } }, "invite-a-user-response": { "type": "object", "properties": { "code": { "type": "integer", "example": 0, "readOnly": true }, "message": { "type": "string", "example": "Your invitation has been sent.", "readOnly": true } } }, "mark-user-as-active-response": { "type": "object", "properties": { "code": { "type": "integer", "example": 0, "readOnly": true }, "message": { "type": "string", "example": "The user has been marked as active.", "readOnly": true } } }, "mark-user-as-inactive-response": { "type": "object", "properties": { "code": { "type": "integer", "example": 0, "readOnly": true }, "message": { "type": "string", "example": "The user has been marked as inactive.", "readOnly": true } } } } }