Fieldy Users

Response Code


S.No HTTP Code Explanation
1. 200 - Success Standard response for successful HTTP requests.
2. 400 - Bad Request The server cannot or will not process the request due to client error
3. 401 - Unauthorized Authenticable fields provided are incorrect
4. 403 - Forbidden The server does not accept the authentication
5. 422 - Error Occured The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
6. 500 - Internal Server Error Request is correct, But while processing the request, server is failing due to the logic which isn't handled by backend developers
Note: 200 for Success response, 400 for given id is not found. 401 for the token is not valid, 403 for the user who are not having appropriate permissions to view this endpoint. 422 is not mostly occured in this request, but 500 is occur when the given data is correct but while processing server faces any exceptions it will throws you error.

User Profile API


Method: GET
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/user/{id}
_token * Bearer Token: "token" Pass it in header as all other request
id * User should not be inactive, Tenant should not be inactive. Backend will check if the given id is matching in database and gives you the required output.id is required field http://devapi-saas.zaicrm.com/z1/api/user/user/1

Description

This endpoint is used to provide the User Detailed view page, which it contains the sections like Profile, Activity, Teams, Tasks, Timesheets, Permission Control etc.,

All this are coming under this API, where We are providing the single object which it contains multiple properties, where profile is the property which holds profile information of user and activities also a property which holds activities of user.All those properties are occur inside data.


{
    "message": "User basic information listed successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
        "profile": {
            "id": "2",
            "name": "Fieldy Tenant 1",
            "first_name": "",
            "last_name": "",
            "email": "admin@fieldy.co",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "http://localhost/zaiserve-api-saas/public/img/user_default.png",
            "status": "Active",
            "user_type": "Admin",
            "addresses": [],
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        "logged_in_user_company": {
            "company_name": "",
            "image": "http://localhost/zaiserve-api-saas/public/img/user_default.png",
            "name": "Fieldy Tenant 1"
        },
        "is_admin": true,
        "is_technician": false,
        "activities": {
            "today": [],
            "week": [],
            "month": [],
            "year": []
        },
        "tasks": {
            "open": {
                "in_progress": [],
                "in_progress_count": 0,
                "not_started": [],
                "not_started_count": 0
            },
            "today": {
                "not_started": [],
                "not_started_count": 0,
                "in_progress": [],
                "in_progress_count": 0,
                "completed": [],
                "completed_count": 0,
                "cancelled": [],
                "cancelled_count": 0
            },
            "week": {
                "not_started": [],
                "not_started_count": 0,
                "in_progress": [],
                "in_progress_count": 0,
                "cancelled": [],
                "cancelled_count": 0
            },
            "overdue": {
                "not_started": [],
                "not_started_count": 0,
                "in_progress": [],
                "in_progress_count": 0
            },
            "completed": []
        },
        "permission": {
            "menus_permissions": {
                "user": {
                    "companies": [
                        {
                            "tenant-company": [
                                "edit",
                                "view",
                                "address-delete"
                            ],
                            "contractor-company": [
                                "create-contractor-company",
                                "edit-contractor",
                                "contractor-view",
                                "delete"
                            ],
                            "vendor-company": [
                                "create-vendor-company",
                                "edit-vendor",
                                "view-vendor",
                                "delete-vendor"
                            ]
                        }
                    ],
                    "user": [
                        {
                            "tenant-users": [
                                "bulk-import",
                                "send-invite",
                                "create-user",
                                "edit",
                                "delete",
                                "user-view",
                                "permission-control",
                                "edit-user",
                                "create-task",
                                "add-comments",
                                "mark-completed",
                                "set-reminder",
                                "hold",
                                "cancel",
                                "assign-user"
                            ]
                        }
                    ],
                    "team": [
                        {
                            "general-team": [
                                "create-team",
                                "edit-team",
                                "add-members",
                                "view-members",
                                "delete-team"
                            ]
                        }
                    ]
                },
                "customer": [
                    {
                        "customer-contact": [
                            "create-contact",
                            "edit",
                            "view",
                            "delete",
                            "send-invite",
                            "activity",
                            "job",
                            "notes",
                            "invoices",
                            "create-invoice-by-job"
                        ]
                    }
                ],
                "quote": [
                    {
                        "general-quote": [
                            "quote-by-job",
                            "quote-by-product-services",
                            "edit",
                            "view",
                            "delete",
                            "resend-quote",
                            "edit-and-resend-quote",
                            "contact-customer-create",
                            "analytics",
                            "notes",
                            "create-task",
                            "add-comments",
                            "mark-completed",
                            "set-reminder",
                            "hold",
                            "cancel",
                            "assign-user"
                        ]
                    }
                ],
                "products_and_services": [
                    {
                        "services": [
                            "create-services",
                            "create-category",
                            "edit-service",
                            "view",
                            "delete-service"
                        ],
                        "product": [
                            "create-product",
                            "create-brand",
                            "edit-product",
                            "view",
                            "delete-product"
                        ]
                    }
                ],
                "jobs": [
                    {
                        "general-job": [
                            "create-job",
                            "view-job",
                            "edit-job",
                            "delete-job",
                            "create-task",
                            "crew-size-modification-on-creation",
                            "business-unit-creation",
                            "unassignassign",
                            "invoice",
                            "dispatch-or-cancel-job",
                            "assign-technicians"
                        ]
                    }
                ],
                "invoice": [
                    {
                        "general-invoice": [
                            "create-by-product-and-services",
                            "create-by-job",
                            "edit",
                            "view",
                            "download",
                            "resend-email"
                        ]
                    }
                ],
                "task": [
                    {
                        "general-task": [
                            "create-task",
                            "edit",
                            "view",
                            "delete",
                            "add-comments",
                            "mark-completed",
                            "set-reminder",
                            "hold",
                            "cancel",
                            "assign-user"
                        ]
                    }
                ],
                "reports": [
                    {
                        "general-report": [
                            "user",
                            "quote",
                            "invoice",
                            "customer",
                            "revenue-and-operations"
                        ]
                    }
                ],
                "timesheet": [
                    {
                        "general-timesheet": [
                            "create-timesheet",
                            "edit",
                            "delete",
                            "approve-timesheets",
                            "payroll"
                        ]
                    }
                ],
                "dashboard_access": [
                    {
                        "dashboard-access": [
                            "granted"
                        ]
                    }
                ]
            }
        }
    }
}

S.No Property Name Type Usage
1. profile Object Which gives the information of Profile tab of the user. (Please Refer UI Page number: 42 in user.pdf) all fields are string except few fields, and those fields are explained below.
1a. addresses Array of Objects Which contains the Addresses which has been provided by user, while given at the time of registration or creation.
1b. company Object Which it holds three properties, company_name, image and contact_person name as name
1c. contractor_company Object Which gives relavant information about the contractor company this will provide object details only if the user id which is sent in request is of type contractor_user.


If the user is contractor user,It will respond you with the contractor_company detailed information.

If it is Contractor User Response | Code-200


{
	"message": "User basic information listed successfully",
	"status": "success",
	"code": 200,
	"language": "en",
	"data": {
		"profile": {
			"id": "14",
			"name": "Scarlett Johnson",
			"first_name": "Scarlett",
			"last_name": "Johnson",
			"email": "scarlett@mpl.com",
			"phone": "",
			"secondary_phone": "",
			"home_phone": "",
			"user_image": "http://devapi-saas.zaicrm.com/public/img/user_default.png",
			"status": "Active",
			"user_type": "Contractor",
			"addresses": [],
			"business_unit": "",
			"business_unit_id": "",
			"contractor_company": {
				"id_customer_group": "1",
				"email": "blmuruga6@zaigoinfotech.com",
				"phone": null,
				"fax": null,
				"website": null,
				"lead_source": null,
				"contact_person_name": "John Wick",
				"addresses": [
					null,
					null
				],
				"company_logo": "http://devapi-saas.zaicrm.com/public/img/user_default.png"
			},
			"contractor_type": "Company Contractor"
		},
		"logged_in_user_company": {
			"company_name": "",
			"image": "http://devapi-saas.zaicrm.com/public/img/user_default.png",
			"name": "Zaigo Infotech"
		},
        "is_admin": true,
        "is_technician": false,
		"activities": [],
		"tasks": {
			"open": {
				"in_progress": [],
				"not_started": []
			},
			"today": {
				"not_started": [],
				"in_progress": [],
				"completed": [],
				"cancelled": []
			},
			"week": {
				"not_started": [],
				"in_progress": [],
				"completed": [],
				"cancelled": []
			},
			"overdue": {
				"not_started": [],
				"in_progress": []
			},
			"completed": []
		},
		,
        "permission": {
            "menus_permissions": {
                "user": {
                    "companies": [
                        {
                            "tenant-company": [
                                "edit",
                                "view",
                                "address-delete"
                            ],
                            "contractor-company": [
                                "create-contractor-company",
                                "edit-contractor",
                                "contractor-view",
                                "delete"
                            ],
                            "vendor-company": [
                                "create-vendor-company",
                                "edit-vendor",
                                "view-vendor",
                                "delete-vendor"
                            ]
                        }
                    ],
                    "user": [
                        {
                            "tenant-users": [
                                "bulk-import",
                                "send-invite",
                                "create-user",
                                "edit",
                                "delete",
                                "user-view",
                                "permission-control",
                                "edit-user",
                                "create-task",
                                "add-comments",
                                "mark-completed",
                                "set-reminder",
                                "hold",
                                "cancel",
                                "assign-user"
                            ]
                        }
                    ],
                    "team": [
                        {
                            "general-team": [
                                "create-team",
                                "edit-team",
                                "add-members",
                                "view-members",
                                "delete-team"
                            ]
                        }
                    ]
                },
                "customer": [
                    {
                        "customer-contact": [
                            "create-contact",
                            "edit",
                            "view",
                            "delete",
                            "send-invite",
                            "activity",
                            "job",
                            "notes",
                            "invoices",
                            "create-invoice-by-job"
                        ]
                    }
                ],
                "quote": [
                    {
                        "general-quote": [
                            "quote-by-job",
                            "quote-by-product-services",
                            "edit",
                            "view",
                            "delete",
                            "resend-quote",
                            "edit-and-resend-quote",
                            "contact-customer-create",
                            "analytics",
                            "notes",
                            "create-task",
                            "add-comments",
                            "mark-completed",
                            "set-reminder",
                            "hold",
                            "cancel",
                            "assign-user"
                        ]
                    }
                ],
                "products_and_services": [
                    {
                        "services": [
                            "create-services",
                            "create-category",
                            "edit-service",
                            "view",
                            "delete-service"
                        ],
                        "product": [
                            "create-product",
                            "create-brand",
                            "edit-product",
                            "view",
                            "delete-product"
                        ]
                    }
                ],
                "jobs": [
                    {
                        "general-job": [
                            "create-job",
                            "view-job",
                            "edit-job",
                            "delete-job",
                            "create-task",
                            "crew-size-modification-on-creation",
                            "business-unit-creation",
                            "unassignassign",
                            "invoice",
                            "dispatch-or-cancel-job",
                            "assign-technicians"
                        ]
                    }
                ],
                "invoice": [
                    {
                        "general-invoice": [
                            "create-by-product-and-services",
                            "create-by-job",
                            "edit",
                            "view",
                            "download",
                            "resend-email"
                        ]
                    }
                ],
                "task": [
                    {
                        "general-task": [
                            "create-task",
                            "edit",
                            "view",
                            "delete",
                            "add-comments",
                            "mark-completed",
                            "set-reminder",
                            "hold",
                            "cancel",
                            "assign-user"
                        ]
                    }
                ],
                "reports": [
                    {
                        "general-report": [
                            "user",
                            "quote",
                            "invoice",
                            "customer",
                            "revenue-and-operations"
                        ]
                    }
                ],
                "timesheet": [
                    {
                        "general-timesheet": [
                            "create-timesheet",
                            "edit",
                            "delete",
                            "approve-timesheets",
                            "payroll"
                        ]
                    }
                ],
                "dashboard_access": [
                    {
                        "dashboard-access": [
                            "granted"
                        ]
                    }
                ]
            }
        }
    }
}

If Internal Server error occured with valid input.

Internal Server Error Response | Code-500


	{
		"message": "User is not found with the input which you've provided",
		"status": "failure",
		"code": 500,
		"language": "en",
		"data": {}
	}

If incorrect user id sent or another tenant's user id is sent. | Code-400


	{
		"message": "User not exists with the input provided",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {}
	}

Forbidden Response | Code-403


1. If user status is not active
{
  "message": "Unauthorized",
  "status": "forbidden",
  "code": 403,
  "language": "en",
  "data": {
     "status": "Your account is locked. Please contact admin."
  }
}

Business Unit Listing


Method: GET
Field * required Validations Rule Testing Inputs
URL http://devaccounting-saas.zaicrm.com/z1/accounting/category
_token * Bearer Token: "token" Pass it in header as all other request
type Not required, but it is better to send type for this stage in fieldy. - business_unit or service_type
Note: This is the api where it retrieves products and services categories. which you will see in Inventory module.


Business Units Retrieved!


Provided Inputs

URL:http://devaccounting-saas.zaicrm.com/z1/accounting/category?type=business_unit


	{
		"message": "List Retrieved!",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {
			"business_unit": [
				{
					"name": "Heating",
					"id": 1
				},
				{
					"name": "Plumbing",
					"id": 2
				},
				{
					"name": "Velding",
					"id": 3
				}
			]
		}
	}

Service Types Retrieved!


Provided Inputs

URL:http://devaccounting-saas.zaicrm.com/z1/accounting/category?type=service_type


	{
		"message": "List Retrieved!",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {
			"business_unit": [
				{
					"name": "Heating",
					"id": 1
				},
				{
					"name": "Plumbing",
					"id": 2
				},
				{
					"name": "Velding",
					"id": 3
				}
			]
		}
	}

Roles Listing API


Method: GET
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/roles
OR http://qaapigateway-saas.zaicrm.com/z1/api/user/roles
_token * Bearer Token: "token" Pass it in header as all other request


Roles Retrieved!


Provided Inputs

URL:http://devapi-saas.zaicrm.com/z1/api/user/roles


	{
    "message": "Lists! retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": [
        {
            "id": "7",
            "name": "Admin"
        },
        {
            "id": "8",
            "name": "Manager"
        },
        {
            "id": "9",
            "name": "Operator"
        },
        {
            "id": "10",
            "name": "Technician"
        }
    ]
}

User Creation


Method: POST
Field * required Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/user
OR
http://qaapigateway-saas.zaicrm.com/z1/api/user/user
_token * Bearer Token: "token" Pass it in header as all other request
first_name *
  • Required
  • Input type string
  • Maximum character allowed - 256
  • Minimum character allowed - 1
  • Special character allowed - all
Alan
last_name
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
Alan
job_title
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
Alan
email *
  • Required
  • Unique -(tenant based) where it should not found any existing users with same email address
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
qateam@fieldy.co
role_id (conditional required) *
  • Required (if creating tenant user)
  • Role Ids needs to be fetched from roles api
  • Input type dropdown
  • Should be valid role id

Note: If User is about to create technician, there is additional validation may account based on the package subscribed by tenant that is whether their package may have any technician creation limitation, if yes means we will be checking there are any previous technicians or contractors already available and the count is exceeding the limit means we will be throwing error.

2
phone_with_ext
  • Optional
  • Input type number
  • Minimum Character allowed - 6
  • Maximum character allowed - 12
9894425810
secondary_phone
  • Optional
  • Input type number
  • Minimum Character allowed - 6
  • Maximum character allowed - 12
9894425810
home_phone
  • Optional
  • Input type number
  • Minimum Character allowed - 6
  • Maximum character allowed - 12
9894425810

If phone field is multiple please use the below one

phones
  • optional
  • should be valid json format
Label Param
  • is hardcoded values
  • Input type string
  • should be on of the following- work,home,personal,other
  • default value - work
  • maximum character allowed - 64
  • minimum character allowed - 0
  • special character allowed - all
Number Param
  • Input type numeric
  • maximum digits allowed - 12
  • minimum digits - 6
[{"number":"829101","label":"office"},{"number":"829101","label":"HOme"}]
addresses
  • Optional
  • Valid json format
name
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
line_1
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
line_2
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
city
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
state
  • Optional
  • Input type string
  • Maximum character allowed - 45
zipcode
  • Optional
  • Input type string
  • Maximum character allowed - 10
  • Minimum character allowed - 3
  • Special character allowed - all
country
  • Optional
  • Input type dropdown
[{"name":"chennai","line_1":"6-A,6th Floor, Sapna Trade Centre","line_2":"poonamalle High Rd","city":"Egmore,Chennai","state":"Tamilnadu","zipcode":"600001","country":"6"},{"name":"Vellore","line_1":"9-A,6th Floor, Vellore Trade Centre","line_2":"poonamalle High Rd","city":"Egmore, chennai","state":"Tamilnadu","zipcode":"602191","country":"7"}]
social_media
  • optional
Label Param
  • Optional
  • is hardcoded values
  • Input type string
  • should be on of the following- facebook,twitter,linkedin,website,messenger
  • maximum character allowed - 64
  • minimum character allowed - 0
  • special character allowed - all
url Param
  • Optional
  • Input type string
  • maximum character allowed - 65535
[{"label":"facebook","url":"https://www.facebook.com"},{"label":"twitter","url":"https://twitter.com"}]
user_image
  • Optional
  • Input type file
  • Allowed format - png,jpg,jpeg
  • Maximum Upload size - 2048 Kb
-
status
  • mandatory
  • Input type string
  • default value - active
  • should be - active,inactive
  • hardcoded values
  • maximum character allowed - 64
  • minimum character allowed - 0
active
type (It is needed only for contractor user creation) Specify where we are about to create tenant user or contractor user. It should be send contractor_user when creating contractor user (For tenant user it is not required and please avoid sending type) [no validations as for now. But if type is found contractor_users then contractor_users related required fields should be provided with values.]. contractor_user
contractor_type * (conditional required) Required, Please send 1 if Company Contractor. Please send 2 if Individual contractor [required,in:1,2]Note: If User is about to create contractor user, there is additional validation may account based on the package subscribed by tenant that is whether their package may have any technician creation limitation, if yes means we will be checking there are any previous technicians or contractors already available and the count is exceeding the limit means we will be throwing error. 2 or 1
company_id * (conditional required) Required and it should be valid company id, please refer contractor companies listing api to fetch details. [required,in:contractor_company_ids]Note: If User is about to create contractor user, there is additional validation may account based on the package subscribed by tenant that is whether their package may have any technician creation limitation, if yes means we will be checking there are any previous technicians or contractors already available and the count is exceeding the limit means we will be throwing error. (Please pass valid contractor_company id)
business_unit_id
  • Optional
  • Input type dropdown
  • Should be any of the allotted business unit
  • Please refer business units api to get available buiness units for the current tenant.)
Please pass any of the available valid business unit id refer by api. Testing Inputs : 4,5
service_type_id
  • Optional
  • Input type dropdown
  • Should be any of the allotted business unit
  • Please refer service type api to get available service type for the current tenant.)
Please pass any of the available valid service type id refer by api. Testing Inputs : 1,2

Notes

In the above address json you have to pass address_id as empty(""). For Zipcode validated if exists as 6 digits

If need to delete all the address - send as empty array([])



Bit About social_media validations.

S.No Description Code (Regex)
1 How we are validating facebook profile? Via this regexp '/http(?:s):\/\/(?:www\.)facebook\.com\/.+/i'
2 How we are validating twitter profile? Via this regexp '/http(?:s)?:\/\/(?:www\.)?twitter\.com\/([a-zA-Z0-9_]+)/'
3 How we are validating linkedin profile? Via this regexp '^https:\\/\\/[a-z]{2,3}\\.linkedin\\.com\\/.*$'

User Created!


If User Created this is the success response which is expected.

Provided Inputs

first_name: Muruga
last_name:Tester
email:mailme_rbm@rediffmail.com
role_id:2

Note: While submitting this input time is 12:50 PM


	{
		"message": "User created successfully!",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {}
	}

Contractor User Created!


If User Created this is the success response which is expected.

Provided Inputs

first_name: Muruga
last_name:Contractor
email:mailme_rbm+2@rediffmail.com
type:contractor_user
contractor_type:1
company_id:2

Note: While submitting this input time is 12:50 PM


	{
		"message": "User created successfully!",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {}
	}

Contractor User Created (Individual contractor)!


If User Created this is the success response which is expected.

Provided Inputs

first_name: Muruga
last_name:Contractor
email:mailme_rbm+3@rediffmail.com
type:contractor_user
contractor_type:2

Note: While submitting this input time is 12:50 PM


	{
		"message": "User created successfully!",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {}
	}

Empty Request


If Empty request has been sent,like without required inputs. (By default it assumes that it is going to check for tenant_users)


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"first_name": {
				"message": "This field is required. ."
			},
			"last_name": {
				"message": "This field is required. ."
			},
			"email": {
				"message": "This field is required. ."
			},
			"role_id": {
				"message": "This field is required. ."
			}
		}
	}

In-Valid Input 1.


Provided Inputs

email:mailme_rbm@rediffmail.com
role_id:2


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"email": {
				"message": "User Already Exist with the same email address"
			}
		}
	}

In-Valid Input 2.


Provided Inputs

email:mailme_rbm+1@rediffmail.com
role_id:1000


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"role_id": {
				"message": "The selected role id is invalid."
			}
		}
	}

In-Valid Input 3.


Provided Inputs

email:mailme_rbm+1@rediffmail.com
role_id:1000


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"role_id": {
				"message": "The selected role id is invalid."
			}
		}
	}

In-Valid Input 4 - Not valid company id.


Provided Inputs

email:mailme_rbm+3@rediffmail.com
type:contractor_user
email:mailme_rbm+3@rediffmail.com
contractor_type:1
company_id:1


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"company_id": {
				"message": "The selected company id is invalid."
			}
		}
	}

All Invalid Response for User


	{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "first_name": {
            "message": "This first name is required."
        },
        "first_name": {
            "message": "The first name may not be greater than 256 characters."
        },
        "last_name": {
            "message": "The last name may not be greater than 256 characters."
        },
        "job_title": {
            "message": "The job title may not be greater than 256 characters."
        },
        "role_id": {
            "message": "This role id is required."
        },
        "role_id": {
            "message": "The role id should be anyone of 7, 8, 9, 10"
        },
        "email": {
            "message": "The e-mail must be a valid email address."
        },
        "email": {
            "message": "User Already Exist with the same email address"
        },
        "email": {
            "message": "The e-mail may not be greater than 256 characters."
        },
       If invalid address json given,
        "addresses": [

            {
                "name": {
                    "code": "Q1004",
                    "message": "Addresses name exceeds 256 characters"
                },

                "line_1": {
                    "code": "Q1004",
                    "message": "Line 1 exceeds 256 characters"
                },
                "line_2": {
                    "code": "Q1004",
                    "message": "Line 2 exceeds 256 characters"
                },
                "country": {
                    "code": "Q1002",
                    "message": "Selected country is invalid"
                },
                "state": {
                    "code": "Q1004",
                    "message": "State exceeds 45 characters"
                },
                "city": {
                    "code": "Q1004",
                    "message": "City exceeds 256 characters"
                },
                "zipcode": {
                    "code": "Q1005",
                    "message": "Zipcode should be minimum 3 characters"
                }
            },
            {
                "name": {
                    "code": "Q1004",
                    "message": "Addresses name exceeds 256 characters"
                },

                "line_1": {
                    "code": "Q1004",
                    "message": "Line 1 exceeds 256 characters"
                },
                "line_2": null,
                "country": null,
                "state": null,
                "city": null,
                "zipcode": null
            },
            {
                "name": null,
                "line_1": null,
                "line_2": null,
                "country": {
                    "code": "Q1002",
                    "message": "Selected country is invalid"
                },
                "state": null,
                "city": null,
                "zipcode": {
                    "code": "Q1003",
                    "message": "Zipcode should be numeric"
                }
            },
    null,
    null

        ],
        "user_image": {
            "message": "The user image must be a file of type: png, jpeg, jpg."
        },
        "user_image": {
            "message": "The user image may not be greater than 2048 kilobytes."
        },
     "phones": [
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of Work,Home,Personal,Other"
                },
                "number": {
                    "code": "Q1005",
                    "message": "Phones number should be minimum 6 characters"
                }
            },
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of Work,Home,Personal,Other"
                },
                "number": null
            },
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of Work,Home,Personal,Other"
                },
                "number": {
                    "code": "Q1003",
                    "message": "Phone number should be numeric"
                }
            }
        ],
     "social_media": [
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of facebook,twitter,linkedin,website,messenger"
                },
                "url": {
                    "code": "Q1004",
                    "message": "Social media url exceeds 65535 character"
                }
            },
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of facebook,twitter,linkedin,website,messenger"
                },
                "url": null
            }
        ]

    }
}

All Invalid Response for Contractor User


	{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "first_name": {
            "message": "This first name is required."
        },
        "first_name": {
            "message": "The first name may not be greater than 256 characters."
        },
        "last_name": {
            "message": "The last name may not be greater than 256 characters."
        },
        "job_title": {
            "message": "The job title may not be greater than 256 characters."
        },






        "email": {
            "message": "The e-mail must be a valid email address."
        },
        "email": {
            "message": "User Already Exist with the same email address"
        },
        "email": {
            "message": "The e-mail may not be greater than 256 characters."
        },
        "business_unit_id": {
            "message": "please provide valid business_unit_id"
        },
        "service_type_id": {
            "message": "please provide valid service_type_id"
        },
       If invalid address json given,
        "addresses": [

            {
                "name": {
                    "code": "Q1004",
                    "message": "Addresses name exceeds 256 characters"
                },

                "line_1": {
                    "code": "Q1004",
                    "message": "Line 1 exceeds 256 characters"
                },
                "line_2": {
                    "code": "Q1004",
                    "message": "Line 2 exceeds 256 characters"
                },
                "country": {
                    "code": "Q1002",
                    "message": "Selected country is invalid"
                },
                "state": {
                    "code": "Q1004",
                    "message": "State exceeds 45 characters"
                },
                "city": {
                    "code": "Q1004",
                    "message": "City exceeds 256 characters"
                },
                "zipcode": {
                    "code": "Q1005",
                    "message": "Zipcode should be minimum 3 characters"
                }
            },
            {
                "name": {
                    "code": "Q1004",
                    "message": "Addresses name exceeds 256 characters"
                },

                "line_1": {
                    "code": "Q1004",
                    "message": "Line 1 exceeds 256 characters"
                },
                "line_2": null,
                "country": null,
                "state": null,
                "city": null,
                "zipcode": null
            },
            {
                "name": null,
                "line_1": null,
                "line_2": null,
                "country": {
                    "code": "Q1002",
                    "message": "Selected country is invalid"
                },
                "state": null,
                "city": null,
                "zipcode": {
                    "code": "Q1003",
                    "message": "Zipcode should be numeric"
                }
            },
    null,
    null

        ],
        "user_image": {
            "message": "The user image must be a file of type: png, jpeg, jpg."
        },
        "user_image": {
            "message": "The user image may not be greater than 2048 kilobytes."
        },
        "company_id": {
            "message": "Please provide valid company_id"
        },

     "phones": [
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of Work,Home,Personal,Other"
                },
                "number": {
                    "code": "Q1005",
                    "message": "Phones umber should be minimum 6 characters"
                }
            },
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of Work,Home,Personal,Other"
                },
                "number": null
            },
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of Work,Home,Personal,Other"
                },
                "number": {
                    "code": "Q1003",
                    "message": "Phone number should be numeric"
                }
            }
        ],
      "social_media": [
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of facebook,twitter,linkedin,website,messenger"
                },
                "url": {
                    "code": "Q1004",
                    "message": "Social media url exceeds 65535 character"
                }
            },
            {
                "label": {
                    "code": "Q1002",
                    "message": "Selected label is invalid. it should be anyone of facebook,twitter,linkedin,website,messenger"
                },
                "url": null
            }
        ]
    }
}

User Updation


Method: POST
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/user/{user_id}
OR
http://qaapigateway-saas.zaicrm.com/z1/api/user/user/{user_id}
_token * Bearer Token: "token" Pass it in header as all other request
_method * put
first_name *
  • Required
  • Input type string
  • Maximum character allowed - 256
  • Minimum character allowed - 1
  • Special character allowed - all
Alan
last_name
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
Alan
job_title
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
Alan
email *
  • Required
  • Unique -(tenant based) where it should not found any existing users with same email address
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
qateam@fieldy.co
role_id (conditional required) *
  • Required (if creating tenant user)
  • Role Ids needs to be fetched from roles api
  • Input type dropdown
  • Should be valid role id

Note: If User is about to create technician, there is additional validation may account based on the package subscribed by tenant that is whether their package may have any technician creation limitation, if yes means we will be checking there are any previous technicians or contractors already available and the count is exceeding the limit means we will be throwing error.

2
phone_with_ext
  • Optional
  • Input type number
  • Minimum Character allowed - 6
  • Maximum character allowed - 12
9894425810
secondary_phone
  • Optional
  • Input type number
  • Minimum Character allowed - 6
  • Maximum character allowed - 12
9894425810
home_phone
  • Optional
  • Input type number
  • Minimum Character allowed - 6
  • Maximum character allowed - 12
9894425810

If phone field is multiple please use the below one

phones
  • optional
  • should be valid json format
  • If you send empty array we will delete all phones for the user (Ex- phones=[])
Label Param
  • is hardcoded values
  • Input type string
  • should be on of the following- work,home,personal,other
  • default value - work
  • maximum character allowed - 64
  • minimum character allowed - 0
  • special character allowed - all
Number Param
  • Input type numeric
  • maximum digits allowed - 12
  • minimum digits - 6
[{"number":"829101","label":"office"},{"number":"829101","label":"HOme"}]
addresses
  • Optional
  • Valid json format
name
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
line_1
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
line_2
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
city
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
state
  • Optional
  • Input type string
  • Maximum character allowed - 45
zipcode
  • Optional
  • Input type string
  • Maximum character allowed - 10
  • Minimum character allowed - 3
  • Special character allowed - all
country
  • Optional
  • Input type dropdown
id_address
  • Optional
  • Input type string
  • need to pass valid address id
[{"name":"chennai","line_1":"6-A,6th Floor, Sapna Trade Centre","line_2":"poonamalle High Rd","city":"Egmore,Chennai","state":"Tamilnadu","zipcode":"600001","country":"6","id_address":"2"},{"name":"Vellore","line_1":"9-A,6th Floor, Vellore Trade Centre","line_2":"poonamalle High Rd","city":"Egmore, chennai","state":"Tamilnadu","zipcode":"602191","country":"7","id_address":"1"}]
social_media
  • optional
  • If you send empty array we will delete all social_media for the user (Ex- social_media=[])
Label Param
  • Optional
  • is hardcoded values
  • Input type string
  • should be on of the following- facebook,twitter,linkedin,website,messenger
  • maximum character allowed - 64
  • minimum character allowed - 0
  • special character allowed - all
url Param
  • Optional
  • Input type string
  • maximum character allowed - 65535
[{"label":"facebook","url":"https://www.facebook.com"},{"label":"twitter","url":"https://twitter.com"}]
user_image
  • Optional
  • Input type file
  • Allowed format - png,jpg,jpeg
  • Maximum Upload size - 2048 Kb
-
type (It is needed only for contractor user creation) Specify where we are about to create tenant user or contractor user. It should be send contractor_user when creating contractor user (For tenant user it is not required and please avoid sending type) [no validations as for now. But if type is found contractor_users then contractor_users related required fields should be provided with values.]. contractor_user
contractor_type * (conditional required) Required, Please send 1 if Company Contractor. Please send 2 if Individual contractor [required,in:1,2]Note: If User is about to create contractor user, there is additional validation may account based on the package subscribed by tenant that is whether their package may have any technician creation limitation, if yes means we will be checking there are any previous technicians or contractors already available and the count is exceeding the limit means we will be throwing error. 2 or 1
company_id * (conditional required) Required and it should be valid company id, please refer contractor companies listing api to fetch details. [required,in:contractor_company_ids]Note: If User is about to create contractor user, there is additional validation may account based on the package subscribed by tenant that is whether their package may have any technician creation limitation, if yes means we will be checking there are any previous technicians or contractors already available and the count is exceeding the limit means we will be throwing error. (Please pass valid contractor_company id)
business_unit_id
  • Optional
  • Input type dropdown
  • Should be any of the allotted business unit
  • Please refer business units api to get available buiness units for the current tenant.)
Please pass any of the available valid business unit id refer by api. Testing Inputs : 4,5
service_type_id
  • Optional
  • Input type dropdown
  • Should be any of the allotted business unit
  • Please refer service type api to get available service type for the current tenant.)
Please pass any of the available valid service type id refer by api. Testing Inputs : 1,2

In the above address json you have to pass address_id if you are going to update address detail. If you are adding new address you pass address_id as empty.



Bit About social_media validations.

S.No Description Code (Regex)
1 How we are validating facebook profile? Via this regexp '/http(?:s):\/\/(?:www\.)facebook\.com\/.+/i'
2 How we are validating twitter profile? Via this regexp '/http(?:s)?:\/\/(?:www\.)?twitter\.com\/([a-zA-Z0-9_]+)/'
3 How we are validating linkedin profile? Via this regexp '^https:\\/\\/[a-z]{2,3}\\.linkedin\\.com\\/.*$'

User Updated!


If User Updated this is the success response which is expected.

Provided Inputs

first_name: Muruga
last_name:Tester
email:mailme_rbm@rediffmail.com
role_id:2

Note: While submitting this input time is 12:50 PM


	{
		"message": "User information updated successfully",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {}
	}

Contractor User Updated!


If User Updated this is the success response which is expected.

Provided Inputs

first_name: Muruga
last_name:Contractor
email:mailme_rbm+2@rediffmail.com
type:contractor_user
contractor_type:1
company_id:2

Note: While submitting this input time is 12:50 PM


	{
		"message": "User information updated successfully",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {}
	}

Contractor User Updated (Individual contractor)!


If User Updated this is the success response which is expected.

Provided Inputs

first_name: Muruga
last_name:Contractor
email:mailme_rbm+3@rediffmail.com
type:contractor_user
contractor_type:2

Note: While submitting this input time is 12:50 PM


	{
		"message": "User information updated successfully!",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {}
	}

Empty Request


If Empty request has been sent,like without required inputs. (By default it assumes that it is going to check for tenant_users)


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"first_name": {
				"message": "This field is required. ."
			},
			"last_name": {
				"message": "This field is required. ."
			},
			"email": {
				"message": "This field is required. ."
			},
			"role_id": {
				"message": "This field is required. ."
			}
		}
	}

In-Valid Input 1.


Provided Inputs

email:mailme_rbm@rediffmail.com
role_id:2


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"email": {
				"message": "User Already Exist with the same email address"
			}
		}
	}

In-Valid Input 2.


Provided Inputs

email:mailme_rbm+1@rediffmail.com
role_id:1000


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"role_id": {
				"message": "The selected role id is invalid."
			}
		}
	}

In-Valid Input 3.


Provided Inputs

email:mailme_rbm+1@rediffmail.com
role_id:1000


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"role_id": {
				"message": "The selected role id is invalid."
			}
		}
	}

In-Valid Input 4 - Not valid company id.


Provided Inputs

email:mailme_rbm+3@rediffmail.com
type:contractor_user
email:mailme_rbm+3@rediffmail.com
contractor_type:1
company_id:1


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"company_id": {
				"message": "Please select the company associated or create as an Individual contractor"
			}
		}
	}

While Developing, focused on task reminders should not marked as past and after task due time etc., If We missed anything, please let us know.

User Delete API


Method: DELETE
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/user/{user_id}
OR
http://qaapigateway-saas.zaicrm.com/z1/api/user/user/{user_id}
_token * Bearer Token: "token" Pass it in header as all other request
Records are deleted from application not in fieldy server(database). we have the records for references.

Delete Response


Success response which is expected.


{
    "message": "User have been deleted successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {}
}

If delete request not succeed.



{
    "message": "Sorry! There is an error occured while processing your entry",
    "status": "failure",
    "code": 422,
    "language": "en",
    "data": {}
}

Error in Backend Server - 500


If all inputs are satisfied, but if there is any issue in backend means it will send respond like below.


{
    "message": "Couldn't fetch user details",
    "status": "failure",
    "code": 500,
    "language": "en",
    "data": {}
}

User Edit Detail API


Method: GET
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/user/detail/{user_id}
OR
http://qaapigateway-saas.zaicrm.com/z1/api/user/user/detail/{user_id}
_token * Bearer Token: "token" Pass it in header as all other request

Success Response


Success response which is expected.

NOTE:

Use phone_number param . It will retrieve the first phone number from you are added on the multiple phones field


{
    "message": "User basic information listed successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
        "first_name": "Naveen",
        "last_name": "A",
        "job_title": "",
        "email": "naveen.image@zaigoinfotech.com",
        "role_id": "7",
        "phone": "",
        "secondary_phone": "",
        "home_phone": "",
        "status": "active",
        "is_contractor": "0",
        "id_customer_group": "",
        "business_unit": "",
        "service_type": "",
        "business_unit_id": "",
        "service_type_id": "",
        "user_image": "http://qaapigateway-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202251753587552.jpg",
        "addresses": [
            {
                "contact_person_name": "Naveen A",
                "line_1": "9a sapna trade ceter/9th floor",
                "line_2": "Poonamalle high road",
                "landmark": "",
                "zip_code": "600084",
                "notes": "Tenant User Address",
                "state_name": "Tamil Nadu",
                "country_name": "India",
                "country_id": "1",
                "state_id": "1",
                "get_country": {
                    "id": 1,
                    "name": "india"
                }
            },
            {
                "contact_person_name": "Naveen A",
                "line_1": "9a sapna trade ceter/9th floor",
                "line_2": "Poonamalle high road",
                "landmark": "",
                "zip_code": "600084",
                "notes": "Tenant User Address",
                "state_name": "Tamil Nadu",
                "country_name": "India",
                "country_id": "1",
                "state_id": "1",
                "get_country": {
                    "id": 1,
                    "name": "india"
                }
            }
        ],
        "social_media": null,
        "phone_number": "9008900989" // use this param for phone number ignore others
    }
}

Error in Backend Server - 500


If all inputs are satisfied, but if there is any issue in backend means it will send respond like below.


{
    "message": "Couldn't fetch user details",
    "status": "failure",
    "code": 500,
    "language": "en",
    "data": {}
}

User Status Change


Method: POST
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/user/status/change/{user_id}
OR
http://qaapigateway-saas.zaicrm.com/z1/api/user/user/status/change/{user_id}
_token * Bearer Token: "token" Pass it in header as all other request
status * Required and it should be active or inactive [required,in:active,inactive] active

User Status Changed Successfully!


Provided Inputs

status:active


{
    "message": "User Status Changed Successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {}
}

Empty Request


If Empty request has been sent,like without required inputs


{
	"message": "Bad Request.",
	"status": "bad_request",
	"code": 400,
	"language": "en",
	"data": {
		"status": {
			"message": "This field is required."
		}
	}
}

If Invalid Request


Provided Inputs

status:asdad


{
	"message": "Bad Request.",
	"status": "bad_request",
	"code": 400,
	"language": "en",
	"data": {
		"status": {
			"message": "The status must be active or inactive."
		}
	}
}

Users Listing


Method: GET
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/user
OR http://qaapigateway-saas.zaicrm.com/z1/api/user/user
_token * Bearer Token: "token" Pass it in header as all other request
type Not required, But it is used when they want only users or contractors alone to get it. - users or contractors
search Desire text input to search on Search using name and email,phone_number gavaskar
id_customer_group Filter using contractor company Filters the user based on contractor company 1(contractor_company_id)
role_id Filter using user type Filters the user based on user type/td> 1(role_id)
business_unit_id Filter using business units with comma separators Filters the user based on business units 2,5(business_unit_id)
service_type_id Filter using service types with comma separators Filters the user based on service types 4,3(service_type_id)
limit Limits the number of records - 10
sort_by Specify the column to sort_by - [first_name, last_name, email]
sort_direction It will decide how it should sortby - desc (by default), asc


Users List


NOTE:

Use phone_number param for list. It will retrieve the first phone number from you are added on the multiple phones field

If User is listed this is the success response which is expected.

URL given: http://devapi-saas.zaicrm.com/z1/api/user/user

Note: No filters are type specified, so it will list both users and contract users.


	{
    "message": "Lists! retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
        "users": [
            {
                "id": "756",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.tenant@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://qaapigateway-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202251812207562.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1874",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "755",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.image@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://qaapigateway-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202251753587552.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1872",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "754",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.1212@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1870",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "753",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.asdd@zaigoinfotech.com",
                "phone": "9894425810",
                "secondary_phone": "9894425810",
                "home_phone": "5765757657",
                "phone_number": "9008900989",
                "user_image": "",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1868",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "752",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "751",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "750",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "749",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "748",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "747",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveesssn.adds@zaigoinfotech.com",
                "phone": "9894425810",
                "secondary_phone": "9894425810",
                "home_phone": "5765757657",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1862",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            }
        ],
        "users_links": "http://qaapigateway-saas.zaicrm.com/z1/api/user/user?limit=10&type=users&cursor=eyJpZCI6Ijc0NyIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
        "contractors": [
            {
                "id": "756",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.tenant@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://qaapigateway-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202251812207562.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1874",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "755",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.image@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://qaapigateway-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202251753587552.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1872",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "754",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.1212@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1870",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "753",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.asdd@zaigoinfotech.com",
                "phone": "9894425810",
                "secondary_phone": "9894425810",
                "home_phone": "5765757657",
                "phone_number": "9008900989",
                "user_image": "",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1868",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "752",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "751",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "750",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "749",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "748",
                "name": "Heloo new ",
                "first_name": "Heloo new",
                "last_name": "",
                "job_title": "",
                "email": "",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Customer",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "747",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveesssn.adds@zaigoinfotech.com",
                "phone": "9894425810",
                "secondary_phone": "9894425810",
                "home_phone": "5765757657",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1862",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            }
        ],
        "contractors_links": "http://qaapigateway-saas.zaicrm.com/z1/api/user/user?limit=10&type=contractors&cursor=eyJpZCI6Ijc0NyIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
    }
}

Mobile Response

	{
     "message": "Lists! retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "users": [
        {
            "id": "503",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdsssssssss132s@gmail.com",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1219",
                    "line_1": "Test",
                    "line_2": "",
                    "city": "chennai",
                    "zip_code": "781112",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1"
        },
        {
            "id": "502",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdssssssssss@gmail.com",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1217",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1"
        },
        {
            "id": "501",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdsssssss@gmail.com",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1215",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "500",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdsssss@gmail.com",
            "phone": "asdasd",
            "secondary_phone": "s",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1213",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "499",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdss@gmail.com",
            "phone": "",
            "secondary_phone": "9894425810",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1211",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "498",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasd@gmail.com",
            "phone": "",
            "secondary_phone": "9894425810",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1209",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": "",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "497",
            "name": "hhhh ",
            "first_name": "hhhh",
            "last_name": "",
            "job_title": "",
            "email": "",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Customer",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "496",
            "name": "test test",
            "first_name": "test",
            "last_name": "test",
            "job_title": "test",
            "email": "ab@zaigoinfotech.com",
            "phone": "asdasd",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202112281859314962.png",
            "status": "Active",
            "user_type": "Admin",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "sdsds",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "494",
            "name": "Create contact test date installled ",
            "first_name": "Create contact test date installled",
            "last_name": "",
            "job_title": "",
            "email": "",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Customer",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "493",
            "name": "Tesla Customer ",
            "first_name": "Tesla Customer",
            "last_name": "",
            "job_title": "",
            "email": "",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Customer",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        }
    ],
    "contractors": [
        {
            "id": "503",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdsssssssss132s@gmail.com",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1219",
                    "line_1": "Test",
                    "line_2": "",
                    "city": "chennai",
                    "zip_code": "781112",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                }
            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1"
        },
        {
            "id": "502",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdssssssssss@gmail.com",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1217",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1"
        },
        {
            "id": "501",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdsssssss@gmail.com",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1215",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "500",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdsssss@gmail.com",
            "phone": "asdasd",
            "secondary_phone": "s",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1213",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "499",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdss@gmail.com",
            "phone": "",
            "secondary_phone": "9894425810",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1211",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "498",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasd@gmail.com",
            "phone": "",
            "secondary_phone": "9894425810",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1209",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": "",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "497",
            "name": "hhhh ",
            "first_name": "hhhh",
            "last_name": "",
            "job_title": "",
            "email": "",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Customer",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "496",
            "name": "test test",
            "first_name": "test",
            "last_name": "test",
            "job_title": "test",
            "email": "ab@zaigoinfotech.com",
            "phone": "asdasd",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202112281859314962.png",
            "status": "Active",
            "user_type": "Admin",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "sdsds",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "494",
            "name": "Create contact test date installled ",
            "first_name": "Create contact test date installled",
            "last_name": "",
            "job_title": "",
            "email": "",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Customer",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "493",
            "name": "Tesla Customer ",
            "first_name": "Tesla Customer",
            "last_name": "",
            "job_title": "",
            "email": "",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Customer",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        }
    ],
    "users_links": "http://devapi-saas.zaicrm.com/z1/api/user/user?limit=10&type=users&cursor=eyJpZCI6IjQ5MyIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
    "contractors_links": "http://devapi-saas.zaicrm.com/z1/api/user/user?limit=10&type=contractors&cursor=eyJpZCI6IjQ5MyIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
}

Tenant Users Alone


URL given: http://devapi-saas.zaicrm.com/z1/api/user/user?type=users&limit=15



    {
    "message": "Lists! retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
        "users": [
            {
                "id": "766",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.wew45345@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202281147427662.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1895",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "kerala",
                    "country_name": "India",
                    "state_id": "kerala",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "765",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.123123123@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202281146187652.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1893",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "kerala",
                    "country_name": "India",
                    "state_id": "kerala",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "763",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.contratr123211@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202281130557632.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1891",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "kerala",
                    "country_name": "India",
                    "state_id": "kerala",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "762",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.contratr111@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202281123397622.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1890",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "kerala",
                    "country_name": "India",
                    "state_id": "kerala",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "761",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.contratr@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202281121277612.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1888",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "kerala",
                    "country_name": "India",
                    "state_id": "kerala",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "760",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.statename124@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202281113247602.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1886",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "kerala",
                    "country_name": "India",
                    "state_id": "kerala",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "759",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.statename12@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202251838497592.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1878",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "kerala",
                    "country_name": "India",
                    "state_id": "kerala",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "758",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.statename@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202251838147582.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": "",
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "757",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.state@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202251829177572.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1876",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "1",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            },
            {
                "id": "756",
                "name": "Naveen A",
                "first_name": "Naveen",
                "last_name": "A",
                "job_title": "",
                "email": "naveen.tenant@zaigoinfotech.com",
                "phone": "",
                "secondary_phone": "",
                "home_phone": "",
                "phone_number": "9008900989",
                "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202202251812207562.jpg",
                "status": "Active",
                "user_type": "Admin",
                "addresses": {
                    "id_address": "1874",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "1",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "",
                "service_type": "",
                "service_type_id": ""
            }
        ],
        "admin": {
            "count": "46",
            "id": "7"
        },
        "manager": {
            "count": "8",
            "id": "8"
        },
        "operator": {
            "count": "4",
            "id": "9"
        },
        "technician": {
            "count": "5",
            "id": "10"
        },
        "all_users": {
            "count": "70",
            "id": ""
        },
        "users_links": "http://devapi-saas.zaicrm.com/z1/api/user/user?limit=10&type=users&cursor=eyJpZCI6Ijc1NiIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
    }
}


Mobile Response

{
    "message": "Lists! retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "users": [
        {
            "id": "503",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdsssssssss132s@gmail.com",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1219",
                    "line_1": "Test",
                    "line_2": "",
                    "city": "chennai",
                    "zip_code": "781112",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                }

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1"
        },
        {
            "id": "502",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdssssssssss@gmail.com",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1217",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1"
        },
        {
            "id": "496",
            "name": "test test",
            "first_name": "test",
            "last_name": "test",
            "job_title": "test",
            "email": "ab@zaigoinfotech.com",
            "phone": "asdasd",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "http://devapi-saas.zaicrm.com/storage/app/contractors/fieldy_user__202112281859314962.png",
            "status": "Active",
            "user_type": "Admin",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "sdsds",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "489",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "naveen.ad@zaigoinfotech.com",
            "phone": "9894425810",
            "secondary_phone": "9894425810",
            "home_phone": "5765757657",
            "user_image": "",
            "status": "Inactive",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1073",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "452",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "",
            "phone": "9894425810",
            "secondary_phone": "9894425810",
            "home_phone": "5765757657",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1012",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "451",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "",
            "phone": "9894425810",
            "secondary_phone": "9894425810",
            "home_phone": "5765757657",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1010",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "450",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "",
            "phone": "9894425810",
            "secondary_phone": "9894425810",
            "home_phone": "5765757657",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "449",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "",
            "phone": "9894425810",
            "secondary_phone": "9894425810",
            "home_phone": "5765757657",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "448",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "",
            "phone": "9894425810",
            "secondary_phone": "9894425810",
            "home_phone": "5765757657",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        },
        {
            "id": "447",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "",
            "phone": "9894425810",
            "secondary_phone": "9894425810",
            "home_phone": "5765757657",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses": "",
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": ""
        }
    ],
    "admin": {
        "count": "2",
        "id": "8"
    },
    "manager": {
        "count": "2",
        "id": "8"
    },
    "operator": {
        "count": "1",
        "id": "9"
    },
    "technician": {
        "count": "2",
        "id": "10"
    },
    "all_users": {
        "count": "16",
        "id": ""
    },
    "users_links": "http://devapi-saas.zaicrm.com/z1/api/user/user?limit=10&type=users&cursor=eyJpZCI6IjQ0NyIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
}

Contractor Users Listing


URL given: http://devapi-saas.zaicrm.com/z1/api/user/user?type=contractors&limit=15


	{
    "message": "Lists! retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
        "contractors": [
            {
                "id": "653",
                "name": "Christelle Fahey",
                "first_name": "Christelle",
                "last_name": "Fahey",
                "job_title": "Cement Mason and Concrete Finisher",
                "email": "manuela96@example.com",
                "phone": "7916799978",
                "secondary_phone": "9728580868",
                "home_phone": "7026419258",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1799",
                    "line_1": "50784 Alexandro Drives Suite 604\nNorth Reedside, CA 51543-7091",
                    "line_2": "905 Antonietta Villages\nNew Herta, FL 52341-7773",
                    "city": "Lake Irwinshire",
                    "zip_code": "49086",
                    "state_name": "2",
                    "country_name": "India",
                    "state_id": "2",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Prof. Theo Schultz",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "3",
                "service_type": "",
                "service_type_id": "2",
                "contractor_company": null,
                "contractor_type": "Company Contractor"
            },
            {
                "id": "652",
                "name": "Luisa Kuhn",
                "first_name": "Luisa",
                "last_name": "Kuhn",
                "job_title": "Safety Engineer",
                "email": "dennis.conn@example.org",
                "phone": "1835767690",
                "secondary_phone": "4964792460",
                "home_phone": "0159447983",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1798",
                    "line_1": "5749 Streich Field Apt. 747\nAlexannefurt, GA 44527",
                    "line_2": "6943 Kamille Flat\nBraunborough, NY 27587-9326",
                    "city": "Satterfieldmouth",
                    "zip_code": "44995-8709",
                    "state_name": "2",
                    "country_name": "India",
                    "state_id": "2",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Maurine Heidenreich",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "2",
                "service_type": "",
                "service_type_id": "2",
                "contractor_company": "Michale Smitham",
                "contractor_type": "Company Contractor"
            },
            {
                "id": "651",
                "name": "Aryanna Watsica",
                "first_name": "Aryanna",
                "last_name": "Watsica",
                "job_title": "Screen Printing Machine Operator",
                "email": "vonrueden.thalia@example.com",
                "phone": "1465497102",
                "secondary_phone": "3366533693",
                "home_phone": "6032499619",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1797",
                    "line_1": "19250 Wilfredo Pass Apt. 813\nSouth Angie, MN 04494-0434",
                    "line_2": "81138 Wilkinson Port Apt. 512\nKriston, KS 68149-1679",
                    "city": "Addisonshire",
                    "zip_code": "35481-8520",
                    "state_name": "2",
                    "country_name": "India",
                    "state_id": "2",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Bret O'Hara",
                    "location_name": ""
                },
                "business_unit": "Velding",
                "business_unit_id": "6",
                "service_type": "",
                "service_type_id": "9",
                "contractor_company": "Company creation",
                "contractor_type": "Company Contractor"
            },
            {
                "id": "649",
                "name": "Helene Brekke",
                "first_name": "Helene",
                "last_name": "Brekke",
                "job_title": "Secretary",
                "email": "rbashirian@example.org",
                "phone": "1737336553",
                "secondary_phone": "1759344977",
                "home_phone": "1933546355",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1795",
                    "line_1": "4474 Moen Gateway\nEast Pasquale, VA 36410",
                    "line_2": "76362 Ena Flats\nSporershire, UT 20327-7532",
                    "city": "South Camrenside",
                    "zip_code": "15327-8872",
                    "state_name": "2",
                    "country_name": "South Africa",
                    "state_id": "2",
                    "country_id": "2",
                    "is_primary": "false",
                    "contact_person_name": "Carrie Schmidt",
                    "location_name": ""
                },
                "business_unit": "Velding",
                "business_unit_id": "6",
                "service_type": "",
                "service_type_id": "4",
                "contractor_company": "Eileen Ebert",
                "contractor_type": "Company Contractor"
            },
            {
                "id": "647",
                "name": "Trenton Lehner",
                "first_name": "Trenton",
                "last_name": "Lehner",
                "job_title": "Preschool Education Administrators",
                "email": "leanna87@example.org",
                "phone": "8381556384",
                "secondary_phone": "5701163657",
                "home_phone": "4161795257",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1793",
                    "line_1": "4476 Hills Forest\nNorth Yolandafort, WV 00760",
                    "line_2": "305 Quigley Corners\nGideonborough, NM 28223-8454",
                    "city": "North Scottyland",
                    "zip_code": "95588",
                    "state_name": "1",
                    "country_name": "South Africa",
                    "state_id": "1",
                    "country_id": "2",
                    "is_primary": "false",
                    "contact_person_name": "Rafael Mertz",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "5",
                "service_type": "",
                "service_type_id": "8",
                "contractor_company": "Samsaung",
                "contractor_type": "Company Contractor"
            },
            {
                "id": "646",
                "name": "Madonna Donnelly",
                "first_name": "Madonna",
                "last_name": "Donnelly",
                "job_title": "Claims Examiner",
                "email": "hlubowitz@example.com",
                "phone": "8179398109",
                "secondary_phone": "3481775685",
                "home_phone": "0771782671",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1792",
                    "line_1": "60223 O'Kon Vista\nSouth Meaghan, ND 28431-8330",
                    "line_2": "86132 Sanford Ramp\nLake Wallaceside, NH 77304",
                    "city": "North Tania",
                    "zip_code": "55912",
                    "state_name": "2",
                    "country_name": "South Africa",
                    "state_id": "2",
                    "country_id": "2",
                    "is_primary": "false",
                    "contact_person_name": "Jaeden Kuhic",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "8",
                "service_type": "",
                "service_type_id": "1",
                "contractor_company": null,
                "contractor_type": "Company Contractor"
            },
            {
                "id": "589",
                "name": "Deanna Labadie",
                "first_name": "Deanna",
                "last_name": "Labadie",
                "job_title": "Architectural Drafter OR Civil Drafter",
                "email": "kenton.fisher@example.org",
                "phone": "3069377064",
                "secondary_phone": "5409517967",
                "home_phone": "6910136207",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1529",
                    "line_1": "758 Beer Forks Apt. 797\nAbbottshire, MI 20722",
                    "line_2": "42828 Hodkiewicz Tunnel Suite 305\nNew Merrittchester, HI 07510",
                    "city": "New Carlottabury",
                    "zip_code": "26539",
                    "state_name": "2",
                    "country_name": "India",
                    "state_id": "2",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Dr. Mathew Wyman",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "8",
                "service_type": "",
                "service_type_id": "8",
                "contractor_company": null,
                "contractor_type": "Company Contractor"
            },
            {
                "id": "588",
                "name": "Antonette Flatley",
                "first_name": "Antonette",
                "last_name": "Flatley",
                "job_title": "Insurance Underwriter",
                "email": "pschowalter@example.org",
                "phone": "4067589430",
                "secondary_phone": "3426620723",
                "home_phone": "3699424672",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1528",
                    "line_1": "68077 Holly Green\nWest Dockview, WA 20606",
                    "line_2": "5673 Windler Haven Apt. 851\nPort Mollymouth, MD 15821",
                    "city": "West Shanyton",
                    "zip_code": "86265-1838",
                    "state_name": "1",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Jennyfer Wilderman",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "1",
                "service_type": "",
                "service_type_id": "1",
                "contractor_company": "Address Check",
                "contractor_type": "Company Contractor"
            },
            {
                "id": "587",
                "name": "Nat Schuppe",
                "first_name": "Nat",
                "last_name": "Schuppe",
                "job_title": "Loading Machine Operator",
                "email": "streich.kelley@example.net",
                "phone": "2072707423",
                "secondary_phone": "5085867959",
                "home_phone": "0014904000",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1527",
                    "line_1": "39406 Marvin Well Apt. 433\nSouth Kurtfurt, WA 82062-2387",
                    "line_2": "57257 Andres Route\nTreutelshire, AK 87033",
                    "city": "Camillechester",
                    "zip_code": "21104-3224",
                    "state_name": "2",
                    "country_name": "South Africa",
                    "state_id": "2",
                    "country_id": "2",
                    "is_primary": "false",
                    "contact_person_name": "Roscoe Kihn",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "1",
                "service_type": "",
                "service_type_id": "5",
                "contractor_company": null,
                "contractor_type": "Company Contractor"
            },
            {
                "id": "585",
                "name": "Henriette Bins",
                "first_name": "Henriette",
                "last_name": "Bins",
                "job_title": "Paste-Up Worker",
                "email": "aditya29@example.com",
                "phone": "3128013310",
                "secondary_phone": "6487025056",
                "home_phone": "0954228641",
                "phone_number": "",
                "user_image": "",
                "status": "Active",
                "user_type": "Contractor",
                "addresses": {
                    "id_address": "1525",
                    "line_1": "21495 Becker Inlet\nKobetown, MT 53603",
                    "line_2": "4932 Boyer Ways\nSouth Wymanchester, IN 67444-7969",
                    "city": "New Anita",
                    "zip_code": "60776-6736",
                    "state_name": "2",
                    "country_name": "South Africa",
                    "state_id": "2",
                    "country_id": "2",
                    "is_primary": "false",
                    "contact_person_name": "Prof. Annetta Von MD",
                    "location_name": ""
                },
                "business_unit": "",
                "business_unit_id": "8",
                "service_type": "",
                "service_type_id": "4",
                "contractor_company": "Company creation",
                "contractor_type": "Company Contractor"
            }
        ],
        "contractors_links": "http://devapi-saas.zaicrm.com/z1/api/user/user?limit=10&type=contractors&cursor=eyJpZCI6IjU4NSIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
    }
}

Mobile Response

	{
    "message": "Lists! retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "contractors": [
        {
            "id": "501",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdsssssss@gmail.com",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1215",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "500",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdsssss@gmail.com",
            "phone": "asdasd",
            "secondary_phone": "s",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1213",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "499",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasdss@gmail.com",
            "phone": "",
            "secondary_phone": "9894425810",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1211",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },
            "business_unit": "",
            "business_unit_id": "1",
            "service_type": "",
            "service_type_id": "1",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "498",
            "name": "Naveen A",
            "first_name": "Naveen",
            "last_name": "A",
            "job_title": "",
            "email": "sadasd@gmail.com",
            "phone": "",
            "secondary_phone": "9894425810",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Admin",
            "addresses":
                {
                    "id_address": "1209",
                    "line_1": "9a sapna trade ceter/9th floor",
                    "line_2": "Poonamalle high road",
                    "city": "chennai",
                    "zip_code": "600084",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen A",
                    "location_name": ""
                },

            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": "",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        },
        {
            "id": "21",
            "name": "Fieldy Tenant 1 contractor",
            "first_name": "",
            "last_name": "",
            "job_title": "",
            "email": "contractor@fieldy.co",
            "phone": "",
            "secondary_phone": "",
            "home_phone": "",
            "user_image": "",
            "status": "Active",
            "user_type": "Contractor",
            "addresses":
                {
                    "id_address": "101",
                    "line_1": "Chennai",
                    "line_2": "Chennai",
                    "city": "chennai",
                    "zip_code": "670111",
                    "state_name": "Tamil Nadu",
                    "country_name": "India",
                    "state_id": "1",
                    "country_id": "1",
                    "is_primary": "false",
                    "contact_person_name": "Naveen",
                    "location_name": "Home"
                },
            "business_unit": "",
            "business_unit_id": "",
            "service_type": "",
            "service_type_id": "",
            "contractor_company": "",
            "contractor_type": "Individual Contractor"
        }
    ],
    "contractors_links": ""
}

Contractor Users With Filters


URL given: http://devapi-saas.zaicrm.com/z1/api/user/user?type=contractors&limit=15&filters=%5B%5B%22id_customer_group%22,%22=%22,7%5D,%5B%22business_unit_id%22,%22=%22,11%5D%5D


	{
		"message": "Lists! Retrieved successfully",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {
			"contractors": [
				{
					"id": "15",
					"name": "Trisha Krishnan",
					"first_name": "Trisha",
					"last_name": "Krishnan",
					"email": "prooro@krishnan.com",
					"phone": "",
					"secondary_phone": "",
					"home_phone": "",
					"user_image": "http://devapi-saas.zaicrm.com/public//public/img/user_default.png",
					"status": "Active",
					"user_type": "Contractor",
					"addresses": "",
					"business_unit": "Velding",
					"business_unit_id": "11",
					"contractor_company": "Zaigo",
					"contractor_type": "Company Contractor"
				}
			],
			"contractors_links": null
		}
	}

Contractor Users filter mismatch


URL given: http://devapi-saas.zaicrm.com/z1/api/user/user?type=contractors&limit=15&filters=%5B%5B%22role_id%22,%22=%22,1%5D%5D


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"filters": {
				"message": "Allowed filter columns are id_customer_group,business_unit_id"
			}
		}
	}

Tenant Users filter mismatch


URL given: http://devapi-saas.zaicrm.com/z1/api/user/user?type=users&limit=15&filters=%5B%5B%22id_customer_group%22,%22=%22,7%5D,%5B%22business_unit_id%22,%22=%22,11%5D%5D


{
	"message": "Bad Request.",
	"status": "bad_request",
	"code": 400,
	"language": "en",
	"data": {
		"filters": {
			"message": "Allowed filter columns are role_id"
		}
	}
}

Task Creation


Method: POST
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/task
_token * Bearer Token: "token" Pass it in header as all other request
title * Required and it should be minimum of length 3 characters and maximum should not beyond 40 characters. [required,min:3,max:40] User API - Fieldy
priority Nullable or it should be any of these items, (low, medium, high, emergency) [nullable,in:low,medium,high,emergency] low
due_date * Required and it should be in date format of "Y-m-d" it may be today or future ['required','date_format:Y-m-d','after_or_equal:today'] 2021-03-24
due_time * Required and it should be in time format of "h:i A" it should be after one minute or future and not past. ['required','date_format:h:i A','after:oneminute'] 02:37 PM
notify_by Nullable or it should be any of these options ('by_event', '10min', '30min', '1hr', '1day', 'custom') ['nullable','in:by_event,10min,30min,1hr,1day,custom'] by_event
notify_by_custom (conditional required) * required only if notify_by field selected as custom and it should be a date time format of Y-m-d h:i A and it should before task due time and after now. ['required','date','date_format:Y-m-d h:i A','before:(task due date time)|after:(current time)'] by_event
description Nullable of if they input anything it should be minimum of 8 characters and maximum of 250 characters. It is not finalised yet. nullable|min:8|max:250 This task is to remind api team about incomplete apis.
assign_to * required and it should be either self or others ['required','in:self,others'] others
assigned_to (conditional required) * required only if assign_to field sets to others and it should be any valid users in json array format. ['required','json', 'some users related logic, like they should belongs to tenant and active users.'] ["1","8"]


Bit About notify_by select field and its usages.

S.No Value Actual Action
1 by_event It will remind the user when the task due occurs.
2 10min It will remind the user 10 minutes before task due time.
3 30min It will remind the user 30 minutes before task due time.
4 1hr It will remind the user 1 hour before task due occurs
5 1day It will remind the user 1 day before task due occurs
6 custom It will asks input the datetime of the user specific date time in a format of 'Y-m-d h:i A'

Task Created!


If Task Created this is the success response which is expected.

Provided Inputs

title: Test Task
due_date:2021-03-24
due_time:02:45 PM
assign_to:others
assigned_to:["8"]
notify_by:custom
notify_by_custom:2021-03-24 01:40 PM

Note: While submitting this input time is 12:50 PM


	{
		"message": "Task Created Successfully",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {}
	}

Empty Request


If Empty request has been sent,like without required inputs.


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"title": {
				"message": "Please provide a suitable title to the task"
			},
			"due_date": {
				"message": "Please Specify Due Date for this task"
			},
			"assign_to": {
				"message": "Please specify Assign to in a specific option"
			},
			"due_time": {
				"message": "Please provide task due time"
			}
		}
	}

In-Valid Task Creation Input for reminder greater than task due time.


Provided Inputs

title:Test Task
due_date:2021-03-24
due_time:02:30 PM
assign_to:others
assigned_to:["8"]
notify_by:custom
notify_by_custom:2021-04-24 02:31 PM


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"notify_by_custom": {
				"message": "Please provide valid date and time to remind you, date and time should be before task due time"
			}
		}
	}

While Developing, focused on task reminders should not marked as past and after task due time etc., If We missed anything, please let us know.

Task Listing by Statuses


Method: GET
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/task
_token * Bearer Token: "token" Pass it in header as all other request
title * Required and it should be minimum of length 3 characters and maximum should not beyond 40 characters. [required,min:3,max:40] User API - Fieldy
user Should give us the user id so that it will retrieve the task lists which are related to user. If this param missed, system will respond with the tasks which are related to the logged in user. [checks if given id user is existing in db, and it should be active,belongs to same tenant.] 1
Note: if user params is not present, system will provide the tasks which are related to current logged in user. (Tasks which are created by user or if user exist in any of the tasks assigned.)


Task Lists Retrieved!


If Task Created this is the success response which is expected.

Provided Inputs

user: 1
URL:http://devapi-saas.zaicrm.com/z1/api/user/task?user=1


	{
		"message": "Lists! Retrieved successfully",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {
			"open": {
				"in_progress": [],
				"not_started": [
					{
						"id": "1",
						"title": "Test Task",
						"description": null,
						"priority": "Low",
						"remind_at": "1hr",
						"due": "03/19/2021 11:05 PM",
						"status": "Open",
						"task_completed_by": "",
						"created_at": "03/19/2021 09:28 PM",
						"task_users": [
							{
								"assigned_by": "Zaigo Infotech",
								"assigned_at": "03/19/2021 09:28 PM",
								"assigned_user_name": "Bala Muruga",
								"assigned_user_email": "blmuruga6@gmail.com",
								"assigned_user_image": "http://devapi-saas.zaicrm.com/public//storage/app/user/8",
								"assigned_user_id": "8"
							}
						]
					},
					{
						"id": "2",
						"title": "Test Task",
						"description": null,
						"priority": "Low",
						"remind_at": "10min",
						"due": "03/22/2021 01:38 PM",
						"status": "Open",
						"task_completed_by": "",
						"created_at": "03/22/2021 01:27 PM",
						"task_users": [
							{
								"assigned_by": "Zaigo Infotech",
								"assigned_at": "03/22/2021 01:27 PM",
								"assigned_user_name": "Bala Muruga",
								"assigned_user_email": "blmuruga6@gmail.com",
								"assigned_user_image": "http://devapi-saas.zaicrm.com/public//storage/app/user/8",
								"assigned_user_id": "8"
							}
						]
					},
					{
						"id": "4",
						"title": "Test Task",
						"description": null,
						"priority": "Low",
						"remind_at": "custom",
						"due": "03/24/2021 02:45 PM",
						"status": "Open",
						"task_completed_by": "",
						"created_at": "03/24/2021 12:44 PM",
						"task_users": [
							{
								"assigned_by": "Zaigo Infotech",
								"assigned_at": "03/24/2021 12:44 PM",
								"assigned_user_name": "Bala Muruga",
								"assigned_user_email": "blmuruga6@gmail.com",
								"assigned_user_image": "http://devapi-saas.zaicrm.com/public//storage/app/user/8",
								"assigned_user_id": "8"
							}
						]
					}
				]
			},
			"today": {
				"not_started": [
					{
						"id": "4",
						"title": "Test Task",
						"description": null,
						"priority": "Low",
						"remind_at": "custom",
						"due": "03/24/2021 02:45 PM",
						"status": "Open",
						"task_completed_by": "",
						"created_at": "03/24/2021 12:44 PM",
						"task_users": [
							{
								"assigned_by": "Zaigo Infotech",
								"assigned_at": "03/24/2021 12:44 PM",
								"assigned_user_name": "Bala Muruga",
								"assigned_user_email": "blmuruga6@gmail.com",
								"assigned_user_image": "http://devapi-saas.zaicrm.com/public//storage/app/user/8",
								"assigned_user_id": "8"
							}
						]
					}
				],
				"in_progress": [],
				"completed": [],
				"cancelled": []
			},
			"week": {
				"not_started": [
					{
						"id": "2",
						"title": "Test Task",
						"description": null,
						"priority": "Low",
						"remind_at": "10min",
						"due": "03/22/2021 01:38 PM",
						"status": "Open",
						"task_completed_by": "",
						"created_at": "03/22/2021 01:27 PM",
						"task_users": [
							{
								"assigned_by": "Zaigo Infotech",
								"assigned_at": "03/22/2021 01:27 PM",
								"assigned_user_name": "Bala Muruga",
								"assigned_user_email": "blmuruga6@gmail.com",
								"assigned_user_image": "http://devapi-saas.zaicrm.com/public//storage/app/user/8",
								"assigned_user_id": "8"
							}
						]
					},
					{
						"id": "4",
						"title": "Test Task",
						"description": null,
						"priority": "Low",
						"remind_at": "custom",
						"due": "03/24/2021 02:45 PM",
						"status": "Open",
						"task_completed_by": "",
						"created_at": "03/24/2021 12:44 PM",
						"task_users": [
							{
								"assigned_by": "Zaigo Infotech",
								"assigned_at": "03/24/2021 12:44 PM",
								"assigned_user_name": "Bala Muruga",
								"assigned_user_email": "blmuruga6@gmail.com",
								"assigned_user_image": "http://devapi-saas.zaicrm.com/public//storage/app/user/8",
								"assigned_user_id": "8"
							}
						]
					}
				],
				"in_progress": [],
				"completed": [],
				"cancelled": []
			},
			"overdue": {
				"not_started": [
					{
						"id": "1",
						"title": "Test Task",
						"description": null,
						"priority": "Low",
						"remind_at": "1hr",
						"due": "03/19/2021 11:05 PM",
						"status": "Open",
						"task_completed_by": "",
						"created_at": "03/19/2021 09:28 PM",
						"task_users": [
							{
								"assigned_by": "Zaigo Infotech",
								"assigned_at": "03/19/2021 09:28 PM",
								"assigned_user_name": "Bala Muruga",
								"assigned_user_email": "blmuruga6@gmail.com",
								"assigned_user_image": "http://devapi-saas.zaicrm.com/public//storage/app/user/8",
								"assigned_user_id": "8"
							}
						]
					},
					{
						"id": "2",
						"title": "Test Task",
						"description": null,
						"priority": "Low",
						"remind_at": "10min",
						"due": "03/22/2021 01:38 PM",
						"status": "Open",
						"task_completed_by": "",
						"created_at": "03/22/2021 01:27 PM",
						"task_users": [
							{
								"assigned_by": "Zaigo Infotech",
								"assigned_at": "03/22/2021 01:27 PM",
								"assigned_user_name": "Bala Muruga",
								"assigned_user_email": "blmuruga6@gmail.com",
								"assigned_user_image": "http://devapi-saas.zaicrm.com/public//storage/app/user/8",
								"assigned_user_id": "8"
							}
						]
					}
				],
				"in_progress": []
			},
			"completed": []
		}
	}

Note: Listing is splitted into various array of objects based on several criterias such as Open, Due Today, Due this Week, Over Due, Completed So For each and every object inside deals with this criteria. All are objects which contains nested array of object properties, Except completed criteria, as we cannot split any of sub criterias for completed, we give it as a straight array of objects.

Invalid User ID


Provided Inputs

user: 00
URL:http://devapi-saas.zaicrm.com/z1/api/user/task?user=00


	{
		"message": "Invalid user information provided",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {}
	}

User is Inactive


Provided Inputs

user: 8
URL:http://devapi-saas.zaicrm.com/z1/api/user/task?user=8


	{
		"message": "User is inactive",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {}
	}

If Cross Tenant Requested.


Quick Note: This will happens if Tenant A user is requesting task information of Tenant B user's.

Provided Inputs

user: 25
due_date:2021-03-24
URL:http://devapi-saas.zaicrm.com/z1/api/user/task?user=8


	{
		"message": "Sorry! You are not authorized to view this record",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {}
	}

Contractor Company Listing API


Method: GET
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/contractor?page=1
_token * Bearer Token: "token" Pass it in header as all other request


Contractor Company Retrieved!


Provided Inputs

URL:http://devapi-saas.zaicrm.com/z1/api/user/contractor?page=1


{
    "message": "Contractor listed successfully.",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": [
        {
            "id_customer_group": "32",
            "company_name": "activity edited"
        },
        {
            "id_customer_group": "33",
            "company_name": "activity edited"
        },
        {
            "id_customer_group": "55",
            "company_name": "asc"
        },
        {
            "id_customer_group": "82",
            "company_name": "Tenant One Company"
        },
        {
            "id_customer_group": "83",
            "company_name": "aa"
        },
        {
            "id_customer_group": "84",
            "company_name": "Test Company"
        },
        {
            "id_customer_group": "85",
            "company_name": "test"
        },
        {
            "id_customer_group": "86",
            "company_name": "act"
        },
        {
            "id_customer_group": "87",
            "company_name": "test"
        },
        {
            "id_customer_group": "142",
            "company_name": "partha"
        },
        {
            "id_customer_group": "143",
            "company_name": "partha"
        },
        {
            "id_customer_group": "144",
            "company_name": "partha s"
        }
    ]
}

Team Creation


Method: POST
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/team
_token * Bearer Token: "token" Pass it in header as all other request
name * Required and it should be a alpha numeric characters which accepts dash and underscores along with it should be minimum of length 3 characters and maximum should not beyond 25 characters. [required,min:3,max:3,alpha_dash (regex:'/^[\pL\pM\pN_-]+$/u' for alpha_dash)] Dev_team
image_type * Required and it should be either image or color_logo (Please pass image if they are gonna upload image and color_logo if they are going to choose color and icon for their team.) [required,in:image,color_logo] image
image If they choose image in image_type and they may opt to choose without uploading image we are not make this as required field. If image uploaded it should be a type of jpg,jpeg,png and it should not greater than 2MB in size. nullable,mimes:jpg,jpeg,png|max:2048 -
team_color * Required only if they choose color_logo in image_type and they need to input valid color codes in any of these formats HEX, rgb, rgba, hsl and hsla ['required','regex:/^(#(?:[0-9a-f]{2}){2,4}|#[0-9a-f]{3}|(?:rgba?|hsla?)\((?:\d+%?(?:deg|rad|grad|turn)?(?:,|\s)+){2,3}[\s\/]*[\d\.]+%?\))$/i'] #fff,#ffffff,rgb(242, 13, 13),hsl(0, 90%, 50%)
team_icon * Required only if they choose color_logo in image_type and they need to input icon identifer of minimum 3 characters and maximum 25 characters. required|min:3|max:25 fas-fa-user
members Not required, Team can be created without members and later they can add it. it should be a valid json array and it should not be empty and it should not contains js object. nullable, Member ["8","1"]
notes Nullable, It is not required, but if input cames in it should be of minimum of 3 characters and maximum of 120 characters long. ['nullable','min:3','max:120'] Team is for those who are accepting their mistakes and move forward to correct it

Team Created!


If Team Created this is the success response which is expected.


	{
		"message": "Team Created successfully.",
		"status": "success",
		"code": 200,
		"language": "en",
		"data": {}
	}

Empty Request


If Empty request has been sent,like without required inputs.


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"name": {Members Validation
				"message": "Team name is required"
			},
			"image_type": {
				"message": "Please select how you are going to display your team infront - Select only preferred image types"
			}
		}
	}

Invalid inputs for required params


Provided Inputs

Name: dssdfsdfklsdflkjsdfkljsdfklsdfjsdjfsdlkfsdfkljsdlfjsdlfsdfklsdfjklsdkljdsfjkldsff
image_type:rest


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "name": {
            "message": "Team name should not greater than maximum of 25 characters"
        },
        "image_type": {
            "message": "Select only preferred image types given"
        }
    }
}

Some optional validations


Provided Inputs

Name: sriramteam
image_type:image
image:some video file


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "image": {
            "message": "The image failed to upload."
        }
    }
}

Team icon color validation


Provided Inputs

Name: sriramteam
image_type:color_logo


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"team_color": {
				"message": "Team Color is required"
			},
			"team_icon": {
				"message": "Please provide valid team icon"
			}
		}
	}

Some optional validations


Provided Inputs

Name: sriramteam
image_type:color_logo
team_color:black
team_icon:sd


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"team_color": {
				"message": "Please input your values in HEX, rgb, rgba, hsl and hsla"
			},
			"team_icon": {
				"message": "Team icon should not be lesser than 3 characters"
			}
		}
	}

Empty Members


Note: If We need to skip members means please ignore or leave empty in value in members. Example: (members: ) leaves empty.

Provided Inputs

Name: sriramteam
image_type:color_logo
team_color:#ffffff
team_icon:fas-fa-user
members:[]


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "members": {
            "message": "Please send valid sequential user information in described type"
        }
    }
}

Invalid User ID


Note: This also includes if they are trying to insert inactive user also.

Provided Inputs

Name: sriramteam
image_type:color_logo
team_color:#ffffff
team_icon:fas-fa-user
members:["8","1","1000","1001","1002"]

Let's assume "1000","1001","1002" user id is not available in our records, let's see what we are getting. It will send you response with the invalid information present in array with comma seperated.


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"members": {
				"message": "3,4,5  Elements input are not valid users"
			}
		}
	}

Error in Backend Server - 500


If all inputs are satisfied, but if there is any issue in backend means it will send respond like below.


	{
		"message": "Sorry! Unable to Create Team",
		"status": "failure",
		"code": 500,
		"language": "en",
		"data": {}
	}

Reset Password


Method: POST

Note * : If any tenant have multi account then it will reset all password related too that origin.

Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/passwordreset OR http://qaapigateway-saas.zaicrm.com/z1/api/user/passwordreset
email * Email must be already registered with us ['required'] admin@fieldy.co
reseturl * Tenant Origin(Domain) url for send reset redirect link. If user requesting password reset from mobile app then no need to send this input. ['required|url'] http://devapi-saas.zaicrm.com
origin * Tenant Origin(Domain) url ['required|url'] http://tenant1.zaicrm.com

Notes

If you submit the input by the above requirement the Reset Link will be Shared to the registered email. reset url is send to email and redirect to the reset screen page

Notes Mobile *

If you submit the input by the above required field from mobile app then Reset code will be Shared to the registered email. OTP Code is send to email and use it on reset screen page of mobile app.



Provided Inputs

API-URL : http://devapi-saas.zaicrm.com/z1/api/user/passwordreset

email : naveen.a@zaigoinfotech.com

reseturl : http://devapi-saas.zaicrm.com


{
    "message": "We have emailed your password reset link!",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
        "encrypted_id": null,
        "name": "Naveen Navi",
        "email": "naveen.a@zaigoinfotech.com"
    }
}

Empty Request



{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "email": {
            "message": "This field is required."
        },
        "reseturl": {
            "message": "This field is required."
        }
    }
}

Invalid Request-1


Provided Inputs

email : test@gmail.com

reseturl : http://devapi-saas.zaicrm.com/z1/api/user/passwordresetupdate


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "user": "We can't find a user with that email address."
    }
}

Invalid Request-2


Provided Inputs

email : test@gmail.com

reseturl : http://


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "reseturl": {
            "message": "The reseturl format is invalid."
        }
    }
}

Invalid Request-3


Notes: Without provided any input


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "email": {
            "message": "This field is required."
        },
        "reseturl": {
            "message": "This field is required."
        }
    }
}

Invalid Request-4


Notes: Origin as invalid


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "origin": {
            "message": "The origin format is invalid."
        }
    }
}

All invalid Response



{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "email": {
            "message": "This e-mail is required."
        },
        "reseturl": {
            "message": "This reseturl is required."
        },
        "origin": {
            "message": "This origin is required."
        },
        "email": {
            "message": "The e-mail must be a valid email address."
        },
        "reseturl": {
            "message": "The reseturl format is invalid."
        },
        "origin": {
            "message": "The origin format is invalid."
        }
    }
}

    1. If Email doesn't match
{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "user": "We can't find a user with that email address."
    }

}

    2. if provide invalid origin or reset url

    {
    "message": "Unauthorized",
    "status": "unauthorized",
    "code": 401,
    "language": "en",
    "data": {
        "message": "Sorry! invalid information given"
    }
}

Update Password


Method: POST
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/passwordresetupdate OR http://qaapigateway-saas.zaicrm.com/z1/api/user/passwordresetupdate
password * Password must contain one lower case letter and one upper case letter and one number ['required','regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/','min:8','max:15'] Fieldy@123
password_confirmation * Confirmariom should be match with password ['confirmed'] Fieldy@123
token * The token will be shared on your email when the password reset api trigger. The token will be auto generated by framework itself ['required|string'] anFmYrJidwceiQDRAir55Q73lCRZnFrnmLpueTjYzuoir3nQBkiOBTJeoICc
otp_code * This is required when we request from mobile app version. The OTP Code will be shared on your email when the password reset api trigger from Mobile APP. The OTP Code will be auto generated by framework itself ['required|string'] 4354

Notes

The token will be shared on your email when the password reset api trigger. The token will be auto generated by framework itself.The token will be expire after 60 seconds.


Notes Mobile *

If you submit the input by the above required field from mobile app then Reset code will be Shared to the registered email. OTP Code is send to email and use it on reset screen page of mobile app..The OTP Code will be expire after 60 seconds.


Provided Inputs

API-URL : http://devapi-saas.zaicrm.com/z1/api/user/passwordresetupdate

email : naveen.a@zaigoinfotech.com

password : Fieldy@123

password_confirmation : Fieldy@123

token : anFmYrJidwceiQDRAir55Q73lCRZnFrnmLpueTjYzuoir3nQBkiOBTJeoICc

OR If Mobile

otp_code : 3453

Note

Use accees_token and domain for redirect to the dashboard after password has been reseted


{
    "message": "Your password has been reset!",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
        "encrypted_id": null,
        "name": "Naveen A",
        "email": "naveen.a@zaigoinfotech.com",
        "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL3phaXNlcnZlLWFwaS1zYWFzXC96MVwvYXBpXC91c2VyXC9wYXNzd29yZHJlc2V0dXBkYXRlIiwiaWF0IjoxNjI0NjIzMDU4LCJleHAiOjE2MjQ2MjY2NTgsIm5iZiI6MTYyNDYyMzA1OCwianRpIjoiclVGQXhqMkRranhxMDlsZyIsInN1YiI6IjQ5IiwicHJ2IjoiZmFjZTYzMzkwYzc2ZmUwMjBhYjUyNGE0YjM0MzJiNDAzNThlZTdlMiIsImlzU3VwZXJBZG1pbkxvZ2dlZEluIjpmYWxzZSwiZGVzY2VuZGFudFJvbGVVc2VycyI6WyI0OSJdfQ.unauQOcvzT_McAZKSlub3wk44ViaY8GTi1g3RZ24qrQ",
        "domain": "http://tenant1.zaicrm.com"
    }
}

Empty Request



{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "password": {
            "message": "This field is required."
        },
        "token": {
            "message": "This field is required."
        },
	"otp_code": {
            "message": "This field is required."
        }
    }
}

Invalid Request-1


Provided Inputs

password : fieldy

token : bV7l8M7FZvvtzFToLAzQNZvmsH8zNZhSGwRpwgL8DQdXzAsXMpMPge04qVrl


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "password": {
            "message": "The password must at least one UPPERCASE / lowercase, and number."
        }
    }
}

Invalid Request-2


Provided Inputs

password : Fieldy123

token : bV7l8M7FZvvtzFToLAzQNZvmsH8zNZhSGwRpwgL8DQdXzAsXMpMPge04qVrl


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "password": {
            "message": "Password should match with confirm password."
        }
    }
}

Invalid Request-3


Provided Inputs

password : Fieldy123

token : abcdefgh

password_confirmation : Fieldy123


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "user": "This password reset token is invalid."
    }
}

All Invalid Response



{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "password": {
            "message": "This password is required."
        },
        "token": {
            "message": "This token is required."
        },
	"otp_code": {
            "message": "This OTP Code is required."
        },
        "password": {
            "message": "Password should match with confirm password."
        },
        "password": {
            "message": "The password must at least one UPPERCASE / lowercase, and number."
        },
        "password": {
            "message": "Enter minimum 8 characters."
        }
    }
}

    1. If reset token is invalid

    {
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "token": "This password reset token is invalid."
    }
}

Verify OTP


Method: POST
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/verifyOTP
OR
http://qaapigateway-saas.zaicrm.com/z1/api/user/verifyOTP
email * The email field is required which one have been provided to reset password. ['required|string'] abc@gmail.com
otp_code * This is required when we request from mobile app version. The OTP Code have been shared on your email when the password reset api trigger from Mobile APP. The OTP Code will be auto generated by framework itself ['required|string'] 4354

	{
		"message": "passwords.tokenVerified",
		"status": "success",
		"code": 200,
		"language": "en",
		"token": "2497"
	}

Empty Request



{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "email": {
			"message": "This e-mail is required."
		},
		"email": {
			"message": "The e-mail must be a valid email address."
		},
		"otp_code": {
			"message": "This otp code is required."
		},
		"otp_code": {
			"message": "This otp code has been expired."
		}
    }
}

API Description


Method: POST
Field * required Validations Testing Inputs
URL http://devapigateway-saas.zaicrm.com/z1/api/user/logout OR http://qaapigateway-saas.zaicrm.com/z1/api/user/logout
__token Token is required, Please send this via authorization header. {{ JSON TOKEN }}

Success Response


					
						{
							"message": "User logged out successfully",
							"status": "success",
							"code": 200,
							"language": "en",
							"data": []
						}
					
					

Invalid Response


Note: 205 Status code indicates that the user-agent to reset the document which sent this request.

Reference 1: About 205

Reference 2: Why 205?

										
											{
												"message": "User is logged out already",
												"status": "success",
												"code": 205,
												"language": "en",
												"data": []
											}
										
										

Reset Password


Method: POST

Note *

Field * required Validations Rule Testing Inputs
URL http://qaapigateway-saas.zaicrm.com/z1/api/user/changepassword
password * ['required'] min- 8 max-15,should be mixed character - lowercase ,uppercase,specialchracter
password_confirmation * ['required'] min- 8 max-15,should be mixed character - lowercase ,uppercase,specialchracter


Provided Inputs

API-URL : http://devapi-saas.zaicrm.com/z1/api/user/passwordreset

password : Zaiserve@123

password_confirmation : Zaiserve@123


{
    "message": "Your password have been changed successfully!",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": []
}