Validation Rules

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

Login API


Method : POST

Field * required Validations Rule Testing Inputs
device * If any API request happening from mobile then an additional header is required for mobile compatible responses. string mobile
* Note:- Login and further any other requests for mobile compatible responses mobile team will need to send additional header allways.
URL

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

OR

http://qaapigateway-saas.zaicrm.com/z1/api/user/login

- -
login * This must be a email field This field must be email format admin@zaigoinfotech.com
origin * It must be tenant URL or main URL - http://zaicrm.com
password * It must be password of the user given Password must be the minimum of 8 characters Admin@123
tenant_id Optional If user have an multiple account if they want to login directly on particular tenant need to pass tenant id. in this param. You will get tenant id from response 2
language Optional Used for change a response message language. Available types - en,fr,ta . Default one is english en

Multi Account :
Email : admin@zaigoinfotech.com
Password : Zaiserve@123

Single Account :
Email : gavaskar@zaigoinfotech.com
Password : Zaiserve@123

Description

If the origin on the API request is "http://zaicrm.com" or "http://localhost:3001" will send the response as it for "multi_account",

On the login API send origin as part of request similar to below for both MAIN URL & TENANT URL
{ login: "admin@zaigoinfotech.com", password: "", origin: "http://zaicrm.com"}

If it is Multiple Account Response | Code-200


{
 "message": "We have found mutliple accounts for you",
 "status": "multi_account",
 "code": 200,
 "language": "en",
 "data": [
   {
     "id_tenant": "4",
     "name": "Zaigo Infotech",
     "image": "http://devapi-saas.zaicrm.com/public/img/user_default.png",
     "domain": "http://localhost:3000/"
   },
   {
     "id_tenant": "8",
     "name": "Zaiserve APP",
     "image": "http://devapi-saas.zaicrm.com/public/img/user_default.png",
     "domain": "http://devapp-saas.zaicrm.com/"
   },
 ]
}

After the above have to send tenant_id along with login, password

If the user has "single_account" set the status has "single_account" and send the account url in response with access token & salt on the response.

If it is Single Account Response | Code-200


{
 "message": "User logged in successfully.",
 "status": "single_account",
 "code": 200,
 "language": "en",
 "data": {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC84MC4yMTEuMjMzLjEyMVwvemFpY3JtX3NhYXNcL3oxXC9hcGlcL3VzZXJcL2xvZ2luIiwiaWF0IjoxNjE0MzI5MjUzLCJleHAiOjE2MTQ5MzQwNTMsIm5iZiI6MTYxNDMyOTI1MywianRpIjoidWk5MEhncW1wa1FUSHZZciIsInN1YiI6MSwicHJ2IjoiZmFjZTYzMzkwYzc2ZmUwMjBhYjUyNGE0YjM0MzJiNDAzNThlZTdlMiIsImlzU3VwZXJBZG1pbkxvZ2dlZEluIjp0cnVlLCJkZXNjZW5kYW50Um9sZVVzZXJzIjpbXX0.uJhp__5KtJXyopVhSfw18eyrKLxVrEVSaMOsEAz-XkY",
    "token_type": "bearer",
    "expires_in": "10080",
    "salt": "$2y$10$SUFF5ZchVgPR5jF9SDVoJuI/RpiukO5e9MviKiJtzdyPkGlnMwkOq",
    "user_details": {
        "id": "1",
        "name": "zaigo",
        "email": "admin@zaigoinfotech.com",
        "image": "http://devapi-saas.zaicrm.com/storage/app/user/user_190.png",
        "domain": "http://devapp-saas.zaicrm.com/",
		"user_type": "Admin",
		"tenant_country": {
			"id": 1,
			"name": "india"
		}
    }
 }
}

If the origin is not from "http://zaicrm.com" or "http://localhost:3001" we will validate the email, password & user has access for the domain(tenant) and send the token & salt in response.

Success Response | Code-200


{
 "message": "User logged in successfully.",
 "status": "success",
 "code": 200,
 "language": "en",
 "data": {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC84MC4yMTEuMjMzLjEyMVwvemFpY3JtX3NhYXNcL3oxXC9hcGlcL3VzZXJcL2xvZ2luIiwiaWF0IjoxNjE0MzI5MjUzLCJleHAiOjE2MTQ5MzQwNTMsIm5iZiI6MTYxNDMyOTI1MywianRpIjoidWk5MEhncW1wa1FUSHZZciIsInN1YiI6MSwicHJ2IjoiZmFjZTYzMzkwYzc2ZmUwMjBhYjUyNGE0YjM0MzJiNDAzNThlZTdlMiIsImlzU3VwZXJBZG1pbkxvZ2dlZEluIjp0cnVlLCJkZXNjZW5kYW50Um9sZVVzZXJzIjpbXX0.uJhp__5KtJXyopVhSfw18eyrKLxVrEVSaMOsEAz-XkY",
    "token_type": "bearer",
    "expires_in": "10080",
    "salt": "$2y$10$SUFF5ZchVgPR5jF9SDVoJuI/RpiukO5e9MviKiJtzdyPkGlnMwkOq",
    "user_details": {
        "id": "1",
        "name": "zaigo",
        "email": "admin@zaigoinfotech.com",
        "image": "http://devapi-saas.zaicrm.com/storage/app/user/user_189.png"
    }
 }
}

Unauthorised Response | Code-401

If user gives wrong tenant information


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

Failure Validation Response | Code-400


1. If email and password not entered
{
  "message": "Bad Request.",
  "status": "bad_request",
  "code": 400,
  "language": "en",
  "data": {
     "login": {
        "message": "This field is required."
     },
     "password": {
        "message": "This field is required."
     }
  }
}

2. Password min Validation

{
  "message": "Bad Request.",
  "status": "bad_request",
  "code": 400,
  "language": "en",
  "data": {
     "password": {
        "message": "Enter minimum 8 characters."
     }
  }
}

Unauthorised Validation Response | Code-401


1. Login Attempt - More than 3 times
{
  "message": "Bad Request.",
  "status": "unauthorized",
  "code": 401,
  "language": "en",
  "data": {
      "status": "Your account is locked due to 3 failed login attempts. Lock will be released in 60 seconds."
  }
}

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."
  }
}

All Invalid Response


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "login": {
            "message": "Enter Your Email"
        },
        "login": {
            "message": "Invalid Email"
        },
        "origin": {
            "message": "This origin is required."
        },
        "password": {
            "message": "Invalid Password"
        },
        "password": {
            "message": "Enter minimum 8 characters."
        }
    }
}
 1. Invalid Origin or invalid tenant id provide response

    {
    "message": "Unauthorized",
    "status": "unauthorized",
    "code": 401,
    "language": "en",
    "data": {
        "message": "Sorry! invalid information given"
    }
}
    2.If attempt incorrect password with more than 3 times

    {
    "message": "Bad Request.",
    "status": "unauthorized",
    "code": 401,
    "language": "en",
    "data": {
        "message": "Your account is locked due to 3 failed login attempts. Lock will be released in 60 seconds."
    }
}

Refresh API


Method : POST

Field * required Validations Rule Testing Inputs
URL

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

OR

http://qaapigateway-saas.zaicrm.com/z1/api/user/refresh

- -
token * pass the token on form data as well in header Token must be access token given at the time of login Token should be same as given in login API response
salt * pass the salt in form data Salt must be same as in login response Salt should be same as given in login API response

Success Response | Code-200


{
 "message": "User logged in successfully.",
 "status": "success",
 "code": 200,
 "language": "en",
 "data": {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC84MC4yMTEuMjMzLjEyMVwvemFpY3JtX3NhYXNcL3oxXC9hcGlcL3VzZXJcL2xvZ2luIiwiaWF0IjoxNjE0MzI5MjUzLCJleHAiOjE2MTQ5MzQwNTMsIm5iZiI6MTYxNDMyOTI1MywianRpIjoidWk5MEhncW1wa1FUSHZZciIsInN1YiI6MSwicHJ2IjoiZmFjZTYzMzkwYzc2ZmUwMjBhYjUyNGE0YjM0MzJiNDAzNThlZTdlMiIsImlzU3VwZXJBZG1pbkxvZ2dlZEluIjp0cnVlLCJkZXNjZW5kYW50Um9sZVVzZXJzIjpbXX0.uJhp__5KtJXyopVhSfw18eyrKLxVrEVSaMOsEAz-XkY",
    "token_type": "bearer",
    "expires_in": "10080",
    "salt": "$2y$10$SUFF5ZchVgPR5jF9SDVoJuI/RpiukO5e9MviKiJtzdyPkGlnMwkOq",
    "user_details": {
        "id": "1",
        "name": "zaigo",
        "email": "admin@zaigoinfotech.com",
        "image": "http://devapi-saas.zaicrm.com/storage/app/user/user_1.jpg",
        "domain": "http://tenant1.zaicrm.com"
    }
 }
}

Failure Validation Response | Code-400


If token and salt not entered
{
  "message": "Bad Request.",
  "status": "bad_request",
  "code": 400,
  "language": "en",
  "data": {
    "salt": {
       "message": "This field is required."
    },
    "token": {
       "message": "This field is required."
    }
  }
}

Unauthorized Response | Code-401


If token and salt given are wrong
{
  "message": "Something went wrong. Couldn't refresh the token",
  "status": "unauthorized",
  "code": 401,
  "language": "en",
  "data": []
}

All invalid Response


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "salt": {
            "message": "This salt is required."
        },
        "token": {
            "message": "This token is required."
        }
    }
}
 1. When provide invalid token or invalid salt or without token passed in header
    {
    "message": "Something went wrong. Couldn't refresh the token",
    "status": "unauthorized",
    "code": 401,
    "language": "en",
    "data": []
}

Validate Token API


Method : GET

OR

http://qaapigateway-saas.zaicrm.com/z1/api/user/validatetoken

Field * required Validations Rule Testing Inputs
URL

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

OR

http://qaapigateway-saas.zaicrm.com/z1/api/user/validatetoken

- -
token * Send the authenticated token in header and formdata Token must be access token given at the time of login Token should be same as given in login API response
domain * Send the domain Send the origin in the domain Domain must be same as given in login API

If it has access to given domain | Code-200


{
    "message": "Validated. Access to the domain",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
        "user_details": {
            "id": "2",
            "name": "Fieldy Tenant 1",
            "email": "admin@fieldy.co",
            "image": "http://devapi-saas.zaicrm.com/public/img/user_default.png",
            "domain": "http://tenant1.zaicrm.com"
        }
    }
}

If it has no access to given domain | Code-400


{
  "message": "Validated. Not access to the domain",
  "status": "bad_request",
  "code": 400,
  "language": "en",
  "data": false
}

Failure Validation Response | Code-400


If token and salt not entered
{
  "message": "Bad Request.",
  "status": "bad_request",
  "code": 400,
  "language": "en",
  "data": {
    "domain": {
       "message": "This field is required."
    },
    "token": {
       "message": "This field is required."
    }
  }
}

If it is unauthenticated token | Code-401


{
  "message": "Sorry, unauthorized access",
  "status": "unauthorized",
  "code": 401,
  "language": "en",
  "data": []
}

All invalid Response


{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "domain": {
            "message": "This domain is required."
        },
        "token": {
            "message": "This token is required."
        }
    }
}
    1. Invalid domain or token provided

    {
    "message": "Sorry, unauthorized access",
    "status": "unauthorized",
    "code": 401,
    "language": "en",
    "data": []
}

    2. If token not passed on header

    {
    "message": "Validated. Not access to the domain",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": false
}

Menus and Permission


Permission Mapping


Module Actions Mapped
Note:
1. View,
2. Create and Edit,
3. Create, Edit and Delete are for front end.
If anything enabled, the mapped actions will get on the response.,
Tenant Company 1. Edit - view, edit, address-delete
Contractor Company
View contractor-view
Create and Edit create-contractor-company,
edit-contractor
Create, Edit and Delete create-contractor-company,
edit-contractor,
delete
Vendor Company
View view-vendor
Create and Edit create-vendor-company,
edit-vendor
Create, Edit and Delete create-contractor-company,
edit-contractor,
delete-vendor
Users
View user-view
Create and Edit create-user,
edit-user,
send-invite,
bulk-import,
user-view,
permission-control,
If task enabled - create-task, add-comments, mark-completed, set-reminder, hold, cancel, assign-user
If task not enabled - Show message as please enable task to view this tab
Create, Edit and Delete create-user,
edit-user,
send-invite,
bulk-import,
user-view,
permission-control,
If task enabled - create-task, add-comments, mark-completed, set-reminder, hold, cancel, assign-user
If task not enabled - Show message as please enable task to view this tab,
delete
Customers
View view
Create and Edit create-contact,
send-invite,
view,
activity,
notes,
create-invoice-by-job,
job - If job main module enabled
invoices - If invoice main module enabled
Create, Edit and Delete create-contact,
send-invite,
view,
activity,
notes,
create-invoice-by-job,
job - If job main module enabled
invoices - If invoice main module enabled,
delete
Note: If the permission is enabled, we can manage both contact and company.
Quotes
View view
Create and Edit quote-by-job,
quote-by-product-services,
view,
resend-quote,
edit-and-resend-quote,
contact-customer-create,
analytics,
notes,
create-task,
add-comments,
mark-completed,
set-reminder,
hold,
cancel,
assign-user,
Create, Edit and Delete quote-by-job,
quote-by-product-services,
view,
resend-quote,
edit-and-resend-quote,
contact-customer-create,
analytics,
notes,
create-task,
add-comments,
mark-completed,
set-reminder,
hold,
cancel,
assign-user,
delete
Note: If quote module included in the package will give quote on the reponse, otherwise won't
Product
View view
Create and Edit create-product,
create-brand,
edit-product
Create, Edit and Delete create-product,
create-brand,
edit-product,
delete-product
Note: If product module included in the package will give product on the reponse, otherwise won't
Service
View view
Create and Edit create-services,
create-category,
edit-service
Create, Edit and Delete create-services,
create-category,
edit-service,
delete-service
Job
View view-job
Create and Edit create-job,
edit-job,
create-task,
crew-size-modification-on-creation,
business-unit-creation,
unassignassign,
invoice,
dispatch-or-cancel-job,
assign-technicians
Create, Edit and Delete create-job,
edit-job,
create-task,
crew-size-modification-on-creation,
business-unit-creation,
unassignassign,
invoice,
dispatch-or-cancel-job,
assign-technicians,
delete-job
Invoice
View view
Create and Edit create-by-product-and-services,
create-by-job,
edit,
download,
resend-email
Task
View view
Create and Edit create-task,
edit,
add-comments,
mark-completed,
set-reminder,
hold,
cancel,
assign-user
Create, Edit and Delete create-task,
edit,
add-comments,
mark-completed,
set-reminder,
hold,
cancel,
assign-user,
delete
Timesheet
Create timesheet. create-timesheet
Create, Edit, Approve timesheet create-timesheet,
edit,
approve-timesheets,
payroll
Create, Edit, Approve and Delete timesheet create-timesheet,
edit,
approve-timesheets,
payroll,
delete
Report user,
quote,
invoice,
customer,
revenue-and-operations
Bit about what we are trying to convey here...

In this endpoint we are about to give you the Menus and Permissions.

Menus are something where logged in user can access the several path of our application.

In our Api Response menus_permissions holds the entire menus and permission related access associated for the current logged in user.

In our Fieldy dashboard, we are having tab based menus, whereas this tab based menus may contains further sub tabs or maynot contain subtabs.

So how we are giving those tabs(menus) and permission resides inside the tabs are shown below.

	
{
    "user": {
   	    "companies":{
   	        "company": [
   	            "i_am_permission_consider_me_as_company_edit"
   	        ],
   	        "contractor": [
   	            "i_am_permission_consider_me_as_contractor_company_create"
   	        ],
   	        "vendor": [
   	            "i_am_permission_consider_me_as_vendor_company_create"
   	        ],
   	    },
   	    "users": {
   	        ....
		},
		"teams": {
		    ....
		}
	}
}
	
	

In the above mentioned snippet, We are passing Menus and submenus as well as permission associate for the menus

But How??? Yes, the topmost level in json property refers to the Main Menu, In our Example it is User.

Inside the main menu we are having three sub menu tabs, such as "companies", "users", "teams"

Regularly there is one set of sub menus only occur, but in our first property user we are having another one level, so inside that level only actual page view will be shown.

At last node only we are having a array of permission which is associated for the particular page.

Note: In some cases we may restrict Product Management in "product_and_services" menu. In some cases we don't provide you the Entire Quote Menu, these are because that the Tenant hasn't purchased package which it is containing that features.

Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/permission/setting
Please Send Token in Header, other than that no input is required for this endpoint!

Description

Each and Everytime if a User Type (Role) Permission or User Permission may changes it will gives you the result like below.

Menus and Permission for Admin



{
    "message": "Menus and Permissions retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
		"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",
					   "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"
				 ]
			  }
		   ],
		   "request":[
			  {
				 "general-request":[
					"create-request",
					"edit",
					"view",
					"delete",
					"crew-size-modification-on-creation",
					"invoice",
					"dispatch-or-cancel-request",
					"assign-technicians"
				 ]
			  }
		   ]
		}
	 }
}

Above mentioned response is only for Admin, But in terms of Manager below mentioned response can expected.

Manager Menus and Permissions


This is for specific user type called Manager.


{
    "message": "Menus and Permissions retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
		"menus_permissions":{
		   "user":{
			  "companies":[
				 {
					"tenant-company":[
					   "view"
					],
					"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",
					   "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"
				 ]
			  }
		   ],
		   "request":[
			  {
				 "general-request":[
					"create-request",
					"edit",
					"view",
					"delete",
					"crew-size-modification-on-creation",
					"invoice",
					"dispatch-or-cancel-request",
					"assign-technicians"
				 ]
			  }
		   ]
		}
	 }
}

Operator (Service Staff) Menus and Permissions


This is for specific user type called Operator.


{
    "message": "Menus and Permissions retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
		"menus_permissions":{
		   "user":{
			  "companies":[
				 {
					"tenant-company":[
					   "view"
					],
					"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",
					   "delete",
					   "user-view",
					   "permission-control",
					   "edit-user",
					   "create-task",
					   "add-comments",
					   "mark-completed",
					   "set-reminder",
					   "hold",
					   "cancel",
					   "assign-user"
					]
				 }
			  ]
		   },
		   "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"
				 ]
			  }
		   ],
		   "dashboard_access":[
			  {
				 "dashboard-access":[
					"granted"
				 ]
			  }
		   ],
		   "request":[
			  {
				 "general-request":[
					"create-request",
					"edit",
					"view",
					"delete",
					"crew-size-modification-on-creation",
					"invoice",
					"dispatch-or-cancel-request",
					"assign-technicians"
				 ]
			  }
		   ]
		}
	 }
}

Technician Menus and Permissions


Note: If Technician User is having desktop access, Otherwise they cannot login into the react app.

This is for specific user type called Technician.


{
    "message": "Menus and Permissions retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
		"menus_permissions":{
		   "user":{
			  "companies":[
				 {
					"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",
					   "delete",
					   "user-view",
					   "permission-control",
					   "edit-user",
					   "create-task",
					   "add-comments",
					   "mark-completed",
					   "set-reminder",
					   "hold",
					   "cancel",
					   "assign-user"
					]
				 }
			  ]
		   },
		   "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"
				 ]
			  }
		   ],
		   "dashboard_access":[
			  {
				 "dashboard-access":[
					"denied"
				 ]
			  }
		   ],
		   "request":[
			  {
				 "general-request":[
					"create-request",
					"edit",
					"view",
					"delete",
					"crew-size-modification-on-creation",
					"invoice",
					"dispatch-or-cancel-request",
					"assign-technicians"
				 ]
			  }
		   ]
		}
	 }
}

Contractor User Menus and Permissions


This is for specific user type called Contractor User.


{
    "message": "Menus and Permissions retrieved successfully",
    "status": "success",
    "code": 200,
    "language": "en",
    "data": {
		"menus_permissions":{
		   "customer":[
			  {
				 "customer-contact":[
					"create-contact",
					"edit",
					"view",
					"delete",
					"send-invite",
					"activity",
					"job",
					"notes",
					"invoices",
					"create-invoice-by-job"
				 ]
			  }
		   ],
		   "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"
				 ]
			  }
		   ],
		   "dashboard_access":[
			  {
				 "dashboard-access":[
					"granted"
				 ]
			  }
		   ],
		   "request":[
			  {
				 "general-request":[
					"create-request",
					"edit",
					"view",
					"delete",
					"crew-size-modification-on-creation",
					"dispatch-or-cancel-request",
					"assign-technicians"
				 ]
			  }
		   ]
		}
	 }
    }
}

Contractor Company Creation



For json params (addresses) validation error response - User story

Method: POST
Field * required Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/contractor OR http://qaapigateway-saas.zaicrm.com/z1/api/user/contractor
_token * Bearer Token: "token" Pass it in header as all other request
name *
  • Required
  • Unique (unique with tenant based)
  • Input type - string
  • Maximum allowed character - 256
  • Minimum allowed character - 1
  • Special character allowed - all
Defoxes-e18y6
email
  • Optional
  • Unique (unique with tenant based contractor companies email )
  • Input type - string
  • Maximum allowed character - 256
  • Special character allowed - all
someemail@gmail.com
phone
  • Optional
  • Input type - string
  • Maximum allowed character - 12
  • Minimum allowed character - 6
9999999999
contact_person_name
  • Optional
  • Input type - string
  • Maximum allowed character - 512
  • Special character allowed - all
John Mckeny
website
  • Optional
  • Input type - string
  • Maximum allowed character - 2048
  • Special character allowed - all
http://defoxes.com/
fax
  • Optional
  • Input type - string
  • Maximum allowed character - 25
  • Special character allowed - all
8910199901
addresses
  • Optional
  • Valid json format
name
  • Optional
  • Input type string
  • Maximum character allowed - 256
  • Special character allowed - all
contact_person
  • Optional
  • Input type string
  • Maximum character allowed - 512
  • Special character allowed - all
phone_number
  • Optional
  • Input type string
  • Maximum character allowed - 12
  • Minimum character allowed - 6
  • Special character allowed - all
email
  • Optional
  • Input type string
  • Should be valid email format and RFC standard
  • 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","contact_person":"gavaskar","email":"gavaskar@zaigoinfotech.com","phone_number":"8178237271","line_1":"6-A, 6th Floor, Sapna Trade Centre","line_2":"poonamalle High Rd","city":"Egmore, Chennai","state":"8","zipcode":"600001","country":"6","address_id":""},{"name":"Vellore","contact_person":"Bala muruga","email":"bala@zaigoinfotech.com","phone_number":"9742317271","line_1":"9-A, 6th Floor, Vellore Trade Centre","line_2":"poonamalle High Rd","city":"Egmore, chennai","state":"8","zipcode":"602191","country":"7","address_id":""}]
company_logo Nullable or if file uploaded it will validate if it is valid jpeg,png,file and checks if file size is not greater 2mb ['nullable','mimes:jpg,jpeg,png','max:2048'] -


Contractor Company Created!


If Contractor Company Created this is the success response which is expected.

Provided Inputs

name: Defoxes
email:someemail@gmail.com
contact_person_name:Peevi

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


	{
		"message": "Contractor have been 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": {
				"message": "This field is required"
			},
			"email": {
				"message": "This field is required"
			},
			"contact_person_name": {
				"message": "This field is required"
			}
		}
	}

If Email Already Exist


Provided Inputs

name: Defoxes
email:someemail@gmail.com
contact_person_name:Peevi


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"email": {
				"message": "Email already Exists with other company"
			}
		}
	}

Invalid Website URL Given:


Provided Inputs

name: Defoxes
email:test@gmail.com
contact_person_name:Peevi
Website:tarrrrr.com


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"website": {
				"message": "Please provide valid website url"
			}
		}
	}

Invalid Address Json Given:


Provided Inputs

name: Defoxes
email:test@gmail.com
contact_person_name:Peevi
addresses:custom


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"addresses": {
				"message": "The addresses must be a valid JSON string."
			}
		}
	}

Incomplete Address:


In this case we are facing error because in address line 1 is missing but line 2 is present and rest of state, city, country is missing. For now Zipcode validation sets to 6 digits.

Provided Inputs

name: Defoxes
email:test@gmail.com
contact_person_name:Peevi
addresses:custom


	{
		"message": "Bad Request.",
		"status": "bad_request",
		"code": 400,
		"language": "en",
		"data": {
			"line1_1": {
				"message": "Please Provide valid Address in Line One at address object 1"
			},
			"city_1": {
				"message": "Please provide your city name at address object 1"
			},
			"state_1": {
				"message": "Please select state from the given list at address object 1"
			},
			"country_1": {
				"message": "Please select country from the given list at address object 1"
			},
			"zipcode_1": {
				"message": "Please provide valid zipcode at address object 1"
			},
			"line1_2": {
				"message": "Please Provide valid Address in Line One at address object 2"
			},
			"city_2": {
				"message": "Please provide your city name at address object 2"
			},
			"state_2": {
				"message": "Please select state from the given list at address object 2"
			},
			"country_2": {
				"message": "Please select country from the given list at address object 2"
			},
			"zipcode_2": {
				"message": "Please provide valid zipcode at address object 2"
			}
		}
	}

All Invalid Response:



	{
    "message": "Bad Request.",
    "status": "bad_request",
    "code": 400,
    "language": "en",
    "data": {
        "name": {
            "message": "This is required field."
        },
        "name": {
            "message": "Company Name already Exists"
        },
         "name": {
            "message": "Please enter the name within 256 Characters"
        },
        "email": {
            "message": "Invalid Email"
        },
        "email": {
            "message": "Email already Exists"
        },
        "email": {
            "message": "The e-mail may not be greater than 256 characters."
        },
        "contact_person_name": {
            "message": "Please enter the contact person name within 512 Characters"
        },
         "website": {
            "message": "The website may not be greater than 2048 characters."
        },
        "fax": {
            "message": "Provided characters should not exceed than 25 characters"
        },
      If invalid address json given,
       "addresses":[
       {
          "name":{
             "code":"Q1004",
             "message":"Addresses name exceeds 256 characters"
          },
          "email":null,
          "contact_person":{
             "code":"Q1004",
             "message":"Contact person name exceeds 512 characters"
          },
          "phone_number":null,
          "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"
          },
          "email":{
             "code":"Q1002",
             "message":"Please provide valid email"
          },
          "contact_person":{
             "code":"Q1004",
             "message":"Contact person name exceeds 512 characters"
          },
          "phone_number":{
             "code":"Q1005",
             "message":"Zipcode should be minimum 6 characters"
          },
          "line_1":{
             "code":"Q1004",
             "message":"Line 1 exceeds 256 characters"
          },
          "line_2":null,
          "country":null,
          "state":null,
          "city":null,
          "zipcode":null
       },
       {
          "name":null,
          "email":{
             "code":"Q1002",
             "message":"Please provide valid email"
          },
          "contact_person":null,
          "phone_number":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
    ],
        "company_logo": {
            "message": "Logo must be in a format of png,jpeg,jpg"
        },
         "company_logo": {
            "message": "Logo file size should not exceeds 2048 MB"
        },
    }
}

Note: address object 1 and 2 denotes the order which the user input given.

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.

Contractor Company Updation


For json params (addresses) validation error response - User story

Method: POST
Field * required Validations Rule Testing Inputs
URL http://devapi-saas.zaicrm.com/z1/api/user/contractor/{contractor_id} OR
  • http://qaapigateway-saas.zaicrm.com/z1/api/user/contractor/{contractor_id}
  • _token * Bearer Token: "token" Pass it in header as all other request
    _method * put
    name *
    • Required
    • Unique
    • Input type - string
    • Maximum allowed character - 256
    • Minimum allowed character - 1
    • Special character allowed - all
    Defoxes-e18y6
    email
    • Optional
    • Unique (unique with tenant based contractor companies email )
    • Input type - string
    • Maximum allowed character - 256
    • Special character allowed - all
    someemail@gmail.com
    phone
    • Optional
    • Input type - string
    • Maximum allowed character - 12
    • Minimum allowed character - 6
    9999999999
    contact_person_name
    • Optional
    • Input type - string
    • Maximum allowed character - 512
    • Special character allowed - all
    John Mckeny
    website
    • Optional
    • Input type - string
    • Maximum allowed character - 2048
    • Special character allowed - all
    http://defoxes.com/
    fax
    • Optional
    • Input type - string
    • Maximum allowed character - 25
    • Special character allowed - all
    8910199901
    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":"Contact Person","line_1":"No.4 Teskon Bay","line_2":"Et Ellion","state":"1","country":"1","zipcode":"678100","city":"chennai"}]
    company_logo Nullable or if file uploaded it will validate if it is valid jpeg,png,file and checks if file size is not greater 2mb ['nullable','mimes:jpg,jpeg,png','max:20480'] -

    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([])



    Contractor Company Updated!


    If Contractor Company Created this is the success response which is expected.

    Provided Inputs

    name: Defoxes
    email:someemail@gmail.com
    contact_person_name:Peevi

    
    	{
    		"message": "Contractor have been updated 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": {
    				"message": "This field is required"
    			},
    			"email": {
    				"message": "This field is required"
    			},
    			"contact_person_name": {
    				"message": "This field is required"
    			}
    		}
    	}
    
    

    If Email Already Exist


    Provided Inputs

    name: Defoxes
    email:someemail@gmail.com
    contact_person_name:Peevi

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"email": {
    				"message": "Email already Exists with other company"
    			}
    		}
    	}
    
    

    Invalid Website URL Given:


    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    Website:tarrrrr.com

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"website": {
    				"message": "Please provide valid website url"
    			}
    		}
    	}
    
    

    Invalid Address Json Given:


    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    addresses:custom

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"addresses": {
    				"message": "The addresses must be a valid JSON string."
    			}
    		}
    	}
    
    

    Incomplete Address:


    In this case we are facing error because in address line 1 is missing but line 2 is present and rest of state, city, country is missing. For now Zipcode validation sets to 6 digits.

    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    addresses:custom

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"line1_1": {
    				"message": "Please Provide valid Address in Line One at address object 1"
    			},
    			"city_1": {
    				"message": "Please provide your city name at address object 1"
    			},
    			"state_1": {
    				"message": "Please select state from the given list at address object 1"
    			},
    			"country_1": {
    				"message": "Please select country from the given list at address object 1"
    			},
    			"zipcode_1": {
    				"message": "Please provide valid zipcode at address object 1"
    			},
    			"line1_2": {
    				"message": "Please Provide valid Address in Line One at address object 2"
    			},
    			"city_2": {
    				"message": "Please provide your city name at address object 2"
    			},
    			"state_2": {
    				"message": "Please select state from the given list at address object 2"
    			},
    			"country_2": {
    				"message": "Please select country from the given list at address object 2"
    			},
    			"zipcode_2": {
    				"message": "Please provide valid zipcode at address object 2"
    			}
    		}
    	}
    
    

    Note: address object 1 and 2 denotes the order which the user input given.

    All Invalid Response:


    
    	{
        "message": "Bad Request.",
        "status": "bad_request",
        "code": 400,
        "language": "en",
        "data": {
            "name": {
                "message": "This is required field."
            },
            "name": {
                "message": "Company Name already Exists"
            },
             "name": {
                "message": "Please enter the name within 256 Characters"
            },
            "email": {
                "message": "Invalid Email"
            },
            "email": {
                "message": "Email already Exists"
            },
            "email": {
                "message": "The e-mail may not be greater than 256 characters."
            },
            "contact_person_name": {
                "message": "Please enter the contact person name within 512 Characters"
            },
             "website": {
                "message": "The website may not be greater than 2048 characters."
            },
            "fax": {
                "message": "Provided characters should not exceed than 25 characters"
            },
            If invalid address json given,
           "addresses":[
           {
              "name":{
                 "code":"Q1004",
                 "message":"Addresses name exceeds 256 characters"
              },
              "email":null,
              "contact_person":{
                 "code":"Q1004",
                 "message":"Contact person name exceeds 512 characters"
              },
              "phone_number":null,
              "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"
              },
              "email":{
                 "code":"Q1002",
                 "message":"Please provide valid email"
              },
              "contact_person":{
                 "code":"Q1004",
                 "message":"Contact person name exceeds 512 characters"
              },
              "phone_number":{
                 "code":"Q1005",
                 "message":"Zipcode should be minimum 6 characters"
              },
              "line_1":{
                 "code":"Q1004",
                 "message":"Line 1 exceeds 256 characters"
              },
              "line_2":null,
              "country":null,
              "state":null,
              "city":null,
              "zipcode":null
           },
           {
              "name":null,
              "email":{
                 "code":"Q1002",
                 "message":"Please provide valid email"
              },
              "contact_person":null,
              "phone_number":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
        ],
            "company_logo": {
                "message": "Logo must be in a format of png,jpeg,jpg"
            },
             "company_logo": {
                "message": "Logo file size should not exceeds 2048 MB"
            },
        }
    }
    
    

    Vendor Company Creation


    Method: POST
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/vendor
    _token * Bearer Token: "token" Pass it in header as all other request
    name *
    • Required
    • Unique (tenant based unique)
    • Input type string
    • Maximum allowed character -256
    • Minimum allowed character - 1
    • Special character allowed - all
    Defoxes-e18y6
    email *
    • Required
    • Unique (tenant based unique)
    • Input type string
    • Maximum allowed character -256
    • Minimum allowed character - 1
    • Special character allowed - all
    someemail@gmail.com
    mobile Nullable or if user enters it should be of 10 digits. ['nullable','digits:10'] 9999999999
    contact_person_name *
    • Optional
    • Input type string
    • Maximum allowed character -512
    • Special character allowed - all
    John Mckeny
    website
    • Optional
    • Input type string
    • Maximum allowed character -2048
    • Special character allowed - all
    http://defoxes.com/
    fax
    • Optional
    • Input type string
    • Maximum allowed character -25
    • Special character allowed - all
    8910199901
    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 dropdown
    zipcode
    • Optional
    • Input type string
    • Maximum character allowed - 10
    • Minimum character allowed - 3
    • Special character allowed - all
    country
    • Optional
    • Input type dropdown
    [{"name":"Contact Person","line_1":"No.4 Teskon Bay","line_2":"Et Ellion","city":"Chennai","state":"1","country":"1","zipcode":"678100"}]
    company_logo Nullable or if file uploaded it will validate if it is valid jpeg,png,file and checks if file size is not greater 2mb ['nullable','mimes:jpg,jpeg,png','max:20480'] -
    products_services
    • Optional
    • Input type json should be valid json format
    • Maximum tag Count - 64
    • Maximum character allowed - 256
    • Special character allowed - all
    ["bolds","screws"]


    Vendor Company Created!


    If Vendor Company Created this is the success response which is expected.

    Provided Inputs

    name: Defoxes
    email:someemail@gmail.com
    contact_person_name:Peevi

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

    
    	{
    		"message": "Vendor  have been 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": {
    				"message": "This field is required"
    			},
    			"email": {
    				"message": "This field is required"
    			},
    			"contact_person_name": {
    				"message": "This field is required"
    			}
    		}
    	}
    
    

    If Email Already Exist


    Provided Inputs

    name: Defoxes
    email:someemail@gmail.com
    contact_person_name:Peevi

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"email": {
    				"message": "Email already Exists with other company"
    			}
    		}
    	}
    
    

    Invalid Website URL Given:


    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    Website:tarrrrr.com

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"website": {
    				"message": "Please provide valid website url"
    			}
    		}
    	}
    
    

    Invalid Address Json Given:


    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    addresses:custom

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"addresses": {
    				"message": "The addresses must be a valid JSON string."
    			}
    		}
    	}
    
    

    Incomplete Address:


    In this case we are facing error because in address line 1 is missing but line 2 is present and rest of state, city, country is missing. For now zipcode validation sets to validate 6 digits.

    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    addresses:custom

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"line1_1": {
    				"message": "Please Provide valid Address in Line One at address object 1"
    			},
    			"city_1": {
    				"message": "Please provide your city name at address object 1"
    			},
    			"state_1": {
    				"message": "Please select state from the given list at address object 1"
    			},
    			"country_1": {
    				"message": "Please select country from the given list at address object 1"
    			},
    			"zipcode_1": {
    				"message": "Please provide valid zipcode at address object 1"
    			},
    			"line1_2": {
    				"message": "Please Provide valid Address in Line One at address object 2"
    			},
    			"city_2": {
    				"message": "Please provide your city name at address object 2"
    			},
    			"state_2": {
    				"message": "Please select state from the given list at address object 2"
    			},
    			"country_2": {
    				"message": "Please select country from the given list at address object 2"
    			},
    			"zipcode_2": {
    				"message": "Please provide valid zipcode at address object 2"
    			}
    		}
    	}
    
    

    Invalid Json Format Sent:


    In this case we are facing error because in address line 1 is missing but line 2 is present and rest of state, city, country is missing.

    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    products_services:isi

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"products_services": {
    				"message": "The products services must be a valid JSON string."
    			}
    		}
    	}
    
    

    Note: address object 1 and 2 denotes the order which the user input given.

    All Invalid Response:


    
    	{
        "message": "Bad Request.",
        "status": "bad_request",
        "code": 400,
        "language": "en",
        "data": {
            "name": {
                "message": "This is required field."
            },
            "name": {
                "message": "Company Name already Exists"
            },
             "name": {
                "message": "Please enter the name within 256 Characters"
            },
            "email": {
                "message": "Invalid Email"
            },
            "email": {
                "message": "Email already Exists"
            },
            "email": {
                "message": "The e-mail may not be greater than 256 characters."
            },
            "contact_person_name": {
                "message": "Please enter the contact person name within 512 Characters"
            },
             "website": {
                "message": "The website may not be greater than 2048 characters."
            },
            "fax": {
                "message": "Provided characters should not exceed than 25 characters"
            },
            "name_1": {
                "message": "Addresses name exceeds 256 characters"
            },
            "name_2": {
                "message": "Addresses name exceeds 256 characters"
            },
    
            "line_1_1": {
                "message": "Line 1 exceeds 256 characters"
            },
            "line_1_2": {
                "message": "Line 1 exceeds 256 characters"
            },
            "line_2_1": {
                "message": "Line 2 exceeds 256 characters"
            },
            "city_1": {
                "message": "City exceeds 256 characters"
            },
            "country_1": {
                "message": "Selected country is invalid"
            },
            "country_2": {
                "message": "Selected country is invalid"
            },
            "state_1": {
                "message": "Selected state is invalid"
            },
            "state_2": {
                "message": "Selected state is invalid"
            },
            "zipcode_1": {
                "message": "Zipcode should be minimum 3 characters"
            },
            "zipcode_2": {
                "message": "Zipcode exceeds 10 digits"
            },
            "company_logo": {
                "message": "Logo must be in a format of png,jpeg,jpg"
            },
             "company_logo": {
                "message": "Logo file size should not exceeds 2048 MB"
            },
            "products_services": {
                "message": "The products services may not be greater than 64 characters."
            },
            "products_services_1": {
                "message": "One of Item is exceeds 256 characters"
            },
            "products_services_10": {
                "message": "One of Item is exceeds 256 characters"
            },
        }
    }
    
    

    Vendor Company Updation


    Method: POST
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/vendor/{vendor_id}
    _token * Bearer Token: "token" Pass it in header as all other request
    _method * put
    name *
    • Required
    • Unique (tenant based unique)
    • Input type string
    • Maximum allowed character -256
    • Minimum allowed character - 1
    • Special character allowed - all
    Defoxes-e18y6
    email *
    • Required
    • Unique (tenant based unique)
    • Input type string
    • Maximum allowed character -256
    • Minimum allowed character - 1
    • Special character allowed - all
    someemail@gmail.com
    mobile Nullable or if user enters it should be of 10 digits. ['nullable','digits:10'] 9999999999
    contact_person_name *
    • Optional
    • Input type string
    • Maximum allowed character -512
    • Special character allowed - all
    John Mckeny
    website
    • Optional
    • Input type string
    • Maximum allowed character -2048
    • Special character allowed - all
    http://defoxes.com/
    fax
    • Optional
    • Input type string
    • Maximum allowed character -25
    • Special character allowed - all
    8910199901
    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 dropdown
    zipcode
    • Optional
    • Input type string
    • Maximum character allowed - 10
    • Minimum character allowed - 3
    • Special character allowed - all
    country
    • Optional
    • Input type dropdown
    [{"name":"Contact Person","line_1":"No.4 Teskon Bay","line_2":"Et Ellion","city":"Chennai","state":"1","country":"1","zipcode":"678100"}]
    company_logo Nullable or if file uploaded it will validate if it is valid jpeg,png,file and checks if file size is not greater 2mb ['nullable','mimes:jpg,jpeg,png','max:20480'] -
    products_services
    • Optional
    • Input type json should be valid json format
    • Maximum tag Count - 64
    • Maximum character allowed - 256
    • Special character allowed - all
    ["bolds","screws"]

    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([])



    Vendor Company Updated!


    If Vendor Company Updated this is the success response which is expected.

    Provided Inputs

    name: Defoxes
    email:someemail@gmail.com
    contact_person_name:Peevi

    
    	{
    		"message": "Vendor updated 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": {
    				"message": "This field is required"
    			},
    			"email": {
    				"message": "This field is required"
    			},
    			"contact_person_name": {
    				"message": "This field is required"
    			}
    		}
    	}
    
    

    If Email Already Exist


    Provided Inputs

    name: Defoxes
    email:someemail@gmail.com
    contact_person_name:Peevi

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"email": {
    				"message": "Email already Exists with other company"
    			}
    		}
    	}
    
    

    Invalid Website URL Given:


    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    Website:tarrrrr.com

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"website": {
    				"message": "Please provide valid website url"
    			}
    		}
    	}
    
    

    Invalid Address Json Given:


    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    addresses:custom

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"addresses": {
    				"message": "The addresses must be a valid JSON string."
    			}
    		}
    	}
    
    

    Incomplete Address:


    In this case we are facing error because in address line 1 is missing but line 2 is present and rest of state, city, country is missing. For now zipcode validation sets to validate 6 digits.

    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    addresses:custom

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"line1_1": {
    				"message": "Please Provide valid Address in Line One at address object 1"
    			},
    			"city_1": {
    				"message": "Please provide your city name at address object 1"
    			},
    			"state_1": {
    				"message": "Please select state from the given list at address object 1"
    			},
    			"country_1": {
    				"message": "Please select country from the given list at address object 1"
    			},
    			"zipcode_1": {
    				"message": "Please provide valid zipcode at address object 1"
    			},
    			"line1_2": {
    				"message": "Please Provide valid Address in Line One at address object 2"
    			},
    			"city_2": {
    				"message": "Please provide your city name at address object 2"
    			},
    			"state_2": {
    				"message": "Please select state from the given list at address object 2"
    			},
    			"country_2": {
    				"message": "Please select country from the given list at address object 2"
    			},
    			"zipcode_2": {
    				"message": "Please provide valid zipcode at address object 2"
    			}
    		}
    	}
    
    

    Invalid Json Format Sent:


    In this case we are facing error because in address line 1 is missing but line 2 is present and rest of state, city, country is missing.

    Provided Inputs

    name: Defoxes
    email:test@gmail.com
    contact_person_name:Peevi
    products_services:isi

    
    	{
    		"message": "Bad Request.",
    		"status": "bad_request",
    		"code": 400,
    		"language": "en",
    		"data": {
    			"products_services": {
    				"message": "The products services must be a valid JSON string."
    			}
    		}
    	}
    
    

    Note: address object 1 and 2 denotes the order which the user input given.

    Tenant Company Detail API


    If it is unauthenticated | Code-401

    
    {
        "message": "Unauthorized",
        "status": "unauthorized",
        "code": 401,
        "language": "en",
        "data": {
            "token": "Authorization Token not found"
        }
    }
    
    
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/company OR http://qaapigateway-saas.zaicrm.com/z1/api/user/company - -
    token(Send using header) It must be authenticated token - -

    Success Response | Code-200

    
    {
        "message": "Company detail listed successfully.",
        "status": "success",
        "code": 200,
        "language": "fr",
        "data": {
            "id_tenant": 2,
            "company_name": "Zaigo Infotech",
            "company_website": "https://stackoverflow.com/questions/30616622/laravel-validation-input-must-be-one-of-items-in-array",
            "industry": "1",
            "company_size": "50",
            "account_owner": "Partha",
            "notes": "qweqwe",
            "image": "http://devapi-saas.zaicrm.com/storage/app/tenants/tenant_company__2_20210315123452.png",
            "domain": null,
            "company_address": [
                {
                    "id_tenant": 2,
                    "id_address": 2,
                    "contact_person_name": "Krista Schumm",
                    "line_1": "Dolores qui.",
                    "line_2": "Quia quisquam.",
                    "city": null,
                    "branch_mobile_number": null,
                    "branch_email": null,
                    "state_name": "-NA-",
                    "country_name": "-NA-"
                },
                {
                    "id_tenant": 2,
                    "id_address": 22,
                    "contact_person_name": "edcfd",
                    "line_1": "d",
                    "line_2": null,
                    "city": null,
                    "branch_mobile_number": null,
                    "branch_email": null,
                    "state_name": "-NA-",
                    "country_name": "South Africa"
                },
                {
                    "id_tenant": 2,
                    "id_address": 30,
                    "contact_person_name": "gavaskar",
                    "line_1": "6-A, 6th Floor, Sapna Trade Centre",
                    "line_2": "poonamalle High Rd",
                    "city": "Egmore, Chennai",
                    "branch_mobile_number": "8178237271",
                    "branch_email": "gavaskar@zaigoinfotech.com",
                    "state_name": "Tamil Nadu",
                    "country_name": "India"
                },
                {
                    "id_tenant": 2,
                    "id_address": 31,
                    "contact_person_name": "Bala muruga",
                    "line_1": "9-A, 6th Floor, Vellore Trade Centre",
                    "line_2": "poonamalle High Rd",
                    "city": "Egmore, chennai",
                    "branch_mobile_number": "9742317271",
                    "branch_email": "bala@zaigoinfotech.com",
                    "state_name": "Kerala",
                    "country_name": "India"
                },
                {
                    "id_tenant": 2,
                    "id_address": 32,
                    "contact_person_name": "partha",
                    "line_1": "9-A, 6th Floor, Bangalore Trade Centre",
                    "line_2": "Vellore High Rd",
                    "city": "Egmore, Bangalore",
                    "branch_mobile_number": "7742317271",
                    "branch_email": "partha@zaigoinfotech.com",
                    "state_name": "Tamil Nadu",
                    "country_name": "South Africa"
                },
                {
                    "id_tenant": 2,
                    "id_address": 33,
                    "contact_person_name": "Murali",
                    "line_1": "Bangalore High Road, National High Way",
                    "line_2": "Vellore High Rd",
                    "city": "Villupuram",
                    "branch_mobile_number": "7882763611",
                    "branch_email": "murali@zaigoinfotech.com",
                    "state_name": "Kerala",
                    "country_name": "India"
                }
            ]
        }
    }
    
    

    Contractor Company List API


    Field * required Validations Rule Testing Inputs
    device(mobile request only) * If any API request happening from mobile then an additional header is required for mobile compatible responses. The value should be send as mobile string mobile
    URL

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

    OR

    http://qaapigateway-saas.zaicrm.com/z1/api/user/contractor

    - -
    token(Send using header) It must be authenticated token - -
    search search using name, email, phone number, contact person - -

    Success Response | Code-200

    
    {
        "message": "Contractor listed successfully.",
        "status": "success",
        "code": 200,
        "language": "en",
        "data": {
            "contract": [
                {
                    "id_customer_group": "40",
                    "email": "iamemail3@zaiseve.com",
                    "phone": null,
                    "fax": null,
                    "contact_person_name": "contname",
                   "address": {
                        "id_address": "1123",
                        "contact_person_name": "location 1",
                        "line_1": "chennai",
                        "line_2": "chennai",
                        "city": "chennai, Chennai",
                        "zip_code": "23333",
                        "state_name": "-NA-",
                        "country_name": "-NA-",
                        "country_id": "6",
                        "state_id": "8",
                        "get_country": null
                    }
                    "company_logo": "http://devapi-saas.zaicrm.com/storage/app/contractors/contractor_company__1_20210327140737.jpg",
                    "company_name": "iam name"
                },
                {
                    "id_customer_group": "39",
                    "email": "emailadded200@gmail.com",
                    "phone": null,
                    "fax": null,
                    "contact_person_name": "person name added",
                   "address": {
                        "id_address": "1123",
                        "contact_person_name": "location 1",
                        "line_1": "chennai",
                        "line_2": "chennai",
                        "city": "chennai, Chennai",
                        "zip_code": "23333",
                        "state_name": "-NA-",
                        "country_name": "-NA-",
                        "country_id": "6",
                        "state_id": "8",
                        "get_country": null
                    }
                    "company_logo": "http://devapi-saas.zaicrm.com/storage/app/contractors/contractor_company__3_20210327135309.jfif",
                    "company_name": "name added111"
                }
            ],
            "contract_links": "http://devapi-saas.zaicrm.com/z1/api/user/contractor?cursor=WyIzOSJd&limit=2"
        }
    }
    
    
    Mobile Response

    Success Response | Code-200

    
    
    {
        "message": "Contractor listed successfully.",
        "status": "success",
        "code": 200,
        "language": "en",
        "contract": [
            {
                "id_customer_group": "261",
                "email": "",
                "phone": "98944258101",
                "fax": "asdsadasd",
                "contact_person_name": "Naveen",
                "company_logo": "http://localhost/zaiserve-api-saas/storage/app/contractors/contractor_company__2_20211229164242.png",
                "company_name": "New Contractor fax32",
                "employee_shared": "0",
                "address":""
            },
            {
                "id_customer_group": "260",
                "email": "",
                "phone": "aaaaaa",
                "fax": "12",
                "contact_person_name": "Naveen",
                "company_logo": "http://localhost/zaiserve-api-saas/storage/app/contractors/contractor_company__2_20211229132622.png",
                "company_name": "New Contractor aplhadfg s",
                "employee_shared": "0",
               "address": {
                        "id_address": "1123",
                        "contact_person_name": "location 1",
                        "line_1": "chennai",
                        "line_2": "chennai",
                        "city": "chennai, Chennai",
                        "zip_code": "23333",
                        "state_name": "-NA-",
                        "country_name": "-NA-",
                        "country_id": "6",
                        "state_id": "8",
                        "get_country": null
                    }
            },
            {
                "id_customer_group": "259",
                "email": "",
                "phone": "98944258101",
                "fax": "123",
                "contact_person_name": "Naveen",
                "company_logo": "http://qaapigateway-saas.zaicrm.com/storage/app/contractors/contractor_company__2_20211229132513.png",
                "company_name": "New Contractor aplhadfg",
                "employee_shared": "0",
                "address": []
            },
            {
                "id_customer_group": "258",
                "email": "",
                "phone": "98944258101",
                "fax": "123",
                "contact_person_name": "Naveen",
                "company_logo": "http://qaapigateway-saas.zaicrm.com/storage/app/contractors/contractor_company__2_20211228180706.png",
                "company_name": "New Contractor 3",
                "employee_shared": "0",
                "address": {
                        "id_address": "1123",
                        "contact_person_name": "location 1",
                        "line_1": "chennai",
                        "line_2": "chennai",
                        "city": "chennai, Chennai",
                        "zip_code": "23333",
                        "state_name": "-NA-",
                        "country_name": "-NA-",
                        "country_id": "6",
                        "state_id": "8",
                        "get_country": null
                    }
            },
            {
                "id_customer_group": "257",
                "email": "",
                "phone": "98944258101",
                "fax": "123",
                "contact_person_name": "Naveen",
                "company_logo": "http://qaapigateway-saas.zaicrm.com/storage/app/contractors/contractor_company__2_20211229125433.png",
                "company_name": "New Contractor deleted",
                "employee_shared": "0",
                "address": {
                        "id_address": "1123",
                        "contact_person_name": "location 1",
                        "line_1": "chennai",
                        "line_2": "chennai",
                        "city": "chennai, Chennai",
                        "zip_code": "23333",
                        "state_name": "-NA-",
                        "country_name": "-NA-",
                        "country_id": "6",
                        "state_id": "8",
                        "get_country": null
                    }
            }
        ],
        "contract_links": "http://qaapigateway-saas.zaicrm.com/z1/api/user/contractor?limit=5&cursor=eyJpZF9jdXN0b21lcl9ncm91cCI6IjI1NyIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
    }
    
                                

    Vendor Company List API


    Field * required Validations Rule Testing Inputs
    device(mobile request only) * If any API request happening from mobile then an additional header is required for mobile compatible responses. The value should be send as mobile string mobile
    URL http://devapi-saas.zaicrm.com/z1/api/user/vendor - -
    token(Send using header) It must be authenticated token - -
    search Search using name, email, phone, contact person name - -

    Success Response | Code-200

    
    {
        "message": "Vendor listed successfully.",
        "status": "success",
        "code": 200,
        "language": "fr",
        "data": {
        	"vendor": [
    	        {
    	            "id_customer_group": 1,
    	            "name": "resst",
    	            "email": "sharukasnh@sstssss.coms",
    	            "phone": "8667668231",
    	            "contact_person_name": null,
    	            "notes": "po,pick,nuts,bolds",
    	            "created_at": "Mar 10, 2021",
    	            "address": ""
    	        },
    	        {
    	            "id_customer_group": 4,
    	            "name": "resst",
    	            "email": "bala@zaigoinfotech.com",
    	            "phone": "8667668231",
    	            "contact_person_name": "Bala Muruga",
    	            "notes": "po,pick,nuts,bolds",
    	            "created_at": "Mar 10, 2021",
    	           "address": {
                        "id_address": "1123",
                        "contact_person_name": "location 1",
                        "line_1": "chennai",
                        "line_2": "chennai",
                        "city": "chennai, Chennai",
                        "zip_code": "23333",
                        "state_name": "-NA-",
                        "country_name": "-NA-",
                        "country_id": "6",
                        "state_id": "8",
                        "get_country": null
                    }
    	        },
    	        {
    	            "id_customer_group": 5,
    	            "name": "resst",
    	            "email": "bala+1@zaigoinfotech.com",
    	            "phone": "8667668231",
    	            "contact_person_name": "Bala Muruga",
    	            "notes": null,
    	            "created_at": "Mar 11, 2021",
    	            "address": {
                        "id_address": "1123",
                        "contact_person_name": "location 1",
                        "line_1": "chennai",
                        "line_2": "chennai",
                        "city": "chennai, Chennai",
                        "zip_code": "23333",
                        "state_name": "-NA-",
                        "country_name": "-NA-",
                        "country_id": "6",
                        "state_id": "8",
                        "get_country": null
                    }
    	        },
    	        {
    	            "id_customer_group": 6,
    	            "name": "resst",
    	            "email": "bala+12@zaigoinfotech.com",
    	            "phone": "8667668231",
    	            "contact_person_name": "Bala Muruga",
    	            "notes": null,
    	            "created_at": "Mar 11, 2021",
    	           "address": {
                        "id_address": "1123",
                        "contact_person_name": "location 1",
                        "line_1": "chennai",
                        "line_2": "chennai",
                        "city": "chennai, Chennai",
                        "zip_code": "23333",
                        "state_name": "-NA-",
                        "country_name": "-NA-",
                        "country_id": "6",
                        "state_id": "8",
                        "get_country": null
                    }
    	        }
    	    ],
            "contract_links": "http://devapi-saas.zaicrm.com/z1/api/user/vendor?cursor=WyIzOSJd&limit=2"
    	}
    }
    
    
    Mobile Response

    Success Response | Code-200

    
    {
        "message": "Vendor listed successfully.",
        "status": "success",
        "code": 200,
        "language": "en",
        "vendor": [
            {
                "id_customer_group": "237",
                "email": "",
                "phone": "",
                "contact_person_name": "",
                "created_at": "07 Dec, 2021",
                "notes": "",
                "website": "",
                "fax": "",
                "product_count": "",
                "company_logo": "",
                "company_name": "NaveenA",
                "address":
                    {
                        "id_address": "1032",
                        "contact_person_name": "Contact Person",
                        "line_1": "No.4 Teskon Bay",
                        "line_2": "Et Ellion",
                        "city": "Chennai",
                        "zip_code": "",
                        "state_name": "Tamil Nadu",
                        "country_name": "India",
                        "city_name": "Chennai",
                        "country_id": "1",
                        "state_id": "1",
                        "get_country": {
                            "id": 1,
                            "name": "india"
                        }
                    }
    
            },
            {
                "id_customer_group": "236",
                "email": "",
                "phone": "",
                "contact_person_name": "",
                "created_at": "07 Dec, 2021",
                "notes": "",
                "website": "",
                "fax": "",
                "product_count": "",
                "company_logo": "",
                "company_name": "Naveen",
                "address": ""
            }
        ],
        "vendor_links": ""
    }
    
    

    Contractor Company Detail API


    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/contractor/{contractor_id} - -
    token(Send using header) It must be authenticated token - -

    Success Response | Code-200

    
    {
        "message": "Contractor details listed successfully.",
        "status": "success",
        "code": 200,
        "language": "fr",
        "data": {
            "id_customer_group": 7,
            "name": "resst",
            "email": "bala+12@zaigoinfotech.com",
            "phone": "8667668231",
            "contact_person_name": "Bala Muruga",
            "address": [
                {
                    "id_tenant": 11,
                    "id_address": 11,
                    "contact_person_name": "Wiley O'Connell",
                    "line_1": "Et eius repudiandae.",
                    "line_2": "Delectus sint.",
                    "city": null,
                    "branch_mobile_number": null,
                    "branch_email": null,
                    "state_name": "-NA-",
                    "country_name": "-NA-"
                }
            ],
            "employee_detail": [
                {
                    "id": 14,
                    "first_name": "Trisha",
                    "last_name": "Krishnan",
                    "email": "okkkkkkkayyyyyy@krishnan.com",
                    "id_customer_group": 7
                },
                {
                    "id": 15,
                    "first_name": "Trisha",
                    "last_name": "Krishnan",
                    "email": "prooro@krishnan.com",
                    "id_customer_group": 7
                }
            ]
        }
    }
    
    

    if provide invalid Id or no records found response

    
    {
        "message": "Contractor details listed successfully.",
        "status": "success",
        "code": 200,
        "language": "en",
        "data": []
    }
    
    

    Vendor Company Detail API


    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/vendor/{vendor_id} - -
    token(Send using header) It must be authenticated token - -

    Success Response | Code-200

    
    {
        "message": "Vendor details listed successfully.",
        "status": "success",
        "code": 200,
        "language": "fr",
        "data": {
            "id_customer_group": 4,
            "name": "resst",
            "email": "bala@zaigoinfotech.com",
            "phone": "8667668231",
            "contact_person_name": "Bala Muruga",
            "created_at": "Mar 10, 2021",
            "notes": "po,pick,nuts,bolds",
            "address": [
                {
                    "id_tenant": 5,
                    "id_address": 5,
                    "contact_person_name": "Ray Zulauf I",
                    "line_1": "Unde aut sunt.",
                    "line_2": "Laboriosam perferendis praesentium.",
                    "city": null,
                    "branch_mobile_number": null,
                    "branch_email": null,
                    "state_name": "-NA-",
                    "country_name": "-NA-"
                }
            ]
        }
    }
    
    

    Tenant, Contractor, Vendor Company List API


    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/all - -
    token(Send using header) It must be authenticated token - -

    Success Response | Code-200

    
    {
        "message": "Company, Contractor, Vendor listed successfully.",
        "status": "success",
        "code": 200,
        "language": "fr",
        "data": {
            "tenant": {
                "id_tenant": 4,
                "company_name": null,
                "company_website": null,
                "industry": null,
                "company_size": null,
                "account_owner": null,
                "notes": null,
                "image": "http://localhost/zaiserve-api-saas/public/img/user_default.png",
                "domain": "http://devapp-saas.zaicrm.com",
                "company_address": [
                    {
                        "id_tenant": 4,
                        "id_address": 4,
                        "contact_person_name": "Addison Champlin",
                        "line_1": "Quo animi nisi.",
                        "line_2": "Tenetur et.",
                        "city": null,
                        "branch_mobile_number": null,
                        "branch_email": null,
                        "state_name": "-NA-",
                        "country_name": "India"
                    },
                    {
                        "id_tenant": 4,
                        "id_address": 24,
                        "contact_person_name": "Contact Person",
                        "line_1": "Address",
                        "line_2": null,
                        "city": null,
                        "branch_mobile_number": null,
                        "branch_email": null,
                        "state_name": "-NA-",
                        "country_name": "-NA-"
                    }
                ]
            },
            "contractor": [
                {
                    "id_customer_group": 2,
                    "name": "resst",
                    "email": "sharukasnh@sstssss.coms",
                    "phone": "8667668231",
                    "contact_person_name": null,
                    "address": [
                        {
                            "id_tenant": 1,
                            "id_address": 1,
                            "contact_person_name": "Bridgette Schmidt DDS",
                            "line_1": "Impedit asperiores.",
                            "line_2": "Harum explicabo.",
                            "city": null,
                            "branch_mobile_number": null,
                            "branch_email": null,
                            "state_name": "-NA-",
                            "country_name": "-NA-"
                        }
                    ],
                    "employee_detail": []
                },
                {
                    "id_customer_group": 3,
                    "name": "resst",
                    "email": "bala@zaigoinfotech.com",
                    "phone": "8667668231",
                    "contact_person_name": "Bala Muruga",
                    "address": [
                        {
                            "id_tenant": 3,
                            "id_address": 3,
                            "contact_person_name": "Nestor Schiller",
                            "line_1": "Reiciendis cupiditate.",
                            "line_2": "Animi in quaerat.",
                            "city": null,
                            "branch_mobile_number": null,
                            "branch_email": null,
                            "state_name": "-NA-",
                            "country_name": "India"
                        }
                    ],
                    "employee_detail": []
                },
                {
                    "id_customer_group": 7,
                    "name": "resst",
                    "email": "bala+12@zaigoinfotech.com",
                    "phone": "8667668231",
                    "contact_person_name": "Bala Muruga",
                    "address": [
                        {
                            "id_tenant": 11,
                            "id_address": 11,
                            "contact_person_name": "Wiley O'Connell",
                            "line_1": "Et eius repudiandae.",
                            "line_2": "Delectus sint.",
                            "city": null,
                            "branch_mobile_number": null,
                            "branch_email": null,
                            "state_name": "-NA-",
                            "country_name": "-NA-"
                        }
                    ],
                    "employee_detail": [
                        {
                            "id": 14,
                            "first_name": "Trisha",
                            "last_name": "Krishnan",
                            "email": "okkkkkkkayyyyyy@krishnan.com",
                            "id_customer_group": 7
                        },
                        {
                            "id": 15,
                            "first_name": "Trisha",
                            "last_name": "Krishnan",
                            "email": "prooro@krishnan.com",
                            "id_customer_group": 7
                        }
                    ]
                }
            ],
            "vendor": [
                {
                    "id_customer_group": 1,
                    "name": "resst",
                    "email": "sharukasnh@sstssss.coms",
                    "phone": "8667668231",
                    "contact_person_name": null,
                    "created_at": "Mar 11, 2021",
                    "address": []
                },
                {
                    "id_customer_group": 4,
                    "name": "resst",
                    "email": "bala@zaigoinfotech.com",
                    "phone": "8667668231",
                    "contact_person_name": "Bala Muruga",
                    "created_at": "Mar 11, 2021",
                    "address": [
                        {
                            "id_tenant": 5,
                            "id_address": 5,
                            "contact_person_name": "Ray Zulauf I",
                            "line_1": "Unde aut sunt.",
                            "line_2": "Laboriosam perferendis praesentium.",
                            "city": null,
                            "branch_mobile_number": null,
                            "branch_email": null,
                            "state_name": "-NA-",
                            "country_name": "-NA-"
                        }
                    ]
                },
                {
                    "id_customer_group": 5,
                    "name": "resst",
                    "email": "bala+1@zaigoinfotech.com",
                    "phone": "8667668231",
                    "contact_person_name": "Bala Muruga",
                    "created_at": "Mar 11, 2021",
                    "address": [
                        {
                            "id_tenant": 7,
                            "id_address": 7,
                            "contact_person_name": "Dr. Name Hartmann IV",
                            "line_1": "Minima molestiae expedita.",
                            "line_2": "Magnam ut omnis.",
                            "city": null,
                            "branch_mobile_number": null,
                            "branch_email": null,
                            "state_name": "-NA-",
                            "country_name": "-NA-"
                        }
                    ]
                },
                {
                    "id_customer_group": 6,
                    "name": "resst",
                    "email": "bala+12@zaigoinfotech.com",
                    "phone": "8667668231",
                    "contact_person_name": "Bala Muruga",
                    "created_at": "Mar 11, 2021",
                    "address": [
                        {
                            "id_tenant": 9,
                            "id_address": 9,
                            "contact_person_name": "Emmy Zemlak",
                            "line_1": "Ducimus omnis.",
                            "line_2": "Omnis natus inventore.",
                            "city": null,
                            "branch_mobile_number": null,
                            "branch_email": null,
                            "state_name": "-NA-",
                            "country_name": "-NA-"
                        }
                    ]
                }
            ]
        }
    }
    
    

    Company Address Delete


    Method: DELETE
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/address/delete
    _token * Bearer Token: "token" Pass it in header as all other request
    address_id * Required and it should be a address ID. required 1

    Company Address Deleted!


    If Company Address Deleted this is the success response which is expected.

    
    	{
    	    "message": "Deleted Successfully",
    	    "status": "success",
    	    "code": 200,
    	    "language": "fr",
    	    "data": {}
    	}
    
    

    Empty Request


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

    
    	{
    	    "message": "Bad Request.",
    	    "status": "bad_request",
    	    "code": 400,
    	    "language": "fr",
    	    "data": {
    	        "address_id": {
    	            "message": "Enter the address id."
    	        }
    	    }
    	}
    
    

    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! There is an error occured while processing your entry",
    	    "status": "failure",
    	    "code": 500,
    	    "language": "en",
    	    "data": {}
    	}
    
    

    Contractor Company Address Delete


    Method: DELETE
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/contractor/address/delete/{contractor_id}
    _token * Bearer Token: "token" Pass it in header as all other request
    address_id * Required and it should be a address ID. required 1

    Contractor Company Address Deleted!


    If Contractor Company Address Deleted this is the success response which is expected.

    
    	{
    	    "message": "Deleted Successfully",
    	    "status": "success",
    	    "code": 200,
    	    "language": "fr",
    	    "data": {}
    	}
    
    

    Empty Request


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

    
    	{
    	    "message": "Bad Request.",
    	    "status": "bad_request",
    	    "code": 400,
    	    "language": "fr",
    	    "data": {
    	        "address_id": {
    	            "message": "Enter the address id."
    	        }
    	    }
    	}
    
    

    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! There is an error occured while processing your entry",
    	    "status": "failure",
    	    "code": 500,
    	    "language": "en",
    	    "data": {}
    	}
    
    

    Vendor Company Address Delete


    Method: DELETE
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/vendor/address/delete/{vendor_id}
    _token * Bearer Token: "token" Pass it in header as all other request
    address_id * Required and it should be a address ID. required 1

    Vendor Company Address Deleted!


    If Vendor Company Address Deleted this is the success response which is expected.

    
    	{
    	    "message": "Deleted Successfully",
    	    "status": "success",
    	    "code": 200,
    	    "language": "fr",
    	    "data": {}
    	}
    
    

    Empty Request


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

    
    	{
    	    "message": "Bad Request.",
    	    "status": "bad_request",
    	    "code": 400,
    	    "language": "fr",
    	    "data": {
    	        "address_id": {
    	            "message": "Enter the address id."
    	        }
    	    }
    	}
    
    

    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! There is an error occured while processing your entry",
    	    "status": "failure",
    	    "code": 500,
    	    "language": "en",
    	    "data": {}
    	}
    
    

    User Address Delete


    Method: DELETE
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/vendor/address/delete/{vendor_id}
    _token * Bearer Token: "token" Pass it in header as all other request
    address_id * Required and it should be a address ID. required 1

    User Address Deleted!


    If User Address Deleted this is the success response which is expected.

    
    	{
    	    "message": "Deleted Successfully",
    	    "status": "success",
    	    "code": 200,
    	    "language": "fr",
    	    "data": {}
    	}
    
    

    Empty Request


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

    
    	{
    	    "message": "Bad Request.",
    	    "status": "bad_request",
    	    "code": 400,
    	    "language": "fr",
    	    "data": {
    	        "address_id": {
    	            "message": "Enter the address id."
    	        }
    	    }
    	}
    
    

    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! There is an error occured while processing your entry",
    	    "status": "failure",
    	    "code": 500,
    	    "language": "en",
    	    "data": {}
    	}
    
    

    Company Update


    For json params (addresses) validation error response - User story

    Method: POST
    Field * required Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/company OR http://qaapigateway-saas.zaicrm.com/z1/api/user/company
    _token * Bearer Token: "token" Pass it in header as all other request
    _method * put
    company_name *
    • Required
    • Input type - string
    • Minimum character allowed - 1
    • Maximum character allowed - 256
    • Special character allowed - all
    Zaigo Infotech Software Solutions
    account_owner
    • Optional
    • Input type string
    • Maximum character allowed - 256
    • Special character allowed - all
    Bala Muruga
    first_name
    • Optional
    • Input type string
    • Maximum character allowed - 256
    • Special character allowed - all
    Bala
    last_name
    • Optional
    • Input type string
    • Maximum character allowed - 256
    • Special character allowed - all
    Muruga
    company_website
    • Optional
    • Input type string
    • Maximum character allowed - 2048
    • Special character allowed - all
    https://www.facebook.com/
    notes
    • Optional
    • Input type string
    • Maximum character allowed - 2048
    • Special character allowed - all
    Ex: some words that you write down quickly to help you remember something.
    image 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 -
    industry
    • Optional
    • Input type dropdown
    • Hard coded values
    • Maximum character allowed - 64
    • Special character allowed - all
    Air Duct Cleaning

    Valid Inputs - "Air Duct Cleaning", "Applicances", "Automotive", "Carpet Cleaning", "Carpet Repair", "Concrete & Asphalt", "Credit Counselor", "Demolition", "Doors & Windows", "Drywall", "Electrical", "Elevators & Escalators", "Fencing", "Fireplace & Chimney", "Fitness Equipment", "Fleets & Trucks", "Flooring", "Furnitures & Upholstery", "Garage", "Genral Contractor", "Glass Repair", "Handyman", "Heating & Air Conditioning", "Home Cleaning", "Home Inspection", "Interior Design", "Interior & Surface Cleaning", "Janitorial", "Junk Removal", "Landscaping & Lawn", "Laundry", "Lighting", "Locksmith", "Massage", "Packers & Movers", "Painting", "Pest Control", "Plumbing", "Pool & Spa", "Property Management", "Real Estate", "Rug Cleaning", "Sewer & Septic", "Signages & Printing", "Smart Home", "Snow Removal", "Solar & Energy", "Tank Cleaning", "Water Heater", "Water Treatment", "Well Pumps", "Windows & Exterior Cleaning"

    company_size
    • Optional
    • Input type dropdown
    • Hard coded values
    • Maximum character allowed - 64
    • Special character allowed - all
    1 To 50

    Valid Inputs - "1 To 50", "51 To 100", "101 To 500", "Above 500"

    addresses
    • Optional
    • Valid json format
    name
    • Optional
    • Input type string
    • Maximum character allowed - 256
    • Special character allowed - all
    contact_person
    • Optional
    • Input type string
    • Maximum character allowed - 512
    • Special character allowed - all
    phone_number
    • Optional
    • Input type string
    • Maximum character allowed - 12
    • Minimum character allowed - 6
    • Special character allowed - all
    email
    • Optional
    • Input type string
    • Should be valid email format and RFC standard
    • 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","contact_person":"gavaskar","email":"gavaskar@zaigoinfotech.com","phone_number":"8178237271","line_1":"6-A, 6th Floor, Sapna Trade Centre","line_2":"poonamalle High Rd","city":"Egmore, Chennai","state":"8","zipcode":"600001","country":"6","address_id":""},{"name":"Vellore","contact_person":"Bala muruga","email":"bala@zaigoinfotech.com","phone_number":"9742317271","line_1":"9-A, 6th Floor, Vellore Trade Centre","line_2":"poonamalle High Rd","city":"Egmore, chennai","state":"8","zipcode":"602191","country":"7","address_id":""}]

    Notes

    In the above address json you have to pass address_id as empty(""). For Mobile number validated if exits as 10 digits. Also for Zipcode validated if exists as 6 digits

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

    Company Updated!


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

    
    	{
    	    "message": "Company Information updated successfully",
    	    "status": "success",
    	    "code": 200,
    	    "language": "fr",
    	    "data": {}
    	}
    
    

    Empty Request


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

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

    Invalid inputs for required params


    Provided Inputs

    company_name: dssdfsdfklsdflkjsdfkljsdfklsdfjsdjfsdlkfsdfkljsdlfjsdlfsdfklsdfjklsdkljdsfjkldsff

    
    {
        "message": "Bad Request.",
        "status": "bad_request",
        "code": 400,
        "language": "fr",
        "data": {
            "company_name": {
                "message": "Please enter the company name within 50 Characters."
            }
        }
    }
    If invalid address json given,
    "addresses": [
    
                {
                    "name": {
                        "code": "Q1004",
                        "message": "Addresses name exceeds 256 characters"
                    },
                    "email": null,
                    "contact_person": {
                        "code": "Q1004",
                        "message": "Contact person name exceeds 512 characters"
                    },
                    "phone_number": null,
                    "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": "Q1002",
                        "message": "Selected state is invalid"
                    },
                    "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"
                    },
                    "email": {
                        "code": "Q1002",
                        "message": "Please provide valid email"
                    },
                    "contact_person": {
                        "code": "Q1004",
                        "message": "Contact person name exceeds 512 characters"
                    },
                    "phone_number": {
                        "code": "Q1005",
                        "message": "Zipcode should be minimum 6 characters"
                    },
                    "line_1": {
                        "code": "Q1004",
                        "message": "Line 1 exceeds 256 characters"
                    },
                    "line_2": null,
                    "country": null,
                    "state": null,
                    "city": null,
                    "zipcode": null
                },
                {
                    "name": null,
                    "email": {
                        "code": "Q1002",
                        "message": "Please provide valid email"
                    },
                    "contact_person": null,
                    "phone_number": 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
            ]
        }
    
    

    Some optional validations


    
    {
        "message": "Bad Request.",
        "status": "bad_request",
        "code": 400,
        "language": "fr",
        "data": {
        	"account_owner": {
                "message": "Please enter the owner name within 50 Characters."
            },
            "company_website": {
                "message": "The company website is not a valid URL."
            },
            "image": {
                "message": "Logo must be in a format of jpg, jpeg, png"
            },
            "addresses": {
                "message": "The addresses must be a valid JSON string."
            }
        }
    }
    
    

    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 Update Company",
    		"status": "failure",
    		"code": 500,
    		"language": "en",
    		"data": {}
    	}
    
    

    All Invalid Response


    Without Token and Invalid Token Response

    
    	{
        "message": "Unauthorized",
        "status": "unauthorized",
        "code": 401,
        "language": "en",
        "data": {
            "message": "Session Expired. Please login to continue"
        }
    }
    
    

    Error Response

    
    {
        "message": "Bad Request.",
        "status": "bad_request",
        "code": 400,
        "language": "en",
        "data": {
            "company_name": {
                "message": "This field is required."
            },
            "company_name": {
                "message": "Please enter the company name within 256 Characters."
            },
            "account_owner": {
                "message": "Please enter the owner name within 256 Characters."
            },
            "company_website": {
                "message": "The company website may not be greater than 2048 characters."
            },
            "notes": {
                "message": "Please enter the notes within 2048 Characters."
            },
             "image": {
                "message": "Logo must be in a format of png, jpeg, jpg"
            },
             "image": {
                "message": "Logo file size should not exceeds 2048 KB"
            },
            "industry": {
                "message": "The industry should be anyone of Air Duct Cleaning, Applicances, Automotive, Carpet Cleaning, Carpet Repair, Concrete & Asphalt, Credit Counselor, Demolition, Doors & Windows, Drywall, Electrical, Elevators & Escalators, Fencing, Fireplace & Chimney, Fitness Equipment, Fleets & Trucks, Flooring, Furnitures & Upholstery, Garage, Genral Contractor, Glass Repair, Handyman, Heating & Air Conditioning, Home Cleaning, Home Inspection, Interior Design, Interior & Surface Cleaning, Janitorial, Junk Removal, Landscaping & Lawn, Laundry, Lighting, Locksmith, Massage, Packers & Movers, Painting, Pest Control, Plumbing, Pool & Spa, Property Management, Real Estate, Rug Cleaning, Sewer & Septic, Signages & Printing, Smart Home, Snow Removal, Solar & Energy, Tank Cleaning, Water Heater, Water Treatment, Well Pumps, Windows & Exterior Cleaning"
            },
                "company_size": {
                "message": "The company size should be anyone of 1 To 50, 51 To 100, 101 To 500, Above 500"
            },
    
        If invalid address json given,
    "addresses": [
    
                {
                    "name": {
                        "code": "Q1004",
                        "message": "Addresses name exceeds 256 characters"
                    },
                    "email": null,
                    "contact_person": {
                        "code": "Q1004",
                        "message": "Contact person name exceeds 512 characters"
                    },
                    "phone_number": null,
                    "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"
                    },
                    "email": {
                        "code": "Q1002",
                        "message": "Please provide valid email"
                    },
                    "contact_person": {
                        "code": "Q1004",
                        "message": "Contact person name exceeds 512 characters"
                    },
                    "phone_number": {
                        "code": "Q1005",
                        "message": "Zipcode should be minimum 6 characters"
                    },
                    "line_1": {
                        "code": "Q1004",
                        "message": "Line 1 exceeds 256 characters"
                    },
                    "line_2": null,
                    "country": null,
                    "state": null,
                    "city": null,
                    "zipcode": null
                },
                {
                    "name": null,
                    "email": {
                        "code": "Q1002",
                        "message": "Please provide valid email"
                    },
                    "contact_person": null,
                    "phone_number": 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
            ]
        }
        }
    }
    
    

    Contractor Delete API


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

    Delete Response


    Success response which is expected.

    
    {
        "message": "Contractor 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": {}
    }
    
    

    Vendor Delete API


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

    Delete Response


    Success response which is expected.

    
    {
        "message": "Vendor 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": {}
    }
    
    

    Send Invite


    Method: POST
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/sendinvite
    _token * Bearer Token: "token" Pass it in header as all other request
    send_invite * It's required, it must be a json in mentioned format ['required', 'json', new SendInviteValidation(6)] [{"first_name":"partha","last_name":"sarathi","user_type":"2","email":"sriram+11@zaigoinfotech.com"},{"first_name":"bala","last_name":"muruga","user_type":"2","email":"bala+91@zaigoinfotech.com"}]
    message It's Optional, Maximum character - 2048 Optional Accept Invite to Join Fieldy

    Note: user_type Property in Send invite should be role_id, please get your role id from the Roles listing api and if the selected role is technician means it may throw error based on the package setting of Tenant, if tenant don't have any limitations on technicians means we will be accepting any amount of technicians. In case if limitation is there, we will be checking the existing technicians and contractors and if the total count is exceeded means we will be throwing error.

    Invite Sent!


    If invite send successfully this is the success response which is expected.

    
    	{
    	    "message": "Invitation sent successfully to 2 user(s)",
    	    "status": "success",
    	    "code": 200,
    	    "language": "fr",
    	    "data": {}
    	}
    
    

    Empty Request


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

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

    Invalid inputs for required params


    Provided Inputs

    send_invite: [{"first_name":"partha","last_name":"sarathi","user_type":"3""email":"partha@zaigoinfotech.com"},{"first_name":"bala","last_name":"muruga","user_type":"3","email":"bala@zaigoinfotech.com"}]

    
    {
        "message": "Bad Request.",
        "status": "bad_request",
        "code": 400,
        "language": "en",
        "data": {
            "send_invite": [
                {
                    "first_name": {
                        "code": "Q1001",
                        "message": "Enter the valid first name."
                    },
                    "last_name": {
                        "code": "Q1004",
                        "message": "Last name should not exceed 256 characters."
                    },
                    "email": {
                        "code": "Q1002",
                        "message": "Email already exists"
                    },
                    "user_type": {
                        "code": "Q1004",
                        "message": "Please select valid user type 7,8,9,10"
                    }
                },
                {
                    "first_name": {
                        "code": "Q1004",
                        "message": "First name should not exceed 256 characters."
                    },
                    "last_name": null,
                    "email": {
                        "code": "Q1001",
                        "message": "Email is required"
                    },
                    "user_type": null
                }
            ],
            "message": {
                "message": "The message may not be greater than 2048 characters."
            }
        }
    }
    
    

    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 Send Invite",
    		"status": "failure",
    		"code": 500,
    		"language": "en",
    		"data": {}
    	}
    
    

    User Assign for a Task


    Method: POST
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/task/{task_id}
    _token * Bearer Token: "token" Pass it in header as all other request
    _method * put
    assigned_to * 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"]

    Invite Sent!


    If assigned successfully this is the success response which is expected.

    
    	{
    	    "message": "User Assigned",
    	    "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": {
    	        "assigned_to": {
    	            "message": "Please specify Assign to in a specific option"
    	        }
    	    }
    	}
    
    

    Invalid inputs for required params(If assigned user_id sent)


    Provided Inputs

    assigned_to: ["11"]

    
    {
        "message": "Bad Request.",
        "status": "bad_request",
        "code": 400,
        "language": "en",
        "data": {
            "assigned_to": {
                "message": "1 User has been already assigned in this task"
            }
        }
    }
    
    

    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 assign user",
    	    "status": "failure",
    	    "code": 500,
    	    "language": "en",
    	    "data": {}
    	}
    
    

    User List


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

    Get Users!


    Success response which is expected.

    
    	{
    	    "message": "User Listed Successfully",
    	    "status": "success",
    	    "code": 200,
    	    "language": "en",
    	    "data": {
    	        "admin": [
    	            {
    	                "id": "1",
    	                "name": "Zaigo Infotech",
    	                "employee_type": "Admin"
    	            }
    	        ],
    	        "manager": [
    	            {
    	                "id": "8",
    	                "name": "Bala Muruga",
    	                "employee_type": "Manager"
    	            }
    	        ],
    	        "operator": [
    	            {
    	                "id": "9",
    	                "name": "Bala Muruga",
    	                "employee_type": "Operator"
    	            },
    	            {
    	                "id": "13",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Operator"
    	            }
    	        ],
    	        "technician": [
    	            {
    	                "id": "10",
    	                "name": "Bala Muruga",
    	                "employee_type": "Technician"
    	            }
    	        ],
    	        "contractor": [
    	            {
    	                "id": "11",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Contractor"
    	            },
    	            {
    	                "id": "12",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Contractor"
    	            },
    	            {
    	                "id": "14",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Contractor"
    	            },
    	            {
    	                "id": "15",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Contractor"
    	            }
    	        ],
    	        "all": [
    	            {
    	                "id": "1",
    	                "name": "Zaigo Infotech",
    	                "employee_type": "Admin"
    	            },
    	            {
    	                "id": "8",
    	                "name": "Bala Muruga",
    	                "employee_type": "Manager"
    	            },
    	            {
    	                "id": "9",
    	                "name": "Bala Muruga",
    	                "employee_type": "Operator"
    	            },
    	            {
    	                "id": "10",
    	                "name": "Bala Muruga",
    	                "employee_type": "Technician"
    	            },
    	            {
    	                "id": "11",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Contractor"
    	            },
    	            {
    	                "id": "12",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Contractor"
    	            },
    	            {
    	                "id": "13",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Operator"
    	            },
    	            {
    	                "id": "14",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Contractor"
    	            },
    	            {
    	                "id": "15",
    	                "name": "Trisha Krishnan",
    	                "employee_type": "Contractor"
    	            }
    	        ]
    	    }
    	}
    
    

    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": {}
    	}
    
    

    Post Comment


    Method: POST
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/task/{task_id}
    _token * Bearer Token: "token" Pass it in header as all other request
    _method * put
    comment * User comment on particular task required|min:10|max:300 Hello Bala

    Commented Sent!


    If commented successfully this is the success response which is expected.

    
    	{
    	    "message": "Comment Posted",
    	    "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": {
    	        "comment": {
    	            "message": "This field is required."
    	        }
    	    }
    	}
    
    

    Invalid inputs for required params(If assigned user_id sent)


    Provided Inputs

    comment: kkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqwehqjwegkkahdhkasdtqygehqw

    
    {
        "message": "Bad Request.",
        "status": "bad_request",
        "code": 400,
        "language": "en",
        "data": {
            "comment": {
                "message": "The comment may not be greater than 300 characters."
            }
        }
    }
    
    

    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 update comment for this task.",
    	    "status": "failure",
    	    "code": 500,
    	    "language": "en",
    	    "data": {}
    	}
    
    

    Remove User from a Task


    Method: POST | Body Params
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/task/{task_id}
    _token * Bearer Token: "token" Pass it in header as all other request
    _method * put
    user_id * User ID on particular task required 11

    Removed Success!


    If success response which is expected.

    
    	{
    	    "message": "User Removed",
    	    "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": {
    	        "user_id": {
    	            "message": "Enter the user id."
    	        }
    	    }
    	}
    
    

    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 remove user",
    	    "status": "failure",
    	    "code": 500,
    	    "language": "en",
    	    "data": {}
    	}
    
    

    User Permission Update


    Method: POST | Body Params
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/permission/update/{user_id}
    _token * Bearer Token: "token" Pass it in header as all other request
    admin admin must be yes or no nullable yes
    technician technician must be yes or no nullable yes
    customer customer must be yes or no nullable yes
    access access must be yes or no nullable yes
    customer customer must be yes or no nullable yes
    job job must be yes or no nullable yes
    quote quote must be yes or no nullable yes
    invoice invoice must be yes or no nullable yes
    product product must be yes or no nullable yes
    task task must be yes or no nullable yes
    timesheet timesheet must be yes or no nullable yes

    Success Response!


    If success response which is expected.

    
    	{
    	    "message": "Menus and Permissions updated successfully",
    	    "status": "success",
    	    "code": 200,
    	    "language": "en",
    	    "data": []
    	}
    
    

    Invalid inputs for params


    Provided Inputs

    customer: yess

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

    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 process your request",
    	    "status": "failure",
    	    "code": 500,
    	    "language": "en",
    	    "data": {}
    	}
    
    

    Location List


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

    Success Response!


    If success response which is expected.

    
    {
        "message": "Country listed successfully.",
        "status": "success",
        "code": 200,
        "language": "en",
        "data": [
            {
                "id": 1,
                "name": "india",
                "states": [
                    {
                        "id": 1,
                        "name": "tamil nadu",
                        "cities": [
                            {
                                "id": 1,
                                "name": "chennai"
                            },
                            {
                                "id": 2,
                                "name": "kanchipuram"
                            }
                        ]
                    },
                    {
                        "id": 2,
                        "name": "kerala",
                        "cities": [
                            {
                                "id": 3,
                                "name": "trivandrum"
                            },
                            {
                                "id": 4,
                                "name": "kochi"
                            }
                        ]
                    }
                ]
            },
            {
                "id": 2,
                "name": "south africa",
                "states": [
                    {
                        "id": 3,
                        "name": "johannesburg",
                        "cities": []
                    },
                    {
                        "id": 4,
                        "name": "capetown",
                        "cities": []
                    }
                ]
            }
        ]
    }
    
    

    Validation Rules


    Method: GET
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/rules/{module}
    http://qaapi-saas.zaicrm.com/z1/api/rules/{module}
    _token * Bearer Token: "token" Pass it in header as all other request
    Module Name ['user', 'customer', 'invoice', 'quote', 'job', 'request','inventory'] required user

    Success Response!


    If success response which is expected.

    
    	{
    		"message": "Lists! retrieved successfully",
    		"status": "success",
    		"code": 200,
    		"language": "en",
    		"data": {
    			"module": "user",
    			"rule_type": "global_rules",
    			"validation_rules": {
    				"company_edit": {
    					"image": {
    						"type": "file",
    						"is_required": false,
    						"allowed_formats": [
    							"png",
    							"jpeg",
    							"jpg"
    						],
    						"is_multiple_upload": false,
    						"maximum_upload_size": 2048,
    						"maximum_files_upload": null
    					},
    					"notes": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 2048,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"industry": {
    						"type": "dropdown",
    						"is_required": false,
    						"is_hardcoded": true,
    						"valid_inputs": [
    							"Air Duct Cleaning",
    							"Applicances",
    							"Automotive",
    							"Carpet Cleaning",
    							"Carpet Repair",
    							"Concrete & Asphalt",
    							"Credit Counselor",
    							"Demolition",
    							"Doors & Windows",
    							"Drywall",
    							"Electrical",
    							"Elevators & Escalators",
    							"Fencing",
    							"Fireplace & Chimney",
    							"Fitness Equipment",
    							"Fleets & Trucks",
    							"Flooring",
    							"Furnitures & Upholstery",
    							"Garage",
    							"Genral Contractor",
    							"Glass Repair",
    							"Handyman",
    							"Heating & Air Conditioning",
    							"Home Cleaning",
    							"Home Inspection",
    							"Interior Design",
    							"Interior & Surface Cleaning",
    							"Janitorial",
    							"Junk Removal",
    							"Landscaping & Lawn",
    							"Laundry",
    							"Lighting",
    							"Locksmith",
    							"Massage",
    							"Packers & Movers",
    							"Painting",
    							"Pest Control",
    							"Plumbing",
    							"Pool & Spa",
    							"Property Management",
    							"Real Estate",
    							"Rug Cleaning",
    							"Sewer & Septic",
    							"Signages & Printing",
    							"Smart Home",
    							"Snow Removal",
    							"Solar & Energy",
    							"Tank Cleaning",
    							"Water Heater",
    							"Water Treatment",
    							"Well Pumps",
    							"Windows & Exterior Cleaning"
    						],
    						"maximum_characters": 64,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"addresses": {
    						"type": "json",
    						"addresses": [
    							{
    								"city": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"name": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"email": {
    									"type": "email",
    									"is_unique": true,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"state": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": false,
    									"valid_inputs": [],
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"line_1": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"line_2": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"phones": {
    									"type": "json",
    									"phones": [
    										{
    											"label": {
    												"type": "dropdown",
    												"is_required": false,
    												"is_hardcoded": true,
    												"valid_inputs": [
    													"Work",
    													"Home",
    													"Personal",
    													"Other"
    												],
    												"maximum_characters": 64,
    												"minimum_characters": 0,
    												"special_characters_allowed": [
    													"all"
    												],
    												"special_characters_restricted": []
    											},
    											"number": {
    												"type": "number",
    												"is_decimal": false,
    												"is_required": false,
    												"minimum_digit": 6,
    												"maximum_digits": 12,
    												"maximum_digits_with_decimal_point": null
    											}
    										}
    									],
    									"is_required": false,
    									"maximum_count": null,
    									"minimum_count": null
    								},
    								"country": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": false,
    									"valid_inputs": [],
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"zipcode": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 10,
    									"minimum_characters": 3,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"contact_person": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 512,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								}
    							}
    						],
    						"is_required": false,
    						"maximum_count": null,
    						"minimum_count": null
    					},
    					"company_name": {
    						"type": "string",
    						"is_unique": true,
    						"is_required": true,
    						"maximum_characters": 256,
    						"minimum_characters": 1,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"company_size": {
    						"type": "dropdown",
    						"is_required": false,
    						"is_hardcoded": true,
    						"valid_inputs": [
    							"1 To 50",
    							"51 To 100",
    							"101 To 500",
    							"Above 500"
    						],
    						"maximum_characters": 64,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"account_owner": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 256,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"company_website": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 2048,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					}
    				},
    				"user_create_edit": {
    					"email": {
    						"type": "email",
    						"is_unique": true,
    						"is_required": false,
    						"maximum_characters": 256,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"phones": {
    						"type": "json",
    						"phones": [
    							{
    								"label": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": true,
    									"valid_inputs": [
    										"Work",
    										"Home",
    										"Personal",
    										"Other"
    									],
    									"maximum_characters": 64,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"number": {
    									"type": "number",
    									"is_decimal": false,
    									"is_required": false,
    									"minimum_digit": 6,
    									"maximum_digits": 12,
    									"maximum_digits_with_decimal_point": null
    								}
    							}
    						],
    						"is_required": false,
    						"maximum_count": null,
    						"minimum_count": null
    					},
    					"role_id": {
    						"type": "dropdown",
    						"is_required": true,
    						"is_hardcoded": false,
    						"valid_inputs": [],
    						"maximum_characters": null,
    						"minimum_characters": null,
    						"special_characters_allowed": [],
    						"special_characters_restricted": []
    					},
    					"addresses": {
    						"type": "json",
    						"addresses": [
    							{
    								"city": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"state": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": false,
    									"valid_inputs": [],
    									"maximum_characters": 64,
    									"minimum_characters": 0,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"line_1": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"line_2": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"country": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": false,
    									"valid_inputs": [],
    									"maximum_characters": 64,
    									"minimum_characters": 0,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"zipcode": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 10,
    									"minimum_characters": 3,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								}
    							}
    						],
    						"is_required": false,
    						"maximum_count": null,
    						"minimum_count": null
    					},
    					"job_title": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 256,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"last_name": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 256,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"first_name": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": true,
    						"maximum_characters": 256,
    						"minimum_characters": 1,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"user_image": {
    						"type": "file",
    						"is_required": false,
    						"allowed_formats": [
    							"png",
    							"jpeg",
    							"jpg"
    						],
    						"is_multiple_upload": false,
    						"maximum_upload_size": 2048,
    						"maximum_files_upload": null
    					},
    					"social_media": {
    						"type": "json",
    						"is_required": false,
    						"social_media": {
    							"social_media": {
    								"twitter": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"website": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"facebook": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"linkedin": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"messenger": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								}
    							}
    						},
    						"maximum_count": null,
    						"minimum_count": null
    					}
    				},
    				"user_send_invite": {
    					"type": "json",
    					"is_required": false,
    					"send_invite": {
    						"send_invite": [
    							{
    								"email": {
    									"type": "email",
    									"is_unique": true,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									]
    								},
    								"message": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 2048,
    									"minimum_characters": null,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"last_name": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									]
    								},
    								"user_type": {
    									"type": "dropdown",
    									"is_required": true,
    									"is_hardcoded": false,
    									"valid_inputs": [],
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"first_name": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": true,
    									"maximum_characters": 256,
    									"minimum_characters": 1,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								}
    							}
    						]
    					},
    					"maximum_count": null,
    					"minimum_count": null
    				},
    				"company_vendor_create_edit": {
    					"fax": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 25,
    						"minimum_characters": 3,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"name": {
    						"type": "string",
    						"is_unique": true,
    						"is_required": true,
    						"maximum_characters": 256,
    						"minimum_characters": 1,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"email": {
    						"type": "email",
    						"is_unique": true,
    						"is_required": false,
    						"maximum_characters": 256,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"phones": {
    						"type": "json",
    						"phones": [
    							{
    								"label": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": true,
    									"valid_inputs": [
    										"Work",
    										"Home",
    										"Personal",
    										"Other"
    									],
    									"maximum_characters": 64,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"number": {
    									"type": "number",
    									"is_decimal": false,
    									"is_required": false,
    									"minimum_digit": 6,
    									"maximum_digits": 12,
    									"maximum_digits_with_decimal_point": null
    								}
    							}
    						],
    						"is_required": false,
    						"maximum_count": null,
    						"minimum_count": null
    					},
    					"website": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 2048,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"addresses": {
    						"type": "json",
    						"addresses": [
    							{
    								"city": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"state": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": false,
    									"valid_inputs": [],
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"line_1": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"line_2": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"country": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": false,
    									"valid_inputs": [],
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"zipcode": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 10,
    									"minimum_characters": 3,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								}
    							}
    						],
    						"is_required": false,
    						"maximum_count": 2,
    						"minimum_count": 0
    					},
    					"company_logo": {
    						"type": "file",
    						"is_required": false,
    						"allowed_formats": [
    							"png",
    							"jpeg",
    							"jpg"
    						],
    						"is_multiple_upload": false,
    						"maximum_upload_size": 2048,
    						"maximum_files_upload": null
    					},
    					"products_services": {
    						"type": "json",
    						"is_required": false,
    						"maximum_count": 64,
    						"minimum_count": 0,
    						"products_services": [
    							{
    								"products_services": {
    									"type": "string",
    									"is_unique": false,
    									"maximum_characters": 256,
    									"minimum_characters": 1,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								}
    							}
    						]
    					},
    					"contact_person_name": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 512,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					}
    				},
    				"user_contractor_create_edit": {
    					"email": {
    						"type": "email",
    						"is_unique": true,
    						"is_required": false,
    						"maximum_characters": 256,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"phones": {
    						"type": "json",
    						"phones": {
    							"phones": [
    								{
    									"label": {
    										"type": "dropdown",
    										"is_required": false,
    										"is_hardcoded": true,
    										"valid_inputs": [
    											"Work",
    											"Home",
    											"Personal",
    											"Other"
    										],
    										"maximum_characters": 64,
    										"minimum_characters": 0,
    										"special_characters_allowed": [
    											"all"
    										],
    										"special_characters_restricted": []
    									},
    									"number": {
    										"type": "number",
    										"is_decimal": false,
    										"is_required": false,
    										"minimum_digit": 6,
    										"maximum_digits": 12,
    										"maximum_digits_with_decimal_point": null
    									}
    								}
    							]
    						},
    						"is_required": false,
    						"maximum_count": null,
    						"minimum_count": null
    					},
    					"addresses": {
    						"type": "json",
    						"addresses": {
    							"addresses": [
    								{
    									"city": {
    										"type": "string",
    										"is_unique": false,
    										"is_required": false,
    										"maximum_characters": 256,
    										"minimum_characters": 0,
    										"special_characters_allowed": [
    											"all"
    										],
    										"special_characters_restricted": []
    									},
    									"state": {
    										"type": "dropdown",
    										"is_required": false,
    										"is_hardcoded": false,
    										"valid_inputs": [],
    										"maximum_characters": 64,
    										"minimum_characters": 0,
    										"special_characters_allowed": [],
    										"special_characters_restricted": []
    									},
    									"line_1": {
    										"type": "string",
    										"is_unique": false,
    										"is_required": false,
    										"maximum_characters": 256,
    										"minimum_characters": 0,
    										"special_characters_allowed": [
    											"all"
    										],
    										"special_characters_restricted": []
    									},
    									"line_2": {
    										"type": "string",
    										"is_unique": false,
    										"is_required": false,
    										"maximum_characters": 256,
    										"minimum_characters": 0,
    										"special_characters_allowed": [
    											"all"
    										],
    										"special_characters_restricted": []
    									},
    									"country": {
    										"type": "dropdown",
    										"is_required": false,
    										"is_hardcoded": false,
    										"valid_inputs": [],
    										"maximum_characters": 64,
    										"minimum_characters": 0,
    										"special_characters_allowed": [],
    										"special_characters_restricted": []
    									},
    									"zipcode": {
    										"type": "string",
    										"is_unique": false,
    										"is_required": false,
    										"maximum_characters": 10,
    										"minimum_characters": 3,
    										"special_characters_allowed": [],
    										"special_characters_restricted": []
    									}
    								}
    							]
    						},
    						"is_required": false,
    						"maximum_count": 2,
    						"minimum_count": 0
    					},
    					"last_name": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 256,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						]
    					},
    					"first_name": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": true,
    						"maximum_characters": 256,
    						"minimum_characters": 1,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"social_media": {
    						"type": "json",
    						"is_required": false,
    						"social_media": {
    							"twitter": {
    								"type": "string",
    								"is_unique": false,
    								"is_required": false,
    								"maximum_characters": null,
    								"minimum_characters": null,
    								"special_characters_allowed": [],
    								"special_characters_restricted": []
    							},
    							"website": {
    								"type": "string",
    								"is_unique": false,
    								"is_required": false,
    								"maximum_characters": null,
    								"minimum_characters": null,
    								"special_characters_allowed": [],
    								"special_characters_restricted": []
    							},
    							"facebook": {
    								"type": "string",
    								"is_unique": false,
    								"is_required": false,
    								"maximum_characters": null,
    								"minimum_characters": null,
    								"special_characters_allowed": [],
    								"special_characters_restricted": []
    							},
    							"linkedin": {
    								"type": "string",
    								"is_unique": false,
    								"is_required": false,
    								"maximum_characters": null,
    								"minimum_characters": null,
    								"special_characters_allowed": [],
    								"special_characters_restricted": []
    							},
    							"messenger": {
    								"type": "string",
    								"is_unique": false,
    								"is_required": false,
    								"maximum_characters": null,
    								"minimum_characters": null,
    								"special_characters_allowed": [],
    								"special_characters_restricted": []
    							}
    						},
    						"maximum_count": null,
    						"minimum_count": null
    					},
    					"contractor_type": {
    						"type": "dropdown",
    						"is_required": false,
    						"is_hardcoded": true,
    						"valid_inputs": [
    							"1",
    							"2"
    						],
    						"maximum_characters": 0,
    						"minimum_characters": 0,
    						"special_characters_allowed": [],
    						"special_characters_restricted": []
    					},
    					"service_type_id": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 0,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"business_unit_id": {
    						"type": "string",
    						"is_required": false,
    						"maximum_characters": 0,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					}
    				},
    				"company_contractor_create_edit": {
    					"fax": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 25,
    						"minimum_characters": 3,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"name": {
    						"type": "string",
    						"is_unique": true,
    						"is_required": true,
    						"maximum_characters": 256,
    						"minimum_characters": 1,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"email": {
    						"type": "email",
    						"is_unique": true,
    						"is_required": false,
    						"maximum_characters": 256,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"phones": {
    						"type": "json",
    						"phones": [
    							{
    								"label": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": true,
    									"valid_inputs": [
    										"Work",
    										"Home",
    										"Personal",
    										"Other"
    									],
    									"maximum_characters": 64,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"number": {
    									"type": "number",
    									"is_decimal": false,
    									"is_required": false,
    									"minimum_digit": 6,
    									"maximum_digits": 12,
    									"maximum_digits_with_decimal_point": null
    								}
    							}
    						],
    						"is_required": false,
    						"maximum_count": null,
    						"minimum_count": null
    					},
    					"website": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 2048,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					},
    					"addresses": {
    						"type": "json",
    						"addresses": [
    							{
    								"city": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"state": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": false,
    									"valid_inputs": [],
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"line_1": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"line_2": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 256,
    									"minimum_characters": 0,
    									"special_characters_allowed": [
    										"all"
    									],
    									"special_characters_restricted": []
    								},
    								"country": {
    									"type": "dropdown",
    									"is_required": false,
    									"is_hardcoded": false,
    									"valid_inputs": [],
    									"maximum_characters": null,
    									"minimum_characters": null,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								},
    								"zipcode": {
    									"type": "string",
    									"is_unique": false,
    									"is_required": false,
    									"maximum_characters": 10,
    									"minimum_characters": 3,
    									"special_characters_allowed": [],
    									"special_characters_restricted": []
    								}
    							}
    						],
    						"is_required": false,
    						"maximum_count": null,
    						"minimum_count": null
    					},
    					"company_logo": {
    						"type": "file",
    						"is_required": false,
    						"allowed_formats": [
    							"png",
    							"jpeg",
    							"jpg"
    						],
    						"is_multiple_upload": false,
    						"maximum_upload_size": 2048,
    						"maximum_files_upload": null
    					},
    					"contact_person_name": {
    						"type": "string",
    						"is_unique": false,
    						"is_required": false,
    						"maximum_characters": 512,
    						"minimum_characters": 0,
    						"special_characters_allowed": [
    							"all"
    						],
    						"special_characters_restricted": []
    					}
    				}
    			}
    		}
    	}
    
    

    Store User Mobile Info


    User Story: This API endpoint will be used for storing mobile user Information like device android or iOS and FCM token to send push notificatons on mobile logged users. Mobile team have to call this endpoint to save those information.


    Method: POST
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/mobileinfo
    http://qaapi-saas.zaicrm.com/z1/api/user/mobileinfo
    _token * Bearer Token: "token" Pass it in header as all other request
    * device ['android', 'ios'] required android
    * fcm_token It should be FCM generated token from android or iOS device. required bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...

    Success Response!


    If success response which is expected.

    
    	{
    		"message": "Mobile user information stored successfully",
    		"status": "success",
    		"code": 200,
    		"language": "en",
    		"data": {}
    	}
    
    

    Technician Stats


    User Story: This API endpoint will be used to get current logged in technician stats information.


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

    Success Response!


    If success response which is expected.

    
    	{
    		"total_services": "10",
    		"jobs": "6",
    		"requests": "4",
    		"todays_appoinments": "2",
    		"csat_score": "0"
    	}
    
    

    Business Settings List


    User Story: This API endpoint will be used to get current logged in tenants business related settings.


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

    Success Response!


    If success response which is expected.

    				
    	{
    		"message": "Tenant business settings listed successfully.",
    		"status": "success",
    		"code": 200,
    		"language": "en",
    		"data": {
    			"working_hours": [
    				{
    					"sunday": false,
    					"monday": {
    						"start": "09:00 AM",
    						"end": "07:00 PM"
    					},
    					"tuesday": {
    						"start": "09:00 AM",
    						"end": "07:00 PM"
    					},
    					"wednesday": {
    						"start": "09:00 AM",
    						"end": "07:00 PM"
    					},
    					"thursday": {
    						"start": "09:00 AM",
    						"end": "07:00 PM"
    					},
    					"friday": {
    						"start": "09:00 AM",
    						"end": "07:00 PM"
    					},
    					"saturday": {
    						"start": "09:00 AM",
    						"end": "07:00 PM"
    					}
    				}
    			],
    			"default_business_unit": "general",
    			"service_type": [
    				{
    					"projects": false,
    					"installation": {
    						"days": 10,
    						"time": "07:00 PM"
    					},
    					"repair": {
    						"days": 1,
    						"time": "09:00 AM"
    					},
    					"maintanance": false
    				}
    			]
    		}
    	}
    				
    				

    Success Response!


    If success response which is expected.

    				
    	{
    		"message": "Tenant financial settings listed successfully.",
    		"status": "success",
    		"code": 200,
    		"language": "en",
    		"data": {
    			"quote_prefix": {
    				"prefix": "QUF0522",
    				"close_books": "monthly",
    				"default_tax": { "id": 2, "name": "GST"},
    				"default_currency": { "id": 5, "name": "Indian Rupee"},
    			},
    			"invoice_prefix": {
    				"prefix": "INF0522",
    				"close_books": "monthly",
    				"default_tax": { "id": 2, "name": "GST"},
    				"default_currency": { "id": 5, "name": "Indian Rupee"},
    			}
    		}
    	}
    				
    				

    Update Business Settings


    User Story: This API endpoint will be used for update tenant specific business settings.


    Method: POST
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/business/setting
    http://qaapi-saas.zaicrm.com/z1/api/user/business/setting
    _token * Bearer Token: "token" Pass it in header as all other request
    * Name ['business_days', 'financial_settings', 'tax_settings', 'regional_settings'] required business_days
    * value It should be Json formated setings objects. required { "working_hours": [ { "sunday": null, "monday": { "start": "09:00 AM", "end": "07:00 PM" }, "tuesday": { "start": "09:00 AM", "end": "07:00 PM" }, "wednesday": { "start": "09:00 AM", "end": "07:00 PM" }, "thursday": { "start": "09:00 AM", "end": "07:00 PM" }, "friday": { "start": "09:00 AM", "end": "07:00 PM" }, "saturday": { "start": "09:00 AM", "end": "07:00 PM" } } ], "default_business_unit": "general", "service_type": [ { "projects": null, "installation": { "days": 10, "time": "07:00 PM" }, "repair": { "days": 1, "time": "09:00 AM" }, "maintanance": null } ] }

    Success Response!


    If success response which is expected.

    				
    			{
    				"message": "Tenant business settings updated successfully.",
    				"status": "success",
    				"code": 200,
    				"language": "en",
    				"data": {}
    			}
    				
    				

    Update financial Settings


    User Story: This API endpoint will be used for update tenant specific business financial settings.


    Method: POST
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/user/business/setting
    http://qaapi-saas.zaicrm.com/z1/api/user/business/setting
    _token * Bearer Token: "token" Pass it in header as all other request
    * Name ['business_days', 'financial_settings', 'tax_settings', 'regional_settings'] required financial_settings
    * value It should be Json formated setings objects. required { "quote_prefix": [ { "prefix": "QUF0522", "close_books": "monthly", "default_tax_id": 2, "default_currency_id": 5, } ], "invoice_prefix": [ { "prefix": "INF0522", "close_books": "monthly", "default_tax_id": 2, "default_currency_id": 5, } ] }

    Success Response!


    If success response which is expected.

    				
    			{
    				"message": "Tenant financial settings updated successfully.",
    				"status": "success",
    				"code": 200,
    				"language": "en",
    				"data": {}
    			}
    				
    				

    Global Resourecs


    User Story: This API endpoint will be used to get global resources like countries, currencies, date format etc. If we want to list only countries then have to send value "countries" for param "only".


    Method: GET
    Field * required Validations Rule Testing Inputs
    URL http://devapi-saas.zaicrm.com/z1/api/global/resources/{keyname}
    http://qaapi-saas.zaicrm.com/z1/api/global/resources/{keyname}
    _token * Bearer Token: "token" Pass it in header as allother request
    keyname ['daysname', 'dateformat', 'timeformat', 'countries', 'currencies', 'timezone'] Optional countries

    Success Response!


    If success response which is expected.

    				
    	{
    		"message": "Global resources listed successfully.",
    		"status": "success",
    		"code": 200,
    		"language": "en",
    		"data": {
    			"daysname": [
    			  {
    				"id": 1,
    				"name": "Sunday"
    			  },
    			  {
    				"id": 2,
    				"name": "Monday"
    			  },
    			  {
    				"id": 3,
    				"name": "Tuesday"
    			  },
    			  {
    				"id": 4,
    				"name": "wednesday"
    			  },
    			  {
    				"id": 5,
    				"name": "Thursday"
    			  },
    			  {
    				"id": 6,
    				"name": "Friday"
    			  },
    			  {
    				"id": 7,
    				"name": "Saturday"
    			  }
    			],
    			"dateformat": [
    			  {
    				"id": 1,
    				"name": "MM-DD-YYYY"
    			  },
    			  {
    				"id": 2,
    				"name": "DD-MM-YYYY"
    			  }
    			],
    			"timeformat": [
    			  {
    				"id": 1,
    				"name": "12",
    				"display_name": "12 Hours"
    			  },
    			  {
    				"id": 2,
    				"name": "24",
    				"display_name": "24 Hours"
    			  }
    			],
    			"countries": [
    			  {
    				"id": 1,
    				"name": "India"
    			  },
    			  {
    				"id": 2,
    				"name": "Canada"
    			  },
    			  {
    				"id": 3,
    				"name": "Japan"
    			  },
    			  {
    				"id": 4,
    				"name": "Singapore"
    			  },
    			  ...,
    			  ...,
    			  ...
    			],
    			"currencies": [
    			  {
    				"id": 1,
    				"name": "Indian Rupee",
    				"code": "INR",
    				"symbol":"₹"
    			  },
    			  {
    				"id": 2,
    				"name": "Canada Dollar",
    				"code": "CAD",
    				"symbol":"$"
    			  },
    			  {
    				"id": 3,
    				"name": "Japanese Yen",
    				"code": "JPY",
    				"symbol":"¥"
    			  },
    			  {
    				"id": 4,
    				"name": "Singapore dollar",
    				"code": "SGD",
    				"symbol":"$"
    			  },
    			  ...,
    			  ...,
    			  ...
    			],
    			"timezone": [
    			 {
    				"id": 1,
    				"text": "(GMT -12:00) Eniwetok, Kwajalein"
    			 },
    			 {
    				"id": 2,
    				"text": "(GMT -11:00) Midway Island, Samoa"
    			 },
    			 {
    				"id": 3,
    				"text": "(GMT -10:00) Hawaii"
    			 },
    			 {
    				"id": 4,
    				"text": "(GMT -9:00) Alaska"
    			 },
    			 ...,
    			 ...,
    			 ...
    			]
    		}
    	}
    				
    				

    Success Response!


    If success response which is expected.

    				
    	{
    		"message": "Tenant financial settings listed successfully.",
    		"status": "success",
    		"code": 200,
    		"language": "en",
    		"data": {
    			"quote_prefix": {
    				"prefix": "QUF0522",
    				"close_books": "monthly",
    				"default_tax": { "id": 2, "name": "GST"},
    				"default_currency": { "id": 5, "name": "Indian Rupee"},
    			},
    			"invoice_prefix": {
    				"prefix": "INF0522",
    				"close_books": "monthly",
    				"default_tax": { "id": 2, "name": "GST"},
    				"default_currency": { "id": 5, "name": "Indian Rupee"},
    			}
    		}
    	}
    				
    				

    Re-send Invite


    User Story: This API endpoint will be used to Send Re-invite to the user.


    NOTE : Only Invited user have a Re-send Invite Option

    In the user list response we will send resend_invite param value as true or false. If it is true the user have a Re-send Invite Option, Otherwise not.

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

    Success Response!


    If success response which is expected.

    				
    					{
    						"message": "Invitation sented successfully",
    						"status": "success",
    						"code": 200,
    						"language": "en",
    						"data": {}
    					}
    				
    				

    All Invalid Response


    				
    					{
    						"message": "Invalid user id",
    						"status": "failure",
    						"code": 422,
    						"language": "en",
    						"data": {}
    					},
    					/* If user is Active */
    					{
    						"message": "User not applicable to send invite",
    						"status": "failure",
    						"code": 422,
    						"language": "en",
    						"data": {}
    					}