shell

Introduction

Zuper Field Service Management platform lets you reimagine field service delivery and delight your customers. Collaborate Seamlessly with your field teams anytime, anywhere.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request

# Using JWT token
curl "api_endpoint_here" \
  -H "Authorization: Bearer <token>"

# Using API key
curl "api_endpoint_here" \
  -H "x-api-key: <api_key>"

Types
1. JWT tokens : Authorization: Bearer token
2. API keys : x-api-key: api_key

To generate API Key, please follow the below steps:

1. On Zuper Webapp, Click on Settings from the left menu.
2. Under 'General setting' click on "Account".
3. In the "Account Settings" click on "API Keys".
4. Under the "Your API Key" section, click on "New API Key", in the pop-up enter the "API Key Name" and click on create.
5. Your API key will be generated and displayed.

Users

Create User

curl "https://<host>/api/user" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "user": {
        "role_id": "1",
        "emp_code": "001",
        "first_name": "John",
        "last_name": "Doe",
        "email": "[email protected]",
        "designation": "developer",
        "password": "Test@123",
        "confirm_password": "Test@123",
        "work_phone_number": "987654321",
        "home_phone_number": "987654321",
        "mobile_phone_number": "987654321",
        "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
        "external_login_id": "[email protected]"
    },
    "send_welcome_email": true,
    "work_hours": [
        {
            "day": "Sunday",
            "is_enabled": true,
            "start_time": "9:00 AM",
            "end_time": "5:00 PM",
            "work_mins": 480
        },
        {
            "day": "Monday",
            "is_enabled": true,
            "start_time": "9:00 AM",
            "end_time": "5:00 PM",
            "work_mins": 480
        },
        {
            "day": "Tuesday",
            "is_enabled": true,
            "start_time": "9:00 AM",
            "end_time": "5:00 PM",
            "work_mins": 480
        },
        {
            "day": "Wednesday",
            "is_enabled": true,
            "start_time": "9:00 AM",
            "end_time": "5:00 PM",
            "work_mins": 480
        },
        {
            "day": "Thursday",
            "is_enabled": true,
            "start_time": "9:00 AM",
            "end_time": "5:00 PM",
            "work_mins": 480
        },
        {
            "day": "Friday",
            "is_enabled": true,
            "start_time": "9:00 AM",
            "end_time": "5:00 PM",
            "work_mins": 480
        },
        {
            "day": "Saturday",
            "is_enabled": true,
            "start_time": "9:00 AM",
            "end_time": "5:00 PM",
            "work_mins": 480
        }
    ]
}

On successfull creation of a user we get the below response:

{
    "type": "success",
    "title": "User has been successfully created",
    "message": "The user account has been created successfully.",
    "data": {
        "user_uid": "4550dd69-b7fc-4c6f-9b97-56375aedf229"
    }
}

This endpoint allows us to create a new user.

HTTP Request

POST /user

Body Parameters

This endpoint accepts a user object

User Creation Details

Parameter Required Description Type Example
role_id true 1 for ADMIN, 2 for TEAM LEADER, 3 for FIELD EXECUTIVE Number 1
emp_code true Employee code for the user String 0001
first_name true First name of the user String John
last_name true Last name of the user String Doe
email true Email ID of the user String [email protected]
designation true Designation of the user String developer
password true Password for the user String Any string with atleast 8 characters
confirm_password true Reconfirm password for the user String Same as password
work_phone_number false Work phone number of user String 987654321
home_phone_number false Home phone number of user String 987654321
mobile_phone_number false Mobile phone number of user String 987654321
team_uid false Add user to the team with team UID String 81b2d541-aa19-4f11-aebe-f06e6ef3d941
external_login_id false External Login ID for user String [email protected]
work_hours true User's business hours Object REFER WORK HOUR DETAILS
custom_fields true List of custom fields Object REFER CUSTOM FIELD DETAILS
send_welcome_email false Whether to send welcome email to user Boolean True or False

A single day work hour details

Parameter Required Description Type Example
day true Day in a week String ['SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY']
is_enabled true Is work hour active Boolean 0 or 1
start_time true Start time of the day Time 9:00 AM
end_time true End time of the day Time 5:00 PM
work_mins true Working duration of the day Number 480
track_location false Track user's location Boolean 0 or 1

A single custom field details

Parameter Required Description Type Example
label true Custom field label String variety
value true Custom field value String window
type true Custom field type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'RADIO', 'MULTI_ITEM', 'NUMBER', 'DATE', 'TIME', 'DATETIME', 'LOOKUP']
hide_to_fe true Custom field accessible to field executive Boolean 0 or 1
group_name false Group name String Group 1
group_uid false Group UID String 9f0798c0-fd8e-11ea-abaf-7fac6d852c15

Update User

curl "https://<host>/api/user" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "user": {
        "user_uid": "23b815e3-e81e-4316-8763-08604224d3fb",
        "first_name": "John",
        "last_name": "Doe",
        "email": "[email protected]",
        "home_phone_number": "9876543212",
        "designation": "developer2",
        "emp_code": "001",
        "work_phone_number": "9876543212",
        "role_id": "1"
    }
}

On successfull update of a user we get the below response:

{
    "type": "success",
    "message": "User details updated successfully"
}

This endpoint helps us in updating a user.

HTTP Request

PUT /user/<user_uid>

Body Parameters

This endpoint accepts a user object

User Update Details

Parameter Required Description Type Example
user_uid true User UID of the user String 23b815e3-e81e-4316-8763-08604224d3fb
role_id true 1 for ADMIN, 2 for TEAM LEADER, 3 for FIELD EXECUTIVE Number 1
emp_code true Employee code for the user String 0001
first_name true First name of the user String John
last_name true Last name of the user String Doe
email true Email ID of the user String [email protected]
designation true Designation of the user String developer
work_phone_number false Work phone number of user String 987654321
home_phone_number false Home phone number of user String 987654321

Activate / Deactivate User

curl "https://<host>/api/user/<user_uid>/activation" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "type": "ACTIVATE"
}

On successfull activation / deactivation of a user we get the below response:

{
    "type": "success",
    "message": "User details updated successfully"
}

This endpoint helps us in activating / deactivating a user.

HTTP Request

POST /user/<user_uid>/activation

Body Parameters

This endpoint accepts a user activation type object

User Activation Details

Parameter Required Description Type Example
type true Activate or Deactivate a user String ['ACTIVATE', 'DEACTIVATE']

Get Users

curl "https://<host>/api/user/all?filter.custom_field=<custome_filed_object>&filter.is_active=<is_active_flag>&filter.keyword=<keyword>&filter.role_id=<role_id>&filter.team_uid=<team_uid>&limit=<limit_value>&page=<page_number>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the users matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "user_uid": "6c513b60-ff7c-11e7-b3a8-29b417a4f3fa",
            "first_name": "Raghav",
            "last_name": "G",
            "email": "[email protected]",
            "home_phone_number": "1234567890",
            "designation": "CTO",
            "emp_code": "1234",
            "work_phone_number": "1234567890",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7cafaf3fa/de300240-bdffas7eabd345dc5.jpg",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2018-01-22T13:59:11.000Z",
            "updated_at": "2021-02-17T10:56:32.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": null
        },
        {
            "user_uid": "d30d95ba-43fb-4568-9550-715858629f02",
            "first_name": "test",
            "last_name": "test",
            "email": "[email protected]",
            "home_phone_number": "9876543210",
            "designation": "TestDesignation",
            "emp_code": "1234",
            "work_phone_number": "9876543211",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2018-07-26T04:26:24.000Z",
            "updated_at": "2021-02-02T08:28:59.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": null
        },
        {
            "user_uid": "e56d19ee-c096-46ef-981b-f4840c79a5cb",
            "first_name": "Ranjith",
            "last_name": "Admin",
            "email": "[email protected]",
            "home_phone_number": "9876543210",
            "designation": "Admin",
            "emp_code": "111",
            "work_phone_number": "9876543210",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/6c28rwqtqdda17a4f3fa/cd0erqwe33066c43.jpg",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2018-08-09T07:39:17.000Z",
            "updated_at": "2020-08-07T11:21:49.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": null
        },
        {
            "user_uid": "9acb0fc9-dfaf-4915-8bb1-2009fb37eb5b",
            "first_name": "Richard",
            "last_name": "Hendricks",
            "email": "[email protected]",
            "home_phone_number": null,
            "designation": "Dev",
            "emp_code": "009",
            "work_phone_number": null,
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2018-08-24T12:27:19.000Z",
            "updated_at": "2019-09-01T09:39:31.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": null
        },
        {
            "user_uid": "f4158948-7dda-481a-b211-f341fb96ad0a",
            "first_name": "John",
            "last_name": "Wick",
            "email": "[email protected]",
            "home_phone_number": "937626362",
            "designation": "Sales",
            "emp_code": "2442",
            "work_phone_number": "7372638636",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0ewrtgw417a4f3fa/20227r234trwea50f64b7.jpg",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2019-01-09T07:46:53.000Z",
            "updated_at": "2020-09-21T12:27:17.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": null
        },
        {
            "user_uid": "eba894d6-fe61-4fc9-8ad3-8cf8788f8315",
            "first_name": "Sree Vidya",
            "last_name": "S",
            "email": "[email protected]",
            "home_phone_number": null,
            "designation": "Developer",
            "emp_code": "8956",
            "work_phone_number": null,
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287wertweqw3fa/afeytwey139e2a245.png",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2019-01-21T07:24:05.000Z",
            "updated_at": "2019-06-14T10:47:09.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": null
        },
        {
            "user_uid": "71468f36-a847-49a6-b849-02b6992b2b08",
            "first_name": "Sree Vidya",
            "last_name": "Sankar",
            "email": "[email protected]",
            "home_phone_number": "9876543210",
            "designation": "Admin",
            "emp_code": "120",
            "work_phone_number": "9876543210",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c28rqw29b417a4f3fa/24840ed0-a85d-11rweqbb0eb.jpg",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2019-01-21T07:24:22.000Z",
            "updated_at": "2020-12-28T11:42:27.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": null
        },
        {
            "user_uid": "ebfcd6f0-a527-4476-8c4c-786f84c6bac2",
            "first_name": "test",
            "last_name": "user",
            "email": "[email protected]",
            "home_phone_number": null,
            "designation": "asdf",
            "emp_code": "000",
            "work_phone_number": null,
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2019-02-10T11:30:55.000Z",
            "updated_at": "2020-12-03T05:46:33.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": {
                "access_role_uid": "4f36fca2-58bb-43a0-bac1-e3b3f4b4c97f",
                "role_name": "Admin",
                "role_description": "admin"
            }
        },
        {
            "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
            "first_name": "Mahalakshmi",
            "last_name": "Sruthi",
            "email": "[email protected]",
            "home_phone_number": "",
            "designation": "IOS dev",
            "emp_code": "1234",
            "work_phone_number": "",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287dfas3fa/61168820-fas43a57.png",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2019-02-18T06:07:25.000Z",
            "updated_at": "2019-07-09T09:53:19.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": null
        },
        {
            "user_uid": "4792afa4-3a41-413b-9776-28501cb72796",
            "first_name": "Sree",
            "last_name": "Vidya",
            "email": "[email protected]",
            "home_phone_number": "789654123",
            "designation": "Frontend Dev",
            "emp_code": "345",
            "work_phone_number": "321456987",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "is_active": true,
            "is_deleted": false,
            "created_at": "2019-03-29T11:45:26.000Z",
            "updated_at": "2020-02-10T07:18:37.000Z",
            "role": {
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN"
            },
            "access_role": {
                "access_role_uid": "538a0be7-7664-4ea4-9e48-b2b7eb89841c",
                "role_name": "Sales Admiin",
                "role_description": "desc"
            }
        }
    ],
    "total_pages": 16,
    "current_page": 1
}

Fetches all users matching the query parameters

HTTP Request

GET /user/all

Query Parameters

This endpoint accepts multiple filters as a query parameters

User query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
limit true No of users per page Number Any number
filter.custom_field false Filter by custom field Json Stringified REFER CUSTOM FIELD DETAILS
filter.is_active false Filter by active users Boolean 0 or 1
filter.keyword false Filter by search query. Searches for user name String Any valid string
filter.role_id false Filter by role ID - 1 for ADMIN, 2 for TEAM LEADER, 3 for FIELD EXECUTIVE Comma Seperated Numbers 1,2,3
filter.user_id false Filter by user UIDs Comma Seperated String f73a4bf3-92a7-41dc-a0c9-9faa93f80cca, ca21be79-c3e4-40d3-988f-c4591bd9aa43
filter.team_uid false Filter by team UIDs Comma Seperated String a9b5f157-73b8-4550-9b47-7e7dcd88a1ab, f545d74e-1ea9-40d3-a063-c9b19d20dada
filter.designation false Filter by designations Comma Seperated String admin,developer
filter.skillset false Filter by skillset UIDs Comma Seperated String ba7fbb3d-f26b-43bc-89e4-f0bee5d6d96b, 60c0d2ba-75c4-4e16-a607-ff0766469233
filter.date false Filter by working hours Date 2021-03-28

A single custom field details

Parameter Required Description Type Example
label true Custom field label String skill
value true Custom field value String audit

Get User Details

curl "https://<host>/api/user/<user_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the user details for a specific user UID:

{
    "type": "success",
    "data": {
        "user_uid": "6c513b60-ff7c-11e7-b3a8-29b417a4f3fa",
        "first_name": "Raghav",
        "last_name": "G",
        "email": "[email protected]",
        "designation": "CTO",
        "emp_code": "1234",
        "home_phone_number": "1234567890",
        "work_phone_number": "1234567890",
        "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ffwrqwr7a4f3fa/hgfjgkaabd345dc5.jpg",
        "is_active": true,
        "is_deleted": false,
        "created_at": "2018-01-22T13:59:11.000Z",
        "updated_at": "2021-02-17T10:56:32.000Z",
        "role": {
            "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
            "role_name": "Admin"
        },
        "access_role": null,
        "custom_fields": [
            {
                "hide_to_fe": false,
                "label": "Text Input",
                "value": "test 1",
                "type": "SINGLE_LINE"
            },
            {
                "hide_to_fe": false,
                "label": "Checkbox",
                "value": "",
                "type": "MULTI_ITEM"
            },
            {
                "hide_to_fe": false,
                "label": "Select",
                "value": "value one",
                "type": "SINGLE_ITEM"
            },
            {
                "hide_to_fe": false,
                "label": "Radio",
                "value": "value one",
                "type": "RADIO"
            },
            {
                "hide_to_fe": false,
                "label": "Text Area",
                "value": "",
                "type": "MULTI_LINE"
            },
            {
                "hide_to_fe": false,
                "label": "Text Input",
                "value": "test 1",
                "group_name": "Group 1",
                "group_uid": "9f0798c0-fd8e-11ea-abaf-7fac6d852c15",
                "type": "SINGLE_LINE"
            },
            {
                "hide_to_fe": false,
                "label": "Date Input",
                "value": "2020-09-14T18:30:00.000Z"
            }
        ]
    }
}

Fetches user details matching the user UID

HTTP Request

GET /user/<user_uid>

Teams

Create Team

curl "https://<host>/api/team" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "team": {
        "team_color": "#4960a0",
        "team_name": "service team",
        "team_description": "This team deals with job services"
    }
}

On successfull creation of a team we get the below response:

{
    "type": "success",
    "title": "Team has been successfully created",
    "message": "The team has been created successfully.",
    "data": {
        "team_uid": "f488e669-92d0-44b9-912b-3182a790ee20"
    }
}

This endpoint allows us to create a new team.

HTTP Request

POST /team

Body Parameters

This endpoint accepts a team object

Team Creation Details

Parameter Required Description Type Example
team_name true Name of the team String service team
team_color false Color code for the team String #4960a0
team_description false Description of the team String This team deals with job services

Update Team

curl "https://<host>/api/team/<team_uid>" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "team": {
        "team_uid": "f488e669-92d0-44b9-912b-3182a790ee20",
        "team_name": "services",
        "team_color": "#4960a0",
        "team_description": "This team deals with job services"
    }
}

On successfully updating a team we get the below response:

{
    "type": "success",
    "message": "Team details updated successfully",
    "title": "Team Updated"
}

This endpoint helps us updating a new team.

HTTP Request

PUT /team

Body Parameters

This endpoint accepts a team object

Team Update Details

Parameter Required Description Type Example
team_uid true Team UID of the team String f488e669-92d0-44b9-912b-3182a790ee20
team_name true Name of the team String service Team
team_color false Color code for the team String #4960a0
team_description false Description of the team String This team deals with job services

Add User To Team

curl "https://<host>/api/team/assign" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "team_uid": "f488e669-92d0-44b9-912b-3182a790ee20",
    "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
}

On successfully adding a user to a team we get the below response:

{
    "type": "success",
    "title": "User assigned successfully",
    "message": "The User has been assigned to team successfully"
}

This endpoint helps us adding a new user to the team.

HTTP Request

PUT /team/assign

Body Parameters

This endpoint accepts a user team object

User Team Details

Parameter Required Description Type Example
team_uid true Team UID of the team String f488e669-92d0-44b9-912b-3182a790ee20
user_uid true User UID of the user String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6

Remove User From Team

curl "https://<host>/api/team/unassign" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "team_uid": "f488e669-92d0-44b9-912b-3182a790ee20",
    "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
}

On successfully removing a user from a team we get the below response:

{
    "type": "success",
    "title": "User unassigned successfully",
    "message": "The User has been unassigned from team successfully"
}

This endpoint helps us removing a user from the team.

HTTP Request

PUT /team/unassign

Body Parameters

This endpoint accepts a user team object

User Team Details

Parameter Required Description Type Example
team_uid true Team UID of the team String f488e669-92d0-44b9-912b-3182a790ee20
user_uid true User UID of the user String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6"

Get Teams

curl "https://<host>/api/teams/summary?page=<page_number>&sort=<sort_order>&sort_by=<sort_by>&filter.team_name=<team_name>&filter.user_uid=<user_uids>" \
  -X GET \
  -H "Authorization: Bearer <token>"

Fetches all the teams:

{
    "type": "success",
    "data": [
        {
            "team_uid": "18cada40-021b-11e8-8127-43a5add1a9e2",
            "team_name": "Bangalore Team",
            "team_color": "#e74c3c",
            "team_description": "This team covers 603211, 603222, 603223",
            "user_count": 20,
            "is_active": 1,
            "created_at": "2018-01-25T22:00:03.000Z",
            "updated_at": "2021-04-08T07:20:43.000Z"
        },
        {
            "team_uid": "a62ab1ad-33db-47f5-8f67-9dabb6fbde96",
            "team_name": "Zufa",
            "team_color": "#2c3e50",
            "team_description": "Hello Welcome to Zufa",
            "user_count": 35,
            "is_active": 1,
            "created_at": "2018-05-30T10:51:54.000Z",
            "updated_at": "2021-04-05T12:55:18.000Z"
        },
        {
            "team_uid": "94d84b0f-ca91-40b6-b8b6-69c811476de9",
            "team_name": "Installation Team",
            "team_color": "#27ae60",
            "team_description": "install",
            "user_count": 10,
            "is_active": 1,
            "created_at": "2018-05-31T05:50:42.000Z",
            "updated_at": "2021-04-05T12:55:18.000Z"
        },
        {
            "team_uid": "335c25ef-c54a-43d3-9c88-7c62921e4da4",
            "team_name": "Maintanence",
            "team_color": "#1abc9c",
            "team_description": null,
            "user_count": 4,
            "is_active": 1,
            "created_at": "2018-05-31T06:09:13.000Z",
            "updated_at": "2021-04-05T12:55:18.000Z"
        },
        {
            "team_uid": "8931728f-d979-4b23-86bd-b997d184e6aa",
            "team_name": "Transportation",
            "team_color": "#3498db",
            "team_description": "Development Team",
            "user_count": 4,
            "is_active": 1,
            "created_at": "2019-03-04T07:16:47.000Z",
            "updated_at": "2021-04-05T12:55:18.000Z"
        }
    ],
    "total_records": 21,
    "current_page": 1,
    "total_pages": 3
}

This endpoint fetches all teams.

HTTP Request

GET /teams/summary

Query Parameters

This endpoint accepts multiple filters as a query parameters

Job query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
count true No of jobs per page Number Any number
sort false sort order Enum ['ASC', 'DESC']
sort_by false sort by type Enum ['team_name', 'count', 'created_at']
filter.team_name false filter by team name String Support team
filter.user_uid false filter by user UIDs Comma seperated string 8366adeb-fea4-4c97-853b-88462021071d, 6c513b60-ff7c-11e7-b3a8-29b417a4f3fa

Get Team Details

curl "https://<host>/api/team/<team_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the team details of the specific team_uid:

{
    "type": "success",
    "data": {
        "team": {
            "team_uid": "18cada40-021b-11e8-8127-43a5add1a9e2",
            "company_id": 1,
            "team_name": "Bangalore Team",
            "team_description": "This team covers 603211, 603222, 603223",
            "team_color": "#e74c3c",
            "user_count": 5,
            "is_active": 1,
            "is_deleted": 0,
            "created_at": "2018-01-25T22:00:03.000Z",
            "updated_at": "2021-04-08T07:20:43.000Z"
        },
        "users": [
            {
                "user_uid": "6c513b60-ff7c-11e7-b3a8-29b417a4f3fa",
                "emp_code": "1234",
                "first_name": "Raghav",
                "last_name": "G",
                "email": "[email protected]",
                "designation": "CTO",
                "home_phone_number": "123456789",
                "work_phone_number": "123456789",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-11e7-b3a8-29b417a4f3fa/de300240-bdfb-11e9-a739-e7eabd345dc5.jpg",
                "is_active": true,
                "is_deleted": false,
                "created_at": "2018-01-22T13:59:11.000Z"
            },
            {
                "user_uid": "2eb9f152-717a-42ae-864c-f215376c1cfe",
                "emp_code": "8465468",
                "first_name": "Bernard",
                "last_name": "Lowe",
                "email": "[email protected]",
                "designation": "CSM",
                "home_phone_number": "123456789",
                "work_phone_number": "1234567890",
                "profile_picture": "https://i.imgur.com/YmnODol.jpg",
                "is_active": true,
                "is_deleted": false,
                "created_at": "2018-05-28T08:44:41.000Z"
            },
            {
                "user_uid": "f2f5bb37-cd1b-4864-92d7-1e59c493f0bd",
                "emp_code": "1029",
                "first_name": "Raghav",
                "last_name": "G",
                "email": "[email protected]",
                "designation": "Field Executive",
                "home_phone_number": null,
                "work_phone_number": null,
                "profile_picture": "https://i.imgur.com/phnZHKE.png",
                "is_active": true,
                "is_deleted": false,
                "created_at": "2018-06-11T17:07:23.000Z"
            },
            {
                "user_uid": "61e7919c-2b39-4b6b-9f24-f866d5f1714c",
                "emp_code": "111111",
                "first_name": "Maha",
                "last_name": "Dev",
                "email": "[email protected]",
                "designation": "Dev",
                "home_phone_number": null,
                "work_phone_number": null,
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-11e7-b3a8-29b417a4f3fa/53a4a9f0-a3b1-11e9-9918-07ae92b92906.jpg",
                "is_active": true,
                "is_deleted": false,
                "created_at": "2018-06-12T08:01:14.000Z"
            },
            {
                "user_uid": "417be473-2d8f-44d9-94f1-6bd50e747949",
                "emp_code": "ABC678",
                "first_name": "Test",
                "last_name": "Work",
                "email": "[email protected]",
                "designation": "Sales",
                "home_phone_number": null,
                "work_phone_number": null,
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false,
                "created_at": "2018-08-26T06:00:04.000Z"
            }
        ]
    }
}

Fetches team details matching the team_uid

HTTP Request

GET /team/<team_uid>

Delete Team

curl "https://<host>/api/team/<team_uid>" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

Team with the specific team_uid is deleted:

{
    "type": "success",
    "message": "Team deleted successfully",
    "title": "Team Deleted"
}

Deletes team matching the team_uid

HTTP Request

DELETE /team/<team_uid>

Customers

Create Customer

curl "https://<host>/api/customers" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "customer": {
        "customer_first_name": "John",
        "customer_last_name": "Doe",
        "customer_company_name": "Electron Ltd",
        "customer_email": "[email protected]",
        "customer_category": "5f1a48d11289d5e82e798167",
        "customer_contact_no": {
            "home": "1234567890",
            "mobile": "9876543210",
            "work": "99887766655"
        },
        "customer_description": "This customer belongs to electrical category",
        "customer_address": {
            "street": "Plot No. 1 Guindy, SIDCO Industrial Estate",
            "geo_cordinates": [
                13.0066625,
                80.2206369
            ],
            "city": "Chennai ",
            "state": "Tamil Nadu ",
            "country": "India",
            "landmark": "Tech park",
            "zip_code": "600032"
        },
        "customer_billing_address": {
            "street": "Plot No. 1 Guindy, SIDCO Industrial Estate",
            "geo_cordinates": [
                13.0066625,
                80.2206369
            ],
            "city": "Chennai ",
            "state": "Tamil Nadu ",
            "country": "India",
            "landmark": "Tech park",
            "zip_code": "600032"
        },
        "visible_to_all": true,
        "customer_tags": [
            "electrical",
            "reparis"
        ],
        "has_sla": true,
        "sla_duration": {
            "hours": 0,
            "minutes": 0,
            "days": 200
        },
        "custom_fields": [
            {
                "label": "Language Preference",
                "value": "English"
            }
        ],
        "has_account_manager": true,
        "account_manager": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
        "accounts": {
            "billing_frequency": "00364eb0-5f0f-11ec-a8de-a78f777019c4",
            "payment_term": "50a38ad0-67a6-11ec-95f5-2df811c396e3",
            "tax_group": "5669a180-cb78-11ec-b19a-19fad2881efd"
        }
    }
}

On successfull creation of a customer we get the below response:

{
    "type": "success",
    "message": "Customer created successfully",
    "customer_uid": "93063490-8264-11eb-84ff-eb2a762e383a"
}

This endpoint allows us to create a new customer.

HTTP Request

POST /customers

Body Parameters

This endpoint accepts a customer object

Customer Creation Details

Parameter Required Description Type Example
customer_first_name true First name of the customer String John
customer_last_name true Last name of the customer String Doe
customer_company_name false Company name of the customer String Electron Ltd
customer_email true Email ID of the customer String [email protected]
customer_category true Customer category UID String 4368e1d0-cd56-11ea-b6a4-13c5940a5fcf
customer_contact_no false Customer contact details Object REFER CUSTOMER CONTACT DETAILS
customer_description false Customer description String This customer belongs to electrical category
customer_address false Customer address Object REFER CUSTOMER ADDRESS DETAILS
customer_billing_address false Customer billing address Object REFER CUSTOMER ADDRESS DETAILS
visible_to_all false Customer visibility Boolean true or false
customer_tags false Customer tags List ['electrical','reparis' ]
has_sla false Whether customer has sla Boolean true or false
sla_duration false Sla duration details Object REFER SLA DURATION_DETAILS
custom_fields false List of custom fields Object REFER CUSTOM FIELD DETAILS
account_manager false User UID String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6
accounts false Customer account Object REFER CUSTOMER ACCOUNTS DETAILS

Customer contact details

Parameter Required Description Type Example
mobile false Customer mobile number String 1234567890
phone false Customer phone number String 9876543210
work false Customer work number String 99887766655

Customer address details

Parameter Required Description Type Example
street true Customer's street String Prakasam street
city true Customer's city String Chennai
state false Customer's state String Tamilnadu
zipcode false Customer's zipcode String 600017
geo_cordinates false Customer's latitude and longitude List [13.0418, 80.2341]

Customer accounts details

Parameter Required Description Type Example
billing_frequency false Billing frequency UID String 00364eb0-5f0f-11ec-a8de-a78f777019c4
payment_term false Payment term UID String 50a38ad0-67a6-11ec-95f5-2df811c396e3
tax_group false Tax group UID String 5669a180-cb78-11ec-b19a-19fad2881efd

SLA duration details

Parameter Required Description Type Example
days false Number of days Number 10
hours false Number of hours Number 5
minutes false Number of minutes Number 10

A single custom field details

Parameter Required Description Type Example
label true Custom field label String variety
value true Custom field value String window
type true Custom field type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'RADIO', 'MULTI_ITEM', 'NUMBER', 'DATE', 'TIME', 'DATETIME', 'LOOKUP']
hide_to_fe true Custom field accessible to field executive Boolean 0 or 1
group_name false Group name String Group 1
group_uid false Group UID String 9f0798c0-fd8e-11ea-abaf-7fac6d852c15

Get Customers

curl "https://<host>/api/customers?count=<count_number>&page=<page_number>&sort=<sort_order>&sort_by=<sort_by_type>&filter.category=<category_uid>&filter.created_by=<created_user_uid>&filter.customer_tags=<customer_tags>&filter.from_date=<from_date>&filter.to_date=<to_date>&filter.from_no_of_jobs=<from_no_of_jobs>&filter.to_no_of_jobs=<to_number_of_jobs>&filter.is_active=<is_active_flag>&filter.keyword=<keyword>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the customers matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "customer_last_name": "Stanford",
            "customer_company_name": "Electron Ltd",
            "customer_email": "[email protected]",
            "no_of_jobs": 0,
            "customer_tags": [
                "electrical",
                "reparis"
            ],
            "has_sla": false,
            "is_active": false,
            "account_manager": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "designation": "Admin",
                "emp_code": "001",
                "is_active": true,
                "is_deleted": false
            },
            "customer_contact_no": {
                "home": "1234567890",
                "mobile": "9876543210",
                "work": "99887766655"
            },
            "customer_first_name": "Jim",
            "customer_category": {
                "category_name": "electrical",
                "category_uid": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf"
            },
            "sla_duration": {
                "hours": 1,
                "minutes": 0,
                "days": 200
            },
            "custom_fields": [
                {
                    "hide_to_fe": false,
                    "label": "Services",
                    "value": "Industrie"
                }
            ],
            "customer_uid": "203fc0e0-826c-11eb-84ff-eb2a762e383a",
            "created_at": "2021-03-11T13:17:27.417Z"
        },
        {
            "customer_last_name": "Stanford",
            "customer_company_name": "Electron Ltd",
            "customer_email": "[email protected]",
            "no_of_jobs": 0,
            "customer_tags": [
                "electrical",
                "reparis"
            ],
            "has_sla": true,
            "is_active": true,
            "account_manager": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "designation": "Admin",
                "emp_code": "001",
                "is_active": true,
                "is_deleted": false
            },
            "customer_contact_no": {
                "home": "1234567890",
                "mobile": "9876543210",
                "work": "99887766655"
            },
            "customer_first_name": "Jim",
            "customer_category": {
                "category_name": "electrical",
                "category_uid": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf"
            },
            "sla_duration": {
                "hours": 0,
                "minutes": 0,
                "days": 200
            },
            "custom_fields": [
                {
                    "hide_to_fe": false,
                    "label": "Services",
                    "value": "Industries"
                }
            ],
            "customer_uid": "4e4cfc90-8268-11eb-84ff-eb2a762e383a",
            "created_at": "2021-03-11T12:50:06.722Z"
        },
        {
            "customer_last_name": "Morgan",
            "customer_company_name": "Electron Ltd",
            "customer_email": "[email protected]",
            "no_of_jobs": 0,
            "customer_tags": [
                "electrical",
                "reparis"
            ],
            "has_sla": true,
            "is_active": true,
            "account_manager": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "designation": "Admin",
                "emp_code": "001",
                "is_active": true,
                "is_deleted": false
            },
            "customer_contact_no": {
                "home": "1234567890",
                "mobile": "9876543210",
                "work": "99887766655"
            },
            "customer_first_name": "Greg",
            "customer_category": {
                "category_name": "electrical",
                "category_uid": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf"
            },
            "sla_duration": {
                "hours": 0,
                "minutes": 0,
                "days": 200
            },
            "custom_fields": [
                {
                    "hide_to_fe": false,
                    "label": "Services",
                    "value": "Industries"
                }
            ],
            "customer_uid": "31403a60-8266-11eb-84ff-eb2a762e383a",
            "created_at": "2021-03-11T12:34:58.977Z"
        },
        {
            "customer_last_name": "Oliver",
            "customer_company_name": "Electron Ltd",
            "customer_email": "[email protected]",
            "no_of_jobs": 0,
            "customer_tags": [
                "electrical",
                "reparis"
            ],
            "has_sla": true,
            "is_active": true,
            "account_manager": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "designation": "Admin",
                "emp_code": "001",
                "is_active": true,
                "is_deleted": false
            },
            "customer_contact_no": {
                "home": "1234567890",
                "mobile": "9876543210",
                "work": "99887766655"
            },
            "customer_first_name": "Steve",
            "customer_category": {
                "category_name": "electrical",
                "category_uid": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf"
            },
            "sla_duration": {
                "hours": 0,
                "minutes": 0,
                "days": 200
            },
            "custom_fields": [
                {
                    "hide_to_fe": false,
                    "label": "Washables",
                    "value": "House Hold"
                }
            ],
            "customer_uid": "14c17570-8266-11eb-84ff-eb2a762e383a",
            "created_at": "2021-03-11T12:34:11.152Z"
        },
        {
            "customer_last_name": "Samuel",
            "customer_company_name": "Electron Ltd",
            "customer_email": "[email protected]",
            "no_of_jobs": 0,
            "customer_tags": [
                "electrical",
                "reparis"
            ],
            "has_sla": true,
            "is_active": true,
            "account_manager": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "designation": "Admin",
                "emp_code": "001",
                "is_active": true,
                "is_deleted": false
            },
            "customer_contact_no": {
                "home": "1234567890",
                "mobile": "9876543210",
                "work": "99887766655"
            },
            "customer_first_name": "Will",
            "customer_category": {
                "category_name": "electrical",
                "category_uid": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf"
            },
            "sla_duration": {
                "hours": 0,
                "minutes": 0,
                "days": 200
            },
            "custom_fields": [
                {
                    "hide_to_fe": false,
                    "label": "Dates format",
                    "value": "DD/MM/YYYY"
                }
            ],
            "customer_uid": "f1c74bd0-8265-11eb-84ff-eb2a762e383a",
            "created_at": "2021-03-11T12:33:12.471Z"
        }
    ],
    "total_records": 26,
    "current_page": 1,
    "total_pages": 6
}

Fetches all customers matching the query parameters

HTTP Request

GET /customers

Query Parameters

This endpoint accepts multiple filters as a query parameters

Customer query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
limit true No of users per page Number Any number
sort false Sort order Enum [ 'ASC', 'DESC']
sort_by false Sort type Enum ['customer_first_name', 'customer_last_name', 'no_of_jobs', 'created_at']
filter.custom_field false Filter by custom field Json Stringified REFER CUSTOM FIELD DETAILS
filter.is_active false Filter by active customers Boolean 0 or 1
filter.keyword false Filter by search query. Searches for customer email, firstname, lastname, company name, contact details String Any valid string
filter.customer_tags false Filter by customer tags Comma Seperated String repairs,fixes,cleaning
filter.category false Filter by category UIDs Comma Seperated String 4368e1d0-cd56-11ea-b6a4-13c5940a5fcf, 263b47dd-4e01-41e6-b356-ab8622741c90
filter.created_by false Filter by created user UIDs Comma Seperated String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6, 2c02030c-0633-4de9-836b-86c226dab148
filter.from_date false Filter by created from date Date 2021-03-28
filter.to_date false Filter by created to date Date 2021-03-28
filter.from_no_of_jobs false Filter customers having jobs more than the value Number 10
filter.to_no_of_jobs false Filter customers having jobs lesser than the value Number 100
filter.ltv_from false Filter customers having total lifetime value more than the value Number 100
filter.ltv_to false Filter customers having total lifetime value lesser than the value Number 100000
filter.receivable_from false Filter customers having receivables more than the value Number 10
filter.receivable_to false Filter customers having receivables lesser than the value Number 1000
filter.credit_from false Filter customers having credits more than the value Number 10
filter.credit_to false Filter customers having credits lesser than the value Number 1000
filter.account_manager false Filter by account manager user UIDs Comma Seperated String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6, b69b62f6-91ba-4f04-b291-c8144edeb252
filter.organization false Filter by organization UIDs Comma Seperated String a4ee48e0-d60d-11ea-b654-5979bc62f918, 20889eda-0ae4-44d3-a7e6-f19877d338b0
filter.has_org false Filter by customers having organization Boolean 0 or 1
filter.customer_uid false Filter by customer UIDs Comma Seperated String ff040f90-cd52-11ea-9c09-f5d3c9145a54, 08e254e0-d262-11ea-bfd6-85ede87cf0ee
filter.customer_email false Filter by customer emails Comma Seperated String [email protected], [email protected]

A single custom field details

Parameter Required Description Type Example
label true Custom field label String skill
value true Custom field value String audit

Update Customer

curl "https://<host>/api/customers/<customer_uid>" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "customer": {
        "customer_first_name": "John",
        "customer_last_name": "Doe",
        "customer_company_name": "Electron Ltd",
        "customer_email": "[email protected]",
        "customer_category": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf",
        "customer_contact_no": {
            "home": "1234567890",
            "mobile": "9876543210",
            "work": "99887766655"
        },
        "customer_description": "This customer belongs to electrical category",
        "customer_address": {
            "street": "Plot No. 1 Guindy, SIDCO Industrial Estate",
            "geo_cordinates": [
                13.0066625,
                80.2206369
            ],
            "city": "Chennai ",
            "state": "Tamil Nadu ",
            "country": "India",
            "landmark": "Tech park",
            "zip_code": "600032"
        },
        "customer_billing_address": {
            "street": "Plot No. 1 Guindy, SIDCO Industrial Estate",
            "geo_cordinates": [
                13.0066625,
                80.2206369
            ],
            "city": "Chennai ",
            "state": "Tamil Nadu ",
            "country": "India",
            "landmark": "Tech park",
            "zip_code": "600032"
        },
        "visible_to_all": true,
        "customer_tags": [
            "electrical",
            "reparis"
        ],
        "has_sla": true,
        "sla_duration": {
            "hours": 0,
            "minutes": 0,
            "days": 200
        },
        "custom_fields": [
            {
                "label": "Language Preference",
                "value": "English"
            }
        ],
        "has_account_manager": true,
        "account_manager": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
    }
}

On successfully updating a customer we get the below response:

{
    "type": "success",
    "title": "Customer Details Updated",
    "message": "Customer Details has been successfully updated"
}

This endpoint allows us to update a customer.

HTTP Request

PUT /customers/<customer_uid>

Body Parameters

This endpoint accepts a customer object

Customer Update Details

Parameter Required Description Type Example
customer_first_name true First name of the customer String John
customer_last_name true Last name of the customer String Doe
customer_company_name false Company name of the customer String Electron Ltd
customer_email true Email ID of the customer String [email protected]
customer_category true Customer category UID String 4368e1d0-cd56-11ea-b6a4-13c5940a5fcf
customer_contact_no false Customer contact details Object REFER CUSTOMER CONTACT DETAILS
customer_description false Customer description String This customer belongs to electrical category
customer_address false Customer address Object REFER CUSTOMER ADDRESS DETAILS
customer_billing_address false Customer billing address Object REFER CUSTOMER ADDRESS DETAILS
visible_to_all false Customer visibility Boolean true or false
customer_tags false Customer tags List ['electrical','reparis' ]
has_sla false Whether customer has sla Boolean true or false
sla_duration false Sla duration details Object REFER SLA DURATION_DETAILS
custom_fields false List of custom fields Object REFER CUSTOM FIELD DETAILS
account_manager false User UID String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6

Customer contact details

Parameter Required Description Type Example
mobile false Customer mobile number String 1234567890
phone false Customer phone number String 9876543210
work false Customer work number String 99887766655

Customer address details

Parameter Required Description Type Example
street true Customer's street String Prakasam street
city true Customer's city String Chennai
state false Customer's state String Tamilnadu
zipcode false Customer's zipcode String 600017
geo_cordinates false Customer's latitude and longitude List [13.0418, 80.2341]

SLA duration details

Parameter Required Description Type Example
days false Number of days Number 10
hours false Number of hours Number 5
minutes false Number of minutes Number 10

A single custom field details

Parameter Required Description Type Example
label true Custom field label String variety
value true Custom field value String window
type true Custom field type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'RADIO', 'MULTI_ITEM', 'NUMBER', 'DATE', 'TIME', 'DATETIME', 'LOOKUP']
hide_to_fe true Custom field accessible to field executive Boolean 0 or 1
group_name false Group name String Group 1
group_uid false Group UID String 9f0798c0-fd8e-11ea-abaf-7fac6d852c15

Activate / Deactivate Customer

curl "https://<host>/api/customers/<customer_uid>/activation" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "type": "ACTIVATE"
}

On successfull activation / deactivation of a customer we get the below response:

{
    "type": "success",
    "title": "Customer Activation Updated",
    "message": "Customer Details has been successfully updated"
}

This endpoint allows us to activate / deactivate a customer.

HTTP Request

POST /customers/<customer_uid>/activation

Body Parameters

This endpoint accepts a customer object

Customer Activation Details

Parameter Required Description Type Example
type true Type of activation Enum [ 'ACTIVATE', 'DEACTIVATE']

Add / Remove Favourite Technician To Customer

curl "https://<host>/api/customers/<customer_uid>/favorite_technician" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "type": "ADD",
    "favorite_technician": {
        "user": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
        "team": "463ae640-c311-4415-824c-aaab93a4f5b6"
    }
}

On successfully adding / removing a favourite technician for customer we get the below response:

{
    "type": "success",
    "message": "Updated Favourite User for Customer"
}

This endpoint allows us to add / remove a favourite technician for a customer.

HTTP Request

PUT /customers/<customer_uid>/favorite_technician

Body Parameters

This endpoint accepts a customer object

Favourite Technician Details

Parameter Required Description Type Example
type true Type of operation Enum [ 'ADD', 'REMOVE']
favorite_technician true Technician details Object REFER TECHNICIAN DETAILS

Technician Details

Parameter Required Description Type Example
user true User UID String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6
team true Team UID String 463ae640-c311-4415-824c-aaab93a4f5b6

Update Customer Accounts

curl "https://<host>/api/customers/<customer_uid>/accounts" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "remarks": "Updating account details for customer",
    "accounts": {
        "ltv": 100000,
        "receivables": 2000,
        "credits": 500
    }
}

On successfully updating account for a customer we get the below response:

{
    "type": "success",
    "title": "Customer Account Details Updated",
    "message": "Customer Account Details has been successfully updated"
}

This endpoint allows us to update account for a customer.

HTTP Request

PUT /customers/<customer_uid>/accounts

Body Parameters

This endpoint accepts a account object

Customer Account Details

Parameter Required Description Type Example
remarks false Remarks for account update String Updating account details for customer
accounts true Account details Object REFER ACCOUNT DETAILS

Account Details

Parameter Required Description Type Example
ltv true Total lifetime value Number 100000
receivables true Receivables from customer Number 2000
credits true Credits to customer Number 500

Get Customer Details

curl "https://<host>/api/customers/<customer_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the customer details for a specific customer UID:

{
    "type": "success",
    "data": {
        "customer_notifications": {
            "email": false,
            "sms": false,
            "call": false
        },
        "accounts": {
            "ltv": 1500,
            "receivables": 400,
            "credits": 1500
        },
        "customer_last_name": "Stanford",
        "customer_company_name": "Electron Ltd",
        "customer_email": "[email protected]",
        "no_of_jobs": 0,
        "customer_description": "This customer belongs to service category",
        "customer_tags": [
            "electrical",
            "reparis"
        ],
        "has_sla": false,
        "visible_to_all": true,
        "is_active": false,
        "account_manager": {
            "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
            "first_name": "Sriram",
            "last_name": "Palakula",
            "email": "[email protected]",
            "home_phone_number": "9123456789",
            "work_phone_number": "9987654321",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "designation": "Admin",
            "emp_code": "001",
            "is_active": true,
            "is_deleted": false
        },
        "customer_contact_no": {
            "home": "1234567890",
            "mobile": "9876543210",
            "work": "99887766655"
        },
        "customer_first_name": "Jim",
        "customer_category": {
            "category_name": "electrical",
            "category_uid": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf"
        },
        "sla_duration": {
            "hours": 1,
            "minutes": 0,
            "days": 200
        },
        "customer_address": {
            "street": "Plot No. 1 Guindy, SIDCO Industrial Estate",
            "geo_cordinates": [
                13.0066625,
                80.2206369
            ],
            "city": "Chennai ",
            "state": "Tamil Nadu ",
            "country": "India",
            "landmark": "Tech park",
            "zip_code": "600032"
        },
        "customer_billing_address": {
            "street": "Plot No. 1 Guindy, SIDCO Industrial Estate",
            "city": "Chennai ",
            "state": "Tamil Nadu ",
            "country": "India",
            "landmark": "Tech park",
            "zip_code": "600032"
        },
        "custom_fields": [
            {
                "hide_to_fe": false,
                "label": "Services",
                "value": "Industrie"
            }
        ],
        "customer_uid": "203fc0e0-826c-11eb-84ff-eb2a762e383a",
        "created_by": {
            "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
            "first_name": "Sriram",
            "last_name": "Palakula",
            "email": "[email protected]",
            "home_phone_number": "9123456789",
            "work_phone_number": "9987654321",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "designation": "Admin",
            "emp_code": "001",
            "is_active": true,
            "is_deleted": false
        },
        "customer_all_addresses": [],
        "favorited_users": [
            {
                "user": {
                    "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                    "first_name": "Sriram",
                    "last_name": "Palakula",
                    "email": "[email protected]",
                    "home_phone_number": "9123456789",
                    "work_phone_number": "9987654321",
                    "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                    "designation": "Admin",
                    "emp_code": "001",
                    "is_active": true,
                    "is_deleted": false
                },
                "team": {
                    "team_uid": "463ae640-c311-4415-824c-aaab93a4f5b6",
                    "team_name": "support",
                    "team_color": "#3498db",
                    "is_active": true,
                    "is_deleted": false
                },
                "created_at": "2021-03-11T14:33:12.795Z"
            }
        ],
        "created_at": "2021-03-11T13:17:27.417Z"
    }
}

Fetches customer details matching the customer UID

HTTP Request

GET /customers/<customer_uid>

Create Customer Category

curl "https://<host>/api/customers/category" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "category":{
        "category_name": "electrical",
        "category_description": "Electrical work",
        "sla_duration": {
            "days": 10,
            "hours": 5,
            "minutes": 10
        }
    }
}

On a successfull creation of a customer category we get the below response:

{
    "type": "success",
    "message": "Customer Category created successfully",
    "data": {
        "category_uid": "2286fb50-8278-11eb-84ff-eb2a762e383a"
    }
}

This endpoint allows us to create a new customer category.

HTTP Request

POST /customers/category

Body Parameters

This endpoint accepts a customer category object

Customer Category Creation Details

Parameter Required Description Type Example
category_name true Name of customer category String Electrical
category_description true Description of customer category String Electrical work
sla false Category Sla duration details Object REFER SLA DURATION DETAILS

SLA duration details

Parameter Required Description Type Example
days false Number of days Number 10
hours false Number of hours Number 5
minutes false Number of minutes Number 10

Update Customer Category

curl "https://<host>/api/customers/category" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "category":{
        "category_uid": "2286fb50-8278-11eb-84ff-eb2a762e383a",
        "category_name": "electronics",
        "category_description": "Electronics work",
        "sla_duration": {
            "days": 15,
            "hours": 10,
            "minutes": 5
        }
    }
}

On successfully updating a customer category we get the below response:

{
    "title": "Category Updated",
    "message": "The Category has been updated successfully"
}

This endpoint allows us to update customer category.

HTTP Request

PUT /customers/category

Body Parameters

This endpoint accepts a customer category object

Customer Category Update Details

Parameter Required Description Type Example
category_name true Name of customer category String Electrical
category_description true Description of customer category String Electrical work"
sla false Category Sla duration details Object REFER SLA DURATION DETAILS

SLA duration details

Parameter Required Description Type Example
days false Number of days Number 10
hours false Number of hours Number 5
minutes false Number of minutes Number 10

Get Customer Categories

curl "https://<host>/api/customers/cateogry" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get all the customer categories:

{
    "type": "success",
    "data": [
        {
            "sla_duration": {
                "days": 1,
                "hours": 0,
                "minutes": 0
            },
            "is_deleted": false,
            "category_name": "electrical",
            "category_uid": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf",
            "created_at": "2020-07-24T02:34:57.014Z",
            "updated_at": "2020-07-24T02:34:57.019Z"
        },
        {
            "sla_duration": {
                "days": 200
            },
            "is_deleted": false,
            "category_name": "IT",
            "category_description": "IT industry",
            "category_uid": "07f63ad0-8264-11eb-84ff-eb2a762e383a",
            "created_at": "2021-03-11T12:19:30.689Z",
            "updated_at": "2021-03-11T12:19:30.696Z"
        }
    ]
}

Fetches all customer categories

HTTP Request

GET /customers/category

Delete Customer Category

curl "https://<host>/api/customers/category/<customer_category_uid>" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

Customer category with the specific customer_category_uid is deleted:

{
    "type": "success",
    "message": "Customer Category deleted successfully"
}

Deletes a customer category matching the customer_category_uid

HTTP Request

DELETE /customers/category/<customer_category_uid>

Organizations

Create Organization

curl "https://<host>/api/organization" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "organization" : {
        "organization_name" : "Customer Org 1",
        "organization_description" : "This is a customer organization 1",
        "organization_logo" : "https://zuperpro/assets/profile_picture.jpg",
        "organization_address" : {
            "street" : "street",
            "state" : "state",
            "country" : "country",
            "zip_code" : "zipcode",
            "city" : "city" ,
            "geo_cordinates" : [11.21, 81.91]
        },
        "teams" : [
            {
                "team_uid" : "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab"
            },
            {
                "team_uid" : "f545d74e-1ea9-40d3-a063-c9b19d20dada"
            }
        ],
        "customers": ["ff040f90-cd52-11ea-9c09-f5d3c9145a54", "08e254e0-d262-11ea-bfd6-85ede87cf0ee"],
        "custom_fields" : [
            {
                "label": "Orgainzation State",
                "value": "US",
                "hide_to_fe": true
            },
            {
                "label": "Organization Currency",
                "value": "USD",
                "hide_to_fe": true
            }
        ]

    }
}

On successfull creation of a organization we get the below response:

{
    "type": "success",
    "message": "New Organization Created successfully",
    "data": {
        "organization_uid": "52762cc0-d25d-11eb-9cb1-018a2c669645"
    }
}

This endpoint allows us to create a new organization.

HTTP Request

POST /organization

Body Parameters

This endpoint accepts a organization object

Organization Creation Details

Parameter Required Description Type Example
organization_name true Name of organization String Zuper
organization_description false Organization description String This organization belongs to electrical customer
organization_logo false Organization logo String https://zuperpro/assets/profile_picture.jpg
organization_address false Organization address Object REFER ORGANIZATION ADDRESS DETAILS
teams false Organization teams Object REFER ORGANIZATION TEAMS DETAILS
customers false Customer UIDs List [ 'ff040f90-cd52-11ea-9c09-f5d3c9145a54','08e254e0-d262-11ea-bfd6-85ede87cf0ee']
custom_fields false List of custom fields Object REFER CUSTOM FIELD DETAILS

Organization address details

Parameter Required Description Type Example
street false Organization's street String Prakasam street
city false Organization's city String Chennai
state false Organization's state String Tamilnadu
zipcode false Organization's zipcode String 600017
country false Organization's country String India
geo_cordinates false Organization's latitude and longitude List [13.0418, 80.2341]

A single team details

Parameter Required Description Type Example
team_uid true User's team UID String a9b5f157-73b8-4550-9b47-7e7dcd88a1ab

A single custom field details

Parameter Required Description Type Example
label true Custom field label String variety
value true Custom field value String window
type true Custom field type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'RADIO', 'MULTI_ITEM', 'NUMBER', 'DATE', 'TIME', 'DATETIME', 'LOOKUP']
hide_to_fe true Custom field accessible to field executive Boolean 0 or 1
group_name false Group name String Group 1
group_uid false Group UID String 9f0798c0-fd8e-11ea-abaf-7fac6d852c15

Get Organizations

curl "https://<host>/api/organization?page=<page>&count=<count>&filter.keyword=<keyword>&filter.teams=<team_uid>&filter.is_active=<is_active_flag>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the organizations matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "is_active": true,
            "is_deleted": false,
            "organization_name": "Customer Org 2",
            "organization_description": "This is a customer organization 2",
            "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
            "organization_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "organization_uid": "52762cc0-d25d-11eb-9cb1-018a2c669645",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "designation": "Admin",
                "emp_code": "001",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "no_of_customers": 2,
            "created_at": "2021-06-21T06:53:02.234Z",
            "updated_at": "2021-06-21T06:53:02.235Z",
        },
        {
            "is_active": true,
            "is_deleted": false,
            "organization_name": "Customer Org 1",
            "organization_description": "This is a customer organization",
            "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
            "organization_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "organization_uid": "093127e0-d25d-11eb-9cb1-018a2c669645",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "designation": "Admin",
                "emp_code": "001",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "no_of_customers": 2,
            "created_at": "2021-06-21T06:50:59.339Z",
            "updated_at": "2021-06-21T06:50:59.346Z"
        },
        {
            "is_active": true,
            "is_deleted": false,
            "organization_name": "Test One10",
            "organization_description": "test desc",
            "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
            "organization_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "organization_uid": "79b73cc0-61ec-11eb-be1a-5f41b7fdd76b",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "designation": "Admin",
                "emp_code": "001",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "no_of_customers": 0,
            "created_at": "2021-01-29T04:43:04.724Z",
            "updated_at": "2021-01-29T04:43:04.727Z",
        },
        {
            "is_active": true,
            "is_deleted": false,
            "organization_name": "Test One9",
            "organization_description": "test desc",
            "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
            "organization_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "organization_uid": "72238a40-61ec-11eb-be1a-5f41b7fdd76b",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "designation": "Admin",
                "emp_code": "001",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "no_of_customers": 0,
            "created_at": "2021-01-29T04:42:52.018Z",
            "updated_at": "2021-01-29T04:42:52.020Z"
        },
        {
            "is_active": true,
            "is_deleted": false,
            "organization_name": "Test One8",
            "organization_description": "test desc",
            "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
            "organization_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "organization_uid": "6bad2ea0-61ec-11eb-be1a-5f41b7fdd76b",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "designation": "Admin",
                "emp_code": "001",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "no_of_customers": 0,
            "created_at": "2021-01-29T04:42:41.168Z",
            "updated_at": "2021-01-29T04:42:41.171Z"
        }
    ],
    "total_records": 14,
    "current_page": 1,
    "total_pages": 3
}

Fetches all organizations matching the query parameters

HTTP Request

GET /organization

Query Parameters

This endpoint accepts multiple filters as a query parameters

Organization query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
limit true No of users per page Number Any number
sort false Sort order Enum [ 'ASC', 'DESC']
sort_by false Sort type Enum ['organization_name', 'created_at']
filter.is_active false Filter by active organizations Boolean 0 or 1
filter.keyword false Filter by search query. Searches for organization name String Any valid string
filter.teams false Filter by organization teams UIDs Comma seperated list a9b5f157-73b8-4550-9b47-7e7dcd88a1ab,f545d74e-1ea9-40d3-a063-c9b19d20dada

Update Organization

curl "https://<host>/api/organization/<organization_uid>" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "organization" : {
        "organization_name" : "Customer Org Updated",
        "organization_description" : "This is a customer organization description updated",
        "organization_logo" : "https://zuperpro/assets/profile_picture.jpg",
        "organization_address" : {
            "street" : "street",
            "state" : "state",
            "country" : "country",
            "zip_code" : "zipcode",
            "city" : "city" ,
            "geo_cordinates" : [11.21, 81.91]
        },
        "teams" : [
            {
                "team_uid" : "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab"
            }
        ],
        "customers": ["ff040f90-cd52-11ea-9c09-f5d3c9145a54", "08e254e0-d262-11ea-bfd6-85ede87cf0ee"],
        "custom_fields" : [
            {
                "label": "Orgainzation State",
                "value": "US"
            },
            {
                "label": "Organization Currency",
                "value": "USD",
                "hide_to_fe": true
            }
        ]

    }
}

On successfully updating a organization we get the below response:

{
    "type": "success",
    "message": "Organization Updated successfully",
    "data": {
        "organization_uid": "52762cc0-d25d-11eb-9cb1-018a2c669645"
    }
}

This endpoint allows us to update a organization.

HTTP Request

PUT /organization/<organization_uid>

Body Parameters

This endpoint accepts a organization object

Organization Update Details

Parameter Required Description Type Example
organization_name true Name of organization String Zuper
organization_description false Organization description String This organization belongs to electrical customer
organization_logo false Organization logo String https://zuperpro/assets/profile_picture.jpg
organization_address false Organization address Object REFER ORGANIZATION ADDRESS DETAILS
teams false Organization teams Object REFER ORGANIZATION TEAMS DETAILS
customers false Customer UIDs List [ 'ff040f90-cd52-11ea-9c09-f5d3c9145a54','08e254e0-d262-11ea-bfd6-85ede87cf0ee']
custom_fields false List of custom fields Object REFER CUSTOM FIELD DETAILS

Organization address details

Parameter Required Description Type Example
street false Organization's street String Prakasam street
city false Organization's city String Chennai
state false Organization's state String Tamilnadu
zipcode false Organization's zipcode String 600017
country false Organization's country String India
geo_cordinates false Organization's latitude and longitude List [13.0418, 80.2341]

A single team details

Parameter Required Description Type Example
team_uid true User's team UID String a9b5f157-73b8-4550-9b47-7e7dcd88a1ab

A single custom field details

Parameter Required Description Type Example
label true Custom field label String variety
value true Custom field value String window
type true Custom field type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'RADIO', 'MULTI_ITEM', 'NUMBER', 'DATE', 'TIME', 'DATETIME', 'LOOKUP']
hide_to_fe true Custom field accessible to field executive Boolean 0 or 1
group_name false Group name String Group 1
group_uid false Group UID String 9f0798c0-fd8e-11ea-abaf-7fac6d852c15

Activate / Deactivate Organization

curl "https://<host>/api/organization/<organization_uid>/activate?is_active=<is_active_flag>" \
  -X PUT \
  -H "Authorization: Bearer <token>"

On successfully activating / deactivating a organization we get the below response:

{
    "type": "success",
    "message": "Organization Activated / Deactivated successfully"
}

This endpoint allows us to activate / deactivate a organization.

HTTP Request

PUT /organization/<organization_uid>/activate

Query Parameters

This endpoint accepts activation object as query parameter

Organization Activation Details

Parameter Required Description Type Example
is_active true Activation flag Boolean true or false

Update Organization's Customer

curl "https://<host>/api/organization/<organization_uid>/customers" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "customer": {
        "type": "ADD",
        "customer_uid": "2969bb90-d659-11ea-939d-2f7e50296e29"
    }
}

On successfully updating a organization's customer we get the below response:

{
    "type": "success",
    "message": "Organization Customer Updated successfully"
}

This endpoint allows us to update a organization's customer.

HTTP Request

PUT /organization/<organization_uid>/customers

Body Parameters

This endpoint accepts a organization object

Organization's Customer Update Details

Parameter Required Description Type Example
type true Type of operation Enum ['ADD', 'REMOVE']
customer_uid true Customer UID String 2969bb90-d659-11ea-939d-2f7e50296e29

Get Organization Details

curl "https://<host>/api/organization/<organization_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the organization details for a specific organization UID:

{
    "type": "success",
    "data": {
        "is_active": true,
        "is_deleted": false,
        "organization_name": "Customer Org 1",
        "organization_description": "This is a customer organization",
        "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
        "organization_address": {
            "street": "street",
            "state": "state",
            "country": "country",
            "zip_code": "zipcode",
            "city": "city",
            "geo_cordinates": [
                11.21,
                81.91
            ]
        },
        "teams": [
            {
                "team": {
                    "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                    "team_name": "test",
                    "team_color": "#4960a0",
                    "is_active": true,
                    "is_deleted": false
                }
            },
            {
                "team": {
                    "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                    "team_name": "development",
                    "team_color": "#27ae60",
                    "is_active": true,
                    "is_deleted": false
                }
            }
        ],
        "custom_fields": [
            {
                "hide_to_fe": false,
                "label": "Orgainzation State",
                "value": "US"
            },
            {
                "hide_to_fe": false,
                "label": "Organization Currency",
                "value": "USD"
            }
        ],
        "organization_uid": "093127e0-d25d-11eb-9cb1-018a2c669645",
        "created_by": {
            "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
            "first_name": "Sriram",
            "last_name": "Palakula",
            "email": "[email protected]",
            "home_phone_number": "9123456789",
            "designation": "Admin",
            "emp_code": "001",
            "work_phone_number": "9987654321",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "is_active": true,
            "is_deleted": false
        },
        "no_of_customers": 2,
        "created_at": "2021-06-21T06:50:59.339Z",
        "updated_at": "2021-06-21T06:50:59.346Z"
    }
}

Fetches organization details matching the organization UID

HTTP Request

GET /organization/<organization_uid>

Delete Organization

curl "https://<host>/api/organization/<organization_uid>" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

Organization with the specific organization_uid is deleted:

{
    "type": "success",
    "message": "Organization deleted successfully"
}

Deletes a organization matching the organization_uid

HTTP Request

DELETE /organization/<organization_uid>

Properties

Create Property

curl "https://<host>/api/property" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "property": {
        "property_name": "Customer Property 1",
        "organization": "52762cc0-d25d-11eb-9cb1-018a2c669645",
        "no_of_jobs": 10,
        "property_address": {
            "street" : "street",
            "state" : "state",
            "country" : "country",
            "zip_code" : "zipcode",
            "city" : "city" ,
            "geo_cordinates" : [11.21, 81.91]
        },
        "property_customers": [
            {
                "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
            },
            {
                "customer": "08e254e0-d262-11ea-bfd6-85ede87cf0ee"
            }
        ],
        "custom_fields" : [
            {
                "label": "Property State",
                "value": "India",
                "hide_to_fe": false
            },
            {
                "label": "Property Currency",
                "value": "INR",
                "hide_to_fe": false
            }
        ],
        "property_image": "https://zuperpro/assets/property_image.jpg",
        "attachments": [
            {
                "file_name": "Property name",
                "url": "https://zuperpro/assets/attachment.pdf"
            }
        ]

    }
}

On successfull creation of a property we get the below response:

{
    "type": "success",
    "message": "New Property Created successfully",
    "data": {
        "property_uid": "f9f33e90-d265-11eb-9cb1-018a2c669645"
    }
}

This endpoint allows us to create a new property.

HTTP Request

POST /property

Body Parameters

This endpoint accepts a property object

Property Creation Details

Parameter Required Description Type Example
property_name true Name of property String Zuper property
organization false Organization UID String 52762cc0-d25d-11eb-9cb1-018a2c669645
no_of_jobs false Number of jobs Number 10
property_address true Property address Object REFER PROPERTY ADDRESS DETAILS
property_customers false Property customers Object REFER PROPERTY CUSTOMER DETAILS
property_image false Property for image String https://zuperpro/assets/property_image.jpg
attachments false Property attachments Object REFER PROPERTY ATTACHMENT DETAILS
custom_fields false List of custom fields Object REFER CUSTOM FIELD DETAILS

Property address details

Parameter Required Description Type Example
street false Property's street String Prakasam street
city false Property's city String Chennai
state false Property's state String Tamilnadu
zipcode false Property's zipcode String 600017
country false Property's country String India
geo_cordinates false Property's latitude and longitude List [13.0418, 80.2341]

A single property customer details

Parameter Required Description Type Example
customer true Customer's UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54

A single custom field details

Parameter Required Description Type Example
label true Custom field label String variety
value true Custom field value String window
type true Custom field type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'RADIO', 'MULTI_ITEM', 'NUMBER', 'DATE', 'TIME', 'DATETIME', 'LOOKUP']
hide_to_fe true Custom field accessible to field executive Boolean 0 or 1
group_name false Group name String Group 1
group_uid false Group UID String 9f0798c0-fd8e-11ea-abaf-7fac6d852c15

Property Attachment Details

Parameter Required Description Type Example
file_name true Filename String Property Name
url true Attachment URL String https://zuperpro/assets/attachment.pdf

Get Properties

curl "https://<host>/api/property?page=<page_number>&count=<count_number>&filter.created_by=<created_user_uid>&filter.organization=<organization_uid>&filter.customer=<customer_uid>&filter.keyword=<keyword>&filter.is_active=<is_active_flag>&filter.created_at_from=<created_at_from_date>&filter.created_at_to=<created_at_to_date>&filter.no_of_jobs_from=<no_of_jobs_from>&filter.no_of_jobs_to=<no_of_jobs_to>&filter.custom_field={'label': <custom_filed_label>,'value':<custom_filed_value>}" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the properties matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "no_of_jobs": 10,
            "is_active": true,
            "is_deleted": false,
            "property_name": "Customer Property 4",
            "property_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "property_customers": [
                {
                    "customer": {
                        "customer_last_name": "test",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_uid": "08e254e0-d262-11ea-bfd6-85ede87cf0ee",
                        "customer_contact_no": {
                            "mobile": "+449790791037"
                        }
                    }
                },
                {
                    "customer": {
                        "customer_last_name": "Test One",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_contact_no": {
                            "mobile": "09790791037",
                            "home": "987654321"
                        },
                        "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                    }
                }
            ],
            "custom_fields": [
                {
                    "hide_to_fe": false,
                    "label": "Property State",
                    "value": "India"
                },
                {
                    "hide_to_fe": false,
                    "label": "Property Currency",
                    "value": "INR"
                }
            ],
            "property_image": "https://zuperpro/assets/property_image.jpg",
            "property_organization": {
                "organization_name": "Customer Org",
                "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
                "organization_uid": "52762cc0-d25d-11eb-9cb1-018a2c669645"
            },
            "property_uid": "6beec780-d266-11eb-9cb1-018a2c669645",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "designation": "Admin",
                "emp_code": "001",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "created_at": "2021-06-21T07:58:10.426Z",
            "updated_at": "2021-06-21T07:58:10.429Z"
        },
        {
            "no_of_jobs": 10,
            "is_active": true,
            "is_deleted": false,
            "property_name": "Customer Property 2",
            "property_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "property_customers": [
                {
                    "customer": {
                        "customer_last_name": "test",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_uid": "08e254e0-d262-11ea-bfd6-85ede87cf0ee",
                        "customer_contact_no": {
                            "mobile": "+449790791037"
                        }
                    }
                },
                {
                    "customer": {
                        "customer_last_name": "Test One",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_contact_no": {
                            "mobile": "09790791037",
                            "home": "987654321"
                        },
                        "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                    }
                }
            ],
            "custom_fields": [
                {
                    "hide_to_fe": false,
                    "label": "Property State",
                    "value": "India"
                },
                {
                    "hide_to_fe": false,
                    "label": "Property Currency",
                    "value": "INR"
                }
            ],
            "property_image": "https://zuperpro/assets/property_image.jpg",
            "property_uid": "f9f33e90-d265-11eb-9cb1-018a2c669645",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "designation": "Admin",
                "emp_code": "001",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "created_at": "2021-06-21T07:54:59.195Z",
            "updated_at": "2021-06-21T07:54:59.197Z"
        },
        {
            "no_of_jobs": 10,
            "is_active": true,
            "is_deleted": false,
            "property_name": "Customer Property 1",
            "property_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "property_customers": [
                {
                    "customer": {
                        "customer_last_name": "test",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_uid": "08e254e0-d262-11ea-bfd6-85ede87cf0ee",
                        "customer_contact_no": {
                            "mobile": "+449790791037"
                        }
                    }
                },
                {
                    "customer": {
                        "customer_last_name": "Test One",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_contact_no": {
                            "mobile": "09790791037",
                            "home": "987654321"
                        },
                        "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                    }
                }
            ],
            "custom_fields": [
                {
                    "hide_to_fe": true,
                    "label": "Property State",
                    "value": "US"
                },
                {
                    "hide_to_fe": true,
                    "label": "Property Currency",
                    "value": "USD"
                }
            ],
            "property_image": "https://zuperpro/assets/property_image.jpg",
            "property_uid": "d8308380-d265-11eb-9cb1-018a2c669645",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "designation": "Admin",
                "emp_code": "001",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "created_at": "2021-06-21T07:54:02.555Z",
            "updated_at": "2021-06-21T07:54:02.558Z",
        },
        {
            "no_of_jobs": 10,
            "is_active": true,
            "is_deleted": false,
            "property_name": "Test One2",
            "property_address": {
                "street": "Nehru street",
                "state": "Tamil nadu",
                "country": "India",
                "zip_code": "600089",
                "city": "Chennai",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "property_customers": [
                {
                    "customer": {
                        "customer_last_name": "Test One",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_contact_no": {
                            "mobile": "09790791037",
                            "home": "987654321"
                        },
                        "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                    }
                },
                {
                    "customer": {
                        "customer_last_name": "test",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_uid": "08e254e0-d262-11ea-bfd6-85ede87cf0ee",
                        "customer_contact_no": {
                            "mobile": "+449790791037"
                        }
                    }
                }
            ],
            "property_uid": "3361d460-6205-11eb-b6f5-e7fbdf08afc3",
            "created_by": {
                "user_uid": "c04f4872-d5cd-44a8-a33c-4576dd860cce",
                "first_name": "user",
                "last_name": "count",
                "email": "[email protected]",
                "home_phone_number": null,
                "designation": "dev",
                "emp_code": "0011",
                "work_phone_number": null,
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "custom_fields": [],
            "created_at": "2021-01-29T07:40:04.151Z",
            "updated_at": "2021-01-29T07:40:04.163Z"
        },
        {
            "no_of_jobs": 10,
            "is_active": true,
            "is_deleted": false,
            "property_name": "Test One1",
            "property_address": {
                "street": "Nehru street",
                "state": "Tamil nadu",
                "country": "India",
                "zip_code": "600089",
                "city": "Chennai",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "property_customers": [
                {
                    "customer": {
                        "customer_last_name": "Test One",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_contact_no": {
                            "mobile": "09790791037",
                            "home": "987654321"
                        },
                        "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                    }
                },
                {
                    "customer": {
                        "customer_last_name": "Test",
                        "customer_email": "[email protected]",
                        "customer_contact_no": {
                            "home": "912345678",
                            "mobile": "987654321",
                            "work": "122131414"
                        },
                        "customer_first_name": "Sriram",
                        "customer_uid": "09459550-d659-11ea-939d-2f7e50296e29"
                    }
                }
            ],
            "property_uid": "36c7b120-6204-11eb-915b-e306107ad87d",
            "created_by": {
                "user_uid": "7af6909b-9ede-4487-8d84-55ae0e991af8",
                "first_name": "test",
                "last_name": "Sriram",
                "email": "[email protected]",
                "home_phone_number": "1234567890",
                "designation": "FE",
                "emp_code": "001",
                "work_phone_number": "1234567890",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "custom_fields": [],
            "created_at": "2021-01-29T07:33:00.341Z",
            "updated_at": "2021-01-29T07:33:00.345Z",
            "property_organization": {
                "organization_name": "Test One3",
                "organization_logo": "https://www.google.com/",
                "organization_uid": "3578afd0-61ec-11eb-be1a-5f41b7fdd76b"
            }
        },
        {
            "no_of_jobs": 10,
            "is_active": true,
            "is_deleted": false,
            "property_name": "Test One10",
            "property_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "property_uid": "b48bb210-6203-11eb-915b-e306107ad87d",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "home_phone_number": "9123456789",
                "designation": "Admin",
                "emp_code": "001",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "property_customers": [],
            "custom_fields": [],
            "created_at": "2021-01-29T07:29:21.849Z",
            "updated_at": "2021-02-24T12:41:31.260Z",
            "property_organization": {
                "organization_name": "Test One",
                "organization_logo": "https://www.google.com/",
                "organization_uid": "2b7005b0-61ec-11eb-be1a-5f41b7fdd76b"
            }
        }
    ],
    "total_records": 60,
    "current_page": 1,
    "total_pages": 10
}

Fetches all properties matching the query parameters

HTTP Request

GET /property

Query Parameters

This endpoint accepts multiple filters as a query parameters

Customer query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
limit true No of properties per page Number Any number
sort false Sort order Enum [ 'ASC', 'DESC']
sort_by false Sort type Enum ['property_name', 'created_at']
filter.custom_field false Filter by custom field Json Stringified REFER CUSTOM FIELD DETAILS
filter.is_active false Filter by active properties Boolean 0 or 1
filter.keyword false Filter by search query. Searches for property name String Any valid string
filter.created_by false Filter by created user UIDs Comma Seperated String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6, c04f4872-d5cd-44a8-a33c-4576dd860cce
filter.created_at_from false Filter by created from date Date 2021-03-28
filter.created_at_to false Filter by created to date Date 2021-03-28
filter.no_of_jobs_from false Filter properties having jobs more than the value Number 10
filter.no_of_jobs_to false Filter properties having jobs lesser than the value Number 100
filter.customer false Filter properties by customer UIDS Comma Seperated String 08e254e0-d262-11ea-bfd6-85ede87cf0ee, ff040f90-cd52-11ea-9c09-f5d3c9145a54
filter.organization false Filter by organization UIDs Comma Seperated String a4ee48e0-d60d-11ea-b654-5979bc62f918, 52762cc0-d25d-11eb-9cb1-018a2c669645

A single custom field details

Parameter Required Description Type Example
label true Custom field label String Property State
value true Custom field value String US

Update Property

curl "https://<host>/api/property/<property_uid>" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "property": {
        "property_name": "Customer Property 1 updated",
        "organization": "52762cc0-d25d-11eb-9cb1-018a2c669645",
        "no_of_jobs": 10,
        "property_address": {
            "street" : "street",
            "state" : "state",
            "country" : "country",
            "zip_code" : "zipcode",
            "city" : "city" ,
            "geo_cordinates" : [11.21, 81.91]
        },
        "property_customers": [
            {
                "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
            },
            {
                "customer": "08e254e0-d262-11ea-bfd6-85ede87cf0ee"
            }
        ],
        "custom_fields" : [
            {
                "label": "Property State",
                "value": "India",
                "hide_to_fe": false
            },
            {
                "label": "Property Currency",
                "value": "INR",
                "hide_to_fe": false
            }
        ],
        "property_image": "https://zuperpro/assets/property_image.jpg",
        "attachments": [
            {
                "file_name": "Property name",
                "url": "https://zuperpro/assets/attachment.pdf"
            }
        ]

    }
}

On successfully updating a property we get the below response:

{
    "type": "success",
    "message": "Property Updated successfully",
    "data": {
        "property_uid": "6beec780-d266-11eb-9cb1-018a2c669645"
    }
}

This endpoint allows us to update a property.

HTTP Request

PUT /property/<property_uid>

Body Parameters

This endpoint accepts a property object

Property Update Details

Parameter Required Description Type Example
property_name true Name of property String Zuper property
organization false Organization UID String 52762cc0-d25d-11eb-9cb1-018a2c669645
no_of_jobs false Number of jobs Number 10
property_address true Property address Object REFER PROPERTY ADDRESS DETAILS
property_customers false Property customers Object REFER PROPERTY CUSTOMER DETAILS
property_image false Property for image String https://zuperpro/assets/property_image.jpg
attachments false Property attachments Object REFER PROPERTY ATTACHMENT DETAILS
custom_fields false List of custom fields Object REFER CUSTOM FIELD DETAILS

Property address details

Parameter Required Description Type Example
street false Property's street String Prakasam street
city false Property's city String Chennai
state false Property's state String Tamilnadu
zipcode false Property's zipcode String 600017
country false Property's country String India
geo_cordinates false Property's latitude and longitude List [13.0418, 80.2341]

A single property customer details

Parameter Required Description Type Example
customer true Customer's UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54

A single custom field details

Parameter Required Description Type Example
label true Custom field label String variety
value true Custom field value String window
type true Custom field type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'RADIO', 'MULTI_ITEM', 'NUMBER', 'DATE', 'TIME', 'DATETIME', 'LOOKUP']
hide_to_fe true Custom field accessible to field executive Boolean 0 or 1
group_name false Group name String Group 1
group_uid false Group UID String 9f0798c0-fd8e-11ea-abaf-7fac6d852c15

Property Attachment Details

Parameter Required Description Type Example
file_name true Filename String Property Name
url true Attachment URL String https://zuperpro/assets/attachment.pdf

Activate / Deactivate Property

curl "https://<host>/api/property/<property_uid>/activate" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "type": "ACTIVATE"
}

On successfull activation / deactivation of a property we get the below response:

{
    "type": "success",
    "title": "Property Activation Updated",
    "message": "Property Details has been successfully updated"
}

This endpoint allows us to activate / deactivate a property.

HTTP Request

PUT /property/<property_uid>/activate

Body Parameters

This endpoint accepts a property object

Property Activation Details

Parameter Required Description Type Example
type true Type of activation Enum [ 'ACTIVATE', 'DEACTIVATE']

Get Property Details

curl "https://<host>/api/property/<property_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the property details for a specific property UID:

{
    "type": "success",
    "data": {
        "no_of_jobs": 10,
        "is_active": false,
        "is_deleted": false,
        "property_name": "Customer Property",
        "property_address": {
            "street": "street",
            "state": "state",
            "country": "country",
            "zip_code": "zipcode",
            "city": "city",
            "geo_cordinates": [
                11.21,
                81.91
            ]
        },
        "property_customers": [
            {
                "customer": {
                    "customer_last_name": "test",
                    "customer_organization": {
                        "is_active": false,
                        "is_deleted": false,
                        "organization_name": "Customer Org Updated",
                        "organization_description": "This is a customer organization description updated",
                        "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
                        "organization_address": {
                            "street": "street",
                            "state": "state",
                            "country": "country",
                            "zip_code": "zipcode",
                            "city": "city",
                            "geo_cordinates": [
                                11.21,
                                81.91
                            ]
                        },
                        "organization_uid": "52762cc0-d25d-11eb-9cb1-018a2c669645"
                    },
                    "customer_email": "[email protected]",
                    "customer_first_name": "test",
                    "customer_uid": "08e254e0-d262-11ea-bfd6-85ede87cf0ee",
                    "customer_category": {
                        "category_name": "IT",
                        "sla_duration": {
                            "days": 200
                        },
                        "category_uid": "07f63ad0-8264-11eb-84ff-eb2a762e383a"
                    },
                    "customer_contact_no": {
                        "mobile": "+449790791037"
                    }
                }
            },
            {
                "customer": {
                    "customer_last_name": "Test One",
                    "customer_organization": {
                        "is_active": false,
                        "is_deleted": false,
                        "organization_name": "Customer Org Updated",
                        "organization_description": "This is a customer organization description updated",
                        "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
                        "organization_address": {
                            "street": "street",
                            "state": "state",
                            "country": "country",
                            "zip_code": "zipcode",
                            "city": "city",
                            "geo_cordinates": [
                                11.21,
                                81.91
                            ]
                        },
                        "organization_uid": "52762cc0-d25d-11eb-9cb1-018a2c669645"
                    },
                    "customer_email": "[email protected]",
                    "customer_first_name": "test",
                    "customer_contact_no": {
                        "mobile": "09790791037",
                        "home": "987654321"
                    },
                    "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
                    "customer_category": {
                        "category_name": "electrical",
                        "sla_duration": {
                            "days": 1,
                            "hours": 0,
                            "minutes": 0
                        },
                        "category_uid": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf"
                    }
                }
            }
        ],
        "custom_fields": [
            {
                "hide_to_fe": false,
                "label": "Property State",
                "value": "India"
            },
            {
                "hide_to_fe": false,
                "label": "Property Currency",
                "value": "INR"
            }
        ],
        "property_image": "https://zuperpro/assets/property_image.jpg",
        "attachments": [
            {
                "file_name": "Property name",
                "url": "https://zuperpro/assets/attachment.pdf",
                "attachment_uid": "717a97e0-d26d-11eb-9cb1-018a2c669645",
                "created_by": {
                    "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                    "first_name": "Sriram",
                    "last_name": "Palakula",
                    "email": "[email protected]",
                    "home_phone_number": "9123456789",
                    "designation": "Admin",
                    "emp_code": "001",
                    "work_phone_number": "9987654321",
                    "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                    "is_active": true,
                    "is_deleted": false
                },
                "created_at": "2021-06-21T08:48:26.207Z"
            }
        ],
        "property_organization": {
            "organization_name": "Customer Org Updated",
            "organization_logo": "https://zuperpro/assets/profile_picture.jpg",
            "organization_address": {
                "street": "street",
                "state": "state",
                "country": "country",
                "zip_code": "zipcode",
                "city": "city",
                "geo_cordinates": [
                    11.21,
                    81.91
                ]
            },
            "organization_uid": "52762cc0-d25d-11eb-9cb1-018a2c669645",
            "no_of_customers": 2
        },
        "property_uid": "6beec780-d266-11eb-9cb1-018a2c669645",
        "created_by": {
            "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
            "first_name": "Sriram",
            "last_name": "Palakula",
            "email": "[email protected]",
            "home_phone_number": "9123456789",
            "designation": "Admin",
            "emp_code": "001",
            "work_phone_number": "9987654321",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "is_active": true,
            "is_deleted": false
        },
        "created_at": "2021-06-21T07:58:10.426Z",
        "updated_at": "2021-06-21T08:54:35.163Z"
    }
}

Fetches property details matching the property UID

HTTP Request

GET /property/<property_uid>

Delete Property

curl "https://<host>/api/property/<property_uid>" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

Property with the specific property_uid is deleted:

{
    "type": "success",
    "message": "Property deleted successfully"
}

Deletes a property matching the property_uid

HTTP Request

DELETE /property/<property_uid>

Jobs

Create Job

curl "https://<host>/api/jobs" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:


// Normal job
{
    "job": {
        "customer": {
            "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
            "customer_email": "[email protected]",
            "customer_first_name": "John",
            "customer_contact_no": {
                "mobile": "987654321",
                "home": "987654321"
            },
            "customer_billing_address": {
                "street": "Prakasam St, Gangai Karai Puram",
                "city": "Chennai",
                "state": "TAMILNADU",
                "zip_code": "600017"
            },
            "customer_address": {
                "street": "Prakasam St, Gangai Karai Puram",
                "city": "Chennai",
                "state": "TAMILNADU",
                "zip_code": "600017"
            }
        },
        "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "prefix": "fix",
        "job_title": "ac repair",
        "job_category": "665c0df0-cd53-11ea-9c09-f5d3c9145a54",
        "job_priority": "LOW",
        "job_type": "NEW",
        "scheduled_start_time": "2021-02-19 05:45:00",
        "scheduled_end_time": "2021-02-19 06:15:00",
        "due_date": "2021-02-19 18:30:00",
        "asset": "a9a22ed0-5f30-11ec-b0b6-95b6bc4fa19c",
        "assets": [
            {
                "asset": "71b144f0-d7ca-11ea-b00f-617c5f486b2d",
                "remarks": "Asset from company"
            },
            {
                "asset": "e9a7fc90-cb77-11ec-b19a-19fad2881efd",
                "remarks": "Asset from customer"
            }
        ],
        "job_tags": [
            "coolant"
        ],
        "job_description": "repair ac",
        "custom_fields": [
            {
                "id": 1,
                "label": "variety",
                "value": "window",
                "type": "SINGLE_LINE",
                "hide_to_fe": false
            }
        ],
        "team_uid": "463ae640-c311-4415-824c-aaab93a4f5b6",
        "assigned_to": [
            {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "team_uid": "463ae640-c311-4415-824c-aaab93a4f5b6"
            },
            {
                "user_uid": "f8cc5ec2-bfa9-4fbd-8842-53ad7b462da7",
                "team_uid": "5f154076-ad4f-4d58-b806-5c6c697adf97"
            }
        ],
        "products": [
            {
                "product_uid": "a634b7b0-7bc4-11e9-af27-a5e2b7a037f7",
                "product_id": "A010",
                "product_name": "Cardboard Boxes",
                "quantity": 2,
                "price": 200,
                "product_description": "Sample",
                "product_image": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments.png",
                "meta_data": [
                     {
                        "label" : "Selling Price",
                        "value" : "129"
                     }
                ]
            }
        ],
        "organization": "2b7005b0-61ec-11eb-be1a-5f41b7fdd76b",
        "property": "b48bb210-6203-11eb-915b-e306107ad87d"
    }
}

//Recurring job

{
    "job": {
        "customer": {
            "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
            "customer_email": "[email protected]",
            "customer_first_name": "John",
            "customer_contact_no": {
                "mobile": "987654321",
                "home": "987654321"
            },
            "customer_billing_address": {
                "street": "Prakasam St, Gangai Karai Puram",
                "city": "Chennai",
                "state": "TAMILNADU",
                "zip_code": "600017"
            },
            "customer_address": {
                "street": "Prakasam St, Gangai Karai Puram",
                "city": "Chennai",
                "state": "TAMILNADU",
                "zip_code": "600017"
            }
        },
        "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "prefix": "e",
        "job_title": "test",
        "job_category": "665c0df0-cd53-11ea-9c09-f5d3c9145a54",
        "job_priority": "LOW",
        "job_type": "NEW",
        "scheduled_start_time": "2021-02-19 15:00:00",
        "scheduled_end_time": "2021-02-19 15:00:00",
        "due_date": "2021-02-18 18:30:00",
        "is_recurrence": true,
        "contract_name": "#test32 - job_contract",
        "service_contract": "741b8ef0-240d-11eb-97ff-5bebf5df9ab0",
        "recurrence_dates": [
            {
                "scheduled_start_time": "2021-02-19 15:00:00",
                "scheduled_end_time": "2021-02-19 15:00:00"
            }
        ],
        "rrule": {
            "rule_string": "FREQ=DAILY;INTERVAL=2;WKST=SU;DTSTART=20210219T150000;UNTIL=20210220T150000",
            "duration": {
                "value": 1,
                "type": "DAYS"
            }
        },
        "job_tags": [
            ""
        ],
        "job_description": "This is a recurring job",
        "custom_fields": [
            {
                "id": 1,
                "label": "variety",
                "value": "window",
                "type": "SINGLE_LINE",
                "hide_to_fe": false
            }
        ],
        "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
        "assigned_to": [
            {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab"
            }
        ]
    }
}

On successfull creation of a job we get the below response:

{
    "type": "success",
    "message": "New Job Created successfully",
    "job_uid": "73ee0c20-7276-11eb-94ba-8b7293d62475",
    "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
}

This endpoint allows us to create a new job.

HTTP Request

POST /jobs

Body Parameters

This endpoint accepts a job object

Job Creation Details

Parameter Required Description Type Example
customer true Customer Details Object Refer customer details
customer_uid true Customer UID of the customer String ff040f90-cd52-11ea-9c09-f5d3c9145a54
prefix false Namespace for the job String Electrical
job_title true Title of the job String AC repair
job_category true Category UID of the job String 665c0df0-cd53-11ea-9c09-f5d3c9145a54
job_priority false Priority of the job Enum ['LOW', 'MEDIUM', 'HIGH', 'URGENT']
job_type true Type of the job Enum ['NEW', 'REVISIT']
scheduled_start_time true Scheduled start time of the job Datetime 2021-02-19 05:45:00
scheduled_end_time true Scheduled end time of the job Datetime 2021-02-19 06:15:00
due_date false Due date of the job Datetime 2021-02-19 18:30:00
asset false Asset UID of the asset String 71b144f0-d7ca-11ea-b00f-617c5f486b2d
assets false List of assets Object REFER ASSETS DETAILS
is_recurrence false Whether it is a recurring job Boolean 0 or 1
contract_name false Name of the service contract Object #test32 - job_contract
service_contract false Service contract UID String 741b8ef0-240d-11eb-97ff-5bebf5df9ab0
recurrence_dates false Recurrence schedule Object REFER RECURRENCE SCHEDULE DATE DETAILS
rrule false Recurrence schedule rule Object REFER RECURRENCE SCHEDULE RULE DETAILS
job_tags false Collection of job tags List ['repairs', 'AC', 'fixes', 'electrical']
job_description false Description of the job String This job is for AC service
custom_fields false List of custom fields of the job Object REFER CUSTOM FIELD DETAILS
team_uid false Team UID assigned to job String 463ae640-c311-4415-824c-aaab93a4f5b6
assigned_to false List of users assigned to job Object REFER USER DETAILS
organization false Organization UID String 2b7005b0-61ec-11eb-be1a-5f41b7fdd76b
property false Property UID String b48bb210-6203-11eb-915b-e306107ad87d
products false List of Products List of objects REFER PRODUCT DETAILS

Customer details

Parameter Required Description Type Example
customer_uid true Customer UID of the customer String ff040f90-cd52-11ea-9c09-f5d3c9145a54
customer_email true Email ID of customer String [email protected]
customer_first_name true Customer UID of the customer String John
customer_contact_no true Customer's contanct details Object REFER CUSTOMER CONTACT DETAILS
customer_address true Customer's address Object REFER CUSTOMER ADDRESS DETAILS
customer_billing_address true Customer's billing address Object REFER CUSTOMER ADDRESS DETAILS

Customer contact details

Parameter Required Description Type Example
mobile true Customer's mobile number String 987654321
phone true Customer's phone number String 987654321

Customer address details

Parameter Required Description Type Example
street true Customer's street String Prakasam street
city true Customer's city String Chennai
state false Customer's state String Tamilnadu
zipcode false Customer's zipcode String 600017
geo_cordinates false Customer's latitude and longitude List [13.0418, 80.2341]

A single user details

Parameter Required Description Type Example
team_uid true User's team UID String 463ae640-c311-4415-824c-aaab93a4f5b6
user_uid true User's user UID String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6

Assets details

Parameter Required Description Type Example
asset false Asset UID of the asset String 71b144f0-d7ca-11ea-b00f-617c5f486b2d
remarks false Remarks for asset String Asset from company

Product details

Parameter Required Description Type Example
product_uid false Product UID String a634b7b0-7bc4-11e9-af27-a5e2b7a037f7
product_id false Product ID String A010
product_name true Product name String Cardboard Boxes
product_image false Product image String https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments.png
quantity true Product quantity Number 2
price false Product price Number 200
meta_data false List of custom fields of product Object REFER CUSTOM FIELD DETAILS

A single custom field details

Parameter Required Description Type Example
label true Custom field label String variety
value true Custom field value String window
type true Custom field type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'RADIO', 'MULTI_ITEM', 'NUMBER', 'DATE', 'TIME', 'DATETIME', 'LOOKUP']
hide_to_fe true Custom field accessible to field executive Boolean 0 or 1
group_name false Group name String Group 1
group_uid false Group UID String 9f0798c0-fd8e-11ea-abaf-7fac6d852c15

Recurrence schedule date details

Parameter Required Description Type Example
scheduled_start_time true Scheduled start time Datetime 2021-02-19 15:00:00
scheduled_end_time true Scheduled end time Datetime 2021-02-19 17:00:00

Recurrence schedule rule details

Parameter Required Description Type Example
rule_string false Recurrence rule string String REFER RECURRING RULE DETAILS
duration false Duration details Object REFER DURATION DETAILS

Recurrring rule details

Parameter Required Description Type Example
FREQ false Recurrence frequency Enum ['YEARLY', 'MONTHLY', 'WEEKLY', 'DAILY', 'HOURLY', 'MINUTELY', 'SECONDLY']
INTERVAL false Frequnce interval Number 2 - (Incase DAILY - Once every 2 days, HOURLY - Once every 2 hours)
WKST false Start day of the week Enum ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU']
DTSTART false The start of recurrence Datetime 20210219T150000
UNTIL false The end of recurrence Datetime 20210220T150000

Duration details

Parameter Required Description Type Example
type false Type of recurring duration Enum ['DATES', 'WEEKS', 'MONTHS', 'YEARS']
value false Frequency Number 2 - (Incase YEARS - Once every 2 years, MONTHS - Once every 2 months)

Update Job

curl "https://<host>/api/jobs/" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "job": {
        "job_title": "updated title",
        "job_description": "repairs edit",
        "due_date": "2021-02-19 18:30:00",
        "job_priority": "MEDIUM",
        "job_tags": [
             "coolant", "fans"
        ],
        "customer_address": {
            "street": "Prakasam St, Gangai Karai Puram",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600017"
        },
        "customer_billing_address": {
            "street": "Prakasam St, Gangai Karai Puram",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600017"
        },
        "custom_fields": [
            {
                "id": 1,
                "label": "variety",
                "value": "window",
                "type": "SINGLE_LINE",
                "hide_to_fe": false
            },
            {
                "id": 2,
                "label": "variety",
                "value": "split",
                "type": "MULTI_LINE",
                "hide_to_fe": true
            }
        ],
        "job_uid": "73ee0c20-7276-11eb-94ba-8b7293d62475",
        "organization": "38f0bf90-61ec-11eb-be1a-5f41b7fdd76b",
        "property": "3361d460-6205-11eb-b6f5-e7fbdf08afc3"
    }
}

On successfull job update we get the below response:

{
    "type": "success",
    "message": "Job Details updated successfully"
}

The job's title, description, priority, due date, customer address, custom fields and tags can be updated.

HTTP Request

PUT /jobs

Body Parameters

This endpoint accepts a job object

Job Update Details

Parameter Required Description Type Example
job_uid true Job UID of the updated job String 73ee0c20-7276-11eb-94ba-8b7293d62475
job_title true Title of the job String AC repair
job_description false Description of the job String This job is for AC service
job_priority false Priority of the job Enum ['LOW', 'MEDIUM', 'HIGH', 'URGENT']
job_tags false Collection of job tags List ['repairs', 'AC', 'fixes', 'electrical']
due_date false Due date of the job Datetime 2021-02-19 18:30:00
organization false Organization UID String 2b7005b0-61ec-11eb-be1a-5f41b7fdd76b
property false Property UID String b48bb210-6203-11eb-915b-e306107ad87d
customer_address true Customer's address Object REFER CUSTOMER ADDRESS DETAILS
custom_fields false List of custom fields of the job Object REFER CUSTOM FIELD DETAILS

Customer address details

Parameter Required Description Type Example
street true Customer's street String Prakasam street
city true Customer's city String Chennai
state false Customer's state String Tamilnadu
zipcode false Customer's zipcode String 600017
geo_cordinates false Customer's latitude and longitude List [13.0418, 80.2341]

A single custom field details

Parameter Required Description Type Example
label true Custom field label String variety
value true Custom field value String window
type true Custom field type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'RADIO', 'MULTI_ITEM', 'NUMBER', 'DATE', 'TIME', 'DATETIME', 'LOOKUP']
hide_to_fe true Custom field accessible to field executive Boolean 0 or 1
group_name false Group name String Group 1
group_uid false Group UID String 9f0798c0-fd8e-11ea-abaf-7fac6d852c15

Update Job Schedule

curl "https://<host>/api/jobs/schedule" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "from_date": "2021-02-19 07:45:00",
    "to_date": "2021-02-19 09:45:00",
    "job_uid": "73ee0c20-7276-11eb-94ba-8b7293d62475",
    "reason": "agent travel time increased due to traffic"
}

On successfull job schedule update we get the below response:

{
    "type": "success",
    "message": "Job has been updated successfully"
}

The job can be rescheduled.

HTTP Request

PUT /jobs/schedule

Body Parameters

This endpoint accepts a job reschedule object

Job Schedule Details

Parameter Required Description Type Example
job_uid true Job UID of the updated job String 73ee0c20-7276-11eb-94ba-8b7293d62475
scheduled_start_time true Scheduled start time of the job Datetime 2021-02-19 07:45:00
scheduled_end_time true Scheduled end time of the job Datetime 2021-02-19 09:45:00
reason false Reason for rescheduling String agent travel time increased due to traffic

Update Job Assignment

curl "https://<host>/api/jobs/assign" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "job_uid": "73ee0c20-7276-11eb-94ba-8b7293d62475",
    "users": [
        {
            "user_uid": "7af6909b-9ede-4487-8d84-55ae0e991af8",
            "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab"
        }
    ],
    "teams" : ["18cada40-021b-11e8-8127-43a5add1a9e2"],
    "type": "ASSIGN",
    "update_all_jobs": false
}

On successfull user assignment to job we get the below response:

{
    "type": "success",
    "message": "The Job Assignment has been updated successfully",
    "title": "Job Assignment updated"
}

The users can be added to or removed from the job.

HTTP Request

POST /jobs/assign

Body Parameters

This endpoint accepts a job assignment object

Job Assignment Details

Parameter Required Description Type Example
job_uid true Job UID of the updated job String 73ee0c20-7276-11eb-94ba-8b7293d62475
users true List of users to add or remove from the job Object REFER USER DETAILS
teams false List of team UIDs to add or remove from the job List ["18cada40-021b-11e8-8127-43a5add1a9e2"]
type true To add or remove users Enum ['ASSIGN', 'UNASSIGN']
update_all_jobs false Update all jobs Boolean true or false

A single user details

Parameter Required Description Type Example
team_uid true User's team UID String 463ae640-c311-4415-824c-aaab93a4f5b6
user_uid true User's user UID String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6

Update Job Status

curl "https://<host>/api/jobs/<job_uid>/status" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "job_uid": "73ee0c20-7276-11eb-94ba-8b7293d62475",
    "status_uid": "81b2d541-aa19-4f11-aebe-f06e6ef3d941",
    "remarks": "drop_down_picker_remark",
    "remarks_free_text": "free text remark",
    "customer_signature": "Customer sign upload URL",
    "customer_signature_name": "Signed by",
    "facial_auth_status": "SUCCESS", 
    "facial_auth_picture": "facial auth URL",
    "checklist": [
        {
            "question": "Is job completed",
            "answer": "Yes",
            "type": "SINGLE_LINE"
        }
    ],
    "feedback": {
         "rating": "HAPPY",
         "message": "text feedback collected for UNHAPPY case"
   }
}

On successfull status update of job we get the below response:

{
    "type": "success",
    "message": "Job Status Updated"
}

The status of the job can be updated.

HTTP Request

PUT /jobs/<job_uid>/status

Body Parameters

This endpoint accepts a job status object

Job Status Details

Parameter Required Description Type Example
job_uid true Job UID of the updated job String 73ee0c20-7276-11eb-94ba-8b7293d62475
remarks false Status remarks String drop_down_picker_remark
remarks_free_text false Status remarks free text String free text remark
customer_signature false Customer signature upload URL String Customer sign upload URL
customer_signature_name false Customer signature name String Signed by
facial_auth_status false Facial auth status String SUCCESS
facial_auth_picture false Facial auth picture String facial auth URL
checklist false Checklist details of the newly changed status Object REFER CHECKLIST DETAILS
feedback false Feedback details of the newly changed status Object REFER FEEDBACK DETAILS

A single checklist details

Parameter Required Description Type Example
question true Checklist question String Is job completed
answer true Checklist answer String yes
type true Checklist type Enum ['SINGLE_LINE', 'MULTI_LINE', 'SINGLE_ITEM', 'MULTI_ITEM', 'RADIO', 'NUMBER', 'DATE', 'TIME', 'BARCODE', 'IMAGE', 'DATETIME' ]

Feedback details

Parameter Required Description Type Example
rating false Rating Enum ['HAPPY', 'NEUTRAL', 'UNHAPPY']
message false Feedback message for unhappy case String We are unhappy

Rollback Job Status

curl "https://<host>/api/jobs/<job_uid>/status/rollback" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
  "job_uid": "8aeb7ba0-65c2-11e9-a2f4-35c4f74062f3",
  "reason": "Status rolled back due to incomplete job",
  "status_uid": "c5b4a973-6d07-45dd-92f6-8b8806250801"
}

On successfull status rollback of job we get the below response:

{
  "type": "success",
  "message": "Job Status rolled back successfully"
}

The status of the job can be rolled back.

HTTP Request

PUT /jobs/<job_uid>/status/rollback

Body Parameters

This endpoint accepts a job status object

Job Status Details

Parameter Required Description Type Example
job_uid true Job UID of the updated job String 8aeb7ba0-65c2-11e9-a2f4-35c4f74062f3
status_uid true Status UID of the updated job String c5b4a973-6d07-45dd-92f6-8b8806250801
reason true Reason for status rollback String Status rolled back due to incomplete job

Get Jobs

curl "https://<host>/api/jobs?count=<job_count>&filter.category=<category_uid>&filter.from_date=<from_date>&filter.job_status=<job_status_uid>&filter.keyword=<keyword>&filter.priority=<job_proirity>&filter.to_date=<to_date>&page=<page_number>&sort=<sort_order>&sort_by=<sort_type>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the jobs matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "job_uid": "b4da5cc0-ae57-11ec-92f3-2bd69649bb75",
            "customer": {
                "customer_last_name": "S",
                "customer_company_name": "Zuper",
                "customer_email": "[email protected]",
                "is_active": true,
                "is_deleted": false,
                "customer_first_name": "Sree Vidya",
                "customer_contact_no": {
                    "mobile": "123456789"
                },
                "customer_uid": "3cbaa5b0-8c66-11eb-b151-65f870d11b32",
                "customer_organization": {
                    "is_active": true,
                    "is_deleted": false,
                    "organization_address": {
                        "geo_cordinates": [
                            13.0494706,
                            80.245223
                        ],
                        "street": "SKCL Harmony Square, Prakasam Street, Gangai Karai Puram, T. Nagar",
                        "city": "Chennai ",
                        "state": "Tamil Nadu ",
                        "country": "India",
                        "zip_code": "600017",
                        "landmark": ""
                    },
                    "organization_name": "Guindy SKCL",
                    "organization_uid": "f7ebd2e0-b958-11eb-815b-e3ecdc272c06"
                }
            },
            "prefix": "2022 -",
            "delayed_job": false,
            "assigned_to": [
                {
                    "user": {
                        "user_uid": "e84fa16a-bd25-46da-8bb2-2c9649b2aff7",
                        "emp_code": "2553",
                        "prefix": null,
                        "first_name": "Sushil",
                        "last_name": "TL",
                        "email": "[email protected]",
                        "designation": "TL",
                        "home_phone_number": null,
                        "work_phone_number": null,
                        "mobile_phone_number": null,
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 2,
                            "role_uid": "504e5168-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Team Leader",
                            "role_key": "TEAM_LEADER",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "team": {
                        "team_uid": "d4693c7f-2b05-450a-9a56-1f42afb82dca",
                        "team_name": "Zuper_test",
                        "team_color": "#4960a0",
                        "is_active": true,
                        "is_deleted": false
                    }
                },
                {
                    "user": {
                        "user_uid": "5b7324a5-2a61-4401-822b-3703249b936e",
                        "emp_code": "14789",
                        "prefix": null,
                        "first_name": "Sushil",
                        "last_name": "FE",
                        "email": "[email protected]",
                        "designation": "Field Executive",
                        "home_phone_number": null,
                        "work_phone_number": null,
                        "mobile_phone_number": null,
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 3,
                            "role_uid": "504e52bc-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Field Executive",
                            "role_key": "FIELD_EXECUTIVE",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "team": {
                        "team_uid": "d4693c7f-2b05-450a-9a56-1f42afb82dca",
                        "team_name": "Zuper_test",
                        "team_color": "#4960a0",
                        "is_active": true,
                        "is_deleted": false
                    }
                }
            ],
            "job_title": "Test Job",
            "job_category": {
                "category_name": "Pressure Washing",
                "category_uid": "5c904c80-b753-11e9-8afe-e53ff9105097",
                "category_color": "#e74c3c",
                "estimated_duration": {
                    "hours": 8,
                    "minutes": 1
                }
            },
            "job_priority": "LOW",
            "job_type": "NEW",
            "job_tags": [],
            "scheduled_start_time": "2024-03-07T05:30:00.000Z",
            "scheduled_end_time": "2024-03-07T13:31:00.000Z",
            "current_job_status": {
                "status_uid": "e491ab73-ab51-49af-81b2-6ded70f4acd1",
                "status_name": "Confirmed",
                "status_type": "NEW",
                "status_color": "#27ae60"
            },
            "job_status": [
                {
                    "status_uid": "e491ab73-ab51-49af-81b2-6ded70f4acd1",
                    "status_name": "Confirmed",
                    "status_type": "NEW",
                    "status_color": "#27ae60",
                    "checklist": [],
                    "created_at": "2022-03-28T05:27:06.125Z"
                }
            ],
            "customer_address": {
                "landmark": "",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "SIDCO Industrial Estate ",
                "country": "India",
                "zip_code": "600032",
                "geo_cordinates": [
                    13.0144557,
                    80.2126109
                ],
                "first_name": "Sree Vidya",
                "last_name": "S",
                "phone_number": "123456789",
                "email": "[email protected]"
            },
            "customer_billing_address": {
                "landmark": "",
                "city": "Chennai ",
                "state": "Tamil Nadu ",
                "street": "SKCL Harmony Square, Prakasam Street, Gangai Karai Puram, T. Nagar",
                "country": "India",
                "zip_code": "600017",
                "geo_cordinates": [
                    13.0494706,
                    80.2452213
                ],
                "first_name": "Sree Vidya",
                "last_name": "S",
                "phone_number": "123456789",
                "email": "[email protected]"
            },
            "custom_fields": [
                {
                    "label": "HubSpot Ticket ID",
                    "value": "",
                    "type": "SINGLE_LINE",
                    "hide_to_fe": false,
                    "hide_field": false,
                    "read_only": false
                },
                {
                    "label": "Text Input",
                    "value": "",
                    "type": "SINGLE_LINE",
                    "hide_to_fe": false,
                    "hide_field": false,
                    "read_only": false
                },
                {
                    "label": "Text Input",
                    "value": "",
                    "type": "SINGLE_LINE",
                    "hide_to_fe": false,
                    "hide_field": false,
                    "read_only": false,
                    "group_name": "New group",
                    "group_uid": "1f16e820-9467-11ec-b675-b9a129ac10eb"
                }
            ],
            "products": [],
            "is_recurrence": true,
            "created_by": {
                "user_uid": "71468f36-a847-49a6-b849-02b6992b2b08",
                "emp_code": "120",
                "prefix": null,
                "first_name": "Raghav",
                "last_name": "G",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "123456789",
                "work_phone_number": "123456789",
                "mobile_phone_number": null,
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_id": 1,
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN",
                    "created_at": "2018-01-22T00:00:00.000Z",
                    "updated_at": "2018-01-22T00:00:00.000Z"
                }
            },
            "is_deleted": false,
            "assigned_to_team": [],
            "created_at": "2022-03-28T05:27:06.126Z",
            "work_order_number": 4696,
            "route": null,
            "scheduled_duration": 481
        },
        {
            "job_uid": "b47afeb0-ae57-11ec-92f3-2bd69649bb75",
            "customer": {
                "customer_last_name": "S",
                "customer_company_name": "Zuper",
                "customer_email": "[email protected]",
                "is_active": true,
                "is_deleted": false,
                "customer_first_name": "Sree Vidya",
                "customer_contact_no": {
                    "mobile": "9876543210"
                },
                "customer_uid": "3cbaa5b0-8c66-11eb-b151-65f870d11b32",
                "customer_organization": {
                    "is_active": true,
                    "is_deleted": false,
                    "organization_address": {
                        "geo_cordinates": [
                            13.0494706,
                            80.24522139999999
                        ],
                        "street": "SKCL Harmony Square, Prakasam Street, Gangai Karai Puram, T. Nagar",
                        "city": "Chennai ",
                        "state": "Tamil Nadu ",
                        "country": "India",
                        "zip_code": "600017",
                        "landmark": ""
                    },
                    "organization_name": "Guindy SKCL",
                    "organization_uid": "f7ebd2e0-b958-11eb-815b-e3ecdc272c06"
                }
            },
            "prefix": "2022 -",
            "delayed_job": false,
            "assigned_to": [
                {
                    "user": {
                        "user_uid": "6fcaa0f7-b510-4f65-9cb4-3e55a32c1f8d",
                        "emp_code": "12563",
                        "prefix": null,
                        "first_name": "Sushil",
                        "last_name": "S",
                        "email": "[email protected]",
                        "designation": "Backend",
                        "home_phone_number": null,
                        "work_phone_number": null,
                        "mobile_phone_number": null,
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 1,
                            "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Admin",
                            "role_key": "ADMIN",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "team": {
                        "team_uid": "d4693c7f-2b05-450a-9a56-1f42afb82dca",
                        "team_name": "Zuper_test",
                        "team_color": "#4960a0",
                        "is_active": true,
                        "is_deleted": false
                    }
                },
                {
                    "user": {
                        "user_uid": "e84fa16a-bd25-46da-8bb2-2c9649b2aff7",
                        "emp_code": "2553",
                        "prefix": null,
                        "first_name": "Sushil",
                        "last_name": "TL",
                        "email": "[email protected]",
                        "designation": "TL",
                        "home_phone_number": null,
                        "work_phone_number": null,
                        "mobile_phone_number": null,
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 2,
                            "role_uid": "504e5168-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Team Leader",
                            "role_key": "TEAM_LEADER",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "team": {
                        "team_uid": "d4693c7f-2b05-450a-9a56-1f42afb82dca",
                        "team_name": "Zuper_test",
                        "team_color": "#4960a0",
                        "is_active": true,
                        "is_deleted": false
                    }
                },
                {
                    "user": {
                        "user_uid": "5b7324a5-2a61-4401-822b-3703249b936e",
                        "emp_code": "14789",
                        "prefix": null,
                        "first_name": "Sushil",
                        "last_name": "FE",
                        "email": "[email protected]",
                        "designation": "Field Executive",
                        "home_phone_number": null,
                        "work_phone_number": null,
                        "mobile_phone_number": null,
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 3,
                            "role_uid": "504e52bc-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Field Executive",
                            "role_key": "FIELD_EXECUTIVE",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "team": {
                        "team_uid": "d4693c7f-2b05-450a-9a56-1f42afb82dca",
                        "team_name": "Zuper_test",
                        "team_color": "#4960a0",
                        "is_active": true,
                        "is_deleted": false
                    }
                }
            ],
            "job_title": "Test Job",
            "job_category": {
                "category_name": "Pressure Washing",
                "category_uid": "5c904c80-b753-11e9-8afe-e53ff9105097",
                "category_color": "#e74c3c",
                "estimated_duration": {
                    "hours": 8,
                    "minutes": 1
                }
            },
            "job_priority": "LOW",
            "job_type": "NEW",
            "job_tags": [],
            "scheduled_start_time": "2024-03-06T05:30:00.000Z",
            "scheduled_end_time": "2024-03-06T06:30:00.000Z",
            "current_job_status": {
                "status_uid": "e491ab73-ab51-49af-81b2-6ded70f4acd1",
                "status_name": "Confirmed",
                "status_type": "NEW",
                "status_color": "#27ae60"
            },
            "job_status": [
                {
                    "status_uid": "e491ab73-ab51-49af-81b2-6ded70f4acd1",
                    "status_name": "Confirmed",
                    "status_type": "NEW",
                    "status_color": "#27ae60",
                    "checklist": [],
                    "created_at": "2022-03-28T05:27:05.501Z"
                }
            ],
            "customer_address": {
                "landmark": "",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "SIDCO Industrial Estate ",
                "country": "India",
                "zip_code": "600032",
                "geo_cordinates": [
                    13.0144557,
                    80.2126109
                ],
                "first_name": "Sree Vidya",
                "last_name": "S",
                "phone_number": "9876543210",
                "email": "[email protected]"
            },
            "customer_billing_address": {
                "landmark": "",
                "city": "Chennai ",
                "state": "Tamil Nadu ",
                "street": "SKCL Harmony Square, Prakasam Street, Gangai Karai Puram, T. Nagar",
                "country": "India",
                "zip_code": "600017",
                "geo_cordinates": [
                    13.0494706,
                    80.24522139999999
                ],
                "first_name": "Sree Vidya",
                "last_name": "S",
                "phone_number": "9876543210",
                "email": "[email protected]"
            },
            "custom_fields": [
                {
                    "label": "HubSpot Ticket ID",
                    "value": "",
                    "type": "SINGLE_LINE",
                    "hide_to_fe": false,
                    "hide_field": false,
                    "read_only": false
                },
                {
                    "label": "Text Input",
                    "value": "",
                    "type": "SINGLE_LINE",
                    "hide_to_fe": false,
                    "hide_field": false,
                    "read_only": false
                },
                {
                    "label": "Text Input",
                    "value": "",
                    "type": "SINGLE_LINE",
                    "hide_to_fe": false,
                    "hide_field": false,
                    "read_only": false,
                    "group_name": "New group",
                    "group_uid": "1f16e820-9467-11ec-b675-b9a129ac10eb"
                }
            ],
            "products": [],
            "is_recurrence": true,
            "created_by": {
                "user_uid": "71468f36-a847-49a6-b849-02b6992b2b08",
                "emp_code": "120",
                "prefix": null,
                "first_name": "Raghav",
                "last_name": "G",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9876543210",
                "work_phone_number": "9876543210",
                "mobile_phone_number": null,
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_id": 1,
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN",
                    "created_at": "2018-01-22T00:00:00.000Z",
                    "updated_at": "2018-01-22T00:00:00.000Z"
                }
            },
            "is_deleted": false,
            "assigned_to_team": [],
            "created_at": "2022-03-28T05:27:05.502Z",
            "work_order_number": 4694
        }
    ],
    "total_records": 100,
    "current_page": 1,
    "total_pages": 50
}

Fetches all jobs matching the query parameters

HTTP Request

GET /jobs

Query Parameters

This endpoint accepts multiple filters as a query parameters

Job query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
count true No of jobs per page Number Any number
sort false sort order Enum ['ASC', 'DESC']
sort_by false sort by type Enum ['work_order_number', 'job_priority', 'scheduled_start_time']
filter.customer false filter by customer UIDs Comma Seperated String b40998c0-7275-11eb-94ba-8b7293d62475, 08e254e0-d262-11ea-bfd6-85ede87cf0ee
filter.created_by false filter by created user UIDs Comma Seperated String 8366adeb-fea4-4c97-853b-88462021071d, f8cc5ec2-bfa9-4fbd-8842-53ad7b462da7
filter.category false filter by category UIDs Comma Seperated String 73ee0c20-7276-11eb-94ba-8b7293d62475, ac8b7bf0-cffd-11eb-bb7b-57c969f3810a
filter.job_status false filter by job status UIDs Comma Seperated String cd2d0840-7276-11eb-94ba-8b7293d62475, d6130ba0-cffd-11eb-bb7b-57c969f3810a
filter.assigned false Filter by assigned status Enum ['ASSIGNED', 'UNASSIGNED']
filter.assigned_to false Filter by user UIDs Comma Seperated String 6dce9a90-7285-11eb-94ba-8b7293d62475, 7e11fac9-29f6-4b94-ba19-59681e6ee288
filter.assigned_to_team false Filter by team UIDs Comma Seperated String 7db606f0-727a-11eb-94ba-8b7293d62475, a91ecc24-06c5-44ae-9e6e-519ec80fa724
filter.asset false Filter by asset UIDs Comma Seperated String ca29fe10-d60d-11ea-b654-5979bc62f918, 725cb210-d7c8-11ea-b00f-617c5f486b2d
filter.ppm false Filter by PPM UIDs Comma Seperated String ae685ac0-d7d2-11ea-b00f-617c5f486b2d, cdb84110-d7d2-11ea-b00f-617c5f486b2d
filter.service_contract false Filter by service contract UIDs Comma Seperated String 5bab4ea0-d7b4-11ea-952f-093dafdd66ac, a5c38200-d7b4-11ea-952f-093dafdd66ac
filter.job_uid false Filter by job UIDS Comma Seperated String cf8ff0e0-cd56-11ea-b6a4-13c5940a5fcf, c0644220-cd82-11ea-838b-f1340f67ce12
filter.keyword false Filter by search query. Searches for work order number, job title String Any valid string
filter.priority false Filter by priority Comma Seperated Enum LOW, MEDIUM, HIGH, URGENT
filter.from_date false Filter by job scheduled from date Date 2021-02-19
filter.to_date false Filter by job scheduled to date Date 2021-02-19
filter.due_date_from false Filter by due from date Date 2021-02-19
filter.due_date_to false Filter by due to date Date 2021-02-19
filter.created_at false Filter by job created at date Date 2021-02-19
filter.created_at_from false Filter by job created at from date Date 2021-02-19
filter.created_at_to false Filter by job created at to date Date 2021-02-19
filter.status false Filter by job status types Comma Seperated Enum NEW, SCHEDULED, ON_MY_WAY, STARTED, ON_HOLD, COMPLETED, CANNOT_COMPLETE, CLOSED, CANCELED, FAILED, PAID, FOLLOW_UP, OTHER, FOLLOW_UP_SAME_JOB, REQUEST_INITIATED, REQUEST_APPROVED, REQUEST_REJECTED
filter.scheduled false Filter by scheduled status Enum ['SCHEDULED', 'UNSCHEDULED', 'OVERDUE']
filter.customer_feedack false Filter by customer feedback Enum ['HAPPY', 'NEUTRAL', 'UNHAPPY']
filter.is_recurrence false Filter by recurring jobs Boolean 0 or 1
filter.recurrence_job_uid false Filter by recurrence job UIDS Comma Seperated String 97f13a40-cd83-11ea-8e1c-690eb1dee1e7, 15fef8f0-cd84-11ea-8e1c-690eb1dee1e7
filter.job_type false Filter by job type String NEW
filter.job_tags false Filter by job tags Comma Seperated String repairs, AC, fixes, electrical
filter.custom_field false Filter by custom field Json Stringified REFER CUSTOM FIELD DETAILS
filter.customer_organization false Filter by customer organization UIDs Comma Seperated String 093127e0-d25d-11eb-9cb1-018a2c669645, 2b7005b0-61ec-11eb-be1a-5f41b7fdd76b
filter.property false Filter by property UIDs 6beec780-d266-11eb-9cb1-018a2c669645, b48bb210-6203-11eb-915b-e306107ad87d

A single custom field details

Parameter Required Description Type Example
label true Custom field label String skill
value true Custom field value String audit

Get Job Details

curl "https://<host>/api/jobs/<job_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the job details of the specific job_uid:

{
    "type": "success",
    "data": {
        "job_tags": [
            "coolant"
        ],
        "is_recurrence": false,
        "is_deleted": false,
        "products": [
            {
                "product_id": "1",
                "product_name": "Product 1",
                "product_image": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "quantity": 1,
                "currency": "Rs",
                "price": 1234.123,
                "meta_data": []
            },
            {
                "product_name": "Product 2",
                "quantity": 2,
                "currency": "Rs",
                "price": 23423.234,
                "meta_data": []
            }
        ],
        "job_category": {
            "estimated_duration": {
                "hours": 0,
                "minutes": 0,
                "days": 2
            },
            "category_name": "Fixes",
            "category_uid": "665c0df0-cd53-11ea-9c09-f5d3c9145a54"
        },
        "job_uid": "5dce9a90-7285-11eb-94ba-8b7293d62475",
        "job_title": "AC repair",
        "job_description": "AC services and repairs",
        "job_priority": "LOW",
        "job_type": "NEW",
        "scheduled_start_time": "2021-02-19T02:15:00.000Z",
        "scheduled_end_time": "2021-02-19T04:15:00.000Z",
        "assigned_to": [
            {
                "user": {
                    "user_uid": "7af6909b-9ede-4487-8d84-55ae0e991af8",
                    "emp_code": "001",
                    "first_name": "John",
                    "last_name": "Wick",
                    "email": "[email protected]",
                    "designation": "FE",
                    "home_phone_number": "1234567890",
                    "work_phone_number": "1234567890",
                    "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                    "is_active": true,
                    "is_deleted": false,
                    "role": {
                        "role_id": 3,
                        "role_uid": "504e52bc-ff7d-11e7-8be5-0ed5f89f718b",
                        "role_name": "Field Executive",
                        "role_key": "FIELD_EXECUTIVE",
                        "created_at": "2018-01-22T00:00:00.000Z",
                        "updated_at": "2018-01-22T00:00:00.000Z"
                    }
                },
                "team": {
                    "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                    "team_name": "test",
                    "team_color": "#4960a0",
                    "is_active": true,
                    "is_deleted": false
                },
                "acceptance_status": "AWAIT_RESPONSE"
            }
        ],
        "assigned_to_team": [],
        "customer_address": {
            "street": "Prakasam St, Gangai Karai Puram",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600017"
        },
        "customer_billing_address": {
            "street": "Prakasam St, Gangai Karai Puram",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600017"
        },
        "custom_fields": [
            {
                "hide_to_fe": false,
                "label": "variety",
                "value": "window",
                "type": "SINGLE_LINE"
            }
        ],
        "products": [],
        "created_by": {
            "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
            "emp_code": "001",
            "first_name": "Sriram",
            "last_name": "Palakula",
            "email": "[email protected]",
            "designation": "Admin",
            "home_phone_number": "9123456789",
            "work_phone_number": "9987654321",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "is_active": true,
            "is_deleted": false,
            "role": {
                "role_id": 1,
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN",
                "created_at": "2018-01-22T00:00:00.000Z",
                "updated_at": "2018-01-22T00:00:00.000Z"
            }
        },
        "current_job_status": {
            "status_uid": "81b2d541-aa19-4f11-aebe-f06e6ef3d941",
            "status_name": "inprogress",
            "status_type": "STARTED",
            "status_color": "#9b59b6"
        },
        "job_status": [
            {
                "status_uid": "52fd9a9d-1006-407f-a164-14482e2b836b",
                "status_name": "new",
                "status_type": "NEW",
                "done_by": {
                    "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                    "emp_code": "001",
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "[email protected]",
                    "designation": "Admin",
                    "home_phone_number": "9123456789",
                    "work_phone_number": "9987654321",
                    "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                    "is_active": true,
                    "is_deleted": false,
                    "role": {
                        "role_id": 1,
                        "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                        "role_name": "Admin",
                        "role_key": "ADMIN",
                        "created_at": "2018-01-22T00:00:00.000Z",
                        "updated_at": "2018-01-22T00:00:00.000Z"
                    }
                },
                "checklist": [],
                "created_at": "2021-02-19T07:37:49.512Z"
            },
            {
                "status_uid": "81b2d541-aa19-4f11-aebe-f06e6ef3d941",
                "status_name": "inprogress",
                "status_type": "STARTED",
                "status_color": "#9b59b6",
                "done_by": {
                    "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                    "emp_code": "001",
                    "first_name": "Sriram",
                    "last_name": "Palakula",
                    "email": "[email protected]",
                    "designation": "Admin",
                    "home_phone_number": "9123456789",
                    "work_phone_number": "9987654321",
                    "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                    "is_active": true,
                    "is_deleted": false,
                    "role": {
                        "role_id": 1,
                        "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                        "role_name": "Admin",
                        "role_key": "ADMIN",
                        "created_at": "2018-01-22T00:00:00.000Z",
                        "updated_at": "2018-01-22T00:00:00.000Z"
                    }
                },
                "checklist": [
                    {
                        "question": "Text Input",
                        "answer": "rr",
                        "type": "SINGLE_LINE"
                    }
                ],
                "created_at": "2021-02-19T08:41:38.435Z"
            }
        ],
        "customer": {
            "customer_last_name": "customer",
            "customer_company_name": "css",
            "customer_email": "[email protected]",
            "customer_first_name": "test",
            "customer_contact_no": {
                "mobile": "0123456789",
                "home": "987654321"
            },
            "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
            "customer_category": {
                "category_name": "electrical",
                "category_uid": "4368e1d0-cd56-11ea-b6a4-13c5940a5fcf"
            }
        },
        "asset": {
            "asset_serial_number": [],
            "is_deleted": false,
            "is_active": true,
            "purchase_date": "2020-08-05T00:00:00.000Z",
            "warranty_expiry_date": null,
            "placed_in_service": null,
            "asset_name": "AC",
            "asset_category": {
                "category_name": "AC coolant",
                "category_uid": "a4ee48e0-d60d-11ea-b654-5979bc62f918"
            },
            "asset_code": "4",
            "asset_quantity": 2,
            "asset_uid": "71b144f0-d7ca-11ea-b00f-617c5f486b2d"
        },
        "created_at": "2021-02-19T07:37:49.512Z",
        "work_order_number": 60247,
        "checklist": []
    }
}

Fetches job details matching the job_uid

HTTP Request

GET /jobs/<job_uid>

Get Employee Job Schedule

curl "https://<host>/api/jobs/employee/schedule?from_date=<from_date>&to_date=<to_date>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the list of users and jobs scheduled:

{
    "data": {
        "users": [
            {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN"
                },
                "access_role": null,
                "job_count": 2,
                "deleted_user": false,
                "work_hours": [
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Sunday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Monday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Tuesday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Wednesday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Thursday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Friday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Saturday"
                    }
                ],
                "timeoff_request": [
                    {
                        "request_uid": "2c021392-f0b0-44d1-a7d2-4273739485ff",
                        "request_from": "2021-04-26T00:00:00.000Z",
                        "requested_at": "2021-03-25T09:11:26.000Z",
                        "request_to": "2021-04-27T00:00:00.000Z",
                        "all_day": true,
                        "request_reason": "VACATION",
                        "request_remarks": "Will be on vacation for a week",
                        "approval_status": "APPROVED",
                        "approved_at": "2021-03-25T09:13:07.000Z",
                        "approval_remarks": "Yes sure",
                        "created_at": "2021-03-25T09:11:26.000Z",
                        "requested_by_team": {
                            "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                            "team_name": "development",
                            "team_description": null,
                            "team_color": "#27ae60"
                        }
                    }
                ]
            },
            {
                "user_uid": "4e1e1873-9bab-46d0-b493-b12137a272b2",
                "emp_code": "ZT001",
                "first_name": "Zuper",
                "last_name": "Human",
                "email": "[email protected]",
                "designation": "Manager",
                "home_phone_number": "123456789",
                "work_phone_number": "123456789",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-14f3fa/f4d6a-11eb-8302-750c30d4731b.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN"
                },
                "access_role": null,
                "job_count": 0,
                "deleted_user": false,
                "work_hours": [
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Sunday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Monday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Tuesday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Wednesday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Thursday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Friday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Saturday"
                    }
                ],
                "timeoff_request": []
            },
            {
                "user_uid": "451784fc-c185-4dd3-8de0-3bc9dde746b3",
                "emp_code": "ZT001",
                "first_name": "Zuper",
                "last_name": "Human",
                "email": "[email protected]",
                "designation": "Manager",
                "home_phone_number": "123456789",
                "work_phone_number": "123456789",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c28f3fa/f4236da0-8302-750c731b.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN"
                },
                "access_role": null,
                "job_count": 0,
                "deleted_user": false,
                "work_hours": [
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Sunday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Monday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Tuesday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Wednesday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Thursday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Friday"
                    },
                    {
                        "start_time": "09:00:00",
                        "end_time": "17:00:00",
                        "work_mins": 480,
                        "day": "Saturday"
                    }
                ],
                "timeoff_request": []
            }
        ],
        "jobs": [
            {
                "job_tags": [
                    "coolant"
                ],
                "is_recurrence": false,
                "is_deleted": false,
                "job_category": {
                    "category_name": "Solutions",
                    "category_uid": "201a5d10-d17c-11ea-80a9-47b88a915868"
                },
                "scheduled_start_time": "2021-03-25T01:15:00.000Z",
                "scheduled_end_time": "2021-03-25T01:45:00.000Z",
                "job_uid": "b9f7f3f0-8d35-11eb-a2f6-650d212c5a5a",
                "job_title": "ac solution",
                "job_priority": "LOW",
                "assigned_to": [
                    "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
                ],
                "customer_address": {
                    "city": "Chennai",
                    "state": "Tamil Nadu",
                    "street": "Prakasam St",
                    "zip_code": 600017
                },
                "customer_billing_address": {
                    "city": "Chennai",
                    "state": "Tamil Nadu",
                    "street": "Prakasam St",
                    "zip_code": 600017
                },
                "created_by": 93,
                "customer": {
                    "customer_last_name": "Test One",
                    "customer_first_name": "test",
                    "customer_contact_no": {
                        "mobile": "123456789",
                        "home": "987654321"
                    },
                    "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                },
                "job_status": [],
                "created_at": "2021-03-25T06:45:45.795Z",
                "work_order_number": 60280
            },
            {
                "job_tags": [
                    "coolant"
                ],
                "is_recurrence": false,
                "is_deleted": false,
                "job_category": {
                    "category_name": "Solutions",
                    "category_uid": "201a5d10-d17c-11ea-80a9-47b88a915868"
                },
                "scheduled_start_time": "2021-03-25T01:15:00.000Z",
                "scheduled_end_time": "2021-03-25T01:45:00.000Z",
                "job_uid": "caedd760-8d35-11eb-a2f6-650d212c5a5a",
                "job_title": "ac solution",
                "job_priority": "LOW",
                "assigned_to": [],
                "customer_address": {
                    "city": "Chennai",
                    "state": "Tamil Nadu",
                    "street": "Prakasam St",
                    "zip_code": 600017
                },
                "customer_billing_address": {
                    "city": "Chennai",
                    "state": "Tamil Nadu",
                    "street": "Prakasam St",
                    "zip_code": 600017
                },
                "created_by": 93,
                "customer": {
                    "customer_last_name": "Test One",
                    "customer_first_name": "test",
                    "customer_contact_no": {
                        "mobile": "123456789",
                        "home": "987654321"
                    },
                    "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                },
                "job_status": [],
                "created_at": "2021-03-25T06:46:14.251Z",
                "work_order_number": 60281
            },
            {
                "job_tags": [
                    "service"
                ],
                "is_recurrence": false,
                "is_deleted": false,
                "job_category": {
                    "category_name": "Solutions",
                    "category_uid": "201a5d10-d17c-11ea-80a9-47b88a915868"
                },
                "scheduled_start_time": "2021-03-25T01:15:00.000Z",
                "scheduled_end_time": "2021-03-25T01:45:00.000Z",
                "job_uid": "3672dda0-8d36-11eb-a2f6-650d212c5a5a",
                "job_title": "ac service",
                "job_priority": "LOW",
                "assigned_to": [
                    "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
                ],
                "customer_address": {
                    "city": "Chennai",
                    "state": "Tamil Nadu",
                    "street": "Prakasam St",
                    "zip_code": 600017
                },
                "customer_billing_address": {
                    "city": "Chennai",
                    "state": "Tamil Nadu",
                    "street": "Prakasam St",
                    "zip_code": 600017
                },
                "created_by": 93,
                "customer": {
                    "customer_last_name": "Test One",
                    "customer_first_name": "test",
                    "customer_contact_no": {
                        "mobile": "123456789",
                        "home": "987654321"
                    },
                    "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                },
                "job_status": [],
                "created_at": "2021-03-25T06:49:14.632Z",
                "work_order_number": 60282
            }
        ]
    },
    "type": "success"
}

Fetches users and jobs scheduled

HTTP Request

GET /jobs/employee/schedule

Query Parameters

This endpoint accepts multiple query parameters

User Jobs schedule query param details

Parameter Required Description Type Example
from_date true Filter by job scheduled date Date 2021-03-22
to_date true Filter by job scheduled date Date 2021-03-30
filter.team_uid false Filter by team UID Comma seperated values 463ae640-c311-4415-824c-aaab93a4f5b6, 18cada40-021b-11e8-8127-43a5add1a9e2
filter.user_uid false Filter by user UID String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6
filter.job_category false Filter by job category Comma seperated values 201a5d10-d17c-11ea-80a9-47b88a915868, b8db0690-6064-11eb-9cac-272aa54c6ffa
filter.role false Filter by user role key Enum [ 'ADMIN', 'TEAM_LEADER', 'FIELD_EXECUTIVE' ]
filter.status false Filter by job status UID Comma seperated values 52fd9a9d-1006-407f-a164-14482e2b836b, 6cba46db-8761-4fef-b163-eb747712985f

Create Job Note

curl "https://<host>/api/jobs/<job_uid>/note?notify_users=true" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "note": {
        "is_private": false,
        "attachments": [
            {
                "attachment": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-rqwriqjk9bec/123rqwqr3a34633c.jpg",
                "attachment_size": 42.154,
                "attachment_type": "IMAGE"
            }
        ],
        "note": "this is to add a image as a note",
        "note_type": "IMAGE"
    }
}

On successfull creation of a job note we get the below response:

{
    "type": "success",
    "message": "Job Note created successfully",
    "data": {
        "note_uid": "16926290-72c8-11eb-a623-8fde3a34633c"
    }
}

This endpoint allows us to create a new job note.

HTTP Request

POST /jobs/<job_uid>/note

Body Parameters

This endpoint accepts a job note object

Job Note Creation Details

Parameter Required Description Type Example
is_private true Whether note is private Boolean 0 or 1
note true Note's data String this is to add a image as a note
note_type true Type of note Enum ['TEXT', 'AUDIO', 'VIDEO', 'IMAGE', 'DOCUMENT']
attachments true List of attachments Object REFER ATTACHMENT DETAILS

Attachment Details

Parameter Required Description Type Example
attachment true Attachment URL String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-rqwriqjk9bec/123rqwqr3a34633c.jpg
attachment_size true Size of attachment Decimal 42.154
attachment_type true Type of attachment Enum ['TEXT', 'AUDIO', 'VIDEO', 'IMAGE', 'DOCUMENT']

Update Job Note Privacy

curl "https://<host>/api/jobs/<job_uid>/note/<job_note_uid>?is_private=true" \
  -X PUT \
  -H "Authorization: Bearer <token>"

On successfull update of a job note's privacy we get the below response:

{
    "type": "success",
    "message": "Note Privacy Updated successfully"
}

This endpoint allows us to change the privacy of a job note.

HTTP Request

PUT /jobs/<job_uid>/note/<job_note_uid>

Body Parameters

This endpoint accepts a query paramter

Query params details

Parameter Required Description Type Example
is_private true Whether note is private Boolean 0 or 1

Get Job Notes

curl "https://<host>/api/jobs/<job_uid>/note" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the job notes of the specific job:

{
    "type": "success",
    "data": [
        {
            "is_private": false,
            "is_deleted": false,
            "attachments": [],
            "note": "this is a test note",
            "note_type": "TEXT",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "note_uid": "d17f2150-7297-11eb-92e3-6d5de17d231e",
            "created_at": "2021-02-19T09:49:54.537Z",
            "updated_at": "2021-02-19T09:49:54.543Z"
        },
        {
            "is_private": false,
            "is_deleted": false,
            "attachments": [
                {
                    "attachment": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4deb-fassfac/1dc1aec0fas17d231e.pdf",
                    "attachment_size": 257.281,
                    "attachment_type": "DOCUMENT"
                }
            ],
            "note": "this is a pdf for job",
            "note_type": "DOCUMENT",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "note_uid": "27c0bbf0-7298-11eb-92e3-6d5de17d231e",
            "created_at": "2021-02-19T09:52:19.248Z",
            "updated_at": "2021-02-19T09:52:19.250Z"
        },
        {
            "is_private": false,
            "is_deleted": false,
            "attachments": [
                {
                    "attachment": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-bfsaec/2e298-11eb-92e51e.docx",
                    "attachment_size": 8.94,
                    "attachment_type": "DOCUMENT"
                }
            ],
            "note": "this is a text document",
            "note_type": "DOCUMENT",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "note_uid": "369a2800-7298-11eb-92e3-6d5de17d231e",
            "created_at": "2021-02-19T09:52:44.161Z",
            "updated_at": "2021-02-19T09:52:44.161Z"
        },
        {
            "is_private": false,
            "is_deleted": false,
            "attachments": [
                {
                    "attachment": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4eb-9605-3caccc/40580-72982312e.jpg",
                    "attachment_size": 42.154,
                    "attachment_type": "IMAGE"
                }
            ],
            "note": "This is a image file",
            "note_type": "IMAGE",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "note_uid": "461ccc60-7298-11eb-92e3-6d5de17d231e",
            "created_at": "2021-02-19T09:53:10.184Z",
            "updated_at": "2021-02-19T09:53:10.186Z"
        }
    ]
}

Fetches job notes matching the job_uid

HTTP Request

GET /jobs/<job_uid>/note

Delete Job Note

curl "https://<host>/api/jobs/<job_uid>/note/<job_note_uid>" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

On successfull deletion of a job note we get the below response:

{
    "type": "success",
    "message": "Note Deleted successfully"
}

This endpoint allows us to delate a job note.

HTTP Request

DELETE /jobs/<job_uid>/note/<job_note_uid>

Get Job Activities

curl "https://<host>/api/activities/job?count=<number>&job_uid=<job_uid>&page=<page_number>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the job ativities of the specific job:

{
    "type": "success",
    "data": [
        {
            "user_activity_uid": "8a7a3a17-c9e5-4a6c-8895-2c7202771966",
            "activity_module": "JOB",
            "activity_type": "CREATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "printed Job card for job Job with all 3 dates",
            "created_at": "2021-02-15T10:35:44.000Z",
            "users": {
                "user_uid": "fecc6ecd-82e7-4728-8e98-ebb038c2a34e",
                "first_name": "Sabarinathan",
                "last_name": "J",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "iOS Dev",
                "emp_code": "12345",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-1sdf9b417a4f3fa/726fsa-11eb-a02f-27c00cb0c514.jpeg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "dbace213-9621-44b3-bc79-1bc96cb478e2",
            "activity_module": "JOB",
            "activity_type": "CREATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "printed Job card for job Job with all 3 dates",
            "created_at": "2021-02-15T10:34:02.000Z",
            "users": {
                "user_uid": "fecc6ecd-82e7-4728-8e98-ebb038c2a34e",
                "first_name": "Sabarinathan",
                "last_name": "J",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "iOS Dev",
                "emp_code": "12345",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ffsaf17a4f3fa/726fsa11eb-a02f-27c00cb0c514.jpeg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "83c8b0a2-179d-45df-a68a-d6e9e6221667",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "rescheduled job Job with all 3 dates, start date from 2021-02-25 01:15 PM to 2021-02-25 01:15 PM and end date from 2021-02-25 02:15 PM to 2021-02-25 02:15 PM",
            "created_at": "2021-02-12T06:13:11.000Z",
            "users": {
                "user_uid": "5ea2f64c-0c7f-4f3f-a9ec-fff8b6abeb16",
                "first_name": "Selva",
                "last_name": "Kumar",
                "email": "[email protected]",
                "home_phone_number": null,
                "designation": "Admin",
                "emp_code": "007",
                "work_phone_number": null,
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "bbbb09cf-a7a4-4be6-8988-a82cdaa2cd52",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "updated Status to New Lead for Job Job with all 3 dates",
            "created_at": "2021-02-11T04:40:01.000Z",
            "users": {
                "user_uid": "6c513b60-ff7c-11e7-b3a8-29b417a4f3fa",
                "first_name": "Raghav",
                "last_name": "G",
                "email": "[email protected]",
                "home_phone_number": "1234567890",
                "designation": "CTO",
                "emp_code": "1234",
                "work_phone_number": "1234567890",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-fffasdf4f3fa/de300240fsafsae7eabd345dc5.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "74afafe8-68ba-43dc-a5fc-10669f0c0d68",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "updated Status to New Lead for Job Job with all 3 dates",
            "created_at": "2021-02-11T04:39:51.000Z",
            "users": {
                "user_uid": "6c513b60-ff7c-11e7-b3a8-29b417a4f3fa",
                "first_name": "Raghav",
                "last_name": "G",
                "email": "[email protected]",
                "home_phone_number": "1234567890",
                "designation": "CTO",
                "emp_code": "1234",
                "work_phone_number": "1234567890",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-11e7fasa/de3twe-e7eabd345dc5.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "56fa4f39-8fb2-4db9-a9c8-090d73276e6e",
            "activity_module": "JOB",
            "activity_type": "DELETE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "deleted status New Lead for Job Job with all 3 dates with reason test",
            "created_at": "2021-02-10T12:04:43.000Z",
            "users": {
                "user_uid": "6c513b60-ff7c-11e7-b3a8-29b417a4f3fa",
                "first_name": "Raghav",
                "last_name": "G",
                "email": "[email protected]",
                "home_phone_number": "1234567890",
                "designation": "CTO",
                "emp_code": "1234",
                "work_phone_number": "1234567890",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0tweterwb417a4f3fa/de300twetre9-e7eabd345dc5.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "1e2a8337-aab1-48de-a9e9-33745fb0422a",
            "activity_module": "JOB",
            "activity_type": "CREATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "added a new note for job Job with all 3 dates",
            "created_at": "2021-02-10T11:35:05.000Z",
            "users": {
                "user_uid": "f4158948-7dda-481a-b211-f341fb96ad0a",
                "first_name": "John",
                "last_name": "Wick",
                "email": "[email protected]",
                "home_phone_number": "937626362",
                "designation": "Sales",
                "emp_code": "2442",
                "work_phone_number": "7372638636",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287twee7-b3a8twef3fa/202twe57-11ea-92ctw50f64b7.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "ec0c28d0-cbcc-4e52-bcc9-7bbf0b243a41",
            "activity_module": "JOB",
            "activity_type": "CREATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "added a new note for job Job with all 3 dates",
            "created_at": "2021-02-10T11:35:01.000Z",
            "users": {
                "user_uid": "f4158948-7dda-481a-b211-f341fb96ad0a",
                "first_name": "John",
                "last_name": "Wick",
                "email": "[email protected]",
                "home_phone_number": "937626362",
                "designation": "Sales",
                "emp_code": "2442",
                "work_phone_number": "7372638636",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287dbtwe29b417a4f3twfa/20227320wet50f64b7.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "fa5341c9-3a09-46bc-86aa-a2a7192eaa85",
            "activity_module": "JOB",
            "activity_type": "CREATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "added a new note for job Job with all 3 dates",
            "created_at": "2021-02-10T11:34:59.000Z",
            "users": {
                "user_uid": "f4158948-7dda-481a-b211-f341fb96ad0a",
                "first_name": "John",
                "last_name": "Wick",
                "email": "[email protected]",
                "home_phone_number": "937626362",
                "designation": "Sales",
                "emp_code": "2442",
                "work_phone_number": "7372638636",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287dbsgst1e7-b3a8-29b417a4f3fa/20227gs-92cb-a1f7a50f64b7.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "108a8cc9-9a4b-415e-a7a4-b52b5dbff464",
            "activity_module": "JOB",
            "activity_type": "CREATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "added a new note for job Job with all 3 dates",
            "created_at": "2021-02-10T11:34:57.000Z",
            "users": {
                "user_uid": "f4158948-7dda-481a-b211-f341fb96ad0a",
                "first_name": "John",
                "last_name": "Wick",
                "email": "[email protected]",
                "home_phone_number": "937626362",
                "designation": "Sales",
                "emp_code": "2442",
                "work_phone_number": "7372638636",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287dyutre7-b3a8-29b417a4f3fa/20227adab-a1f7a50f64b7.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "c39899fd-1d61-4732-9320-e21fe7dcc683",
            "activity_module": "JOB",
            "activity_type": "CREATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "added a new note for job Job with all 3 dates",
            "created_at": "2021-02-10T11:34:50.000Z",
            "users": {
                "user_uid": "f4158948-7dda-481a-b211-f341fb96ad0a",
                "first_name": "John",
                "last_name": "Wick",
                "email": "[email protected]",
                "home_phone_number": "937626362",
                "designation": "Sales",
                "emp_code": "2442",
                "work_phone_number": "7372638636",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287yry-b3a8-29b417a4f3fa/20227ryr1ea-92cb-a1f7a50f64b7.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "ee172d4a-ed22-4e7d-b1f6-6f7c9e110bad",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "updated job",
            "created_at": "2021-02-10T05:54:50.000Z",
            "users": {
                "user_uid": "71468f36-a847-49a6-b849-02b6992b2b08",
                "first_name": "Sree Vidya",
                "last_name": "Sankar",
                "email": "[email protected]",
                "home_phone_number": "987654321",
                "designation": "Admin",
                "emp_code": "120",
                "work_phone_number": "9876543210",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/yryr-29b417a4f3fa/24840eyr35bdfbb0eb.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "eaaca40a-9e5d-41c8-8665-c1bc00668fe6",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "updated Status to New Lead for Job Job with all 3 dates",
            "created_at": "2021-02-08T15:11:22.000Z",
            "users": {
                "user_uid": "6c513b60-ff7c-11e7-b3a8-29b417a4f3fa",
                "first_name": "Raghav",
                "last_name": "G",
                "email": "[email protected]",
                "home_phone_number": "1234567890",
                "designation": "CTO",
                "emp_code": "1234",
                "work_phone_number": "1234567890",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c2yr11e7-b3a8-29b417a4f3fa/de300240-bdfb-11utybd345dc5.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "c0fa6b4d-b098-4301-945e-d43b42934c41",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "assigned Sabarinathan J from Bangalore Team to job Job with all 3 dates",
            "created_at": "2021-02-08T10:04:06.000Z",
            "users": {
                "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
                "first_name": "Mahalakshmi",
                "last_name": "Sruthi",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "IOS dev",
                "emp_code": "1234",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-fdffsa8-29b417a4f3fa/611rw9dc6-696ee2a43a57.png",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "a5f18a30-e926-4d4f-ae08-517e05eca3dc",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "unassigned Sabarinathan J from Bangalore Team from job Job with all 3 dates",
            "created_at": "2021-02-08T10:03:23.000Z",
            "users": {
                "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
                "first_name": "Mahalakshmi",
                "last_name": "Sruthi",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "IOS dev",
                "emp_code": "1234",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c28rwrwe7-b3a8-29b417a4f3fa/61168820-awr-11e9-9dc96ee2a43a57.png",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "3448e815-d676-4fae-be09-1fbbb25821cd",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "assigned Sabarinathan J from Bangalore Team to job Job with all 3 dates",
            "created_at": "2021-02-08T10:03:03.000Z",
            "users": {
                "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
                "first_name": "Mahalakshmi",
                "last_name": "Sruthi",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "IOS dev",
                "emp_code": "1234",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287dwrt9b417a4f3fa/61168820-a2wtt696ee2a43a57.png",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "0a04aa84-e749-4286-91b9-d7a563eaf95f",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "unassigned Sabarinathan J from Bangalore Team from job Job with all 3 dates",
            "created_at": "2021-02-08T10:01:45.000Z",
            "users": {
                "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
                "first_name": "Mahalakshmi",
                "last_name": "Sruthi",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "IOS dev",
                "emp_code": "1234",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-1rwrwfa/61168qeqf-11e9-9dc6-696ee2a43a57.png",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "4f487ca3-73eb-4927-afa5-6c8e9aad6966",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "assigned Sabarinathan J from Bangalore Team to job Job with all 3 dates",
            "created_at": "2021-02-08T10:00:43.000Z",
            "users": {
                "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
                "first_name": "Mahalakshmi",
                "last_name": "Sruthi",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "IOS dev",
                "emp_code": "1234",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db017a4f3fa/61168820-a2rwrw9dc6-696ee2a43a57.png",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "e11fa32b-aa6e-451e-9086-4c8a52612d72",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "unassigned Sabarinathan J from Bangalore Team from job Job with all 3 dates",
            "created_at": "2021-02-08T09:31:12.000Z",
            "users": {
                "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
                "first_name": "Mahalakshmi",
                "last_name": "Sruthi",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "IOS dev",
                "emp_code": "1234",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-11rw7a4f3fa/61168820rwdc6-696ee2a43a57.png",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "bdf35c07-8f3a-4276-9de3-aaf9ef5dcfaa",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "assigned Sabarinathan J from Bangalore Team to job Job with all 3 dates",
            "created_at": "2021-02-08T09:30:44.000Z",
            "users": {
                "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
                "first_name": "Mahalakshmi",
                "last_name": "Sruthi",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "IOS dev",
                "emp_code": "1234",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7wr417a4f3fa/61168820-rwdc6-696ee2a43a57.png",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "f092883d-3a37-4405-af73-7d17bb87558a",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "unassigned Sabarinathan J from Bangalore Team from job Job with all 3 dates",
            "created_at": "2021-02-08T09:27:46.000Z",
            "users": {
                "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
                "first_name": "Mahalakshmi",
                "last_name": "Sruthi",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "IOS dev",
                "emp_code": "1234",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7fs417a4f3fa/61168fsfs1e9-9dc6-696ee2a43a57.png",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "a64ca2d0-e68b-4368-a56f-29174b19ded0",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "assigned Sabarinathan J from Bangalore Team to job Job with all 3 dates",
            "created_at": "2021-02-08T09:27:18.000Z",
            "users": {
                "user_uid": "6a18e31e-9432-4f0e-a54c-51a92e8536a4",
                "first_name": "Mahalakshmi",
                "last_name": "Sruthi",
                "email": "[email protected]",
                "home_phone_number": "",
                "designation": "IOS dev",
                "emp_code": "1234",
                "work_phone_number": "",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-1142e7-bf3fa/6116-a22f-11e9-4249dc6-696ee2a43a57.png",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "b63e15df-e1a4-488c-b898-9ce632c20863",
            "activity_module": "JOB",
            "activity_type": "UPDATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "updated Status to New Lead for Job Job with all 3 dates",
            "created_at": "2021-02-04T14:06:18.000Z",
            "users": {
                "user_uid": "71468f36-a847-49a6-b849-02b6992b2b08",
                "first_name": "Sree Vidya",
                "last_name": "Sankar",
                "email": "[email protected]",
                "home_phone_number": "9876543210",
                "designation": "Admin",
                "emp_code": "120",
                "work_phone_number": "9876543210",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-1f3fa/24840ed0-a88cb9-d135bdfbb0eb.jpg",
                "is_active": true,
                "is_deleted": false
            }
        },
        {
            "user_activity_uid": "73abcea6-a70c-4f88-87f1-acf476f044bf",
            "activity_module": "JOB",
            "activity_type": "CREATE",
            "activity_action_uid": "26da94b0-66f2-11eb-99d1-7b31b7c8254b",
            "activity_message": "created new job Job with all 3 dates",
            "created_at": "2021-02-04T14:06:18.000Z",
            "users": {
                "user_uid": "71468f36-a847-49a6-b849-02b6992b2b08",
                "first_name": "Sree Vidya",
                "last_name": "Sankar",
                "email": "[email protected]",
                "home_phone_number": "9876543210",
                "designation": "Admin",
                "emp_code": "120",
                "work_phone_number": "987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/6c287db0-ff7c-11e7a/24840ed0-135bdfbb0eb.jpg",
                "is_active": true,
                "is_deleted": false
            }
        }
    ]
}

Fetches job activities matching the job_uid

HTTP Request

GET /activities/job

Query Parameters

This endpoint accepts a job_uid, page and count as query parameters

Job activity query param details

Parameter Required Description Type Example
job_uid true Job UID of the job String 73ee0c20-7276-11eb-94ba-8b7293d62475
page true Page no to fetch Number Any number
count true No of activities per page Number Any number

Get Assisted Schedule

curl "https://<host>/api/assisted_scheduling?job_duration=<duration_in_minutes>&team_uid=<team_uid>&from_date=<from_date>&to_date=<to_date>&job_category=<category_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the available user slots matching the query parameters:

{
    "type": "success",
    "data": {
        "availability": [
            {
                "date": "2020-09-01",
                "slots": [
                    {
                        "start_time": "2020-09-01 09:00:00",
                        "end_time": "2020-09-01 11:00:00",
                        "users_available": 2,
                        "users": [
                            "f87aacd5-fa44-4ccf-ab07-953624ab4d49",
                            "5c523849-1f92-46dd-a1f2-d4073c73a125"
                        ]
                    },
                    {
                        "start_time": "2020-09-01 11:00:00",
                        "end_time": "2020-09-01 13:00:00",
                        "users_available": 2,
                        "users": [
                            "f87aacd5-fa44-4ccf-ab07-953624ab4d49",
                            "5c523849-1f92-46dd-a1f2-d4073c73a125"
                        ]
                    },
                    {
                        "start_time": "2020-09-01 13:00:00",
                        "end_time": "2020-09-01 15:00:00",
                        "users_available": 2,
                        "users": [
                            "f87aacd5-fa44-4ccf-ab07-953624ab4d49",
                            "5c523849-1f92-46dd-a1f2-d4073c73a125"
                        ]
                    },
                    {
                        "start_time": "2020-09-01 15:00:00",
                        "end_time": "2020-09-01 17:00:00",
                        "users_available": 2,
                        "users": [
                            "f87aacd5-fa44-4ccf-ab07-953624ab4d49",
                            "5c523849-1f92-46dd-a1f2-d4073c73a125"
                        ]
                    }
                ]
            }
        ],
        "users": [
            {
                "prefix": null,
                "user_uid": "f87aacd5-fa44-4ccf-ab07-953624ab4d49",
                "emp_code": "12345",
                "first_name": "John",
                "last_name": "Doe",
                "email": "[email protected]",
                "designation": "Team Lead",
                "home_phone_number": "123456789",
                "work_phone_number": "123456789",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro.jpg",
                "is_active": true,
                "is_deleted": false,
                "created_by": null,
                "created_at": "2019-02-01T07:35:38.000Z",
                "updated_at": "2019-02-01T07:35:38.000Z"
            },
            {
                "prefix": null,
                "user_uid": "5c523849-1f92-46dd-a1f2-d4073c73a125",
                "emp_code": "890",
                "first_name": "Steve",
                "last_name": "Nolan",
                "email": "[email protected]",
                "designation": "Dev",
                "home_phone_number": "123456789",
                "work_phone_number": "123456789",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro.jpg",
                "is_active": true,
                "is_deleted": false,
                "created_by": null,
                "created_at": "2019-06-04T12:22:38.000Z",
                "updated_at": "2019-06-10T11:49:33.000Z"
            }
        ]
    }
}

Fetches all available slots matching the query parameters

HTTP Request

GET /assisted_scheduling

Query Parameters

This endpoint accepts multiple filters as a query parameters

Assisted schedule query param details

Parameter Required Description Type Example
from_date true Filter by from date Date 2021-02-19 11:00:00
to_date true Filter by to date Date 2021-02-19 11:00:00
job_category false filter by category UIDs Comma Seperated String 73ee0c20-7276-11eb-94ba-8b7293d62475, ac8b7bf0-cffd-11eb-bb7b-57c969f3810a
service_territory false filter by service territory UIDS Comma Seperated String ca21be79-c3e4-40d3-988f-c4591bd9aa43, f4e7a41b-f46c-4af3-9838-c6b6e62e43c9
zipcode false filter by zipcodes Comma Seperated String 600017,600015
skillset_uid false filter by skillset UIDS Comma Seperated String 0ddb64ff-a8c8-43f3-b60c-1a7b4724010e, 59776597-ff79-4a6f-92da-784bab6274bc
team_uid false filter by team UIDs Comma Seperated String 27763606-af0b-405c-b666-f57b7c8d795d, 93476f4f-93a4-499c-859f-0cf09daf033b
user_uid false filter by user UIDs Comma Seperated String 4550dd69-b7fc-4c6f-9b97-56375aedf229, 23b815e3-e81e-4316-8763-08604224d3fb
customer_uid false filter by customer UIDs Comma Seperated String 66a88aa0-76fb-4339-b815-988e8dc78ae7, e96c7d96-b507-4e0a-ab9d-5feaff35484
favorite_user false filter by favorite user UIDs Comma Seperated String 4e6d481a-0377-4b7a-a435-26205cf985, 2eeda458-5f9b-4b17-8597-71464cc684
job_duration false filter by job duration in minutes Number 60
user_type false filter by user type Enum ['ADMIN', 'TEAM_LEADER', 'FIELD_EXECUTIVE']
consider_holidays false filter by holiday consideration Boolean 0 or 1

Delete Job

curl "https://<host>/api/jobs/<job_uid>/delete" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

Job with the specific job_uid is deleted:

{
    "type": "success",
    "message": "Job deleted successfully"
}

Deletes a job matching the job_uid

HTTP Request

DELETE /jobs/<job_uid>/delete

Routes

Create Route

curl "https://<host>/api/routes" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "route_name": "AC repairs",
    "departure": "2021-03-08 14:10",
    "enable_traffic": true,
    "route_type": "SHORTEST",
    "duration": 24 ,
    "color": "#FFFFFF",
    "transport_mode": "CAR",
    "start_location": {
        "name": "SKCL Harmony square",
        "street": "Prakasam St, T Nagar",
        "geo_cords": [13.0418, 80.2341]
    }
}

On successfull creation of a route we get the below response:

{
    "type": "success",
    "message": "Job route created successfully",
    "title": "Job route created successfully",
    "job_route_uid": "bffddd30-7fd1-11eb-b38a-1fdea62789c8"
}

This endpoint allows us to create a new route.

HTTP Request

POST /routes

Body Parameters

This endpoint accepts a route object

Route Creation Details

Parameter Required Description Type Example
route_name true Name of the route String AC repairs
departure true The departure time of the route in UTC Datetime 2021-03-08 14:10
enable_traffic false Traffic considered for route Boolean true or false
route_type true Type of route Enum ['FASTEST', 'SHORTEST']
duration true The estimated duration for route Number 24
color true Color code for the route String #FFFFFF
transport_mode true Transport mode of route Enum ['CAR', 'TRUCK','PEDESTRIAN']
start_location true Start location for the route Object REFER GEO COORDINATE DETAILS

Geo coordinate details

Parameter Required Description Type Example
geo_cords true Latitude and Longitude for the route List [13.0418, 80.2341]
name false Name of start location String SKCL Harmony square
street false Street of start location String Prakasam St, T Nagar

Update Route

curl "https://<host>/api/routes/<route_uid>" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "route_name": "AC repairs updated",
    "departure": "2021-03-04 14:10",
    "can_reschedule_job": true,
    "route_type": "FASTEST",
    "duration": 12 ,
    "color": "#000000",
    "transport_mode": "TRUCK",
    "enable_traffic": false,
    "start_location": {
        "name": "Olympia tech park",
        "street": "SIDCO Industrial Estate, Guindy",
        "geo_cords": [13.0067,80.2206]
    }
}

On successfull route update we get the below response:

{
    "type": "success",
    "message": "Job route updated successfully",
    "title": "Job route updated successfully",
    "job_route_uid": "39e2a0c0-7fd4-11eb-b38a-1fdea62789c8"
}

The route's name, departure, type, duration, color, transport mode, traffic flag, start location and job's scheduled time can be updated.

HTTP Request

PUT /routes/<route_uid>

Body Parameters

This endpoint accepts a route object

Route Update Details

Parameter Required Description Type Example
route_name true Name of the route String AC repairs
departure true The departure time of the route in UTC Datetime 2021-03-08 14:10
enable_traffic false Traffic considered for route Boolean true or false
route_type true Type of route Enum ['FASTEST', 'SHORTEST']
duration true The estimated duration for route Number 24
color true Color code for the route String #FFFFFF
transport_mode true Transport mode of route Enum ['CAR', 'TRUCK','PEDESTRIAN']
can_reschedule_job false Can jobs be rescheduled if departure is updated Booelan true or false
start_location true Start location for the route Object REFER GEO COORDINATE DETAILS

Geo coordinate details

Parameter Required Description Type Example
geo_cords true Latitude and Longitude for the route List [13.0418, 80.2341]
name false Name of start location String SKCL Harmony square
street false Street of start location String Prakasam St, T Nagar

Assign user team to route

curl "https://<host>/api/routes/<route_uid>/assign" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "users": [
        {
            "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
            "team_uid": "463ae640-c311-4415-824c-aaab93a4f5b6"
        },
        {
            "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
            "user_uid": "7af6909b-9ede-4487-8d84-55ae0e991af8"
        }
    ]
}

On successfull user assignment we get the below response:

{
    "message": "User Teams added successfully",
    "title": "User Teams added successfully",
    "type": "success"
}

Users can be assigned to a job route.

HTTP Request

POST /routes/<route_uid>/assign

Body Parameters

This endpoint accepts a list of user team objects

User assignment Details

Parameter Required Description Type Example
users true List of users List of Objects REFER USER TEAM DETAILS

A single user team details

Parameter Required Description Type Example
team_uid true Team UID of the team String 463ae640-c311-4415-824c-aaab93a4f5b6
user_uid true User UID of the user String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6

Unassign user team from route

curl "https://<host>/api/routes/<route_uid>/unassign" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "users": [
        {
            "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
            "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
        }
    ]
}

On successfull user unassignment we get the below response:

{
    "message": "User Teams removed successfully",
    "title": "User Teams removed successfully",
    "type": "success"
}

Users can be unassigned from a job route.

HTTP Request

POST /routes/<route_uid>/unassign

Body Parameters

This endpoint accepts a list of user team objects to be unassigned

User unassignment Details

Parameter Required Description Type Example
users true List of users List of Objects REFER USER TEAM DETAILS

A single user team details

Parameter Required Description Type Example
team_uid true Team UID of the team String 463ae640-c311-4415-824c-aaab93a4f5b6
user_uid true User UID of the user String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6

Add jobs to route

curl "https://<host>/api/routes/<route_uid>/job" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "jobs": [
        {
            "job_uid": "48529090-5c7d-11eb-85f1-b57d6fe33f3a",
            "geo_cords": [
                13.0205556,
                80.2200335
            ]
        },
        {
            "job_uid": "5be2a6e0-5c7d-11eb-85f1-b57d6fe33f3a",
            "geo_cords": [
                12.4443953,
                80.1087382
            ]
        },
        {
            "job_uid": "34f84ff0-5c80-11eb-85f1-b57d6fe33f3a",
            "geo_cords": [
                13.09243,
                80.218604
            ]
        },
        {
            "job_uid": "cc274520-5c8a-11eb-b437-375d093f36ba",
            "geo_cords": [
                13.08898739457866,
                80.21746069192886
            ]
        },
        {
            "job_uid": "ad1f6030-6f55-11eb-aaa7-4bdccf94aebb",
            "geo_cords": [
                12.4443953,
                80.10873819999999
            ]
        }
    ]
}

On successfull addition of jobs we get the below response:

{
    "type": "success",
    "message": "Job added to route successfully",
    "title": "Job added to route successfully"
}

Jobs can be added to the route.

HTTP Request

POST /routes/<route_uid>/job

Body Parameters

This endpoint accepts a list of job objects

Job addition details

Parameter Required Description Type Example
jobs true List of jobs List of Objects REFER JOB DETAILS

A single job details

Parameter Required Description Type Example
job_uid true Job UID of the job String 48529090-5c7d-11eb-85f1-b57d6fe33f3a
geo_cords true Latitude and longitude of the job's location List [13.0205556, 80.2200335]

Remove jobs from route

curl "https://<host>/api/routes/<route_uid>/job" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "jobs": [
        {
            "job_uid": "48529090-5c7d-11eb-85f1-b57d6fe33f3a"
        },
        {
            "job_uid": "5be2a6e0-5c7d-11eb-85f1-b57d6fe33f3a"
        }
    ]
}

On successfull removal of jobs we get the below response:

{
    "type": "success",
    "message": "Jobs removed from route successfully",
    "title": "Jobs removed from route successfully"
}

Jobs can be removed to the route.

HTTP Request

DELETE /routes/<route_uid>/job

Body Parameters

This endpoint accepts a list of job objects to be removed

Job removal details

Parameter Required Description Type Example
jobs true List of jobs List of Objects REFER JOB DETAILS

A single job details

Parameter Required Description Type Example
job_uid true Job UID of the job String 48529090-5c7d-11eb-85f1-b57d6fe33f3a

Reassign job to a different route

curl "https://<host>/api/routes/<route_uid>/reassign" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "route_uid": "bffddd30-7fd1-11eb-b38a-1fdea62789c8",
    "job_uid": "48529090-5c7d-11eb-85f1-b57d6fe33f3a"
}

On successfull reassignment of job from one route to a different route, we get the below response:

{
    "message": "Job reassigned successfully",
    "title": "Job reassigned successfully",
    "type": "success"
}

Job can be reassigned to a different route.

HTTP Request

POST /routes/<route_uid>/reassign

Body Parameters

This endpoint accepts a route reassingment object

Job reassignment details

Parameter Required Description Type Example
route_uid true Destination route UID String bffddd30-7fd1-11eb-b38a-1fdea62789c8
job_uid true Job UID of the job String 48529090-5c7d-11eb-85f1-b57d6fe33f3a

Reorder jobs in route

curl "https://<host>/api/routes/<route_uid>/reorder" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "jobs": [
        {
            "job_uid": "cc274520-5c8a-11eb-b437-375d093f36ba"
        },
        {
            "job_uid": "48529090-5c7d-11eb-85f1-b57d6fe33f3a"
        },
        {
            "job_uid": "34f84ff0-5c80-11eb-85f1-b57d6fe33f3a"
        },
        {
            "job_uid": "5be2a6e0-5c7d-11eb-85f1-b57d6fe33f3a"
        },
        {
            "job_uid": "ad1f6030-6f55-11eb-aaa7-4bdccf94aebb"
        }
    ]
}

On successfull reordering of jobs we get the below response:

{
    "message": "Jobs reordered successfully for route",
    "title": "Jobs reordered successfully",
    "type": "success"
}

Jobs can be reordered in the route.

HTTP Request

POST /routes/<route_uid>/reorder

Body Parameters

This endpoint accepts a list of job objects

Job reorder details

Parameter Required Description Type Example
jobs true List of jobs List of Objects REFER JOB DETAILS

A single job details

Parameter Required Description Type Example
job_uid true Job UID of the job String 48529090-5c7d-11eb-85f1-b57d6fe33f3a

Clone route

curl "https://<host>/api/routes/<route_uid>/clone" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "route_name": "AC repairs cloned",
    "departure": "2021-03-04 14:10",    
    "route_type": "FASTEST",
    "duration": 16 ,
    "color": "#000000",
    "transport_mode": "CAR",
    "enable_traffic": false,
    "start_location": {
        "name": "Olympia tech park",
        "street": "SIDCO Industrial Estate, Guindy",
        "geo_cords": [13.0067,80.2206]
    }
}

On successfull cloning of a route we get the below response:

{
    "type": "success",
    "message": "Job route cloned successfully",
    "title": "Job route cloned successfully",
    "job_route_uid": "0555cb90-7fe1-11eb-997a-0171aba0bea3"
}

A route can be cloned along with the jobs present in the route.

HTTP Request

POST /routes/<route_uid>/clone

Body Parameters

This endpoint accepts a route object

Route Clone Details

Parameter Required Description Type Example
route_name false Name of the cloned route String AC repairs
departure false The departure time of the cloned route in UTC Datetime 2021-03-08 14:10
enable_traffic false Traffic considered for cloned route Boolean true or false
route_type false Type of cloned route Enum ['FASTEST', 'SHORTEST']
duration false The estimated duration for cloned route Number 24
color false Color code for the cloned route String #FFFFFF
transport_mode false Transport mode of cloned route Enum ['CAR', 'TRUCK','PEDESTRIAN']
start_location false Start location for the cloned route Object REFER GEO COORDINATE DETAILS

Geo coordinate details

Parameter Required Description Type Example
geo_cords true Latitude and Longitude for the route List [13.0418, 80.2341]
name false Name of start location String SKCL Harmony square
street false Street of start location String Prakasam St, T Nagar

HTTP Request

POST /routes/<route_uid>/clone

Optimize route

curl "https://<host>/api/routes/<route_uid>/optimze" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "start_location": {
        "name": "SKCL Harmony square",
        "street": "Prakasam St, T Nagar",
        "geo_cords": [13.0418, 80.2341]
    }
}

On successfull optimization of a route we get the below response:

{
    "type": "success",
    "message": "Routes optimized successfully",
    "title": "Routes optimized successfully"
}

A route's travel distance can be optimized.

HTTP Request

POST /routes/<route_uid>/optimze

Body Parameters

This endpoint accepts start location object

Route Optimze Details

Parameter Required Description Type Example
start_location false Start location for the route Object REFER GEO COORDINATE DETAILS

Geo coordinate details

Parameter Required Description Type Example
geo_cords true Latitude and Longitude for the route List [13.0418, 80.2341]
name false Name of start location String SKCL Harmony square
street false Street of start location String Prakasam St, T Nagar

HTTP Request

POST /routes/<route_uid>/optimize

Get Routes

curl "https://<host>/api/routes?page=<page_number>&limit=<limit_number>&filter.from_date=<from_date>&filter.to_date=<to_date>&filter.keyword=<keyword>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the routes matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "total_jobs": 0,
            "transport_mode": "TRUCK",
            "enable_traffic": false,
            "is_optimized": false,
            "is_locked": false,
            "company_id": "86",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_id": 1,
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN",
                    "created_at": "2018-01-22T00:00:00.000Z",
                    "updated_at": "2018-01-22T00:00:00.000Z"
                }
            },
            "route_name": "Sales work",
            "route_uid": "6a785710-7b25-11eb-ad06-49983057004f",
            "duration": 16,
            "departure": "2021-03-02T01:33:00.000Z",
            "route_end_time": "2021-03-02T02:33:00.000Z",
            "route_type": "SHORTEST",
            "color": "#3498DB",
            "start_location": {
                "street": "Valasaravakkam ",
                "name": "Chennai ",
                "geo_cords": [
                    13.0402725,
                    80.1722913
                ]
            },
            "assigned_to": [],
            "created_at": "2021-03-02T07:03:39.532Z",
            "updated_at": "2021-03-02T07:03:39.537Z"
        },
        {
            "total_jobs": 0,
            "transport_mode": "CAR",
            "enable_traffic": false,
            "is_optimized": false,
            "is_locked": false,
            "company_id": "86",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_id": 1,
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN",
                    "created_at": "2018-01-22T00:00:00.000Z",
                    "updated_at": "2018-01-22T00:00:00.000Z"
                }
            },
            "route_name": "Job locations",
            "route_uid": "67e3fd40-7bf9-11eb-8d72-514e0d500833",
            "duration": 24,
            "departure": "2021-03-03T08:40:00.000Z",
            "route_end_time": "2021-03-04T08:40:00.000Z",
            "route_type": "SHORTEST",
            "color": "blue",
            "start_location": {
                "geo_cords": [
                    0,
                    0
                ],
                "name": "",
                "street": ""
            },
            "assigned_to": [
                {
                    "user": {
                        "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                        "emp_code": "001",
                        "first_name": "Sriram",
                        "last_name": "Palakula",
                        "email": "[email protected]",
                        "designation": "Admin",
                        "home_phone_number": "9123456789",
                        "work_phone_number": "9987654321",
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 1,
                            "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Admin",
                            "role_key": "ADMIN",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "team": {
                        "team_uid": "463ae640-c311-4415-824c-aaab93a4f5b6",
                        "team_name": "support",
                        "team_color": "#3498db",
                        "is_active": true,
                        "is_deleted": false
                    }
                }
            ],
            "created_at": "2021-03-03T08:21:08.504Z",
            "updated_at": "2021-03-03T08:21:57.057Z"
        },
        {
            "total_jobs": 1,
            "transport_mode": "CAR",
            "enable_traffic": true,
            "is_optimized": false,
            "is_locked": false,
            "company_id": "86",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_id": 1,
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN",
                    "created_at": "2018-01-22T00:00:00.000Z",
                    "updated_at": "2018-01-22T00:00:00.000Z"
                }
            },
            "route_name": "Washing service",
            "route_uid": "bffddd30-7fd1-11eb-b38a-1fdea62789c8",
            "duration": 24,
            "departure": "2021-03-08T08:40:00.000Z",
            "route_end_time": "2021-03-09T08:40:00.000Z",
            "route_type": "SHORTEST",
            "color": "blue",
            "start_location": {
                "geo_cords": [
                    0,
                    0
                ],
                "name": "",
                "street": ""
            },
            "assigned_to": [],
            "created_at": "2021-03-08T05:47:21.099Z",
            "updated_at": "2021-03-08T07:40:54.705Z"
        },
        {
            "total_jobs": 0,
            "transport_mode": "CAR",
            "enable_traffic": false,
            "is_optimized": false,
            "is_locked": false,
            "company_id": "86",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_id": 1,
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN",
                    "created_at": "2018-01-22T00:00:00.000Z",
                    "updated_at": "2018-01-22T00:00:00.000Z"
                }
            },
            "route_name": "Cleaning",
            "route_uid": "08f7e470-7fd4-11eb-b38a-1fdea62789c8",
            "duration": 24,
            "departure": "2021-03-08T08:40:00.000Z",
            "route_end_time": "2021-03-09T08:40:00.000Z",
            "route_type": "SHORTEST",
            "color": "blue",
            "start_location": {
                "geo_cords": [
                    0,
                    0
                ],
                "name": "",
                "street": ""
            },
            "assigned_to": [],
            "created_at": "2021-03-08T06:03:42.521Z",
            "updated_at": "2021-03-08T06:03:42.523Z"
        },
        {
            "total_jobs": 4,
            "transport_mode": "CAR",
            "enable_traffic": false,
            "is_optimized": true,
            "is_locked": false,
            "company_id": "86",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                "emp_code": "001",
                "first_name": "Sriram",
                "last_name": "Palakula",
                "email": "[email protected]",
                "designation": "Admin",
                "home_phone_number": "9123456789",
                "work_phone_number": "9987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false,
                "role": {
                    "role_id": 1,
                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                    "role_name": "Admin",
                    "role_key": "ADMIN",
                    "created_at": "2018-01-22T00:00:00.000Z",
                    "updated_at": "2018-01-22T00:00:00.000Z"
                }
            },
            "route_name": "AC repairs",
            "route_uid": "39e2a0c0-7fd4-11eb-b38a-1fdea62789c8",
            "duration": 24,
            "departure": "2021-03-04T08:40:00.000Z",
            "route_end_time": "2021-03-05T08:40:00.000Z",
            "route_type": "SHORTEST",
            "color": "blue",
            "start_location": {
                "name": "Valasaravakkam",
                "street": "Nehru street",
                "geo_cords": [
                    13.05,
                    80.2121
                ]
            },
            "assigned_to": [
                {
                    "user": {
                        "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                        "emp_code": "001",
                        "first_name": "Sriram",
                        "last_name": "Palakula",
                        "email": "[email protected]",
                        "designation": "Admin",
                        "home_phone_number": "9123456789",
                        "work_phone_number": "9987654321",
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 1,
                            "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Admin",
                            "role_key": "ADMIN",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "team": {
                        "team_uid": "463ae640-c311-4415-824c-aaab93a4f5b6",
                        "team_name": "support",
                        "team_color": "#3498db",
                        "is_active": true,
                        "is_deleted": false
                    }
                },
                {
                    "user": {
                        "user_uid": "7af6909b-9ede-4487-8d84-55ae0e991af8",
                        "emp_code": "001",
                        "first_name": "test",
                        "last_name": "Sriram",
                        "email": "[email protected]",
                        "designation": "FE",
                        "home_phone_number": "1234567890",
                        "work_phone_number": "1234567890",
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 2,
                            "role_uid": "504e5168-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Team Leader",
                            "role_key": "TEAM_LEADER",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "team": {
                        "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                        "team_name": "test",
                        "team_color": "#4960a0",
                        "is_active": true,
                        "is_deleted": false
                    }
                }
            ],
            "created_at": "2021-03-08T06:05:04.590Z",
            "updated_at": "2021-03-08T07:45:15.935Z",
            "total_distance": 88533,
            "total_time": 7574
        }
    ],
    "total_records": 5,
    "current_page": 1,
    "total_pages": 1
}

Fetches all routes matching the query parameters

HTTP Request

GET /routes

Query Parameters

This endpoint accepts multiple filters as a query parameters

Route query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
limit true No of routes per page Number Any number
filter.keyword false Filter by search query. Searches for route name String Any valid string
filter.from_date false Filter by route departure date Date 2021-03-01
filter.to_date false Filter by route departure date Date 2021-03-08

Get Route Details

curl "https://<host>/api/routes/<route_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the route details of the specific route_uid:

{
    "type": "success",
    "data": {
        "total_jobs": 4,
        "transport_mode": "CAR",
        "enable_traffic": false,
        "is_optimized": true,
        "is_locked": false,
        "company_id": "86",
        "created_by": {
            "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
            "emp_code": "001",
            "first_name": "Sriram",
            "last_name": "Palakula",
            "email": "[email protected]",
            "designation": "Admin",
            "home_phone_number": "9123456789",
            "work_phone_number": "9987654321",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "is_active": true,
            "is_deleted": false,
            "role": {
                "role_id": 1,
                "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                "role_name": "Admin",
                "role_key": "ADMIN",
                "created_at": "2018-01-22T00:00:00.000Z",
                "updated_at": "2018-01-22T00:00:00.000Z"
            }
        },
        "route_name": "AC repairs updated",
        "route_uid": "39e2a0c0-7fd4-11eb-b38a-1fdea62789c8",
        "duration": 24,
        "departure": "2021-03-04T08:40:00.000Z",
        "route_end_time": "2021-03-05T08:40:00.000Z",
        "route_type": "SHORTEST",
        "color": "blue",
        "start_location": {
            "name": "Valasaravakkam",
            "street": "Nehru street",
            "geo_cords": [
                13.05,
                80.2121
            ]
        },
        "jobs": [
            {
                "job": {
                    "job_tags": [],
                    "is_recurrence": false,
                    "is_deleted": false,
                    "job_category": {
                        "category_name": "Fixes",
                        "category_uid": "665c0df0-cd53-11ea-9c09-f5d3c9145a54"
                    },
                    "job_uid": "cc274520-5c8a-11eb-b437-375d093f36ba",
                    "job_title": "test_avg",
                    "job_priority": "LOW",
                    "job_type": "NEW",
                    "scheduled_start_time": "2021-01-31T01:15:00.000Z",
                    "scheduled_end_time": "2021-01-31T01:15:00.000Z",
                    "assigned_to": [
                        {
                            "user": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "team": {
                                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                                "team_name": "test",
                                "team_color": "#4960a0",
                                "is_active": true,
                                "is_deleted": false
                            }
                        },
                        {
                            "user": {
                                "user_uid": "7af6909b-9ede-4487-8d84-55ae0e991af8",
                                "emp_code": "001",
                                "first_name": "test",
                                "last_name": "Sriram",
                                "email": "[email protected]",
                                "designation": "FE",
                                "home_phone_number": "1234567890",
                                "work_phone_number": "1234567890",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 2,
                                    "role_uid": "504e5168-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Team Leader",
                                    "role_key": "TEAM_LEADER",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "team": {
                                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                                "team_name": "development",
                                "team_color": "#27ae60",
                                "is_active": true,
                                "is_deleted": false
                            }
                        }
                    ],
                    "assigned_to_team": [
                        {
                            "team": {
                                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                                "team_name": "development",
                                "team_color": "#27ae60",
                                "is_active": true,
                                "is_deleted": false
                            }
                        },
                        {
                            "team": {
                                "team_uid": "463ae640-c311-4415-824c-aaab93a4f5b6",
                                "team_name": "support",
                                "team_color": "#3498db",
                                "is_active": true,
                                "is_deleted": false
                            }
                        },
                        {
                            "team": {
                                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                                "team_name": "test",
                                "team_color": "#4960a0",
                                "is_active": true,
                                "is_deleted": false
                            }
                        }
                    ],
                    "prefix": "j",
                    "customer_address": {
                        "street": "Rajaji Avenue Annexe",
                        "city": "Chennai",
                        "state": "TAMILNADU",
                        "zip_code": "600087"
                    },
                    "customer_billing_address": {
                        "street": "Rajaji Avenue Annexe",
                        "city": "Chennai",
                        "state": "TAMILNADU",
                        "zip_code": "600087"
                    },
                    "custom_fields": [
                        {
                            "hide_to_fe": false,
                            "label": "variety",
                            "value": "tt",
                            "type": "SINGLE_LINE"
                        }
                    ],
                    "products": [],
                    "created_by": {
                        "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                        "emp_code": "001",
                        "first_name": "Sriram",
                        "last_name": "Palakula",
                        "email": "[email protected]",
                        "designation": "Admin",
                        "home_phone_number": "9123456789",
                        "work_phone_number": "9987654321",
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 1,
                            "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Admin",
                            "role_key": "ADMIN",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "current_job_status": {
                        "status_uid": "08e59747-256f-49cd-aff2-fa91b3259b83",
                        "status_name": "Completed",
                        "status_type": "COMPLETED",
                        "status_color": "#e67e22"
                    },
                    "job_status": [
                        {
                            "status_uid": "52fd9a9d-1006-407f-a164-14482e2b836b",
                            "status_name": "new",
                            "status_type": "NEW",
                            "done_by": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "checklist": [],
                            "created_at": "2021-01-22T06:44:31.944Z"
                        },
                        {
                            "status_uid": "6cba46db-8761-4fef-b163-eb747712985f",
                            "status_name": "Completed",
                            "status_type": "CANCELED",
                            "done_by": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "checklist": [],
                            "created_at": "2021-01-22T06:48:00.384Z"
                        },
                        {
                            "status_uid": "08e59747-256f-49cd-aff2-fa91b3259b83",
                            "status_name": "Completed",
                            "status_type": "ON_HOLD",
                            "done_by": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "checklist": [],
                            "created_at": "2021-01-22T06:48:57.235Z"
                        },
                        {
                            "status_uid": "81b2d541-aa19-4f11-aebe-f06e6ef3d941",
                            "status_name": "inprogress",
                            "status_type": "STARTED",
                            "done_by": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "checklist": [
                                {
                                    "question": "Text Input",
                                    "answer": "ters",
                                    "type": "SINGLE_LINE"
                                }
                            ],
                            "created_at": "2021-01-22T05:14:18.948Z"
                        },
                        {
                            "status_uid": "08e59747-256f-49cd-aff2-fa91b3259b83",
                            "status_name": "Completed",
                            "status_type": "COMPLETED",
                            "done_by": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "checklist": [],
                            "created_at": "2021-01-22T06:56:56.073Z"
                        }
                    ],
                    "customer": {
                        "customer_last_name": "Test One",
                        "customer_company_name": "css",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_contact_no": {
                            "mobile": "123456789",
                            "home": "987654321"
                        },
                        "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                    },
                    "created_at": "2021-01-22T06:44:31.944Z",
                    "work_order_number": 60188
                },
                "geo_cords": [
                    13.08898739457866,
                    80.21746069192886
                ],
                "sequence": 1,
                "distance": 5085,
                "time": 773
            },
            {
                "job": {
                    "job_tags": [],
                    "is_recurrence": false,
                    "is_deleted": false,
                    "job_category": {
                        "category_name": "Fixes",
                        "category_uid": "665c0df0-cd53-11ea-9c09-f5d3c9145a54"
                    },
                    "job_uid": "34f84ff0-5c80-11eb-85f1-b57d6fe33f3a",
                    "job_title": "test avg 4",
                    "job_priority": "LOW",
                    "job_type": "NEW",
                    "scheduled_start_time": "2021-01-22T01:45:00.000Z",
                    "scheduled_end_time": "2021-01-22T01:45:00.000Z",
                    "assigned_to": [
                        {
                            "user": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "team": {
                                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                                "team_name": "test",
                                "team_color": "#4960a0",
                                "is_active": true,
                                "is_deleted": false
                            }
                        },
                        {
                            "user": {
                                "user_uid": "7af6909b-9ede-4487-8d84-55ae0e991af8",
                                "emp_code": "001",
                                "first_name": "test",
                                "last_name": "Sriram",
                                "email": "[email protected]",
                                "designation": "FE",
                                "home_phone_number": "1234567890",
                                "work_phone_number": "1234567890",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 2,
                                    "role_uid": "504e5168-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Team Leader",
                                    "role_key": "TEAM_LEADER",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "team": {
                                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                                "team_name": "test",
                                "team_color": "#4960a0",
                                "is_active": true,
                                "is_deleted": false
                            }
                        }
                    ],
                    "assigned_to_team": [
                        {
                            "team": {
                                "team_uid": "463ae640-c311-4415-824c-aaab93a4f5b6",
                                "team_name": "support",
                                "team_color": "#3498db",
                                "is_active": true,
                                "is_deleted": false
                            }
                        },
                        {
                            "team": {
                                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                                "team_name": "test",
                                "team_color": "#4960a0",
                                "is_active": true,
                                "is_deleted": false
                            }
                        }
                    ],
                    "prefix": "j",
                    "customer_address": {
                        "street": "Rajaji Avenue Annexe",
                        "city": "Chennai",
                        "state": "TAMILNADU",
                        "zip_code": "600087"
                    },
                    "customer_billing_address": {
                        "street": "Rajaji Avenue Annexe",
                        "city": "Chennai",
                        "state": "TAMILNADU",
                        "zip_code": "600087"
                    },
                    "custom_fields": [
                        {
                            "hide_to_fe": false,
                            "label": "variety",
                            "value": "tt",
                            "type": "SINGLE_LINE"
                        }
                    ],
                    "products": [],
                    "created_by": {
                        "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                        "emp_code": "001",
                        "first_name": "Sriram",
                        "last_name": "Palakula",
                        "email": "[email protected]",
                        "designation": "Admin",
                        "home_phone_number": "9123456789",
                        "work_phone_number": "9987654321",
                        "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                        "is_active": true,
                        "is_deleted": false,
                        "role": {
                            "role_id": 1,
                            "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                            "role_name": "Admin",
                            "role_key": "ADMIN",
                            "created_at": "2018-01-22T00:00:00.000Z",
                            "updated_at": "2018-01-22T00:00:00.000Z"
                        }
                    },
                    "current_job_status": {
                        "status_uid": "08e59747-256f-49cd-aff2-fa91b3259b83",
                        "status_name": "Completed",
                        "status_type": "COMPLETED",
                        "status_color": "#e67e22"
                    },
                    "job_status": [
                        {
                            "status_uid": "52fd9a9d-1006-407f-a164-14482e2b836b",
                            "status_name": "new",
                            "status_type": "NEW",
                            "done_by": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "checklist": [],
                            "created_at": "2021-01-22T07:05:27.934Z"
                        },
                        {
                            "status_uid": "81b2d541-aa19-4f11-aebe-f06e6ef3d941",
                            "status_name": "inprogress",
                            "status_type": "STARTED",
                            "done_by": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "checklist": [
                                {
                                    "question": "Text Input",
                                    "answer": "ters",
                                    "type": "SINGLE_LINE"
                                }
                            ],
                            "created_at": "2021-01-22T07:06:28.054Z"
                        },
                        {
                            "status_uid": "08e59747-256f-49cd-aff2-fa91b3259b83",
                            "status_name": "Completed",
                            "status_type": "COMPLETED",
                            "done_by": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "checklist": [],
                            "created_at": "2021-01-22T07:06:34.239Z"
                        }
                    ],
                    "customer": {
                        "customer_last_name": "Test One",
                        "customer_company_name": "css",
                        "customer_email": "[email protected]",
                        "customer_first_name": "test",
                        "customer_contact_no": {
                            "mobile": "1234567890",
                            "home": "987654321"
                        },
                        "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9145a54"
                    },
                    "created_at": "2021-01-22T07:05:27.935Z",
                    "work_order_number": 60187
                },
                "geo_cords": [
                    13.09243,
                    80.218604
                ],
                "sequence": 2,
                "distance": 629,
                "time": 97
            },
            {
                "job": {
                    "job_tags": [],
                    "is_recurrence": false,
                    "is_deleted": false,
                    "job_category": {
                        "category_name": "Fixes",
                        "category_uid": "665c0df0-cd53-11ea-9c09-f5d3c9145a54"
                    },
                    "job_uid": "5be2a6e0-5c7d-11eb-85f1-b57d6fe33f3a",
                    "job_title": "test avg 2",
                    "job_priority": "LOW",
                    "job_type": "NEW",
                    "scheduled_start_time": "2021-01-22T01:15:00.000Z",
                    "scheduled_end_time": "2021-01-22T01:15:00.000Z",
                    "assigned_to": [
                        {
                            "user": {
                                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
                                "emp_code": "001",
                                "first_name": "Sriram",
                                "last_name": "Palakula",
                                "email": "[email protected]",
                                "designation": "Admin",
                                "home_phone_number": "9123456789",
                                "work_phone_number": "9987654321",
                                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                                "is_active": true,
                                "is_deleted": false,
                                "role": {
                                    "role_id": 1,
                                    "role_uid": "504e4eac-ff7d-11e7-8be5-0ed5f89f718b",
                                    "role_name": "Admin",
                                    "role_key": "ADMIN",
                                    "created_at": "2018-01-22T00:00:00.000Z",
                                    "updated_at": "2018-01-22T00:00:00.000Z"
                                }
                            },
                            "team": {
                                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                                "team_name": "test",
                                "team_color": "#4960a0",
                                "is_active"