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": 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-22T06:45:04.737Z"
                        },
                        {
                            "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:50:38.218Z"
                        },
                        {
                            "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-22T06:56:08.533Z"
                        },
                        {
                            "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:20.171Z"
                        }
                    ],
                    "customer": {
                        "customer_last_name": "Test One",
                        "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"
                    },
                    "created_at": "2021-01-22T06:45:04.737Z",
                    "work_order_number": 60186
                },
                "geo_cords": [
                    12.4443953,
                    80.1087382
                ],
                "sequence": 3,
                "distance": 82819,
                "time": 6704
            },
            {
                "job": {
                    "job_tags": [
                        ""
                    ],
                    "is_recurrence": false,
                    "is_deleted": false,
                    "job_category": {
                        "category_name": "Fixes",
                        "category_uid": "665c0df0-cd53-11ea-9c09-f5d3c9145a54"
                    },
                    "scheduled_start_time": "2021-02-24T19:30:00.000Z",
                    "scheduled_end_time": "2021-02-24T21:45:00.000Z",
                    "job_uid": "ad1f6030-6f55-11eb-aaa7-4bdccf94aebb",
                    "job_title": "route_job_2",
                    "job_priority": "LOW",
                    "job_type": "NEW",
                    "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": "test",
                    "customer_address": {
                        "street": "Rajaji Avenue Annex",
                        "city": "Chennai",
                        "state": "TAMILNADU",
                        "zip_code": "600087",
                        "geo_cordinates": null
                    },
                    "customer_billing_address": {
                        "street": "Rajaji Avenue Annexe",
                        "city": "Chennai",
                        "state": "TAMILNADU",
                        "zip_code": "600087"
                    },
                    "custom_fields": [
                        {
                            "hide_to_fe": false,
                            "label": "variety",
                            "value": "test",
                            "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"
                    },
                    "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-02-15T06:18:53.261Z"
                        },
                        {
                            "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": "r",
                                    "type": "SINGLE_LINE"
                                }
                            ],
                            "created_at": "2021-02-15T08:00:05.269Z"
                        },
                        {
                            "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-02-15T08:13:33.560Z"
                        }
                    ],
                    "customer": {
                        "customer_last_name": "Test One",
                        "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"
                    },
                    "created_at": "2021-02-15T06:18:53.261Z",
                    "work_order_number": 60223
                },
                "geo_cords": [
                    12.4443953,
                    80.10873819999999
                ],
                "sequence": 4,
                "distance": 0,
                "time": 0
            }
        ],
        "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
    }
}

Fetches route details matching the route_uid

HTTP Request

GET /routes/<route_uid>

Get Routes Count

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

We get the route's count between the dates:

{
    "type": "success",
    "data": [
        {
            "job_routes": 10,
            "date": "2021-03-01"
        },
        {
            "job_routes": 1,
            "date": "2021-03-02"
        },
        {
            "job_routes": 5,
            "date": "2021-03-03"
        },
        {
            "job_routes": 4,
            "date": "2021-03-04"
        },
        {
            "job_routes": 20,
            "date": "2021-03-05"
        },
        {
            "job_routes": 0,
            "date": "2021-03-06"
        },
        {
            "job_routes": 6,
            "date": "2021-03-07"
        },
        {
            "job_routes": 2,
            "date": "2021-03-08"
        }
    ]
}

Fetches route's count between the dates

HTTP Request

GET /routes/count

Query Parameters

This endpoint accepts from and to dates as a query parameters

Route query param details

Parameter Required Description Type Example
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's Job Config

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

We get the job's status update details:

{
    "type": "success",
    "data": {
        "is_last_job": false,
        "can_update_status": true
    }
}

Fetches job's status update information

HTTP Request

GET /routes/<route_uid>/config

Query Parameters

This endpoint accepts job_uid as a query parameter

Route query param details

Parameter Required Description Type Example
filter.job_uid false Job UID for the job String 2021-03-01

Delete Route

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

Route with the specific route_uid is deleted:

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

Deletes a route matching the route_uid

HTTP Request

DELETE /routes/<route_uid>

Timesheets

Create Timesheet

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

Example request body:

{
    "type_of_check": "CHECK_IN",
    "location_uid": "e94bf935-bc60-4f07-aa06-5dbc61718a0a",
    "checked_users": [
        "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
        "7af6909b-9ede-4487-8d84-55ae0e991af8"
    ],
    "checked_time": "2021-03-09 08:15:00"
}

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

{
    "type": "success",
    "title": "Timesheet data inserted successfully",
    "message": "User timesheet has been inserted successfully",
    "data": {
        "employee_timesheet_uid": [
            "b0447d4f-2feb-4791-ae04-206621251374",
            "4f59291b-527d-49e2-80ae-5f217e8948d4"
        ]
    }
}

This endpoint allows us to create new timesheets.

HTTP Request

POST /timesheets/bulk_update

Body Parameters

This endpoint accepts a timesheet object

Timesheet Creation Details

Parameter Required Description Type Example
type_of_check true Type of check Enum ["CHECK_IN", "CHECK_OUT", "BREAK", "RESUME_WORK"]
location_uid false Location UID String e94bf935-bc60-4f07-aa06-5dbc61718a0a
checked_users true User UIDs for the timesheet List [ "9d0a4bd7-8424-4bcc-abd9-5731199b30f6", "7af6909b-9ede-4487-8d84-55ae0e991af8"]
checked_time true Checked time of timesheet Datetime 2021-03-09 08:15:00

Get Timesheets

curl "https://<host>/api/timesheets?count=<timesheet_count>&date=<date>&filter.location_uid=<location_uid>&filter.keyword=<keyword>&filter.type=<type_of_timesheet>&page=<page_number>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the timesheets matching the query parameters:

{
    "status": "success",
    "data": {
        "timesheets": [
            {
                "employee_timesheet_uid": "b093b517-9c86-4e54-86bd-2ee6a85692ce",
                "type_of_check": "CHECK_IN",
                "latitude": 13.0067,
                "longitude": 80.2206,
                "auth_pic": null,
                "checked_time": "2021-03-04T22:00:00.000Z",
                "created_at": "2021-03-09T09:05:07.000Z",
                "users": {
                    "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_user": {
                    "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
                },
                "timesheet_location": {
                    "location_uid": "e94bf935-bc60-4f07-aa06-5dbc61718a0a",
                    "location_name": "Guindy",
                    "latitude": 13.0067,
                    "longitude": 80.2206,
                    "address": "Plot No. 1 Guindy, SIDCO Industrial Estate, Chennai, Tamil Nadu 600032",
                    "radius": 200,
                    "created_at": "2021-03-09T08:04:03.000Z"
                }
            },
            {
                "employee_timesheet_uid": "e9c6cac5-5064-4142-bff2-ce06384688cb",
                "type_of_check": "CHECK_IN",
                "latitude": 13.0418,
                "longitude": 80.2341,
                "auth_pic": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "checked_time": "2021-03-04T22:00:00.000Z",
                "created_at": "2021-03-09T09:05:32.000Z",
                "users": {
                    "user_uid": "6862f359-ac89-4482-b20a-53932c3bfe54",
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "[email protected]",
                    "home_phone_number": "987654321",
                    "designation": "developer",
                    "emp_code": "001",
                    "work_phone_number": "987654321",
                    "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                    "is_active": true,
                    "is_deleted": false
                },
                "created_user": {
                    "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
                },
                "timesheet_location": {
                    "location_uid": "b759fb15-d45c-43bb-8be0-06d9df486d4e",
                    "location_name": "TNagar",
                    "latitude": 13.0418,
                    "longitude": 80.2341,
                    "address": "Prakasam St, Gangai Karai Puram, T. Nagar, Chennai, Tamil Nadu 600017",
                    "radius": 200,
                    "created_at": "2021-03-09T08:05:41.000Z"
                }
            }
        ],
        "total_pages": 1,
        "current_page": 1
    }
}

Fetches all timesheets matching the query parameters

HTTP Request

GET /timesheets

Query Parameters

This endpoint accepts multiple filters as a query parameters

Timesheet query param details

Parameter Required Description Type Example
date true Timesheet date Date 2021-03-09
page true Page no to fetch Number Any number
count true No of timesheets per page Number Any number
filter.type false Filter by type Enum ['CHECK_IN', 'CHECK_OUT', 'BREAK', 'RESUME_WORK']
filter.user_uid false Filter by User UID String 7e11fac9-29f6-4b94-ba19-59681e6ee288
filter.team_uid false Filter by Team UID String a91ecc24-06c5-44ae-9e6e-519ec80fa724
filter.location_uid false Filter by location UID String e94bf935-bc60-4f07-aa06-5dbc61718a0a
filter.keyword false Filter by search query. Searches for user's first name, last name and email String Any valid string

Get Current User Timesheet Details

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

We get the timesheet details of the current user:

{
    "status": "success",
    "data": [
        {
            "employee_timesheet_uid": "b093b517-9c86-4e54-86bd-2ee6a85692ce",
            "type_of_check": "CHECK_IN",
            "latitude": 13.0067,
            "longitude": 80.2206,
            "checked_time": "2021-03-04T22:00:00.000Z",
            "created_at": "2021-03-09T09:05:07.000Z",
            "location": {
                "location_uid": "e94bf935-bc60-4f07-aa06-5dbc61718a0a",
                "location_name": "Guindy",
                "radius": "200",
                "address": "Plot No. 1 Guindy, SIDCO Industrial Estate, Chennai, Tamil Nadu 600032",
                "latitude": "13.0067",
                "longitude": "80.2206"
            }
        }
    ]
}

Fetches timesheet details of the current user

HTTP Request

GET /timesheets/<user_uid>

Update Timesheet History

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

Example request body:

{
    "timesheet_history": {
        "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
        "date": "2021-03-09",
        "shift_start": "9:00",
        "shift_end": "17:00",
        "total_distance": 30,
        "total_overtime": 120,
        "total_break_time": 30,
        "total_work_time": 240
    }
}

On successfull update of a timesheet history we get the below response:

{
    "type": "success",
    "message": "Timesheet History details updated successfully"
}

This endpoint allows us to update timesheet history.

HTTP Request

PUT /timesheets/history

Body Parameters

This endpoint accepts a timesheet history object

Timesheet History Details

Parameter Required Description Type Example
user_uid true User UID String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6
date true Checked time of timesheet Datetime 2021-03-09 08:15:00
shift_start false Shift start time in 24 Hrs Format Time 9:00
shift_end false Shift end time in 24 Hrs Format Time 17:00
total_distance false Total distance in Kilometers Decimal 30.5
total_work_time false Total Worktime in minutes Decimal 240
total_overtime false Total Overtime in minutes Decimal 120
total_break_time false Total Breaktime in minutes Decimal 30

Get Timesheets History

curl "https://<host>/api/timesheets/history?date=<date>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the timesheet history of the current user on a particular day:

{
    "type": "success",
    "data": {
        "total_work_time": 0,
        "total_break_time": 60,
        "total_distance": 0,
        "shift_start": "03:30:00",
        "shift_end": "12:00:00",
        "timesheets": [
            {
                "employee_timesheet_uid": "b093b517-9c86-4e54-86bd-2ee6a85692ce",
                "type_of_check": "CHECK_IN",
                "latitude": 13.0067,
                "longitude": 80.2206,
                "auth_pic": null,
                "checked_time": "2021-03-04T22:00:00.000Z",
                "created_at": "2021-03-09T09:05:07.000Z",
                "timesheet_location": {
                    "location_uid": "e94bf935-bc60-4f07-aa06-5dbc61718a0a",
                    "location_name": "Guindy",
                    "latitude": 13.0067,
                    "longitude": 80.2206,
                    "address": "Plot No. 1 Guindy, SIDCO Industrial Estate, Chennai, Tamil Nadu 600032",
                    "radius": 200,
                    "created_at": "2021-03-09T08:04:03.000Z"
                }
            },
            {
                "employee_timesheet_uid": "4c5006a6-271c-4969-9aeb-80da35d9af44",
                "type_of_check": "BREAK",
                "latitude": 13.0418,
                "longitude": 80.2341,
                "auth_pic": null,
                "checked_time": "2021-03-05T00:15:00.000Z",
                "created_at": "2021-03-09T09:41:41.000Z",
                "timesheet_location": {
                    "location_uid": "b759fb15-d45c-43bb-8be0-06d9df486d4e",
                    "location_name": "TNagar",
                    "latitude": 13.0418,
                    "longitude": 80.2341,
                    "address": "Prakasam St, Gangai Karai Puram, T. Nagar, Chennai, Tamil Nadu 600017",
                    "radius": 200,
                    "created_at": "2021-03-09T08:05:41.000Z"
                }
            },
            {
                "employee_timesheet_uid": "2f8657f0-8afc-4823-b18d-69bea7e49171",
                "type_of_check": "RESUME_WORK",
                "latitude": 13.0067,
                "longitude": 80.2206,
                "auth_pic": null,
                "checked_time": "2021-03-05T01:15:00.000Z",
                "created_at": "2021-03-09T09:42:01.000Z",
                "timesheet_location": {
                    "location_uid": "e94bf935-bc60-4f07-aa06-5dbc61718a0a",
                    "location_name": "Guindy",
                    "latitude": 13.0067,
                    "longitude": 80.2206,
                    "address": "Plot No. 1 Guindy, SIDCO Industrial Estate, Chennai, Tamil Nadu 600032",
                    "radius": 200,
                    "created_at": "2021-03-09T08:04:03.000Z"
                }
            },
            {
                "employee_timesheet_uid": "20889eda-0ae4-44d3-a7e6-f19877d338b0",
                "type_of_check": "CHECK_OUT",
                "latitude": 13.0067,
                "longitude": 80.2206,
                "auth_pic": null,
                "checked_time": "2021-03-05T06:30:00.000Z",
                "created_at": "2021-03-09T09:42:20.000Z",
                "timesheet_location": {
                    "location_uid": "e94bf935-bc60-4f07-aa06-5dbc61718a0a",
                    "location_name": "Guindy",
                    "latitude": 13.0067,
                    "longitude": 80.2206,
                    "address": "Plot No. 1 Guindy, SIDCO Industrial Estate, Chennai, Tamil Nadu 600032",
                    "radius": 200,
                    "created_at": "2021-03-09T08:04:03.000Z"
                }
            }
        ]
    }
}

Fetches timesheet history of the current user on a particular day

HTTP Request

GET /timesheets/history

Query Parameters

This endpoint accepts a date as a query paramter

Date details

Parameter Description Type Example
date Timesheet history date Date 2021-03-05

Get Timesheet defaulters

curl "https://<host>/api/timesheets/yet_to_update?date=<date>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the yet to check in users for a particular date:

{
    "type": "success",
    "data": [
        {
            "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,
            "created_at": "2020-11-09T09:37:31.000Z",
            "updated_at": "2020-11-09T09:37:31.000Z",
            "work_hours": {
                "start_time": "09:00 AM",
                "end_time": "05:00 PM"
            }
        },
        {
            "user_uid": "4550dd69-b7fc-4c6f-9b97-56375aedf229",
            "emp_code": "001",
            "first_name": "John",
            "last_name": "Doe",
            "email": "[email protected]",
            "designation": "developer",
            "home_phone_number": "987654321",
            "work_phone_number": "987654321",
            "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-02-19T10:36:45.000Z",
            "updated_at": "2021-02-19T10:36:45.000Z",
            "work_hours": {
                "start_time": "09:00 AM",
                "end_time": "05:00 PM"
            }
        }
    ]
}

Fetches yet to check in users for a particualr day

HTTP Request

GET /timesheets/yet_to_update

Query Parameters

This endpoint accepts a date as a query paramter

Date details

Parameter Description Type Example
date Timesheet date Date 2021-03-05

Create Timeoff Request

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

Example request body:

{
    "timeoff_request": {
        "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
        "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6",
        "request_reason": "VACATION",
        "request_remarks": "Will be on vacation for a week",
        "request_from": "2021-03-11 03:30:00",
        "request_to": "2021-03-17 11:30:00",
        "all_day": true
    }
}

On successfull creation of a timeoff request we get the below response:

{
    "type": "success",
    "title": "Timeoff Request created successfully",
    "message": "Timeoff Request created successfully",
    "data": {
        "request_uid": "19a30c84-c340-47c8-abd4-2c7e6a1f21ad"
    }
}

This endpoint allows us to create new timeoff requests.

HTTP Request

POST /timesheets/request/timeoff

Body Parameters

This endpoint accepts a timeoff request object

Timeoff Creation 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
request_reason true Timeoff reason Enum ['OFF', 'VACATION', 'SICK', 'PARENTAL LEAVE', 'UNPAID', 'OTHERS']
request_remarks true Timeoff remarks String Will be on vacation for a week
request_from true Timeoff from Date 2021-03-11
request_to true Timeoff till Date 2021-03-17
all_day false Whether timeoff is for full day Boolean true or false

Accept / Reject Timeoff Request

curl "https://<host>/api/timesheets/request/timeoff/<timeoff_request_uid>/update_approval" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "timeoff_request": {
        "approval_remarks": "Yes sure",
        "approval_status": "APPROVED"
    }
}

On successfull accept / reject of a timeoff request we get the below response:

{
    "type": "success",
    "title": "Timeoff Request updated successfully",
    "message": "Timeoff Request updated successfully",
    "data": {
        "request_uid": "19a30c84-c340-47c8-abd4-2c7e6a1f21ad"
    }
}

This endpoint allows us to accept / reject timeoff requests.

HTTP Request

PUT /timesheets/request/timeoff/<timeoff_request_uid>/update_approval

Body Parameters

This endpoint accepts a timeoff request approval object

Timeoff Approval Details

Parameter Required Description Type Example
approval_remarks true Remarks for approval String Yes sure
approval_status true Approval status Enum [ 'APPROVED', 'REJECTED' ]

Get Timesoff requests

curl "https://<host>/api/timesheets/request/timeoff?sort=<sort_order>&sort_by=<sort_by>&filter.from_date=<from_date>&filter.to_date=<to_date>&filter.approval_status=<approval_status>&filter.requested_at=<request_date>&filter.user_uid=<user_uid>&filter.team_uid=<team_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the timesoff requests matching the query parameters:

{
    "status": "success",
    "data": [
        {
            "request_uid": "c92c494a-c69e-49d1-b611-52645798d78a",
            "request_from": "2021-03-18T00:00:00.000Z",
            "requested_at": "2021-03-10T06:23:42.000Z",
            "request_to": "2021-03-20T00:00:00.000Z",
            "all_day": false,
            "request_reason": "VACATION",
            "request_remarks": "Will be on vacation for a week",
            "approval_status": "AWAIT_APPROVAL",
            "approved_at": null,
            "approval_remarks": null,
            "created_at": "2021-03-10T06:23:42.000Z",
            "requested_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": "2020-07-24T02:00:44.000Z",
                "updated_at": "2020-07-24T02:00:44.000Z"
            },
            "requested_by_team": {
                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                "team_name": "development",
                "team_description": null,
                "team_color": "#27ae60"
            },
            "approved_by_user": null,
            "timeoff_request_type": null
        },
        {
            "request_uid": "19a30c84-c340-47c8-abd4-2c7e6a1f21ad",
            "request_from": "2021-03-11T22:00:00.000Z",
            "requested_at": "2021-03-10T06:16:34.000Z",
            "request_to": "2021-03-17T06:00:00.000Z",
            "all_day": false,
            "request_reason": "VACATION",
            "request_remarks": "Will be on vacation for a week",
            "approval_status": "APPROVED",
            "approved_at": "2021-03-10T06:42:27.000Z",
            "approval_remarks": "Yes sure",
            "created_at": "2021-03-10T06:16:34.000Z",
            "requested_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": "2020-07-24T02:00:44.000Z",
                "updated_at": "2020-07-24T02:00:44.000Z"
            },
            "requested_by_team": {
                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                "team_name": "development",
                "team_description": null,
                "team_color": "#27ae60"
            },
            "approved_by_user": {
                "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": "2020-07-24T02:00:44.000Z",
                "updated_at": "2020-07-24T02:00:44.000Z"
            },
            "timeoff_request_type": null
        },
        {
            "request_uid": "a79d09a6-dc52-40dd-b082-618d964af8f1",
            "request_from": "2021-03-10T22:00:00.000Z",
            "requested_at": "2021-03-10T06:13:08.000Z",
            "request_to": "2021-03-11T06:00:00.000Z",
            "all_day": false,
            "request_reason": "VACATION",
            "request_remarks": "Will be on vacation fro a week",
            "approval_status": "AWAIT_APPROVAL",
            "approved_at": null,
            "approval_remarks": null,
            "created_at": "2021-03-10T06:13:08.000Z",
            "requested_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": "2020-07-24T02:00:44.000Z",
                "updated_at": "2020-07-24T02:00:44.000Z"
            },
            "requested_by_team": {
                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                "team_name": "development",
                "team_description": null,
                "team_color": "#27ae60"
            },
            "approved_by_user": null,
            "timeoff_request_type": null
        },
        {
            "request_uid": "6e3a6759-63e5-451c-8e7c-d7fda14c4273",
            "request_from": "2021-03-01T22:00:00.000Z",
            "requested_at": "2021-03-01T09:04:23.000Z",
            "request_to": "2021-03-02T06:00:00.000Z",
            "all_day": false,
            "request_reason": "OTHERS",
            "request_remarks": null,
            "approval_status": "REJECTED",
            "approved_at": "2021-03-10T06:43:09.000Z",
            "approval_remarks": "Yes sure",
            "created_at": "2021-03-01T09:04:23.000Z",
            "requested_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": "2020-07-24T02:00:44.000Z",
                "updated_at": "2020-07-24T02:00:44.000Z"
            },
            "requested_by_team": {
                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                "team_name": "test",
                "team_description": "testing",
                "team_color": "#4960a0"
            },
            "approved_by_user": {
                "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": "2020-07-24T02:00:44.000Z",
                "updated_at": "2020-07-24T02:00:44.000Z"
            },
            "timeoff_request_type": null
        }
    ]
}

Fetches all timeoff requests matching the query parameters

HTTP Request

GET /timesheets/request/timeoff

Query Parameters

This endpoint accepts multiple query parameters

Timeoff query param details

Parameter Required Description Type Example
sort false Sort order Enum [ 'ASC', 'DESC']
sort_by false Sort by type Enum [ 'requested_at', 'approval_status']
filter.from_date false Timeoff start date Date 2021-03-01
filter.to_date false Timeoff end date Date 2021-03-31
filter.requested_at false Request date Date 2021-03-15
filter.approval_status false Approval status Enum ['AWAIT_APPROVAL', 'APPROVED', 'REJECTED']
filter.user_uid false User UID String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6
filter.team_uid false Team UID String f545d74e-1ea9-40d3-a063-c9b19d20dada

Create Timeoff Request Availability

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

Example request body:

{
        "timeoff_availability": {
            "year": "2021",
            "remaining_days": 10,
            "request_type": "453835bc-e23c-4ead-a1ad-f65ec41700c4",
            "user_uid": "6862f359-ac89-4482-b20a-53932c3bfe54"
        }
}

On successfull creation of a timeoff availability we get the below response:

{
    "type": "success",
    "title": "TimeOff Availability has been successfully created",
    "message": "The TimeOff Availability has been created successfully.",
    "data": {
        "timeoff_availability_uid": "d070e3be-f900-4d7a-bb1e-6421b157e40c"
    }
}

This endpoint allows us to create new timeoff availability.

HTTP Request

POST /timesheets/request/timeoff_availability

Body Parameters

This endpoint accepts a timeoff availability object

Timeoff Availability Creation Details

Parameter Required Description Type Example
request_type true Request type UID String 453835bc-e23c-4ead-a1ad-f65ec41700c4
user_uid true User UID of the user String 6862f359-ac89-4482-b20a-53932c3bfe54
year true Timeoff availability year String 2021
remaining_days true Remaining days Number 10

Update Timeoff Request Availability

curl "https://<host>/api/timesheets/request/timeoff_availability/<timeoff_availability_uid>" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
        "timeoff_availability": {
            "year": "2021",
            "remaining_days": 20,
            "request_type": "404857fe-c04c-4469-8736-0705e0f8fa77",
            "user_uid": "6862f359-ac89-4482-b20a-53932c3bfe54"
        }
}

On successfull update of a timeoff availability we get the below response:

{
    "type": "success",
    "message": "TimeOff Availability details updated successfully",
    "title": "TimeOff Availability Updated",
    "data": {
        "timeoff_availability_uid": "d070e3be-f900-4d7a-bb1e-6421b157e40c"
    }
}

This endpoint allows us to update timeoff availability.

HTTP Request

PUT /timesheets/request/timeoff_availability/<timeoff_availability_uid>

Body Parameters

This endpoint accepts a timeoff availability object

Timeoff Availability Update Details

Parameter Required Description Type Example
request_type true Request type UID String 404857fe-c04c-4469-8736-0705e0f8fa77
user_uid true User UID of the user String 6862f359-ac89-4482-b20a-53932c3bfe54
year true Timeoff availability year String 2021
remaining_days true Remaining days Number 20

Get Timeoff Availabities

curl "https://<host>/api/timesheets/request/timeoff_availability?&filter.user_uid=<user_uid>&filter.request_type=<request_type_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the timeoff availabilities matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "timeoff_availability_uid": "d070e3be-f900-4d7a-bb1e-6421b157e40c",
            "year": "2021",
            "remaining_days": 20,
            "created_at": "2021-03-10T10:06:21.000Z",
            "user": {
                "user_uid": "6862f359-ac89-4482-b20a-53932c3bfe54",
                "first_name": "John",
                "last_name": "Doe",
                "email": "[email protected]",
                "home_phone_number": "987654321",
                "designation": "developer",
                "emp_code": "001",
                "work_phone_number": "987654321",
                "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "timeoff_request_type": {
                "timeoff_request_type_uid": "453835bc-e23c-4ead-a1ad-f65ec41700c4",
                "name": "Casual leave",
                "type": "PAID",
                "no_of_days_per_year": 40,
                "is_deleted": false,
                "created_at": "2021-03-10T10:03:02.000Z",
                "updated_at": "2021-03-10T10:03:02.000Z"
            }
        },
        {
            "timeoff_availability_uid": "66b4971e-496f-464e-9b9c-1a4b449b22fe",
            "year": "2021",
            "remaining_days": 20,
            "created_at": "2021-03-10T10:18:58.000Z",
            "user": {
                "user_uid": "7af6909b-9ede-4487-8d84-55ae0e991af8",
                "first_name": "John",
                "last_name": "Wick",
                "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
            },
            "timeoff_request_type": {
                "timeoff_request_type_uid": "404857fe-c04c-4469-8736-0705e0f8fa77",
                "name": "Vacation Leave",
                "type": "PAID",
                "no_of_days_per_year": 20,
                "is_deleted": false,
                "created_at": "2021-03-10T10:03:29.000Z",
                "updated_at": "2021-03-10T10:03:29.000Z"
            }
        }
    ]
}

Fetches all timeoff availabilities of users matching the query parameters

HTTP Request

GET /timesheets/request/timeoff_availability

Query Parameters

This endpoint accepts multiple filters as a query parameters

Job query param details

Parameter Required Description Type Example
filter.request_type false Filter by request type UID String 453835bc-e23c-4ead-a1ad-f65ec41700c4
filter.user_uid false Filter by User UID String 6862f359-ac89-4482-b20a-53932c3bfe54

Delete Timeoff Availability

curl "https://<host>/api/timesheets/request/timeoff_availability/<timeoff_availability_uid>" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

Timeoff Availability with the specific timeoff_availability_uid is deleted:

{
    "type": "success",
    "message": "TimeOff Availability deleted successfully"
}

Deletes a timeoff availability matching the timeoff_availability_uid

HTTP Request

DELETE /timesheets/request/timeoff_availability/<timeoff_availability_uid>

Get Timesheet locations

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

We get the timesheet locations:

{
    "type": "success",
    "data": [
        {
            "location_uid": "e94bf935-bc60-4f07-aa06-5dbc61718a0a",
            "location_name": "Guindy",
            "latitude": 13.0067,
            "longitude": 80.2206,
            "address": "Plot No. 1 Guindy, SIDCO Industrial Estate, Chennai, Tamil Nadu 600032",
            "radius": 200,
            "created_at": "2021-03-09T08:04:03.000Z"
        },
        {
            "location_uid": "b759fb15-d45c-43bb-8be0-06d9df486d4e",
            "location_name": "TNagar",
            "latitude": 13.0418,
            "longitude": 80.2341,
            "address": "Prakasam St, Gangai Karai Puram, T. Nagar, Chennai, Tamil Nadu 600017",
            "radius": 200,
            "created_at": "2021-03-09T08:05:41.000Z"
        }
    ]
}

Fetches all timesheet locations

HTTP Request

GET /timesheet/location

Create User Shifts

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

Example request body:

{
  "user_shifts": [
    {
      "shift_label": "day",
      "shift_remarks": "day shift",
      "start_date_time": "2021-03-10T03:30:00.000Z",
      "end_date_time": "2021-03-10T11:30:00.000Z",
      "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
      "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
    },
    {
      "shift_label": "night",
      "shift_remarks": "night shift",
      "start_date_time": "2021-03-11T03:30:00.000Z",
      "end_date_time": "2021-03-11T11:30:00.000Z",
      "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
      "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
    }
  ]
}

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

{
    "type": "success",
    "title": "User Shift has been successfully created",
    "message": "The User Shift has been created successfully.",
    "data": {
        "shift_uid": [
            "c6cfda8f-d97a-4790-8e15-4cc4867c73ba",
            "df1450f9-f258-47c7-b606-395a6f164f11"
        ]
    }
}

This endpoint allows us to create new user shifts.

HTTP Request

POST /timesheet/user_shifts

Body Parameters

This endpoint accepts a list of user shift objects

A single user shift object details

Parameter Required Description Type Example
shift_label false Label for shift String day
shift_remarks false Remarks for the shift String day shift
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
start_date_time true User shift from Datetime 2021-03-10T03:30:00.000Z
end_date_time true User shift till Datetime 2021-03-10T11:30:00.000Z

Update User Shift

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

Example request body:

{
  "user_shift": 
    {
      "shift_label": "day updated",
      "shift_remarks": "day shift updated",
      "start_date_time": "2021-03-10T03:30:00.000Z",
      "end_date_time": "2021-03-10T11:30:00.000Z",
      "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
      "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
    }
}

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

{
    "type": "success",
    "message": "User Shift details updated successfully",
    "title": "User Shift Updated",
    "data": {
        "shift_uid": "c6cfda8f-d97a-4790-8e15-4cc4867c73ba"
    }
}

This endpoint allows us to update user shift.

HTTP Request

PUT /timesheet/user_shifts/<user_shift_uid>

Body Parameters

This endpoint accepts a user shift object

A user shift update details

Parameter Required Description Type Example
shift_label false Label for shift String day
shift_remarks false Remarks for the shift String day shift
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
start_date_time true User shift from Datetime 2021-03-10T03:30:00.000Z
end_date_time true User shift till Datetime 2021-03-10T11:30:00.000Z

Activate / Deactivate User Shift

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

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

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

This endpoint allows us to activate / deactivate a user shift.

HTTP Request

PUT /timesheet/user_shifts/<user_shift_uid>/activate

Query Parameters

This endpoint accepts activation object as query parameter

Service Contract Activation Details

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

Update User Shift Status

curl "https://<host>/api/timesheet/user_shifts/<user_shift_uid>/status?approval_status=<status_flag>&approval_remarks=<approval_remarks>" \
  -X PUT \
  -H "Authorization: Bearer <token>"

On successfull status update of user shift we get the below response:

{
    "type": "success",
    "title": "User Shift Status updated successfully",
    "message": "User Shift Status updated successfully",
    "data": {
        "shift_uid": "c6cfda8f-d97a-4790-8e15-4cc4867c73ba"
    }
}

This endpoint allows us to update status of a user shift.

HTTP Request

PUT /timesheet/user_shifts/<user_shift_uid>/status

Query Parameters

This endpoint accepts multiple as a query parameters

User shift status query param details

Parameter Required Description Type Example
approval_status true User shift approval status Enum [ 'true', 'false' ]
aprroval remarks true User shift approval remakrs String Approved

Get User Shifts

curl "https://<host>/api/timesheet/user_shifts?filter.user_uid=<user_uid>&filter.team_uid=<team_uid>&filter.is_approved=<is_approved>&filter.is_active=<is_active>&filter.start_date_time=<start_date_time>&filter.end_date_time=<end_date_time>&start_date=<start_date>&end_date=<end_date>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the user shifts matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "shift_uid": "c6cfda8f-d97a-4790-8e15-4cc4867c73ba",
            "start_date_time": "2021-03-10T03:30:00.000Z",
            "end_date_time": "2021-03-10T11:30:00.000Z",
            "shift_label": "day updated",
            "shift_remarks": "day shift updated",
            "is_approved": true,
            "approval_remarks": "approved",
            "approved_at": "2021-03-10T07:30:39.000Z",
            "is_deleted": false,
            "is_active": true,
            "created_at": "2021-03-10T07:00:24.000Z",
            "created_by_user": {
                "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
            },
            "user_details": {
                "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
            },
            "approval_by_user": {
                "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
            },
            "team": {
                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                "team_name": "development",
                "team_color": "#27ae60",
                "team_description": null,
                "is_active": true,
                "is_deleted": false,
                "created_at": "2020-07-31T09:24:13.000Z"
            }
        },
        {
            "shift_uid": "df1450f9-f258-47c7-b606-395a6f164f11",
            "start_date_time": "2021-03-11T03:30:00.000Z",
            "end_date_time": "2021-03-11T11:30:00.000Z",
            "shift_label": "night",
            "shift_remarks": "night shift",
            "is_approved": true,
            "approval_remarks": null,
            "approved_at": "2021-03-10T07:00:24.000Z",
            "is_deleted": false,
            "is_active": true,
            "created_at": "2021-03-10T07:00:24.000Z",
            "created_by_user": {
                "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
            },
            "user_details": {
                "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
            },
            "approval_by_user": null,
            "team": {
                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                "team_name": "development",
                "team_color": "#27ae60",
                "team_description": null,
                "is_active": true,
                "is_deleted": false,
                "created_at": "2020-07-31T09:24:13.000Z"
            }
        },
        {
            "shift_uid": "4362e181-9605-48c3-be4b-d9d4dcc6c181",
            "start_date_time": "2021-03-12T03:30:00.000Z",
            "end_date_time": "2021-03-12T11:30:00.000Z",
            "shift_label": "day",
            "shift_remarks": "day shift",
            "is_approved": true,
            "approval_remarks": null,
            "approved_at": "2021-03-10T07:00:24.000Z",
            "is_deleted": false,
            "is_active": true,
            "created_at": "2021-03-10T07:00:24.000Z",
            "created_by_user": {
                "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
            },
            "user_details": {
                "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
            },
            "approval_by_user": null,
            "team": {
                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                "team_name": "development",
                "team_color": "#27ae60",
                "team_description": null,
                "is_active": true,
                "is_deleted": false,
                "created_at": "2020-07-31T09:24:13.000Z"
            }
        },
        {
            "shift_uid": "80ffe8e7-66aa-4e58-a03e-8eec33a4761f",
            "start_date_time": "2021-02-10T03:30:00.000Z",
            "end_date_time": "2021-02-10T11:30:00.000Z",
            "shift_label": "day",
            "shift_remarks": null,
            "is_approved": true,
            "approval_remarks": null,
            "approved_at": "2021-03-10T07:07:10.000Z",
            "is_deleted": false,
            "is_active": true,
            "created_at": "2021-03-10T07:07:10.000Z",
            "created_by_user": {
                "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
            },
            "user_details": {
                "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
            },
            "approval_by_user": null,
            "team": {
                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                "team_name": "development",
                "team_color": "#27ae60",
                "team_description": null,
                "is_active": true,
                "is_deleted": false,
                "created_at": "2020-07-31T09:24:13.000Z"
            }
        },
        {
            "shift_uid": "69b8f144-a9d4-4b38-be92-cd6cb55fb81b",
            "start_date_time": "2021-02-11T03:30:00.000Z",
            "end_date_time": "2021-02-11T11:30:00.000Z",
            "shift_label": null,
            "shift_remarks": null,
            "is_approved": true,
            "approval_remarks": null,
            "approved_at": "2021-03-10T07:07:29.000Z",
            "is_deleted": false,
            "is_active": true,
            "created_at": "2021-03-10T07:07:29.000Z",
            "created_by_user": {
                "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
            },
            "user_details": {
                "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
            },
            "approval_by_user": null,
            "team": {
                "team_uid": "f545d74e-1ea9-40d3-a063-c9b19d20dada",
                "team_name": "development",
                "team_color": "#27ae60",
                "team_description": null,
                "is_active": true,
                "is_deleted": false,
                "created_at": "2020-07-31T09:24:13.000Z"
            }
        }
    ]
}

Fetches all user shifts matching the query parameters

HTTP Request

GET /timesheet/user_shifts

Query Parameters

This endpoint accepts multiple filters as a query parameters

User shift query param details

Parameter Required Description Type Example
filter.user_uid false filter by user UID String b40998c0-7275-11eb-94ba-8b7293d62475
filter.team_uid false filter by team UID String b40998c0-7275-11eb-94ba-8b7293d62475
filter.is_approved false Filter by approval Boolean 0 or 1
filter.is_active false Filter by status Boolean 0 or 1
filter.start_date_time false Filter by user shift start date time Datetime 2021-02-11T03:30:00.000Z
filter.end_date_time false Filter by user shift end date time Datetime 2021-02-11T11:30:00.000Z
filter.start_date false Filter by juser shift start date Date 2021-02-11
filter.end_date false Filter by user shift end date Date 2021-02-11

Delete User Shift

curl "https://<host>/api/timesheet/user_shifts/<user_shift_uid>" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

User Shift with the specific user_shift_uid is deleted:

{
    "type": "success",
    "message": "User Shift deleted successfully"
}

Deletes a user shift matching the user_shift_uid

HTTP Request

DELETE /timesheet/user_shifts/<user_shift_uid>

Quotes

Create Quote

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

Example request body:

{
    "estimate": {
        "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "customer_billing_address": {
            "street": "Plot No. 1 Guindy, SIDCO Industrial Estate",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600032"
        },
        "job": "5dce9a90-7285-11eb-94ba-8b7293d62475",
        "reference_no": "1",
        "expiry_date": "2021-03-30 18:30:00",
        "estimate_date": "2021-03-09 18:30:00",
        "remarks" : "Sample remark",
        "tags" : ["New", "Full Fields"],
        "template": "30eab810-d717-11ea-a08f-bbfc0e8cd85a",
        "line_items": [
            {
                "product_id": "1",
                "product_uid": "feb546c0-d249-11ea-a93d-9d89059ce1aa",
                "name": "bolt",
                "product_type": "PARTS",
                "unit_price": 30,
                "quantity": 1,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 30
            }
        ],
        "sub_total": 30,
        "attachments": [
            {
                "file_name": "Quote Image",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf219bec/4e1a039b10fd9f8r23960e9.jpg"
            }
        ],
        "notes": [
            {
                "content": "Note to estimate",
                "is_private": true
            }
        ],
        "discount": {
            "type": "PERCENTAGE",
            "percent": 2
        },
        "tax": [
            {
                "tax_uid": "c991d520-8195-11eb-b28b-b10fd9f860e9"
            }
        ],
        "custom_fields": [
            {
                "label": "Quote type",
                "value": "Manual service"
            }
        ],
        "deposit": {
            "total": 100,
            "status": "COLLECTED"
        }
    }
}

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

{
    "type": "success",
    "message": "Estimate created successfully",
    "data": {
        "estimate_uid": "c19c3710-8196-11eb-b28b-b10fd9f860e9"
    }
}

This endpoint allows us to create a new quote.

HTTP Request

POST /estimate

Body Parameters

This endpoint accepts a estimate object

Estimate Creation Details

Parameter Required Description Type Example
customer true Customer UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54
customer_billing_address true Customer billing address String REFER CUSTOMER ADDRESS DETAILS
job false Job UID String 5dce9a90-7285-11eb-94ba-8b7293d62475
reference_no false Reference number for the quote Number 1
expiry_date true Expiry date for quote in UTC Datetime 2021-03-30 18:30:00
estimate_date true Date of quote in UTC Datetime 2021-03-09 18:30:00
remarks false Remarks for quote String Sample remarks
tags false Tags for quote List ["New", "Full Fields"]
template true Quote template UID String 30eab810-d717-11ea-a08f-bbfc0e8cd85a
line_items false Line items in quote List of Objects REFEER LINE ITEM DETAILS
sub_total false Subtotal of quote Number 30
attachments false Attachements for quote List of Objects REFER ATTACHMENT DETAILS
notes false Notes for quotes List of Objects REFER NOTE DETAILS
discount false Discount on quote Object REFER DISCOUNT DETAILS
tax false Taxes applied on quote List of Objects REFER TAX DETAILS
custom_fields true Custom fields for quote List of Objects REFER CUSTOM FIELD DETAILS
deposit false Deposit for qoute Object REFER DEPOSIT 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 line item details

Parameter Required Description Type Example
product_id false Product id of line item Number 1
product_uid false Product UID of line item Number feb546c0-d249-11ea-a93d-9d89059ce1aa
name false Line item name String bolt
image false Image URL of the line item String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/45/60e9.jpg
brand false Brand of line item String Bolt Company
specification false Specification of line item String To fix and fit
description false Description of line item String Manual service
unit_price true Unit price of line item Number 30
quantity true Quantity of line item Number 1
discount false Discount on line item Number 3
discount_type false Discount type in line item Enum ['FIXED', 'PERCENTAGE']
location_uid false Location UID of line item String debee740-d249-11ea-a93d-9d89059ce1aa
location_name false Location name of line item String India
total false Total amount on line item Number 30

A single line tax details

Parameter Required Description Type Example
tax_uid true Tax UID String c991d520-8195-11eb-b28b-b10fd9f860e9

A single attachment details

Parameter Required Description Type Example
file_name true Name of the attachment String Quote Image
url true URL of the attachment String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf219bec/4e1a039b10fd9f8r23960e9.jpg

A single note Details

Parameter Required Description Type Example
content true Notes content String Note to estimate
is_private false Whether note is private Booelan true or false

Discount Details

Parameter Required Description Type Example
type true Type of discount Enum ['FIXED', 'PERCENTAGE']
percent true Percentage of discount Number 2
value true Value if percentage type is fixed Number 20

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

Deposit details

Parameter Required Description Type Example
total true Deposit total Number 100
status true Deposit status Enum ["COLLECTED", "NOT_COLLECTED"]

Update Quote

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

Example request body:

{
    "estimate": {
        "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "customer_billing_address": {
            "street": "Plot No. 1 Guindy, SIDCO Industrial Estate",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600032"
        },
        "job": "5dce9a90-7285-11eb-94ba-8b7293d62475",
        "reference_no": "2",
        "expiry_date": "2021-04-30 18:30:00",
        "estimate_date": "2021-03-09 18:30:00",
        "template": "06b602d0-d6f3-11ea-939d-2f7e50296e29",
        "line_items": [
            {
                "product_id": "2",
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                "name": "nut",
                "product_type": "SERVICES",
                "unit_price": 20,
                "quantity": 1,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 20
            }
        ],
        "sub_total": 20,
        "attachments": [
            {
                "file_name": "Quote Image Updated",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf219bec/4e1a039b10fd9f8r23960e9.jpg"
            }
        ],
        "notes": [
            {
                "content": "Note to estimate",
                "is_private": true
            }
        ],
        "discount": {
            "type": "PERCENTAGE",
            "percent": 2
        },
        "tax": [
            {
                "tax_uid": "c991d520-8195-11eb-b28b-b10fd9f860e9"
            }
        ],
        "custom_fields": [
            {
                "label": "Quote description",
                "value": "Manual service"
            }
        ],
        "deposit": {
            "total": 100,
            "status": "COLLECTED"
        }
    }
}

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

{
    "type": "success",
    "message": "Estimate Updated",
    "data": {
        "estimate_uid": "9807f900-819d-11eb-b28b-b10fd9f860e9"
    }
}

This endpoint allows us to update a quote only until it is sent to customer.

HTTP Request

PUT /estimate/<estimate_uid>

Body Parameters

This endpoint accepts a estimate object

Estimate Update Details

Parameter Required Description Type Example
customer true Customer UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54
customer_billing_address true Customer billing address String REFER CUSTOMER ADDRESS DETAILS
job false Job UID String 5dce9a90-7285-11eb-94ba-8b7293d62475
reference_no false Reference number for the quote Number 1
expiry_date true Expiry date for quote in UTC Datetime 2021-03-30 18:30:00
estimate_date true Date of quote in UTC Datetime 2021-03-09 18:30:00
template true Quote template UID String 30eab810-d717-11ea-a08f-bbfc0e8cd85a
line_items false Line items in quote List of Objects REFEER LINE ITEM DETAILS
sub_total false Subtotal of quote Number 30
attachments false Attachements for quotes List of Objects REFER ATTACHMENT DETAILS
notes false Notes for quotes List of Objects REFER NOTE DETAILS
discount false Discount on quote Object REFER DISCOUNT DETAILS
tax false Taxes applied on quote List of Objects REFER TAX DETAILS
custom_fields true Custom fields for quotes List of Objects REFER CUSTOM FIELD DETAILS
deposit false Deposit for qoute Object REFER DEPOSIT 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 line item details

Parameter Required Description Type Example
product_id false Product id of line item Number 1
product_uid false Product UID of line item Number feb546c0-d249-11ea-a93d-9d89059ce1aa
name false Line item name String bolt
image false Image URL of the line item String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/45/60e9.jpg
brand false Brand of line item String Bolt Company
specification false Specification of line item String To fix and fit
description false Description of line item String Manual service
unit_price true Unit price of line item Number 30
quantity true Quantity of line item Number 1
discount false Discount on line item Number 3
discount_type false Discount type in line item Enum ['FIXED', 'PERCENTAGE']
location_uid false Location UID of line item String debee740-d249-11ea-a93d-9d89059ce1aa
location_name false Location name of line item String India
total false Total amount on line item Number 30

A single line tax details

Parameter Required Description Type Example
tax_uid true Tax UID String c991d520-8195-11eb-b28b-b10fd9f860e9

A single attachment details

Parameter Required Description Type Example
file_name true Name of the attachment String Quote Image
url true URL of the attachment String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf219bec/4e1a039b10fd9f8r23960e9.jpg

A single note Details

Parameter Required Description Type Example
content true Notes content String Note to estimate
is_private false Whether note is private Booelan true or false

Discount Details

Parameter Required Description Type Example
type true Type of discount Enum ['FIXED', 'PERCENTAGE']
percent true Percentage of discount Number 2
value true Value if percentage type is fixed Number 20

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

Deposit details

Parameter Required Description Type Example
total true Deposit total Number 100
status true Deposit status Enum ["COLLECTED", "NOT_COLLECTED"]

Update Status Of Quote

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

Example request body:

{

    "estimate_status": "ARCHIVED",
    "remarks": "The quote is archived",
    "customer_signature": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/46989bec/4e1a90e9.jpg"

}

On successfull status update of a quote we get the below response:

{
    "type": "success",
    "message": "Quote Status Updated",
    "data": {
        "estimate_uid": "9807f900-819d-11eb-b28b-b10fd9f860e9"
    }
}

This endpoint allows us to update status of a quote.

HTTP Request

PUT /estimate/<estimate_uid>/status

Body Parameters

This endpoint accepts a estimate status object

Estimate Status Details

Parameter Required Description Type Example
estimate_status true Status of estimate Enum ['DRAFT', 'AWAIT_RESPONSE', 'APPROVED', 'DECLINED', 'ARCHIVED', 'CLOSED', 'CANCELED', 'REQUEST_CHANGE']
remarks false Remarks for status String The quote is archived
customer_signature false Customer signature URL Number https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/46989bec/4e1a90e9.jpg

Add quote attachments

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

Example request body:

{
    "estimate": {
        "notes": {
            "content": "Note to estimate",
            "is_private": true
        },
        "attachments": {
            "file_name": "Quote attachment",
            "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4691a90e9.pdf"
        }
    }
}

On successfull addition of a note / attachment to a quote we get the below response:

{
    "type": "success",
    "message": "Estimate Note / attachment added",
    "data": {
        "estimate_uid": "9807f900-819d-11eb-b28b-b10fd9f860e9"
    }
}

This endpoint allows us to add note / attachment to a quote.

HTTP Request

POST /estimate/<estimate_uid>/note_attachment

Body Parameters

This endpoint accepts a note / attachment object

Estimate Note/Attachment Details

Parameter Required Description Type Example
notes false Notes for quote Object REFER NOTE DETAILS
attachments false Attachments for quote Object REFER ATTACHMENT DETAILS

Note Details

Parameter Required Description Type Example
content true Notes content String Note to estimate
is_private false Whether note is private Booelan true or false

Attachment Details

Parameter Required Description Type Example
file_name true Name of attachment String Quote attachment
url true Attachment URL String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4691a90e9.pdf

Collect Deposit

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

Example request body:

{
    "deposit": {
        "total": 100,
        "collected": 100,
        "status": "COLLECTED",
        "collected_at": "2021-07-14",
        "payment_mode_uid": "983fecc0-db9f-11e9-a35c-3301ecc1dbf7",
        "remarks": "Test",
        "reference_no": "FVA55156"
    }
}

On successfully collecting deposit for a quote we get the below response:

{
    "type": "success",
    "message": "Quote Deposit Updated Successfully",
    "data": {
        "estimate_uid": "6296fe50-e6d4-11eb-8c56-9ff5d768059e"
    }
}

This endpoint allows us to collect deposit for a quote.

HTTP Request

PUT /estimate/<estimate_uid>/deposit

Body Parameters

This endpoint accepts a deposit object

Estimate Deposit Details

Parameter Required Description Type Example
total true Total amount Number 100
collected true Collected amount Number 100
status true Deposit status Enum ["COLLECTED", "NOT_COLLECTED"]
payment_mode_uid true Payment mode UID String 983fecc0-db9f-11e9-a35c-3301ecc1dbf7
collected_at false Deposit collection date Date 2021-07-14
remarks false Deposit remarks String This is a remark for deposit
reference_no false Deposit reference number String FVA55156

Get Quotes

curl "https://<host>/api/estimate?count=<count_number>&filter.created_by=<created_by>&filter.created_from_date=<created_from_date>&filter.created_to_date=<created_to_date>&filter.estimate_from_date=<estimate_from_date>&filter.estimate_to_date=<estimate_to_date>&filter.expiry_from_date=<expiry_from_date>&filter.expiry_to_date=<expiry_to_date>&filter.is_converted=<is_converted_flag>&filter.is_expired=<is_expired_flag>&filter.estimate_uid=<estimate_uid>&filter.customer=<cutomer_uid>&filter.job=<job_uid>&filter.keyword=<keyword>&filter.status=<status>&page=<page_number>&sort=<sort_order>&sort_by=<sort_by>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the quotes matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "total": 230.6,
            "estimate_status": "ARCHIVED",
            "is_expired": false,
            "is_converted": false,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_first_name": "Edwin ",
                "customer_last_name": "Catmull",
                "customer_company_name": "pixar",
                "customer_email": "[email protected]",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "92rj5tt6-cd52-11ea-9c09-f5d3c9145a54"
            },
            "reference_no": "5",
            "expiry_date": "2021-03-29T18:30:00.000Z",
            "estimate_date": "2021-03-08T18:30:00.000Z",
            "estimate_uid": "9807f900-819d-11eb-b28b-b10fd9f860e9",
            "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
            },
            "created_at": "2021-03-10T12:39:02.596Z",
            "updated_at": "2021-03-10T12:55:40.751Z",
            "estimate_no": 27
        },
        {
            "total": 102,
            "estimate_status": "CLOSED",
            "is_expired": false,
            "is_converted": false,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_first_name": "Walt",
                "customer_last_name": "Disney",
                "customer_company_name": "disney",
                "customer_email": "[email protected]",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "ff550f90-cd52-1tea-9c09-f5d3c9145a54"
            },
            "expiry_date": "2021-03-29T13:00:00.000Z",
            "estimate_date": "2021-03-09T13:00:00.000Z",
            "estimate_uid": "057882f0-819b-11eb-b28b-b10fd9f860e9",
            "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
            },
            "created_at": "2021-03-10T12:20:37.690Z",
            "updated_at": "2021-03-10T13:22:19.325Z",
            "estimate_no": 26
        },
        {
            "total": 40,
            "estimate_status": "DRAFT",
            "is_expired": false,
            "is_converted": false,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_first_name": "Richard",
                "customer_last_name": "McDonald",
                "customer_company_name": "McDonalds",
                "customer_email": "[email protected]",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "55y670f90-cd52-11ea-9c09-f5d3c9145a54"
            },
            "reference_no": "4",
            "expiry_date": "2021-03-30T13:00:00.000Z",
            "estimate_date": "2021-03-09T13:00:00.000Z",
            "estimate_uid": "b09e35f0-8199-11eb-b28b-b10fd9f860e9",
            "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
            },
            "created_at": "2021-03-10T12:11:05.829Z",
            "updated_at": "2021-03-10T12:11:05.831Z",
            "estimate_no": 25
        },
        {
            "total": 35,
            "estimate_status": "DRAFT",
            "is_expired": false,
            "is_converted": false,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_first_name": "Harry",
                "customer_last_name": "Warner",
                "customer_company_name": "WarnerBros",
                "customer_email": "[email protected]",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "hf040f70-cd52-11ea-9c79-f5d3c9145a54"
            },
            "reference_no": "3",
            "expiry_date": "2021-03-30T13:00:00.000Z",
            "estimate_date": "2021-03-09T13:00:00.000Z",
            "estimate_uid": "9534ffb0-8199-11eb-b28b-b10fd9f860e9",
            "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
            },
            "created_at": "2021-03-10T12:10:19.849Z",
            "updated_at": "2021-03-10T12:10:19.855Z",
            "estimate_no": 24
        },
        {
            "total": 67.8,
            "estimate_status": "DRAFT",
            "is_expired": false,
            "is_converted": false,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_last_name": "Gates",
                "customer_company_name": "Microsoft",
                "customer_email": "[email protected]",
                "customer_first_name": "Bill",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "66040f90-cd52-11ea-9c44-f5d3c9145a54"
            },
            "reference_no": "2",
            "expiry_date": "2021-03-30T13:00:00.000Z",
            "estimate_date": "2021-03-09T13:00:00.000Z",
            "estimate_uid": "6c4bf9f0-8199-11eb-b28b-b10fd9f860e9",
            "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
            },
            "created_at": "2021-03-10T12:09:11.206Z",
            "updated_at": "2021-03-10T12:09:11.209Z",
            "estimate_no": 23
        }
    ],
    "total_records": 27,
    "current_page": 1,
    "total_pages": 6
}

Fetches all quotes matching the query parameters

HTTP Request

GET /estimate

Query Parameters

This endpoint accepts multiple filters as a query parameters

Quote query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
count true No of quotes per page Number Any number
sort false sort order Enum ['ASC', 'DESC']
sort_by false sort by type Enum ['estimate_no', 'reference_no', 'estimate_date', 'created_at']
filter.estimate_from_date false Filter by estimate from date Date 2021-02-19
filter.estimate_to_date false Filter by estimate to date Date 2021-03-19
filter.expiry_from_date false Filter by expiry from date Date 2021-02-19
filter.expiry_to_date false Filter by expiry to date Date 2021-03-19
filter.created_from_date false Filter by created from date Date 2021-02-19
filter.created_to_date false Filter by created to date Date 2021-03-19
filter.is_converted false Filter by conversion Boolean true or false
filter.is_expired false Filter by expiry Boolean true or false
filter.is_deleted false Filter by deleted Boolean true or false
filter.is_active false Filter by active Boolean true or false
filter.created_by false Filter by created user UIDs Comma Seperated String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6, 59776597-ff79-4a6f-92da-784bab6274bc
filter.status false Filter by quote status Comma Seperated Enum DRAFT, AWAIT_RESPONSE, APPROVED, DECLINED, ARCHIVED, CLOSED, CANCELED
filter.keyword false Filter by search query. Searches for estimate number, reference number String Any valid string
filter.team_uid false Filter by team UIDs Comma Seperated String c4ae9119-622f-4285-b517-d0f5c198b53f, 60a93308-4fac-496c-a6f7-e709d89d08ac
filter.estimate_uid false Filter by estimate UIDs Comma Seperated String 6c4bf9f0-8199-11eb-b28b-b10fd9f860e9, 55516a00-d717-11ea-a08f-bbfc0e8cd85a
filter.customer false Filter by customer UIDs Comma Seperated String 08e254e0-d262-11ea-bfd6-85ede87cf0ee, 09459550-d659-11ea-939d-2f7e50296e29
filter.job false Filter by job UIDs Comma Seperated String 20b4f4d0-d33c-11ea-ad37-5728dd5f9dc8, cebde4f0-cd84-11ea-8e1c-690eb1dee1e7
filter.organization false Filter by organization UIDs Comma Seperated String 2b7005b0-61ec-11eb-be1a-5f41b7fdd76b, 458bfb70-61ec-11eb-be1a-5f41b7fdd76b
filter.property false Filter by property UIDs Comma Seperated String b48bb210-6203-11eb-915b-e306107ad87d, d8308380-d265-11eb-9cb1-018a2c669645
filter.custom_field false Filter by custom field Json Stringified REFER CUSTOM FIELD DETAILS

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 Quote Templates

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

We get the quote and invoice templates:

{
    "type": "success",
    "data": [
        {
            "is_deleted": false,
            "type": "INVOICE",
            "template_name": "test",
            "template": " {{invoice_no}}  {{customer.customer_first_name}}  {{customer.customer_last_name}} ",
            "template_description": "invoice template",
            "template_uid": "06b602d0-d6f3-11ea-939d-2f7e50296e29",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199450f6",
                "first_name": "John",
                "last_name": "Wick",
                "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
            },
            "created_at": "2020-08-05T08:09:46.622Z",
            "updated_at": "2020-08-05T08:09:46.623Z"
        },
        {
            "is_deleted": false,
            "type": "ESTIMATE",
            "template_name": "test quote",
            "template": " {{estimate_no}}  {{customer.customer_first_name}} ",
            "template_description": "quotation template",
            "template_uid": "30eab810-d717-11ea-a08f-bbfc0e8cd85a",
            "created_by": {
                "user_uid": "9d0a4bd7-8424-4bcc-abd9-5731199450f6",
                "first_name": "John",
                "last_name": "Wick",
                "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
            },
            "created_at": "2020-08-05T12:28:39.314Z",
            "updated_at": "2020-08-05T12:28:39.316Z"
        }
    ]
}

Fetches all quote and invoice templates

HTTP Request

GET /invoice_estimate/template

Invoices

Create Invoice

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

Example request body:

{
    "invoice": {
        "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "customer_billing_address": {
            "street": "Rajaji Avenue Annexe",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600087"
        },
        "job": "5dce9a90-7285-11eb-94ba-8b7293d62475",
        "prefix": "In",
        "reference_no": "1",
        "invoice_date": "2021-03-11 00:00:00",
        "payment_term": "166fbcc0-d6f3-11ea-939d-2f7e50296e29",
        "due_date": "2021-04-10 00:00:00",
        "template": "06b602d0-d6f3-11ea-939d-2f7e50296e29",
        "remarks": "Sample remarks",
        "tags": [
            "labels",
            " test"
        ],
        "line_items": [
            {
                "product_id": "1",
                "product_uid": "feb546c0-d249-11ea-a93d-9d89059ce1aa",
                "name": "bolt",
                "product_type": "PARTS",
                "unit_price": 30,
                "quantity": 5,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 150
            },
            {
                "product_id": "2",
                "prefix": "e",
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                "name": "Nut",
                "product_type": "PARTS",
                "unit_price": 20,
                "quantity": 2,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 40
            }
        ],
        "attachments": [
            {
                "file_name": "This is the image for invoice",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4deb-9605-3ccccf219bec/fcb6c8c0-823f-11eb-9616-f5af9492c1aa.jpg"
            }
        ],
        "notes": [
            {
                "content": "Note to invoice",
                "is_private": true
            }
        ],
        "discount": {
            "type": "PERCENTAGE",
            "percent": 2
        },
        "sub_total": 190,
        "tax": [
            {
                "tax_uid": "c991d520-8195-11eb-b28b-b10fd9f860e9"
            }
        ],
        "custom_fields": [
            {
                "label": "Invoice type",
                "value": "Manual service"
            }
        ]
    }
}

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

{
    "type": "success",
    "message": "Invoice created successfully",
    "data": {
        "invoice_uid": "eaf12750-8241-11eb-9616-f5af9492c1aa"
    }
}

This endpoint allows us to create a new invoice.

HTTP Request

POST /invoice

Body Parameters

This endpoint accepts a invoice object

Invoice Creation Details

Parameter Required Description Type Example
customer true Customer UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54
customer_billing_address true Customer billing address String REFER CUSTOMER ADDRESS DETAILS
job false Job UID String 5dce9a90-7285-11eb-94ba-8b7293d62475
prefix false Prefix for invoice String In
reference_no false Reference number for the invoice Number 1
invoice_date true Date of invoice in UTC Datetime 2021-03-09 18:30:00
payment_term true Payment term UID String 166fbcc0-d6f3-11ea-939d-2f7e50296e29
remarks false Remarks for invoice String Sample remarks
tags false Tags for invoice List ["New", "Full Fields"]
template true Invoice template UID String 30eab810-d717-11ea-a08f-bbfc0e8cd85a
line_items false Line items in invoice List of Objects REFEER LINE ITEM DETAILS
sub_total false Subtotal of invoice Number 30
attachments false Attachements for invoice List of Objects REFER ATTACHMENT DETAILS
notes false Notes for invoice List of Objects REFER NOTE DETAILS
discount false Discount on invoice Object REFER DISCOUNT DETAILS
tax false Taxes applied on invoice List of Objects REFER TAX DETAILS
custom_fields true Custom fields for invoice List of Objects 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 line item details

Parameter Required Description Type Example
product_id false Product id of line item Number 1
product_uid false Product UID of line item Number feb546c0-d249-11ea-a93d-9d89059ce1aa
name false Line item name String bolt
image false Image URL of the line item String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/45/60e9.jpg
brand false Brand of line item String Bolt Company
specification false Specification of line item String To fix and fit
description false Description of line item String Manual service
unit_price true Unit price of line item Number 30
quantity true Quantity of line item Number 1
discount false Discount on line item Number 3
discount_type false Discount type in line item Enum ['FIXED', 'PERCENTAGE']
location_uid false Location UID of line item String debee740-d249-11ea-a93d-9d89059ce1aa
location_name false Location name of line item String India
total false Total amount on line item Number 30

A single line tax details

Parameter Required Description Type Example
tax_uid true Tax UID String c991d520-8195-11eb-b28b-b10fd9f860e9

A single attachment details

Parameter Required Description Type Example
file_name true Name of the attachment String Quote Image
url true URL of the attachment String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf219bec/4e1a039b10fd9f8r23960e9.jpg

A single note Details

Parameter Required Description Type Example
content true Notes content String Note to estimate
is_private false Whether note is private Booelan true or false

Discount Details

Parameter Required Description Type Example
type true Type of discount Enum ['FIXED', 'PERCENTAGE']
percent true Percentage of discount Number 2
value true Value if percentage type is fixed Number 20

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 Invoice

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

Example request body:

{
    "invoice": {
        "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "customer_billing_address": {
            "street": "Rajaji Avenue Annexe",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600087"
        },
        "job": "5dce9a90-7285-11eb-94ba-8b7293d62475",
        "prefix": "In",
        "reference_no": "2",
        "invoice_date": "2021-03-11 00:00:00",
        "payment_term": "166fbcc0-d6f3-11ea-939d-2f7e50296e29",
        "due_date": "2021-04-10 00:00:00",
        "template": "06b602d0-d6f3-11ea-939d-2f7e50296e29",
        "remarks": "Sample remarks",
        "tags": [
            "labels",
            " test"
        ],
        "line_items": [
            {
                "product_id": "1",
                "product_uid": "feb546c0-d249-11ea-a93d-9d89059ce1aa",
                "name": "bolt",
                "product_type": "PARTS",
                "unit_price": 30,
                "quantity": 5,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 150
            },
            {
                "product_id": "2",
                "prefix": "e",
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                "name": "Nut",
                "product_type": "PARTS",
                "unit_price": 20,
                "quantity": 2,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 40
            }
        ],
        "attachments": [
            {
                "file_name": "This is the image for invoice updated",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4deb-9605-3ccccf219bec/fcb6c8c0-823f-11eb-9616-f5af9492c1aa.jpg"
            }
        ],
        "notes": [
            {
                "content": "Note to invoice",
                "is_private": true
            }
        ],
        "discount": {
            "type": "PERCENTAGE",
            "percent": 2
        },
        "sub_total": 190,
        "tax": [
            {
                "tax_uid": "c991d520-8195-11eb-b28b-b10fd9f860e9"
            }
        ],
        "custom_fields": [
            {
                "label": "Invoice type updated",
                "value": "Manual service"
            }
        ]
    }
}

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

{
    "type": "success",
    "message": "Invoice Updated",
    "data": {
        "invoice_uid": "eaf12750-8241-11eb-9616-f5af9492c1aa"
    }
}

This endpoint allows us to update a invoice only until it is sent to customer.

HTTP Request

PUT /invoice/<invoice_uid>

Body Parameters

This endpoint accepts a invoice object

Invoice Update Details

Parameter Required Description Type Example
customer true Customer UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54
customer_billing_address true Customer billing address String REFER CUSTOMER ADDRESS DETAILS
job false Job UID String 5dce9a90-7285-11eb-94ba-8b7293d62475
prefix false Prefix for invoice String In
reference_no false Reference number for the invoice Number 1
invoice_date true Date of invoice in UTC Datetime 2021-03-09 18:30:00
payment_term true Payment term UID String 166fbcc0-d6f3-11ea-939d-2f7e50296e29
remarks false Remarks for invoice String Sample remarks
tags false Tags for invoice List ["New", "Full Fields"]
template true Invoice template UID String 30eab810-d717-11ea-a08f-bbfc0e8cd85a
line_items false Line items in invoice List of Objects REFEER LINE ITEM DETAILS
sub_total false Subtotal of invoice Number 30
attachments false Attachements for invoice List of Objects REFER ATTACHMENT DETAILS
notes false Notes for invoice List of Objects REFER NOTE DETAILS
discount false Discount on invoice Object REFER DISCOUNT DETAILS
tax false Taxes applied on invoice List of Objects REFER TAX DETAILS
custom_fields true Custom fields for invoice List of Objects 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 line item details

Parameter Required Description Type Example
product_id false Product id of line item Number 1
product_uid false Product UID of line item Number feb546c0-d249-11ea-a93d-9d89059ce1aa
name false Line item name String bolt
image false Image URL of the line item String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/45/60e9.jpg
brand false Brand of line item String Bolt Company
specification false Specification of line item String To fix and fit
description false Description of line item String Manual service
unit_price true Unit price of line item Number 30
quantity true Quantity of line item Number 1
discount false Discount on line item Number 3
discount_type false Discount type in line item Enum ['FIXED', 'PERCENTAGE']
location_uid false Location UID of line item String debee740-d249-11ea-a93d-9d89059ce1aa
location_name false Location name of line item String India
total false Total amount on line item Number 30

A single line tax details

Parameter Required Description Type Example
tax_uid true Tax UID String c991d520-8195-11eb-b28b-b10fd9f860e9

A single attachment details

Parameter Required Description Type Example
file_name true Name of the attachment String Quote Image
url true URL of the attachment String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf219bec/4e1a039b10fd9f8r23960e9.jpg

A single note Details

Parameter Required Description Type Example
content true Notes content String Note to estimate
is_private false Whether note is private Booelan true or false

Discount Details

Parameter Required Description Type Example
type true Type of discount Enum ['FIXED', 'PERCENTAGE']
percent true Percentage of discount Number 2
value true Value if percentage type is fixed Number 20

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 Status Of Invoice

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

Example request body:

{
    "invoice_status": "PAID",
    "payment_mode_uid": "31d08d90-75af-11eb-b24c-c130bc1e4fe2",
    "amount_paid": 189.92,
    "remarks": "This is the first payment",
    "reference_no": "1"
}

On successfull status update of a invoice we get the below response:


{
    "type": "success",
    "message": "Invoice Status Updated",
    "data": {
        "invoice_uid": "eaf12750-8241-11eb-9616-f5af9492c1aa"
    }
}

This endpoint allows us to update status of a invoice.

HTTP Request

PUT /invoice/<invoice_uid>/status

Body Parameters

This endpoint accepts a invoice status object

Invoice Status Details

Parameter Required Description Type Example
invoice_status true Status of invoice Enum ['DRAFT', 'AWAIT_PAYMENT', 'PARTIALLY_PAID', 'PAID', 'BAD_DEBT', 'ARCHIVED', 'CLOSED', 'CANCELED']
payment_mode_uid false Payment mode UID String 31d08d90-75af-11eb-b24c-c130bc1e4fe2
amount_paid false Amount paid mandatory in case of status 'PAID' Number 189.92
remarks false Remarks for status String This is the first payment
reference_no false Payment Reference number String 1

Add invoice attachments

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

Example request body:

{
    "invoice": {
        "notes": {
            "content": "Note to invoice",
            "is_private": true
        },
        "attachments": {
            "file_name": "Invoice attachment",
            "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4691a90e9.pdf"
        }
    }
}

On successfull addition of a note / attachment to a invoice we get the below response:

{
    "type": "success",
    "message": "Invoice Updated",
    "data": {
        "invoice_uid": "eaf12750-8241-11eb-9616-f5af9492c1aa"
    }
}

This endpoint allows us to add note / attachment to a invoice.

HTTP Request

POST /invoice/<invoice_uid>/note_attachment

Body Parameters

This endpoint accepts a note / attachment object

Invoice Note/Attachment Details

Parameter Required Description Type Example
notes false Notes for quote Object REFER NOTE DETAILS
attachments false Attachments for quote Object REFER ATTACHMENT DETAILS

Note Details

Parameter Required Description Type Example
content true Notes content String Note to estimate
is_private false Whether note is private Booelan true or false

Attachment Details

Parameter Required Description Type Example
file_name true Name of attachment String Quote attachment
url true Attachment URL String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4691a90e9.pdf

Get Invoices

curl "https://<host>/api/estimate?count=<count_number>&filter.created_by=<created_by>&filter.created_from_date=<created_from_date>&filter.created_to_date=<created_to_date>&filter.invoice_from_date=<invoice_from_date>&filter.invoice_to_date=<invoice_to_date>&filter.due_from_date=<due_from_date>&filter.due_to_date=<due_to_date>&filter.is_paid=<is_paid_flag>&filter.is_active=<is_active_flag>&filter.is_expired=<is_expired_flag>&filter.over_due=<over_due>&filter.payment_term>=<payment_term_uid>&filter.payment_mode>=<payment_mode_uid>&filter.estimate=<estimate_uid>&filter.job=<job_uid>&filter.customer=<cutomer_uid>&filter.keyword=<keyword>&filter.status=<status>&page=<page_number>&sort=<sort_order>&sort_by=<sort_by>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the invoices matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "total": 9.92,
            "invoice_status": "PAID",
            "is_paid": true,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_first_name": "Edwin ",
                "customer_last_name": "Catmull",
                "customer_company_name": "pixar",
                "customer_email": "[email protected]",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "ff040f90-cd52-11ea-9c09-f5d3c9166a54"
            },
            "job": {
                "job_uid": "5dce9a90-7285-11eb-94ba-8b7293d62475",
                "job_title": "ewq2",
                "job_priority": "LOW",
                "scheduled_start_time": "2021-02-19T02:15:00.000Z",
                "scheduled_end_time": "2021-02-19T04:15:00.000Z",
                "work_order_number": 60247
            },
            "prefix": "In",
            "reference_no": "1",
            "invoice_date": "2021-03-10T18:30:00.000Z",
            "due_date": "2021-04-09T18:30:00.000Z",
            "invoice_uid": "9760f770-8249-11eb-9616-f5af9492c1aa",
            "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
            },
            "created_at": "2021-03-11T09:10:15.607Z",
            "updated_at": "2021-03-11T09:20:45.996Z",
            "invoice_no": 30
        },
        {
            "total": 180,
            "invoice_status": "CANCELED",
            "is_paid": false,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_first_name": "Walt",
                "customer_last_name": "Disney",
                "customer_company_name": "disney",
                "customer_email": "[email protected]",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "3f040f90-cd52-11ea-9c09-f556c9145a54"
            },
            "job": {
                "job_uid": "5dce9a90-7285-11eb-94ba-8b7293d62475",
                "job_title": "ewq2",
                "job_priority": "LOW",
                "scheduled_start_time": "2021-02-19T02:15:00.000Z",
                "scheduled_end_time": "2021-02-19T04:15:00.000Z",
                "work_order_number": 60247
            },
            "prefix": "In",
            "reference_no": "1",
            "invoice_date": "2021-03-10T18:30:00.000Z",
            "due_date": "2021-04-09T18:30:00.000Z",
            "invoice_uid": "0abc53f0-8249-11eb-9616-f5af9492c1aa",
            "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
            },
            "created_at": "2021-03-11T09:06:19.684Z",
            "updated_at": "2021-03-11T09:07:57.713Z",
            "invoice_no": 29
        },
        {
            "total": 12,
            "invoice_status": "CLOSED",
            "is_paid": true,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_first_name": "Richard",
                "customer_last_name": "McDonald",
                "customer_company_name": "McDonalds",
                "customer_email": "[email protected]",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "rr046f90-cd52-11ea-9c09-f5d3c9145a54"
            },
            "job": {
                "job_uid": "5dce9a90-7285-11eb-94ba-8b7293d62475",
                "job_title": "ewq2",
                "job_priority": "LOW",
                "scheduled_start_time": "2021-02-19T02:15:00.000Z",
                "scheduled_end_time": "2021-02-19T04:15:00.000Z",
                "work_order_number": 60247
            },
            "prefix": "In",
            "reference_no": "1",
            "invoice_date": "2021-03-10T18:30:00.000Z",
            "due_date": "2021-04-09T18:30:00.000Z",
            "invoice_uid": "6f712620-8246-11eb-9616-f5af9492c1aa",
            "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
            },
            "created_at": "2021-03-11T08:47:40.259Z",
            "updated_at": "2021-03-11T09:05:52.604Z",
            "invoice_no": 28
        },
        {
            "total": 89,
            "invoice_status": "DRAFT",
            "is_paid": false,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_first_name": "Harry",
                "customer_last_name": "Warner",
                "customer_company_name": "WarnerBros",
                "customer_email": "[email protected]",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "ty40f90-c782-11ea-9c09-f5d3c9145a54"
            },
            "prefix": "In",
            "reference_no": "1",
            "invoice_date": "2021-03-10T18:30:00.000Z",
            "due_date": "2021-04-09T18:30:00.000Z",
            "invoice_uid": "4e0a6dc0-8246-11eb-9616-f5af9492c1aa",
            "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
            },
            "created_at": "2021-03-11T08:46:43.381Z",
            "updated_at": "2021-03-11T08:46:43.385Z",
            "invoice_no": 27
        },
        {
            "total": 242,
            "invoice_status": "DRAFT",
            "is_paid": false,
            "is_deleted": false,
            "is_active": true,
            "customer": {
                "customer_last_name": "Gates",
                "customer_company_name": "Microsoft",
                "customer_email": "[email protected]",
                "customer_first_name": "Bill",
                "customer_contact_no": {
                    "mobile": "123456789",
                    "home": "987654321"
                },
                "customer_uid": "q5y40f90-cd52-11ea-9c09-f5d3c9145a54"
            },
            "prefix": "In",
            "reference_no": "1",
            "invoice_date": "2021-03-10T18:30:00.000Z",
            "due_date": "2021-04-09T18:30:00.000Z",
            "invoice_uid": "9aaa8be0-8243-11eb-9616-f5af9492c1aa",
            "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
            },
            "created_at": "2021-03-11T08:27:23.447Z",
            "updated_at": "2021-03-11T08:27:23.451Z",
            "invoice_no": 26
        }
    ],
    "total_records": 30,
    "current_page": 1,
    "total_pages": 6
}

Fetches all quotes matching the query parameters

HTTP Request

GET /invoice

Query Parameters

This endpoint accepts multiple filters as a query parameters

Quote query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
count true No of quotes per page Number Any number
sort false sort order Enum ['ASC', 'DESC']
sort_by false sort by type Enum ['invoice_no', 'reference_no', 'created_at']
filter.invoice_from_date false Filter by invoice from date Date 2021-02-19
filter.invoice_to_date false Filter by invoice to date Date 2021-03-19
filter.due_from_date false Filter by due from date Date 2021-02-19
filter.due_to_date false Filter by due to date Date 2021-03-19
filter.created_from_date false Filter by created from date Date 2021-02-19
filter.created_to_date false Filter by created to date Date 2021-03-19
filter.is_paid false Filter by payment Boolean true or false
filter.is_active false Filter by active invoices Boolean true or false
filter.is_deleted false Filter by deleted Boolean true or false
filter.over_due false Filter by over due invoices Boolean true or false
filter.created_by false Filter by created user UIDs Comma Seperated String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6, 59776597-ff79-4a6f-92da-784bab6274bc
filter.status false Filter by invoice status Comma Seperated Enum DRAFT, AWAIT_PAYMENT, PARTIALLY_PAID, PAID, BAD_DEBT, ARCHIVED, CLOSED, CANCELED
filter.keyword false Filter by search query. Searches for invoice number, reference number String Any valid string
filter.payment_term false Filter by payment term UIDs Comma Seperated String 06b602d0-d6f3-11ea-939d-2f7e50296e29, 0e8bdd84-060f-4d28-a1ec-b97abfa18590
filter.payment_mode false Filter by payment mode UIDs Comma Seperated String 31d08d90-75af-11eb-b24c-c130bc1e4fe2, fb0cb479-7b6e-4420-986b-95b7d2064ac3
filter.team_uid false Filter by team UIDs Comma Seperated String c4ae9119-622f-4285-b517-d0f5c198b53f, 60a93308-4fac-496c-a6f7-e709d89d08ac
filter.invoice_uid false Filter by invoice UIDs Comma Seperated String eaf12750-8241-11eb-9616-f5af9492c1aa, 0bde21a0-d6f5-11ea-ac89-dd1c5f935d51
filter.estimate false Filter by estimate UIDs Comma Seperated String 6c4bf9f0-8199-11eb-b28b-b10fd9f860e9, 55516a00-d717-11ea-a08f-bbfc0e8cd85a
filter.customer false Filter by customer UIDs Comma Seperated String 08e254e0-d262-11ea-bfd6-85ede87cf0ee, ff040f90-cd52-11ea-9c09-f5d3c9145a54
filter.job false Filter by job UIDs Comma Seperated String 20b4f4d0-d33c-11ea-ad37-5728dd5f9dc8, cf8ff0e0-cd56-11ea-b6a4-13c5940a5fcf
filter.organization false Filter by organization UIDs Comma Seperated String 2b7005b0-61ec-11eb-be1a-5f41b7fdd76b, 458bfb70-61ec-11eb-be1a-5f41b7fdd76b
filter.property false Filter by property UIDs Comma Seperated String b48bb210-6203-11eb-915b-e306107ad87d, d8308380-d265-11eb-9cb1-018a2c669645
filter.custom_field false Filter by custom field Json Stringified REFER CUSTOM FIELD DETAILS

A single custom field details

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

Service Contracts

Create Service Contract

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

Example request body:

{
    "service_contract": {
        "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "customer_address": {
            "city": "Chennai",
            "state": "Tamil Nadu",
            "street": "Prakasam St",
            "zip_code": 600017
        },
        "billing_address": {
            "city": "Chennai",
            "state": "Tamil Nadu",
            "street": "Prakasam St",
            "zip_code": 600017
        },
        "prefix": "service",
        "contract_name": "job contract",
        "ref_no": "10000",
        "term_months": 12,
        "parent_contract": "ca4cdec0-8bbc-11eb-9f8e-c7e91ecf30c6",
        "description": "This is a extended contract",
        "start_date": "2021-03-29 18:30:00",
        "end_date": "2022-03-29 18:30:00",
        "activation_date": "2021-03-30 18:30:00",
        "line_items": [
            {
                "product_id": "1",
                "product_uid": "feb546c0-d249-11ea-a93d-9d89059ce1aa",
                "name": "bolt",
                "product_type": "PARTS",
                "unit_price": 30,
                "quantity": 5,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 150,
                "tax": {
                    "tax_name": "GST",
                    "tax_rate": 10,
                    "tax_amount": 100
                }
            },
            {
                "product_id": "2",
                "prefix": "e",
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                "name": "Nut",
                "product_type": "PARTS",
                "unit_price": 20,
                "quantity": 2,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 40,
                "tax": {
                    "tax_name": "GST",
                    "tax_rate": 10,
                    "tax_amount": 100
                }
            }
        ],
        "invoice_settings": {
            "payment_term": "166fbcc0-d6f3-11ea-939d-2f7e50296e29",
            "auto_generate": "true",
            "billing_period": "b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9",
            "invoice_template": "06b602d0-d6f3-11ea-939d-2f7e50296e29",
            "generate_invoice_days": 10
        },
        "location_applicability": "ANY",
        "applicable_locations": [
            {
                "landmark": "TNagar Bridge",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "Prakasam St",
                "country": "India",
                "zip_code": 600017
            },
            {
                "landmark": "SIDCO Industrial Estate",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "Nehru street",
                "country": "India",
                "zip_code": 600032
            }
        ],
        "approval_status": "AWAIT_APPROVAL",
        "custom_fields": [
            {
                "label": "Contract Domain",
                "value": "Mechanical"
            }
        ],
        "attachments": [
            {
                "file_name": "Contract attachment",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4deb-9605-3ccccf219bec/d453a0f0-8c68-11eb-9f8e-c7e91ecf30c6.jpg"
            }
        ],
        "booking_settings": {
            "preferred_resource": {
                "team": "463ae640-c311-4415-824c-aaab93a4f5b6",
                "user": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
            },
            "preferred_start_time": "00:00:00"
        },
        "job_settings": {
            "job_category": "665c0df0-cd53-11ea-9c09-f5d3c9145a54",
            "job_priority": "LOW",
            "job_location": {
                "landmark": "SIDCO Industrial Estate",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "Nehru street",
                "country": "India",
                "zip_code": 600032
            }
        },
        "tax": [
            {
                "tax_uid": "c991d520-8195-11eb-b28b-b10fd9f860e9"
            }
        ],
        "payment_history": [
            {
                "billing_date": "2021-03-29 18:30:00",
                "due_date": "2021-04-28 18:30:00",
                "invoice_date": "2021-03-19 18:30:00",
                "total_amount": "10"
            }
        ]
    }
}

On successfull creation of a service contract we get the below response:

{
    "type": "success",
    "message": "Service Contract created successfully",
    "data": {
        "contract_uid": "9d5980d0-8c6b-11eb-9f8e-c7e91ecf30c6"
    }
}

This endpoint allows us to create a new service contract.

HTTP Request

POST /service_contract

Body Parameters

This endpoint accepts a service contract object

Service Contract Creation Details

Parameter Required Description Type Example
customer true Customer UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54
customer_address true Customer billing address String REFER CUSTOMER ADDRESS DETAILS
billing_address true Customer billing address String REFER CUSTOMER ADDRESS DETAILS
job false Job UID String 5dce9a90-7285-11eb-94ba-8b7293d62475
prefix false Prefix for contract String In
contract_name true Contract name String Job contract
ref_no false Reference number for the contract String 10000
term_months true Contract term in months Number 12
parent_contract false Contract's parent contract String ca4cdec0-8bbc-11eb-9f8e-c7e91ecf30c6
description false Contract's description String This is a extended contract
start_date true Contract's start date Date 2021-03-29
end_date true Contract's end date Date 2021-03-29
activation_date true Contract's activation date Date 2021-03-29
invoice_settings true Contract's invoice settings Object REFER INVOICE SETTING DETAILS
location_applicability false Contract's location applicability Enum [ 'ANY', 'FIXED' ]
applicable_locations false Contract applicable locations List of Objects REFER LOCATION DETAILS
approval_status false Contract's approval status Enum ['AWAIT_APPROVAL', 'ON_HOLD', 'APPROVED', 'REJECTED']
line_items false Line items in contract List of Objects REFEER LINE ITEM DETAILS
tax false Taxes applied on contract List of Objects REFER TAX DETAILS
attachments false Attachements for contract List of Objects REFER ATTACHMENT DETAILS
custom_fields true Custom fields for contract List of Objects REFER CUSTOM FIELD DETAILS
booking_settings false Booking settings for contract Object REFER BOOKING DETAILS
job_settings false Job settings for contract Object REFER JOB SETTING DETAILS
payment_history false Payment history for contract Object REFER PAYMENT HISTORY 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 line item details

Parameter Required Description Type Example
product_id false Product id of line item Number 1
product_uid false Product UID of line item Number feb546c0-d249-11ea-a93d-9d89059ce1aa
name false Line item name String bolt
image false Image URL of the line item String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/45/60e9.jpg
brand false Brand of line item String Bolt Company
specification false Specification of line item String To fix and fit
description false Description of line item String Manual service
unit_price true Unit price of line item Number 30
quantity true Quantity of line item Number 1
discount false Discount on line item Number 3
discount_type false Discount type in line item Enum ['FIXED', 'PERCENTAGE']
location_uid false Location UID of line item String debee740-d249-11ea-a93d-9d89059ce1aa
location_name false Location name of line item String India
total false Total amount on line item Number 30
tax false Tax on line item Object REFER LINE ITEM TAX DETAILS

A single line tax details

Parameter Required Description Type Example
tax_uid true Tax UID String c991d520-8195-11eb-b28b-b10fd9f860e9

A single attachment details

Parameter Required Description Type Example
file_name true Name of the attachment String Quote Image
url true URL of the attachment String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf219bec/4e1a039b10fd9f8r23960e9.jpg

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

Invoice Settings details

Parameter Required Description Type Example
payment_term true Payment term UID String 166fbcc0-d6f3-11ea-939d-2f7e50296e29
billing_period true Billing period UID String b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9
invoice_template true Invoice template UID String 06b602d0-d6f3-11ea-939d-2f7e50296e29
auto_generate false Whether to generate invoice automatically Booelan true or false
generate_invoice_days false Generate invoice before of number of days Number 10

Job Settings details

Parameter Required Description Type Example
job_category false Job category UID String 665c0df0-cd53-11ea-9c09-f5d3c9145a54
job_priority false Job priority Enum ['LOW', 'MEDIUM', 'HIGH', 'URGENT']
job_location false Job location Object REFER LOCATION DETAILS

Payment history details

Parameter Required Description Type Example
billing_date true Billing date Date 2021-03-29
due_date true Due date Date 2021-04-28
invoice_date true Invoice date Date 2021-03-19
total_amount true Total amount Number 10

A single location details

Parameter Required Description Type Example
landmark false Landmark of location String TNagar Bridge
city false Location's city String Chennai
state false Location's state String Tamil Nadu
street false Location's street String Prakasam St
country false Location's country String India
zip_code false Location's zip code String 600017

Booking details

Parameter Required Description Type Example
auto_generate false Auto generate booking Booelan true or false
preferred_resource false Preferred resource Object REFER PREFERRED RESOURCE DETAILS
preferred_start_time false Preferred start time Time 00:00:00

Line item tax details

Parameter Required Description Type Example
tax_name true Tax name String GST
tax_rate true Tax rate Number 10
tax_amount true Tax amount Number 100

Update Service Contract

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

Example request body:

{
    "service_contract": {
        "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "customer_address": {
            "city": "Chennai",
            "state": "Tamil Nadu",
            "street": "Prakasam St",
            "zip_code": 600017
        },
        "billing_address": {
            "city": "Chennai",
            "state": "Tamil Nadu",
            "street": "Prakasam St",
            "zip_code": 600017
        },
        "prefix": "services",
        "contract_name": "job contract updated",
        "ref_no": "10000",
        "term_months": 24,
        "parent_contract": "ca4cdec0-8bbc-11eb-9f8e-c7e91ecf30c6",
        "description": "This is a extended updated contract",
        "start_date": "2021-03-29 18:30:00",
        "end_date": "2022-03-29 18:30:00",
        "activation_date": "2021-03-30 18:30:00",
        "line_items": [
            {
                "product_id": "1",
                "product_uid": "feb546c0-d249-11ea-a93d-9d89059ce1aa",
                "name": "bolt",
                "product_type": "PARTS",
                "unit_price": 30,
                "quantity": 5,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 150,
                "tax": {
                    "tax_name": "GST",
                    "tax_rate": 10,
                    "tax_amount": 100
                }
            },
            {
                "product_id": "2",
                "prefix": "e",
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                "name": "Nut",
                "product_type": "PARTS",
                "unit_price": 20,
                "quantity": 2,
                "location_uid": "debee740-d249-11ea-a93d-9d89059ce1aa",
                "total": 40,
                "tax": {
                    "tax_name": "GST",
                    "tax_rate": 10,
                    "tax_amount": 100
                }
            }
        ],
        "invoice_settings": {
            "payment_term": "166fbcc0-d6f3-11ea-939d-2f7e50296e29",
            "auto_generate": "true",
            "billing_period": "b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9",
            "invoice_template": "06b602d0-d6f3-11ea-939d-2f7e50296e29",
            "generate_invoice_days": 10
        },
        "location_applicability": "ANY",
        "applicable_locations": [
            {
                "landmark": "TNagar Bridge",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "Prakasam St",
                "country": "India",
                "zip_code": 600017
            },
            {
                "landmark": "SIDCO Industrial Estate",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "Nehru street",
                "country": "India",
                "zip_code": 600032
            }
        ],
        "approval_status": "AWAIT_APPROVAL",
        "custom_fields": [
            {
                "label": "Contract Domain updated",
                "value": "Mechanical"
            }
        ],
        "attachments": [
            {
                "file_name": "Contract attachment",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4deb-9605-3ccccf219bec/d453a0f0-8c68-11eb-9f8e-c7e91ecf30c6.jpg"
            }
        ],
        "booking_settings": {
            "preferred_resource": {
                "team": "463ae640-c311-4415-824c-aaab93a4f5b6",
                "user": "9d0a4bd7-8424-4bcc-abd9-5731199b30f6"
            },
            "preferred_start_time": "00:00:00"
        },
        "job_settings": {
            "job_category": "665c0df0-cd53-11ea-9c09-f5d3c9145a54",
            "job_priority": "LOW",
            "job_location": {
                "landmark": "SIDCO Industrial Estate",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "Nehru street",
                "country": "India",
                "zip_code": 600032
            }
        },
        "tax": [
            {
                "tax_uid": "c991d520-8195-11eb-b28b-b10fd9f860e9"
            }
        ],
        "payment_history": [
            {
                "billing_date": "2021-03-29 18:30:00",
                "due_date": "2021-04-28 18:30:00",
                "invoice_date": "2021-03-19 18:30:00",
                "total_amount": "100"
            }
        ]
    }
}

On successfully updating a service contract we get the below response:

{
    "type": "success",
    "message": "Service Contract updated successfully",
    "data": {
        "contract_uid": "fbb37830-8c74-11eb-9f8e-c7e91ecf30c6"
    }
}

This endpoint allows us to update a service contract.

HTTP Request

PUT /service_contract/<service_contract_uid>

Body Parameters

This endpoint accepts a service contract object

Service Contract Update Details

Parameter Required Description Type Example
customer true Customer UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54
customer_address true Customer billing address String REFER CUSTOMER ADDRESS DETAILS
billing_address true Customer billing address String REFER CUSTOMER ADDRESS DETAILS
job false Job UID String 5dce9a90-7285-11eb-94ba-8b7293d62475
prefix false Prefix for contract String In
contract_name true Contract name String Job contract
ref_no false Reference number for the contract String 10000
term_months true Contract term in months Number 12
parent_contract false Contract's parent contract String ca4cdec0-8bbc-11eb-9f8e-c7e91ecf30c6
description false Contract's description String This is a extended contract
start_date true Contract's start date Date 2021-03-29
end_date true Contract's end date Date 2021-03-29
activation_date true Contract's activation date Date 2021-03-29
invoice_settings true Contract's invoice settings Object REFER INVOICE SETTING DETAILS
location_applicability false Contract's location applicability Enum [ 'ANY', 'FIXED' ]
applicable_locations false Contract applicable locations List of Objects REFER LOCATION DETAILS
approval_status false Contract's approval status Enum ['AWAIT_APPROVAL', 'ON_HOLD', 'APPROVED', 'REJECTED']
line_items false Line items in contract List of Objects REFEER LINE ITEM DETAILS
tax false Taxes applied on contract List of Objects REFER TAX DETAILS
attachments false Attachements for contract List of Objects REFER ATTACHMENT DETAILS
custom_fields true Custom fields for contract List of Objects REFER CUSTOM FIELD DETAILS
booking_settings false Booking settings for contract Object REFER BOOKING DETAILS
job_settings false Job settings for contract Object REFER JOB SETTING DETAILS
payment_history false Payment history for contract Object REFER PAYMENT HISTORY 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 line item details

Parameter Required Description Type Example
product_id false Product id of line item Number 1
product_uid false Product UID of line item Number feb546c0-d249-11ea-a93d-9d89059ce1aa
name false Line item name String bolt
image false Image URL of the line item String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/45/60e9.jpg
brand false Brand of line item String Bolt Company
specification false Specification of line item String To fix and fit
description false Description of line item String Manual service
unit_price true Unit price of line item Number 30
quantity true Quantity of line item Number 1
discount false Discount on line item Number 3
discount_type false Discount type in line item Enum ['FIXED', 'PERCENTAGE']
location_uid false Location UID of line item String debee740-d249-11ea-a93d-9d89059ce1aa
location_name false Location name of line item String India
total false Total amount on line item Number 30
tax false Tax on line item Object REFER LINE ITEM TAX DETAILS

A single line tax details

Parameter Required Description Type Example
tax_uid true Tax UID String c991d520-8195-11eb-b28b-b10fd9f860e9

A single attachment details

Parameter Required Description Type Example
file_name true Name of the attachment String Quote Image
url true URL of the attachment String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf219bec/4e1a039b10fd9f8r23960e9.jpg

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

Invoice Settings details

Parameter Required Description Type Example
payment_term true Payment term UID String 166fbcc0-d6f3-11ea-939d-2f7e50296e29
billing_period true Billing period UID String b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9
invoice_template true Invoice template UID String 06b602d0-d6f3-11ea-939d-2f7e50296e29
auto_generate false Whether to generate invoice automatically Booelan true or false
generate_invoice_days false Generate invoice before of number of days Number 10

Job Settings details

Parameter Required Description Type Example
job_category false Job category UID String 665c0df0-cd53-11ea-9c09-f5d3c9145a54
job_priority false Job priority Enum ['LOW', 'MEDIUM', 'HIGH', 'URGENT']
job_location false Job location Object REFER LOCATION DETAILS

Payment history details

Parameter Required Description Type Example
billing_date true Billing date Date 2021-03-29
due_date true Due date Date 2021-04-28
invoice_date true Invoice date Date 2021-03-19
total_amount true Total amount Number 10

A single location details

Parameter Required Description Type Example
landmark false Landmark of location String TNagar Bridge
city false Location's city String Chennai
state false Location's state String Tamil Nadu
street false Location's street String Prakasam St
country false Location's country String India
zip_code false Location's zip code String 600017

Booking details

Parameter Required Description Type Example
auto_generate false Auto generate booking Booelan true or false
preferred_resource false Preferred resource Object REFER PREFERRED RESOURCE DETAILS
preferred_start_time false Preferred start time Time 00:00:00

Line item tax details

Parameter Required Description Type Example
tax_name true Tax name String GST
tax_rate true Tax rate Number 10
tax_amount true Tax amount Number 100

Renew Service Contract

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

Example request body:

{
    "service_contract": {
        "start_date": "2021-03-29 18:30:00",
        "end_date": "2022-03-29 18:30:00",
        "remarks": "Contract is renewed for the upcoming year",
        "payment_history": [
            {
                "billing_date": "2021-03-29 18:30:00",
                "due_date": "2021-04-28 18:30:00",
                "invoice_date": "2021-03-19 18:30:00",
                "total_amount": "100"
            }
        ]
    }
}

On successfully renewing a service contract we get the below response:

{
    "type": "success",
    "message": "Service Contract renewed successfully",
    "data": {
        "contract_uid": "fbb37830-8c74-11eb-9f8e-c7e91ecf30c6"
    }
}

This endpoint allows us to renew a service contract.

HTTP Request

PUT /service_contract/<service_contract_uid>/renew

Body Parameters

This endpoint accepts a service contract renewal object

Service Contract Renewal Details

Parameter Required Description Type Example
start_date true Contract's renewal start date Date 2021-03-29
end_date true Contract's renewal end date Date 2021-03-29
remarks false Remarks for contract renewal String Contract is renewed for the upcoming year
payment_history false Payment history for contract Object REFER PAYMENT HISTORY DETAILS

Payment history details

Parameter Required Description Type Example
billing_date true Billing date Date 2021-03-29
due_date true Due date Date 2021-04-28
invoice_date true Invoice date Date 2021-03-19
total_amount true Total amount Number 10

Update Service Contract Status

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

Example request body:

{
    "remarks": "Approving contract",
    "approval_status": "APPROVED"
}

On successfully updating a service contract status we get the below response:

{
    "type": "success",
    "message": "Service Contract Status Updated",
    "data": {
        "contract_uid": "fbb37830-8c74-11eb-9f8e-c7e91ecf30c6"
    }
}

This endpoint allows us to update a service contract status.

HTTP Request

PUT /service_contract/<service_contract_uid>/status

Body Parameters

This endpoint accepts a service contract status object

Service Contract Renewal Details

Parameter Required Description Type Example
remarks false Remarks for contract status update String Approving contract
approval_status true Approval status Enum [ 'ON_HOLD', 'APPROVED', 'REJECTED']

Activate / Deactivate Service Contract

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

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

{
    "type": "success",
    "message": "Service Contract Status Updated",
    "data": {
        "contract_uid": "fbb37830-8c74-11eb-9f8e-c7e91ecf30c6"
    }
}

This endpoint allows us to activate / deactivate a service contract.

HTTP Request

PUT /service_contract/<service_contract_uid>/activate

Query Parameters

This endpoint accepts activation object as query parameter

Service Contract Activation Details

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

Get Service Contracts

curl "https://<host>/api/service_contract?count=<count>&filter.approval_status=<approval_status>&filter.asset=<asset_uid>&filter.await_approval_by=<approval_user>&filter.customer=<customer_uid>&filter.end_from=<from_date>&filter.end_to=<to_date>&filter.is_expired=<is_expired_flag>&filter.keyword=<keyword>&page=<page_number>&sort=<sort_order>&sort_by=<sort_by>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the service contracts matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "invoice_settings": {
                "auto_generate": true,
                "payment_term": {
                    "payment_term_name": "Monthly",
                    "no_of_days": 30,
                    "payment_term_uid": "166fbcc0-d6f3-11ea-939d-2f7e50296e29"
                },
                "billing_period": {
                    "is_active": true,
                    "is_deleted": false,
                    "billing_period_uid": "b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9",
                    "billing_period_name": "Monthly",
                    "billing_period_type": "MONTHS",
                    "billing_period_value": 12
                },
                "invoice_template": "5f2a694ad546e2656a284062",
                "generate_invoice_days": 10
            },
            "approval_status": "APPROVED",
            "is_active": true,
            "is_expired": false,
            "is_deleted": false,
            "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"
            },
            "prefix": "service",
            "contract_name": "job contract updated",
            "ref_no": "10000",
            "term_months": 12,
            "start_date": "2021-03-28T18:30:00.000Z",
            "end_date": "2022-03-28T18:30:00.000Z",
            "activation_date": "2021-03-29T18:30:00.000Z",
            "contract_uid": "fbb37830-8c74-11eb-9f8e-c7e91ecf30c6",
            "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
            },
            "contract_subtotal": 190,
            "contract_total": 193.8,
            "await_approval_by": {},
            "created_at": "2021-03-24T07:46:03.230Z",
            "updated_at": "2021-03-24T10:57:41.350Z",
            "contract_number": 38
        },
        {
            "invoice_settings": {
                "auto_generate": true,
                "payment_term": {
                    "payment_term_name": "Monthly",
                    "no_of_days": 30,
                    "payment_term_uid": "166fbcc0-d6f3-11ea-939d-2f7e50296e29"
                },
                "billing_period": {
                    "is_active": true,
                    "is_deleted": false,
                    "billing_period_uid": "b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9",
                    "billing_period_name": "Monthly",
                    "billing_period_type": "MONTHS",
                    "billing_period_value": 12
                },
                "invoice_template": "5f2a694ad546e2656a284062",
                "generate_invoice_days": 10
            },
            "approval_status": "AWAIT_APPROVAL",
            "is_active": true,
            "is_expired": false,
            "is_deleted": false,
            "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"
            },
            "prefix": "service",
            "contract_name": "job contract",
            "ref_no": "10000",
            "term_months": 12,
            "start_date": "2021-03-29T13:00:00.000Z",
            "end_date": "2022-03-29T13:00:00.000Z",
            "activation_date": "2021-03-30T13:00:00.000Z",
            "contract_uid": "9d5980d0-8c6b-11eb-9f8e-c7e91ecf30c6",
            "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
            },
            "contract_subtotal": 190,
            "contract_total": 193.8,
            "await_approval_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
            },
            "created_at": "2021-03-24T06:38:59.472Z",
            "updated_at": "2021-03-24T06:38:59.479Z",
            "contract_number": 37
        },
        {
            "invoice_settings": {
                "auto_generate": true,
                "payment_term": {
                    "payment_term_name": "Monthly",
                    "no_of_days": 30,
                    "payment_term_uid": "166fbcc0-d6f3-11ea-939d-2f7e50296e29"
                },
                "billing_period": {
                    "is_active": true,
                    "is_deleted": false,
                    "billing_period_uid": "b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9",
                    "billing_period_name": "Monthly",
                    "billing_period_type": "MONTHS",
                    "billing_period_value": 12
                },
                "invoice_template": "5f2a694ad546e2656a284062",
                "generate_invoice_days": 10
            },
            "approval_status": "AWAIT_APPROVAL",
            "is_active": true,
            "is_expired": false,
            "is_deleted": false,
            "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"
            },
            "prefix": "service",
            "contract_name": "job contract",
            "ref_no": "10000",
            "term_months": 12,
            "contract_total": 0,
            "start_date": "2021-03-29T13:00:00.000Z",
            "end_date": "2022-03-29T13:00:00.000Z",
            "activation_date": "2021-03-30T13:00:00.000Z",
            "contract_uid": "de0f3c80-8c68-11eb-9f8e-c7e91ecf30c6",
            "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
            },
            "contract_subtotal": 0,
            "await_approval_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
            },
            "created_at": "2021-03-24T06:19:19.526Z",
            "updated_at": "2021-03-24T06:19:19.531Z",
            "contract_number": 36
        },
        {
            "invoice_settings": {
                "auto_generate": false,
                "billing_period": {
                    "is_active": true,
                    "is_deleted": false,
                    "billing_period_uid": "b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9",
                    "billing_period_name": "Monthly",
                    "billing_period_type": "MONTHS",
                    "billing_period_value": 12
                },
                "generate_invoice_days": 20,
                "payment_term": {
                    "payment_term_name": "Monthly",
                    "no_of_days": 30,
                    "payment_term_uid": "166fbcc0-d6f3-11ea-939d-2f7e50296e29"
                },
                "invoice_template": "5f2a694ad546e2656a284062"
            },
            "approval_status": "AWAIT_APPROVAL",
            "is_active": true,
            "is_expired": false,
            "is_deleted": false,
            "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"
            },
            "contract_name": "service contract",
            "ref_no": "20",
            "prefix": "t",
            "term_months": 12,
            "contract_total": 193.8,
            "start_date": "2021-03-22T13:00:00.000Z",
            "end_date": "2022-03-22T13:00:00.000Z",
            "activation_date": "2021-03-22T13:00:00.000Z",
            "contract_uid": "e25caca0-8bc3-11eb-9f8e-c7e91ecf30c6",
            "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
            },
            "contract_subtotal": 190,
            "await_approval_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
            },
            "created_at": "2021-03-23T10:38:19.786Z",
            "updated_at": "2021-03-24T06:13:35.536Z",
            "contract_number": 35
        },
        {
            "invoice_settings": {
                "auto_generate": false,
                "billing_period": {
                    "is_active": true,
                    "is_deleted": false,
                    "billing_period_uid": "b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9",
                    "billing_period_name": "Monthly",
                    "billing_period_type": "MONTHS",
                    "billing_period_value": 12
                },
                "generate_invoice_days": 20,
                "payment_term": {
                    "payment_term_name": "Monthly",
                    "no_of_days": 30,
                    "payment_term_uid": "166fbcc0-d6f3-11ea-939d-2f7e50296e29"
                },
                "invoice_template": "5f2a694ad546e2656a284062"
            },
            "approval_status": "AWAIT_APPROVAL",
            "is_active": true,
            "is_expired": false,
            "is_deleted": false,
            "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"
            },
            "contract_name": "test",
            "ref_no": "20",
            "prefix": "t",
            "term_months": 12,
            "contract_total": 193.8,
            "start_date": "2021-03-22T13:00:00.000Z",
            "end_date": "2022-03-22T13:00:00.000Z",
            "activation_date": "2021-03-22T13:00:00.000Z",
            "contract_uid": "ca4cdec0-8bbc-11eb-9f8e-c7e91ecf30c6",
            "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
            },
            "contract_subtotal": 190,
            "await_approval_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
            },
            "created_at": "2021-03-23T09:47:32.935Z",
            "updated_at": "2021-03-23T09:47:32.941Z",
            "contract_number": 34
        }
    ],
    "total_records": 38,
    "current_page": 1,
    "total_pages": 8
}

Fetches all service contracts matching the query parameters

HTTP Request

GET /service_contract

Query Parameters

This endpoint accepts multiple filters as a query parameters

Quote query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
count true No of quotes per page Number Any number
sort false sort order Enum ['ASC', 'DESC']
sort_by false sort by type Enum ['contract_number', 'end_date', 'created_at']
filter.contract_total_from false Filter by contract total from Number 10000
filter.contract_total_to false Filter by contract total to Number 50000
filter.end_from false Filter by contract end from date Date 2021-02-19
filter.end_to false Filter by contract end to date Date 2021-03-19
filter.expiring_from_date false Filter by contract expiry from date Date 2021-02-19
filter.expiring_to_date false Filter by contract expiry to date Date 2021-03-19
filter.contract_uid false Filter by contract UIDs Comma Seperated String eaf12750-8241-11eb-9616-f5af9492c1aa, 5bab4ea0-d7b4-11ea-952f-093dafdd66ac
filter.customer false Filter by customer UIDs Comma Seperated String 08e254e0-d262-11ea-bfd6-85ede87cf0ee, ff040f90-cd52-11ea-9c09-f5d3c9145a54
filter.await_approval_by false Filter by approved user UIDs Comma Seperated String 9d0a4bd7-8424-4bcc-abd9-5731199b30f6, 59776597-ff79-4a6f-92da-784bab6274bc
filter.is_expired false Filter by expiry Boolean true or false
filter.keyword false Filter by search query. Searches for contract name, contract number, reference number String Any valid string
filter.approval_status false Filter by approval status Comma Seperated Enum AWAIT_APPROVAL, ON_HOLD, APPROVED, REJECTED
filter.asset false Filter by asset UIDs Comma Seperated String 6c4bf9f0-8199-11eb-b28b-b10fd9f860e9, ca29fe10-d60d-11ea-b654-5979bc62f918
filter.organization false Filter by organization UIDs Comma Seperated String 2b7005b0-61ec-11eb-be1a-5f41b7fdd76b, 458bfb70-61ec-11eb-be1a-5f41b7fdd76b
filter.property false Filter by property UIDs Comma Seperated String b48bb210-6203-11eb-915b-e306107ad87d, d8308380-d265-11eb-9cb1-018a2c669645
filter.custom_field false Filter by custom field Json Stringified REFER CUSTOM FIELD DETAILS

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 Service Contract Details

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

We get the service contract details of the specific service_contract_uid:

{
    "type": "success",
    "data": {
        "booking_settings": {
            "preferred_resource": {
                "team": 4,
                "user": 93
            },
            "auto_generate": false,
            "preferred_start_time": "00:00:00"
        },
        "job_settings": {
            "job_location": {
                "landmark": "SIDCO Industrial Estate",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "Nehru street",
                "country": "India",
                "zip_code": "600032"
            },
            "auto_generate": false,
            "job_category": {
                "category_name": "Fixes",
                "category_uid": "665c0df0-cd53-11ea-9c09-f5d3c9145a54"
            },
            "job_priority": "LOW"
        },
        "invoice_settings": {
            "auto_generate": true,
            "payment_term": {
                "payment_term_name": "Monthly",
                "no_of_days": 30,
                "payment_term_uid": "166fbcc0-d6f3-11ea-939d-2f7e50296e29"
            },
            "billing_period": {
                "is_active": true,
                "is_deleted": false,
                "billing_period_uid": "b3a17e70-d7b1-11ea-b83f-5bb7f3b89ca9",
                "billing_period_name": "Monthly",
                "billing_period_type": "MONTHS",
                "billing_period_value": 12
            },
            "invoice_template": {
                "type": "INVOICE",
                "template_name": "test",
                "template_description": "test invoice",
                "template_uid": "06b602d0-d6f3-11ea-939d-2f7e50296e29"
            },
            "generate_invoice_days": 10
        },
        "approval_status": "APPROVED",
        "is_active": true,
        "is_expired": false,
        "is_deleted": false,
        "line_items": [
            {
                "discount_type": "FIXED",
                "product_id": "1",
                "product_uid": "feb546c0-d249-11ea-a93d-9d89059ce1aa",
                "name": "bolt",
                "unit_price": 30,
                "quantity": 5,
                "total": 150,
                "tax": {
                    "tax_name": "GST",
                    "tax_rate": 10,
                    "tax_amount": 100
                },
                "discount": 0,
                "image": ""
            },
            {
                "discount_type": "FIXED",
                "product_id": "2",
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                "name": "Nut",
                "unit_price": 20,
                "quantity": 2,
                "total": 40,
                "tax": {
                    "tax_name": "GST",
                    "tax_rate": 10,
                    "tax_amount": 100
                },
                "discount": 0,
                "image": "",
                "brand": "Sony"
            }
        ],
        "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"
        },
        "billing_address": {
            "city": "Chennai",
            "state": "Tamil Nadu",
            "street": "Prakasam St",
            "zip_code": "600017"
        },
        "location_applicability": "ANY",
        "applicable_locations": [
            {
                "landmark": "TNagar Bridge",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "Prakasam St",
                "country": "India",
                "zip_code": "600017"
            },
            {
                "landmark": "SIDCO Industrial Estate",
                "city": "Chennai",
                "state": "Tamil Nadu",
                "street": "Nehru street",
                "country": "India",
                "zip_code": "600032"
            }
        ],
        "custom_fields": [
            {
                "hide_to_fe": false,
                "label": "Contract Domain updated",
                "value": "Mechanical"
            }
        ],
        "prefix": "service",
        "contract_name": "job contract updated",
        "ref_no": "10000",
        "term_months": 12,
        "parent_contract": {
            "contract_name": "test",
            "prefix": "t",
            "contract_total": 193.8,
            "contract_uid": "ca4cdec0-8bbc-11eb-9f8e-c7e91ecf30c6",
            "contract_number": 34
        },
        "description": "This is a extended updated contract",
        "attachments": [
            {
                "file_name": "Contract attachment",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4deb-9605-39bec/d453a0f0-8c68-18e-c7e91ecf30c6.jpg",
                "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
                },
                "created_at": "2021-03-24T08:00:31.349Z"
            }
        ],
        "tax": [
            {
                "tax_uid": "c991d520-8195-11eb-b28b-b10fd9f860e9",
                "tax_name": "GST",
                "tax_percent": 2,
                "tax_id": "6048b0cdc0c42b500f364114",
                "tax_amount": 3.8
            }
        ],
        "start_date": "2021-03-28T18:30:00.000Z",
        "end_date": "2022-03-28T18:30:00.000Z",
        "activation_date": "2021-03-29T18:30:00.000Z",
        "payment_history": [
            {
                "status": "YET_TO_SEND",
                "is_paid": false,
                "billing_date": "2021-03-29T13:00:00.000Z",
                "due_date": "2021-04-28T13:00:00.000Z",
                "invoice_date": "2021-03-19T13:00:00.000Z",
                "total_amount": 100,
                "payment_history_uid": "05f67df6-d199-4865-bf95-abd630a88e6b"
            }
        ],
        "customer_address": {
            "city": "Chennai",
            "state": "Tamil Nadu",
            "street": "Prakasam St",
            "zip_code": "600017"
        },
        "contract_uid": "fbb37830-8c74-11eb-9f8e-c7e91ecf30c6",
        "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
        },
        "contract_subtotal": 190,
        "contract_total": 193.8,
        "await_approval_by": {},
        "approval_history": [
            {
                "status_name": "APPROVED",
                "remarks": "Approving contract",
                "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
                },
                "level": 1,
                "created_at": "2021-03-24T10:50:56.179Z"
            }
        ],
        "created_at": "2021-03-24T07:46:03.230Z",
        "updated_at": "2021-03-24T10:57:41.350Z",
        "contract_number": 38
    }
}

Fetches service contract details matching the service_contract_uid

HTTP Request

GET /service_contract/<service_contract_uid>

Delete Service Contract

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

Service contract with the specific service_contract_uid is deleted:

{
    "type": "success",
    "message": "Service Contract deleted successfully"
}

Deletes a service contract matching the service_contract_uid

HTTP Request

DELETE /service_contract/<service_contract_uid>

Assets

Create Asset

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

Example request body:

{
    "asset": {
        "asset_location": {
            "street": "Prakasam St, Gangai Karai Puram",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600017"
        },
        "useful_life": {
            "type": "YEARS",
            "value": "2"
        },
        "asset_description": "This is a new asset",
        "parent_asset": "a99ca5a5-e346-4698-a402-ef35cbf24b9a",
        "asset_quantity": 1,
        "purchase_date": "2021-03-17 18:30:00",
        "warranty_expiry_date": "2021-03-30 18:30:00",
        "placed_in_service": "2021-03-30 18:30:00",
        "asset_code": "0006",
        "asset_name": "Coolant",
        "asset_category": "a4ee48e0-d60d-11ea-b654-5979bc62f918",
        "asset_barcode" : "12345",
        "asset_serial_number": [
            "6", "7"
        ],
        "asset_inspection_form": "695da124-835e-4c86-8f05-51e194835452",
        "owned_by_customer": "true",
        "purchase_price": 2500,
        "residual_price": 1500,
        "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "asset_product": "7e11fac9-29f6-4b94-ba19-59681e6ee288",
        "asset_parts": [
            {
                "product_id": "feb546c0-d249-11ea-a93d-9d89059ce1aa"
            },
            {
                "product_id": "ec97f900-d628-11ea-b54e-090633bb712a"
            }
        ],
        "asset_attachments": [
            {
                "file_name": "Asset attachment",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4deb-9bec/ef8d72e0-8ca1-11eb-9f30c6.jpg"
            }
        ],
        "custom_fields": [
            {
                "label": "Asset Domain",
                "value": "Mechanical"
            }   
        ]
    }
}

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

{
    "type": "success",
    "message": "New asset Created successfully",
    "data": {
        "asset_uid": "ce4ee680-8ca2-11eb-9f8e-c7e91ecf30c6"
    }
}

This endpoint allows us to create a new asset.

HTTP Request

POST /assets

Body Parameters

This endpoint accepts a asset object

Asset Creation Details

Parameter Required Description Type Example
customer true Customer UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54
asset_location false Asset location address String REFER ADDRESS DETAILS
useful_life true Asset life details Object REFER USEFUL LIFE DETAILS
asset_quantity true Quantity of asset Number 2
purchase_date false Asset purchase date Date 2021-03-17
warranty_expiry_date false Asset warranty expiry date Date 2021-03-30
placed_in_service false Asset service placed date Date 2021-03-30
parent_asset false Parent asset UID String a99ca5a5-e346-4698-a402-ef35cbf24b9a
asset_code true Asset code String 0006
asset_name true Asset name String Coolant
asset_description false Asset Description String This is a new asset
asset_category true Asset category UID String a4ee48e0-d60d-11ea-b654-5979bc62f918
asset_barcode false Asset barcode String 12345
asset_product false Asset product UID String 7e11fac9-29f6-4b94-ba19-59681e6ee288
asset_serial_number false Asset serial number List [ '6', '7' ]
asset_inspection_form false Asset form UID String 695da124-835e-4c86-8f05-51e194835452
owned_by_customer false Whether asset owned by customer Boolean true or false
purchase_price false Asset purchase price Number 2500
residual_price false Asset residual price Number 1500
asset_parts false Asset part details List of Objects REFER ASSET PART DETAILS
asset_attachments false Attachements for asset List of Objects REFER ATTACHMENT DETAILS
custom_fields false Custom fields for asset List of Objects REFER CUSTOM FIELD DETAILS

Asset location 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 String [13.0418, 80.2341]

Useful life details

Parameter Required Description Type Example
type true Type of life span Enum ['MONTHS', 'YEARS', 'DAYS']
value true Number of life span type Number 2

A single asset part details

Parameter Required Description Type Example
product_id true Product UID String feb546c0-d249-11ea-a93d-9d89059ce1aa

A single attachment details

Parameter Required Description Type Example
file_name true Name of the attachment String Quote Image
url true URL of the attachment String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf9bec/4e1a039b10fd9f8r60e9.jpg

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 Asset

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

Example request body:

{
    "asset": {
        "asset_location": {
            "street": "Prakasam St, Gangai Karai Puram",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600017"
        },
        "useful_life": {
            "type": "YEARS",
            "value": "4"
        },
        "asset_quantity": 2,
        "purchase_date": "2021-03-17 18:30:00",
        "warranty_expiry_date": "2021-03-30 18:30:00",
        "placed_in_service": "2021-03-30 18:30:00",
        "asset_code": "0006",
        "asset_name": "AC Coolant",
        "asset_category": "a4ee48e0-d60d-11ea-b654-5979bc62f918",
        "asset_barcode" : "12345",
        "asset_serial_number": [
            "6"
        ],
        "owned_by_customer": "true",
        "purchase_price": 4500,
        "residual_price": 2500,
        "customer": "ff040f90-cd52-11ea-9c09-f5d3c9145a54",
        "asset_parts": [
            {
                "product_id": "feb546c0-d249-11ea-a93d-9d89059ce1aa"
            },
            {
                "product_id": "ec97f900-d628-11ea-b54e-090633bb712a"
            }
        ],
        "asset_attachments": [
            {
                "file_name": "Asset attachment updated",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4deb-9605-3ccccf219bec/ef8d72e0-8ca1-11eb-9f8e-c7e91ecf30c6.jpg"
            }
        ],
        "custom_fields": [
            {
                "label": "Asset Domain",
                "value": "Mechanical"
            }   
        ]
    }
}

On successfully updating a asset we get the below response:

{
    "type": "success",
    "message": "Asset Updating successfully",
    "data": {
        "asset_uid": "ce4ee680-8ca2-11eb-9f8e-c7e91ecf30c6"
    }
}

This endpoint allows us to update a asset.

HTTP Request

PUT /assets/<asset_uid>

Body Parameters

This endpoint accepts a asset object

Asset Update Details

Parameter Required Description Type Example
customer true Customer UID String ff040f90-cd52-11ea-9c09-f5d3c9145a54
asset_location false Asset location address String REFER ADDRESS DETAILS
useful_life true Asset life details Object REFER USEFUL LIFE DETAILS
asset_quantity true Quantity of asset Number 2
purchase_date false Asset purchase date Date 2021-03-17
warranty_expiry_date false Asset warranty expiry date Date 2021-03-30
placed_in_service false Asset service placed date Date 2021-03-30
asset_code true Asset code String 0006
asset_name true Asset name String Coolant
asset_category true Asset category UID String a4ee48e0-d60d-11ea-b654-5979bc62f918
asset_barcode false Asset barcode String 12345
asset_serial_number false Asset serial number List [ '6', '7' ]
owned_by_customer false Whether asset owned by customer Boolean true or false
purchase_price false Asset purchase price Number 2500
residual_price false Asset residual price Number 1500
asset_parts false Asset part details List of Objects REFER ASSET PART DETAILS
asset_attachments false Attachements for asset List of Objects REFER ATTACHMENT DETAILS
custom_fields false Custom fields for asset List of Objects REFER CUSTOM FIELD DETAILS

Asset location 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 String [13.0418, 80.2341]

Useful life details

Parameter Required Description Type Example
type true Type of life span Enum ['MONTHS', 'YEARS', 'DAYS']
value true Number of life span type Number 2

A single asset part details

Parameter Required Description Type Example
product_id true Product UID String feb546c0-d249-11ea-a93d-9d89059ce1aa

A single attachment details

Parameter Required Description Type Example
file_name true Name of the attachment String Quote Image
url true URL of the attachment String https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-cf9bec/4e1a039b10fd9f8r60e9.jpg

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 Asset

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

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

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

This endpoint allows us to activate / deactivate a asset.

HTTP Request

PUT /assets/<asset_uid>/activate

Query Parameters

This endpoint accepts activation object as query parameter

Asset Activation Details

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

Get Assets

curl "https://<host>/api/assets?count=<count>&filter.asset_category=<category_uid>&filter.customer=<customer_uid>&filter.is_active=<is_active_flag>&filter.keyword=<keyword>&filter.warranty_from_date=<from_date>&filter.warranty_to_date=<to_date>&page=<page_number>&sort=<sort_order>&sort_by=<sort_by>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the asssets matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "asset_serial_number": [
                "6"
            ],
            "owned_by_customer": true,
            "is_deleted": false,
            "is_active": false,
            "asset_quantity": 2,
            "purchase_date": "2021-03-17T13:00:00.000Z",
            "warranty_expiry_date": "2021-03-30T13:00:00.000Z",
            "placed_in_service": "2021-03-30T13:00:00.000Z",
            "asset_code": "0006",
            "asset_name": "AC Coolant",
            "asset_category": {
                "is_deleted": false,
                "category_name": "AC coolant",
                "category_uid": "a4ee48e0-d60d-11ea-b654-5979bc62f918"
            },
            "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"
            },
            "custom_fields": [
                {
                    "hide_to_fe": false,
                    "label": "Asset Domain",
                    "value": "Mechanical"
                }
            ],
            "asset_uid": "ce4ee680-8ca2-11eb-9f8e-c7e91ecf30c6",
            "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
            },
            "created_at": "2021-03-24T13:14:03.935Z",
            "updated_at": "2021-03-24T13:39:24.869Z"
        },
        {
            "asset_serial_number": [
                "6"
            ],
            "owned_by_customer": true,
            "is_deleted": false,
            "is_active": true,
            "asset_quantity": 1,
            "purchase_date": "2021-03-17T13:00:00.000Z",
            "warranty_expiry_date": "2021-03-30T13:00:00.000Z",
            "placed_in_service": "2021-03-30T13:00:00.000Z",
            "asset_code": "0006",
            "asset_name": "Coolant",
            "asset_category": {
                "is_deleted": false,
                "category_name": "AC coolant",
                "category_uid": "a4ee48e0-d60d-11ea-b654-5979bc62f918"
            },
            "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"
            },
            "custom_fields": [],
            "asset_uid": "f2a05830-8ca1-11eb-9f8e-c7e91ecf30c6",
            "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
            },
            "created_at": "2021-03-24T13:07:55.334Z",
            "updated_at": "2021-03-24T13:07:55.336Z"
        },
        {
            "asset_serial_number": [
                "005"
            ],
            "owned_by_customer": true,
            "is_deleted": false,
            "is_active": true,
            "asset_quantity": 1,
            "purchase_date": "2021-03-30T13:00:00.000Z",
            "warranty_expiry_date": "2021-03-30T13:00:00.000Z",
            "placed_in_service": "2021-04-29T13:00:00.000Z",
            "asset_code": "1111",
            "asset_name": "Nuts",
            "asset_category": {
                "is_deleted": false,
                "category_name": "AC coolant",
                "category_uid": "a4ee48e0-d60d-11ea-b654-5979bc62f918"
            },
            "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"
            },
            "custom_fields": [],
            "asset_uid": "a94affa0-8ca1-11eb-9f8e-c7e91ecf30c6",
            "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
            },
            "created_at": "2021-03-24T13:05:52.300Z",
            "updated_at": "2021-03-24T13:05:52.304Z"
        },
        {
            "asset_serial_number": [],
            "owned_by_customer": false,
            "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": {
                "is_deleted": false,
                "category_name": "AC coolant",
                "category_uid": "a4ee48e0-d60d-11ea-b654-5979bc62f918"
            },
            "asset_code": "4",
            "asset_quantity": 2,
            "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"
            },
            "asset_uid": "71b144f0-d7ca-11ea-b00f-617c5f486b2d",
            "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
            },
            "custom_fields": [],
            "created_at": "2020-08-06T09:51:47.910Z",
            "updated_at": "2020-08-06T09:51:47.912Z"
        },
        {
            "asset_serial_number": [],
            "owned_by_customer": false,
            "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": {
                "is_deleted": false,
                "category_name": "AC coolant",
                "category_uid": "a4ee48e0-d60d-11ea-b654-5979bc62f918"
            },
            "asset_code": "4",
            "asset_quantity": 2,
            "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"
            },
            "asset_uid": "71514aa0-d7ca-11ea-b00f-617c5f486b2d",
            "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
            },
            "custom_fields": [],
            "created_at": "2020-08-06T09:51:47.278Z",
            "updated_at": "2020-08-06T09:51:47.279Z"
        }
    ],
    "total_records": 31,
    "current_page": 1,
    "total_pages": 7
}

Fetches all assets matching the query parameters

HTTP Request

GET /assets

Query Parameters

This endpoint accepts multiple filters as a query parameters

Quote query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
count true No of quotes per page Number Any number
sort false sort order Enum ['ASC', 'DESC']
sort_by false sort by type Enum ['asset_code', 'warranty_expiry_date', 'created_at']
filter.created_at false Filter by created at date Date 2021-02-19
filter.warranty_from_date false Filter by warranty from date Date 2021-02-19
filter.warranty_to_date false Filter by warranty to date Date 2021-02-19
filter.placed_in_service_from false Filter by placed in service from date Date 2021-02-19
filter.placed_in_service_to false Filter by placed in service to date Date 2021-02-19
filter.keyword false Filter by search query. Searches for asset name, asset code String Any valid string
filter.owned_by_customer false Filter by assets owned by customer Boolean true or false
filter.is_active false Filter by active assets Boolean true or false
filter.asset_uid false Filter by asset UIDs Comma Seperated String ce4ee680-8ca2-11eb-9f8e-c7e91ecf30c6, ca29fe10-d60d-11ea-b654-5979bc62f918
filter.customer false Filter by customer UIDs Comma Seperated String 08e254e0-d262-11ea-bfd6-85ede87cf0ee, ff040f90-cd52-11ea-9c09-f5d3c9145a54
filter.asset_category false Filter by customer UIDs Comma Seperated String a4ee48e0-d60d-11ea-b654-5979bc62f918, 2286fb50-8278-11eb-84ff-eb2a762e383a
filter.organization false Filter by organization UIDs Comma Seperated String 2b7005b0-61ec-11eb-be1a-5f41b7fdd76b, 458bfb70-61ec-11eb-be1a-5f41b7fdd76b
filter.property false Filter by property UIDs Comma Seperated String b48bb210-6203-11eb-915b-e306107ad87d, d8308380-d265-11eb-9cb1-018a2c669645

Get Asset Details

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

We get the asset details of the specific asset_uid:

{
    "type": "success",
    "data": {
        "asset_serial_number": [
            "6"
        ],
        "owned_by_customer": true,
        "is_deleted": false,
        "is_active": false,
        "asset_location": {
            "street": "Prakasam St, Gangai Karai Puram",
            "city": "Chennai",
            "state": "TAMILNADU",
            "zip_code": "600017"
        },
        "useful_life": {
            "type": "YEARS",
            "value": 4
        },
        "asset_quantity": 2,
        "purchase_date": "2021-03-17T13:00:00.000Z",
        "warranty_expiry_date": "2021-03-30T13:00:00.000Z",
        "placed_in_service": "2021-03-30T13:00:00.000Z",
        "asset_code": "0006",
        "asset_name": "AC Coolant",
        "asset_category": {
            "is_deleted": false,
            "category_name": "AC coolant",
            "category_uid": "a4ee48e0-d60d-11ea-b654-5979bc62f918"
        },
        "asset_barcode": "54321",
        "purchase_price": 4500,
        "residual_price": 2500,
        "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"
        },
        "asset_parts": [
            {
                "product_id": {
                    "product_id": "1",
                    "product_image": "",
                    "product_barcode": "",
                    "product_files": [],
                    "product_description": "",
                    "product_manual_link": "",
                    "quantity": 27,
                    "currency": "",
                    "price": 30,
                    "is_available": true,
                    "is_deleted": false,
                    "location_availability": [
                        {
                            "min_quantity": null,
                            "serial_nos": [],
                            "location": "5f22978180ca2c24587900b5",
                            "quantity": 27,
                            "created_at": "2020-07-30T09:49:43.598Z"
                        }
                    ],
                    "meta_data": [
                        {
                            "label": "Text Input",
                            "value": ""
                        }
                    ],
                    "product_type": "PARTS",
                    "product_name": "bolt",
                    "product_uid": "feb546c0-d249-11ea-a93d-9d89059ce1aa",
                    "created_at": "2020-07-30T09:49:43.600Z",
                    "product_no": 1
                }
            },
            {
                "product_id": {
                    "product_id": "2",
                    "product_image": "",
                    "product_barcode": "",
                    "product_files": [],
                    "product_description": "",
                    "product_manual_link": "",
                    "quantity": 0,
                    "currency": "",
                    "price": 20,
                    "is_available": true,
                    "is_deleted": false,
                    "location_availability": [
                        {
                            "min_quantity": 3,
                            "serial_nos": [],
                            "location": "5f22978180ca2c24587900b5",
                            "quantity": 0,
                            "created_at": "2020-08-04T08:03:04.467Z"
                        }
                    ],
                    "meta_data": [
                        {
                            "label": "Text Input",
                            "value": ""
                        }
                    ],
                    "product_type": "PARTS",
                    "product_name": "Nut",
                    "brand": "Sony",
                    "prefix": "e",
                    "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                    "created_at": "2020-08-04T08:03:04.469Z",
                    "product_no": 1
                }
            }
        ],
        "asset_attachments": [
            {
                "file_name": "Asset attachment updated",
                "url": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/attachments/4698d906-c479-4deb-96cf219bec/ef8d72e0-8ca1-11f8e-c7e91ecf30c6.jpg",
                "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
                },
                "created_at": "2021-03-24T13:37:48.600Z"
            }
        ],
        "custom_fields": [
            {
                "hide_to_fe": false,
                "label": "Asset Domain",
                "value": "Mechanical"
            }
        ],
        "asset_uid": "ce4ee680-8ca2-11eb-9f8e-c7e91ecf30c6",
        "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
        },
        "created_at": "2021-03-24T13:14:03.935Z",
        "updated_at": "2021-03-24T13:39:24.869Z"
    }
}

Fetches asset details matching the asset_uid

HTTP Request

GET /assets/<asset_uid>

Delete Asset

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

Asset with the specific asset_uid is deleted:

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

Deletes a asset matching the asset_uid

HTTP Request

DELETE /assets/<asset_uid>

Create PPM

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

Example request body:

{
    "ppm": {
        "estimated_duration": {
            "days": 1
        },
        "priority": "MEDIUM",
        "frequency": "YEARS",
        "period": 1,
        "scheduled_dates": [
            {
                "schedule_at": "2021-03-26"
            },
            {
                "schedule_at": "2022-03-26"
            }
        ],
        "service_contract": "9d5980d0-8c6b-11eb-9f8e-c7e91ecf30c6",
        "next_service_date": "2021-03-26",
        "product": {
            "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a"
        },
        "asset": "b1e4d350-8ca8-11eb-a2f6-650d212c5a5a"
    }
}

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

{
    "type": "success",
    "message": "New PPM Created successfully",
    "data": {
        "ppm_uid": "82e7e070-8cac-11eb-a2f6-650d212c5a5a"
    }
}

This endpoint allows us to create a new PPM.

HTTP Request

POST /ppm

Body Parameters

This endpoint accepts a PPM object

PPM Creation Details

Parameter Required Description Type Example
asset true Asset UID String b1e4d350-8ca8-11eb-a2f6-650d212c5a5a
product false Product details Object REFER PRODUCT DETAILS
priority false PPM priority Enum ['LOW', 'MEDIUM', 'HIGH', 'URGENT']
frequency false PPM frequency Enum ['DAYS', 'WEEKS', 'MONTHS', 'YEARS']
period false Duration of PPM Number 1 (Incase frequency in DAYS - 1 Day, Incase frequency in YEARS - 1 Year)
scheduled_dates false PPM scheduled dates List of Objects REFER SCHEDULED DATE DETAILS
service_contract false PPM's service contract String e25caca0-8bc3-11eb-9f8e-c7e91ecf30c6
next_service_date false Next service date Date 2021-03-27

Product details

Parameter Required Description Type Example
product_uid true Product UID String ec97f900-d628-11ea-b54e-090633bb712a

A single scheduled date details

Parameter Required Description Type Example
schedule_at true Scheduled date Date 2021-04-06

Update PPM

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

Example request body:

{
    "ppm": {
        "estimated_duration": {
            "days": 1
        },
        "priority": "HIGH",
        "frequency": "MONTHS",
        "period": 1,
        "scheduled_dates": [
            {
                "schedule_at": "2021-03-26"
            },
            {
                "schedule_at": "2021-04-26"
            }
        ],
        "service_contract": "9d5980d0-8c6b-11eb-9f8e-c7e91ecf30c6",
        "next_service_date": "2021-04-26",
        "product": {
            "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a"
        },
        "asset": "b1e4d350-8ca8-11eb-a2f6-650d212c5a5a"
    }
}

On successfully updating a PPM we get the below response:

{
    "type": "success",
    "message": "New PPM Updating successfully",
    "data": {
        "ppm_uid": "9b88d980-8cad-11eb-a2f6-650d212c5a5a"
    }
}

This endpoint allows us to update a PPM.

HTTP Request

POST /ppm

Body Parameters

This endpoint accepts a PPM object

PPM Update Details

Parameter Required Description Type Example
asset true Asset UID String b1e4d350-8ca8-11eb-a2f6-650d212c5a5a
product false Product details Object REFER PRODUCT DETAILS
priority false PPM priority Enum ['LOW', 'MEDIUM', 'HIGH', 'URGENT']
frequency false PPM frequency Enum ['DAYS', 'WEEKS', 'MONTHS', 'YEARS']
period false Duration of PPM Number 1 (Incase frequency in DAYS - 1 Day, Incase frequency in YEARS - 1 Year)
scheduled_dates false PPM scheduled dates List of Objects REFER SCHEDULED DATE DETAILS
service_contract false PPM's service contract String e25caca0-8bc3-11eb-9f8e-c7e91ecf30c6
next_service_date false Next service date Date 2021-03-27

Product details

Parameter Required Description Type Example
product_uid true Product UID String ec97f900-d628-11ea-b54e-090633bb712a

A single scheduled date details

Parameter Required Description Type Example
schedule_at true Scheduled date Date 2021-04-06

Activate / Deactivate PPM

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

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

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

This endpoint allows us to activate / deactivate a PPM.

HTTP Request

PUT /ppm/<ppm_uid>/activate

Query Parameters

This endpoint accepts activation object as query parameter

PPM Activation Details

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

Get PPMs

curl "https://<host>/api/ppm?count=<count>&filter.asset=<asset_uid>&filter.keyword=<keyword>&filter.last_service_from_date=<from_date>&filter.last_service_to_date=<to_date>&filter.next_service_from_date=<from_date>&filter.next_service_to_date=<to_date>&filter.service_contract=<service_contract_uid>&page=<page_number>&sort=<sort_order>&sort_by=<sort_by>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the ppms matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "is_active": true,
            "is_deleted": false,
            "asset": {
                "asset_serial_number": [],
                "is_active": true,
                "asset_quantity": 1,
                "asset_code": "2",
                "asset_name": "e",
                "asset_uid": "b1e4d350-8ca8-11eb-a2f6-650d212c5a5a"
            },
            "ppm_uid": "9b88d980-8cad-11eb-a2f6-650d212c5a5a",
            "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
            },
            "created_at": "2021-03-24T14:31:23.163Z",
            "updated_at": "2021-03-24T14:43:42.883Z",
            "ppm_number": 31,
            "estimated_duration": {
                "days": 1
            },
            "frequency": "YEARS",
            "next_service_date": "2021-03-25T18:30:00.000Z",
            "period": 1,
            "priority": "MEDIUM",
            "product": {
                "product_ref_id": {
                    "product_id": "2",
                    "product_image": "",
                    "product_barcode": "",
                    "product_files": [],
                    "product_description": "",
                    "product_manual_link": "",
                    "quantity": 0,
                    "currency": "",
                    "price": 20,
                    "is_available": true,
                    "is_deleted": false,
                    "location_availability": [
                        {
                            "min_quantity": 3,
                            "serial_nos": [],
                            "location": "5f22978180ca2c24587900b5",
                            "quantity": 0,
                            "created_at": "2020-08-04T08:03:04.467Z"
                        }
                    ],
                    "meta_data": [
                        {
                            "label": "Text Input",
                            "value": ""
                        }
                    ],
                    "product_type": "PARTS",
                    "product_name": "Nut",
                    "prefix": "e",
                    "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                    "created_at": "2020-08-04T08:03:04.469Z",
                    "product_no": 1
                },
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a"
            },
            "service_contract": {
                "approval_status": "AWAIT_APPROVAL",
                "is_active": true,
                "is_expired": false,
                "is_deleted": false,
                "prefix": "service",
                "contract_name": "job contract",
                "ref_no": "10000",
                "term_months": 12,
                "description": "This is a extended contract",
                "start_date": "2021-03-29T13:00:00.000Z",
                "end_date": "2022-03-29T13:00:00.000Z",
                "activation_date": "2021-03-30T13:00:00.000Z",
                "contract_uid": "9d5980d0-8c6b-11eb-9f8e-c7e91ecf30c6",
                "contract_subtotal": 190,
                "contract_total": 193.8,
                "contract_number": 37
            }
        },
        {
            "is_active": true,
            "is_deleted": false,
            "service_contract": {
                "approval_status": "AWAIT_APPROVAL",
                "is_active": true,
                "is_expired": false,
                "is_deleted": false,
                "prefix": "service",
                "contract_name": "job contract",
                "ref_no": "10000",
                "term_months": 12,
                "description": "This is a extended contract",
                "start_date": "2021-03-29T13:00:00.000Z",
                "end_date": "2022-03-29T13:00:00.000Z",
                "activation_date": "2021-03-30T13:00:00.000Z",
                "contract_uid": "9d5980d0-8c6b-11eb-9f8e-c7e91ecf30c6",
                "contract_subtotal": 190,
                "contract_total": 193.8,
                "contract_number": 37
            },
            "asset": {
                "asset_serial_number": [],
                "is_active": true,
                "asset_quantity": 1,
                "asset_code": "2",
                "asset_name": "e",
                "asset_uid": "b1e4d350-8ca8-11eb-a2f6-650d212c5a5a"
            },
            "ppm_uid": "8ea1c790-8cad-11eb-a2f6-650d212c5a5a",
            "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
            },
            "created_at": "2021-03-24T14:31:01.516Z",
            "updated_at": "2021-03-24T14:31:01.517Z",
            "ppm_number": 30
        },
        {
            "is_active": true,
            "is_deleted": false,
            "service_contract": {
                "approval_status": "AWAIT_APPROVAL",
                "is_active": true,
                "is_expired": false,
                "is_deleted": false,
                "prefix": "service",
                "contract_name": "job contract",
                "ref_no": "10000",
                "term_months": 12,
                "description": "This is a extended contract",
                "start_date": "2021-03-29T13:00:00.000Z",
                "end_date": "2022-03-29T13:00:00.000Z",
                "activation_date": "2021-03-30T13:00:00.000Z",
                "contract_uid": "9d5980d0-8c6b-11eb-9f8e-c7e91ecf30c6",
                "contract_subtotal": 190,
                "contract_total": 193.8,
                "contract_number": 37
            },
            "product": {
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                "product_ref_id": {
                    "product_id": "2",
                    "product_image": "",
                    "product_barcode": "",
                    "product_files": [],
                    "product_description": "",
                    "product_manual_link": "",
                    "quantity": 0,
                    "currency": "",
                    "price": 20,
                    "is_available": true,
                    "is_deleted": false,
                    "location_availability": [
                        {
                            "min_quantity": 3,
                            "serial_nos": [],
                            "location": "5f22978180ca2c24587900b5",
                            "quantity": 0,
                            "created_at": "2020-08-04T08:03:04.467Z"
                        }
                    ],
                    "meta_data": [
                        {
                            "label": "Text Input",
                            "value": ""
                        }
                    ],
                    "product_type": "PARTS",
                    "product_name": "Nut",
                    "prefix": "e",
                    "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                    "created_at": "2020-08-04T08:03:04.469Z",
                    "product_no": 1
                }
            },
            "asset": {
                "asset_serial_number": [],
                "is_active": true,
                "asset_quantity": 1,
                "asset_code": "2",
                "asset_name": "e",
                "asset_uid": "b1e4d350-8ca8-11eb-a2f6-650d212c5a5a"
            },
            "ppm_uid": "8bb86340-8cad-11eb-a2f6-650d212c5a5a",
            "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
            },
            "created_at": "2021-03-24T14:30:56.634Z",
            "updated_at": "2021-03-24T14:30:56.636Z",
            "ppm_number": 29
        },
        {
            "is_active": true,
            "is_deleted": false,
            "service_contract": {
                "approval_status": "AWAIT_APPROVAL",
                "is_active": true,
                "is_expired": false,
                "is_deleted": false,
                "prefix": "service",
                "contract_name": "job contract",
                "ref_no": "10000",
                "term_months": 12,
                "description": "This is a extended contract",
                "start_date": "2021-03-29T13:00:00.000Z",
                "end_date": "2022-03-29T13:00:00.000Z",
                "activation_date": "2021-03-30T13:00:00.000Z",
                "contract_uid": "9d5980d0-8c6b-11eb-9f8e-c7e91ecf30c6",
                "contract_subtotal": 190,
                "contract_total": 193.8,
                "contract_number": 37
            },
            "next_service_date": "2021-03-26T00:00:00.000Z",
            "product": {
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                "product_ref_id": {
                    "product_id": "2",
                    "product_image": "",
                    "product_barcode": "",
                    "product_files": [],
                    "product_description": "",
                    "product_manual_link": "",
                    "quantity": 0,
                    "currency": "",
                    "price": 20,
                    "is_available": true,
                    "is_deleted": false,
                    "location_availability": [
                        {
                            "min_quantity": 3,
                            "serial_nos": [],
                            "location": "5f22978180ca2c24587900b5",
                            "quantity": 0,
                            "created_at": "2020-08-04T08:03:04.467Z"
                        }
                    ],
                    "meta_data": [
                        {
                            "label": "Text Input",
                            "value": ""
                        }
                    ],
                    "product_type": "PARTS",
                    "product_name": "Nut",
                    "prefix": "e",
                    "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                    "created_at": "2020-08-04T08:03:04.469Z",
                    "product_no": 1
                }
            },
            "asset": {
                "asset_serial_number": [],
                "is_active": true,
                "asset_quantity": 1,
                "asset_code": "2",
                "asset_name": "e",
                "asset_uid": "b1e4d350-8ca8-11eb-a2f6-650d212c5a5a"
            },
            "ppm_uid": "8872ae20-8cad-11eb-a2f6-650d212c5a5a",
            "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
            },
            "created_at": "2021-03-24T14:30:51.145Z",
            "updated_at": "2021-03-24T14:30:51.147Z",
            "ppm_number": 28
        },
        {
            "is_active": true,
            "is_deleted": false,
            "estimated_duration": {
                "days": 1
            },
            "service_contract": {
                "approval_status": "AWAIT_APPROVAL",
                "is_active": true,
                "is_expired": false,
                "is_deleted": false,
                "prefix": "service",
                "contract_name": "job contract",
                "ref_no": "10000",
                "term_months": 12,
                "description": "This is a extended contract",
                "start_date": "2021-03-29T13:00:00.000Z",
                "end_date": "2022-03-29T13:00:00.000Z",
                "activation_date": "2021-03-30T13:00:00.000Z",
                "contract_uid": "9d5980d0-8c6b-11eb-9f8e-c7e91ecf30c6",
                "contract_subtotal": 190,
                "contract_total": 193.8,
                "contract_number": 37
            },
            "next_service_date": "2021-03-26T00:00:00.000Z",
            "product": {
                "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                "product_ref_id": {
                    "product_id": "2",
                    "product_image": "",
                    "product_barcode": "",
                    "product_files": [],
                    "product_description": "",
                    "product_manual_link": "",
                    "quantity": 0,
                    "currency": "",
                    "price": 20,
                    "is_available": true,
                    "is_deleted": false,
                    "location_availability": [
                        {
                            "min_quantity": 3,
                            "serial_nos": [],
                            "location": "5f22978180ca2c24587900b5",
                            "quantity": 0,
                            "created_at": "2020-08-04T08:03:04.467Z"
                        }
                    ],
                    "meta_data": [
                        {
                            "label": "Text Input",
                            "value": ""
                        }
                    ],
                    "product_type": "PARTS",
                    "product_name": "Nut",
                    "prefix": "e",
                    "product_uid": "ec97f900-d628-11ea-b54e-090633bb712a",
                    "created_at": "2020-08-04T08:03:04.469Z",
                    "product_no": 1
                }
            },
            "asset": {
                "asset_serial_number": [],
                "is_active": true,
                "asset_quantity": 1,
                "asset_code": "2",
                "asset_name": "e",
                "asset_uid": "b1e4d350-8ca8-11eb-a2f6-650d212c5a5a"
            },
            "ppm_uid": "85445190-8cad-11eb-a2f6-650d212c5a5a",
            "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
            },
            "created_at": "2021-03-24T14:30:45.807Z",
            "updated_at": "2021-03-24T14:30:45.809Z",
            "ppm_number": 27
        }
    ],
    "total_records": 31,
    "current_page": 1,
    "total_pages": 7
}

Fetches all PPMs matching the query parameters

HTTP Request

GET /ppm

Query Parameters

This endpoint accepts multiple filters as a query parameters

Quote query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
count true No of quotes per page Number Any number
sort false sort order Enum ['ASC', 'DESC']
sort_by false sort by type Enum ['ppm_number', 'next_service_date', 'created_at']
filter.last_service_from_date false Filter by last service from date Date 2021-02-19
filter.last_service_to_date false Filter by last service to date Date 2021-02-19
filter.next_service_from_date false Filter by next service from date Date 2021-02-19
filter.next_service_to_date false Filter by next service to date Date 2021-02-19
filter.keyword false Filter by search query. Searches for PPM number, next service date String Any valid string
filter.asset false Filter by asset UIDs Comma Seperated String ce4ee680-8ca2-11eb-9f8e-c7e91ecf30c6, ca29fe10-d60d-11ea-b654-5979bc62f918
filter.service_contract false Filter by service contract UIDs Comma Seperated String 5bab4ea0-d7b4-11ea-952f-093dafdd66ac, a5c38200-d7b4-11ea-952f-093dafdd66ac

Delete PPM

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

PPM with the specific ppm_uid is deleted:

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

Deletes a PPM matching the ppm_uid

HTTP Request

DELETE /ppm/<ppm_uid>

Parts And Services

Create Part

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

Example request body:

{
    "product": {
        "track_quantity": true,
        "tax": {
            "tax_name": "GST",
            "tax_rate": 2
        },
        "has_custom_tax": true,
        "location_availability": [
            {
                "location": "25af5c20-625e-11ec-beb9-a97099cd0da5",
                "quantity": 10000,
                "min_quantity": 10,
                "serial_nos": ["PT12345", "PT12346", "PT123457", "PT12348"]
            }
        ],
        "meta_data": [
            {  
                "label": "Product Type",
                "value": "Plastic Fibre"
            }
        ],
        "product_files": [
            {
                "file_name": "Part image",
                "file_url": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/4.png"
            }
        ],
        "product_barcode": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/64.png",
        "product_image": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/46.png",
        "quantity": 10000,
        "min_quantity": 10,
        "currency": "USD",
        "product_type": "PARTS",
        "prefix": "Part",
        "product_id": "0001",
        "product_name": "Bread Board",
        "product_category": "10814d40-625e-11ec-beb9-a97099cd0da5",
        "brand": "Zuper Electronics",
        "specification": "Semiconductor assembler",
        "uom": "Piece",
        "price": 100,
        "purchase_price": 80,
        "product_manual_link": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/5.png",
        "product_description": "This is a semiconductor part",
        "is_available": true
    }
}

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

{
    "type": "success",
    "message": "New Product Created successfully",
    "data": {
        "product_uid": "3a2c6970-8f1f-11ec-b218-93dd904e78b5"
    }
}

This endpoint allows us to create a new part.

HTTP Request

POST /product

Body Parameters

This endpoint accepts a part object

Part Creation Details

Parameter Required Description Type Example
product_type true Type of part Enum ['PRODUCT', 'SERVICE', 'PARTS']
prefix false Prefix for part String Part
product_id true Unique ID for product String 0001
product_name true Part name String Bread Board
product_category true Part Category UID String 10814d40-625e-11ec-beb9-a97099cd0da5
brand false Part brand String Zuper Electronics
specification false Part specification String Semiconductor assembler
uom false Unit og measurement String Piece
price true Price of part Number 100
purchase_price false Purchase price of part Number 80
product_manual_link false Product manual link String https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/5.png
product_description false Part description String This is a semiconductor part
product_image false Product Image String https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/46.png
product_barcode false Product Barcode String https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/64.png
is_available true Part availability Boolean true or false
track_quantity true Track part quantity Boolean true or false
currency false Part currency String USD
quantity true Part quantity Number 10000
min_quantity true Part minimum quantity 10
has_custom_tax false If custom tax is applied Boolean true or false
tax false Part tax Object REFER PART TAX DETAILS
location_availability true for Part types - PRODUCT, PARTS Part location List of Objects REFER PART LOCATION DETAILS
meta_data false Part Meta data List of Objects REFER PART META DATA DETAILS
product_files false Part related files List of Objects REFER PART FILE DETAILS

Part tax details

Parameter Required Description Type Example
tax_name true Part tax name String GST
tax_rate true Part tax rate in percentage Number 2

A Part's single location details

Parameter Required Description Type Example
location true Part location UID String 25af5c20-625e-11ec-beb9-a97099cd0da5
quantity false Available quantity Number 10000
min_quantity true Minimum quantity Number 10
serial_nos false Serial Numbers List ['PT12345', 'PT12346', 'PT123457', 'PT12348']

A singe part meta data 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

A single part file details

Parameter Required Description Type Example
file_name true File name String Part image
file_url true File URL String https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/5.png

Update Part

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

Example request body:

{
    "product": {
        "product_uid": "6084a7a0-8f1e-11ec-b218-93dd904e78b5",
        "prefix": "Part",
        "product_name": "Bread Board",
        "is_available": false,
        "product_category": "10814d40-625e-11ec-beb9-a97099cd0da5",
        "price": 100,
        "min_quantity": 10,
        "currency": "USD",
        "quantity": 10000,
        "product_manual_link": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/5.png",
        "product_description": "This is a semiconductor part updated",
        "product_barcode": "",
        "product_image": "",
        "product_id": "8888",
        "product_files": [
            {
                "file_name": "Part image",
                "file_url": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/4.png"
            }
        ],
        "product_barcode": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/64.png",
        "product_image": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/46.png",
        "product_type": "PARTS",
        "purchase_price": 80,
        "brand": "Zuper",
        "tax": {
            "tax_rate": 2,
            "tax_name": "GST"
        },
        "track_quantity": true,
        "specification": "Semiconductor assembler updated",
        "has_custom_tax": true,
        "meta_data": [
            {
                "label": "Product Type",
                "value": "Plastic Fibre"
            }
        ],
        "uom": "Piece",
        "location_availability": [
            {
                "location": "25af5c20-625e-11ec-beb9-a97099cd0da5",
                "quantity": 10000,
                "min_quantity": 10,
                "serial_nos": []
            }
        ]
    }
}

On successfully updating a part we get the below response:

{
    "type": "success",
    "message": "Product Updated successfully",
    "data": {
        "product_uid": "6084a7a0-8f1e-11ec-b218-93dd904e78b5"
    }
}

This endpoint allows us to update a part.

HTTP Request

PUT /product/<product_uid>

Body Parameters

This endpoint accepts a part object

Part Update Details

Parameter Required Description Type Example
product_type true Type of part Enum ['PRODUCT', 'SERVICE', 'PARTS']
prefix false Prefix for part String Part
product_id true Unique ID for product String 0001
product_name true Part name String Bread Board
product_category true Part Category UID String 10814d40-625e-11ec-beb9-a97099cd0da5
brand false Part brand String Zuper Electronics
specification false Part specification String Semiconductor assembler
uom false Unit og measurement String Piece
price true Price of part Number 100
purchase_price false Purchase price of part Number 80
product_manual_link false Product manual link String https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/5.png
product_description false Part description String This is a semiconductor part
product_image false Product Image String https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/46.png
product_barcode false Product Barcode String https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/64.png
is_available true Part availability Boolean true or false
track_quantity true Track part quantity Boolean true or false
currency false Part currency String USD
quantity true Part quantity Number 10000
min_quantity true Part minimum quantity 10
has_custom_tax false If custom tax is applied Boolean true or false
tax false Part tax Object REFER PART TAX DETAILS
location_availability true for Part types - PRODUCT, PARTS Part location List of Objects REFER PART LOCATION DETAILS
meta_data false Part Meta data List of Objects REFER PART META DATA DETAILS
product_files false Part related files List of Objects REFER PART FILE DETAILS

Part tax details

Parameter Required Description Type Example
tax_name true Part tax name String GST
tax_rate true Part tax rate in percentage Number 2

A Part's single location details

Parameter Required Description Type Example
location true Part location UID String 25af5c20-625e-11ec-beb9-a97099cd0da5
quantity false Available quantity Number 10000
min_quantity true Minimum quantity Number 10
serial_nos false Serial Numbers List ['PT12345', 'PT12346', 'PT123457', 'PT12348']

A singe part meta data 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

A single part file details

Parameter Required Description Type Example
file_name true File name String Part image
file_url true File URL String https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/5.png

Get Parts

curl "https://<host>/api/product?count=<count>&filter.brand=<brand_name>&filter.is_available=<is_available_flag>&filter.keyword=<keyword>&filter.location=<location_uid>&filter.product_category=<category_uid>&filter.product_type=<part_type>&page=<page_number>&sort=<sort_order>&sort_by=<sort_type>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the parts matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "product_uid": "dd8d067a-8a4b-11ec-885b-6dd8c514c720",
            "product_id": "C10002",
            "product_category": {
                "category_name": "Electronics",
                "category_uid": "10814d40-625e-11ec-beb9-a97099cd0da5"
            },
            "product_image": "",
            "product_barcode": "",
            "product_files": [],
            "brand": "Inventory Item",
            "product_name": "1 1 90 Degree Connectors",
            "product_description": "",
            "product_type": "PRODUCT",
            "meta_data": [],
            "product_manual_link": "",
            "location_availability": [
                {
                    "location": {
                        "location_uid": "d5456d40-8a4b-11ec-885b-6dd8c514c720",
                        "location_name": "7000 Midwest Distribution : 7090 San Antonio Ops Warehouse",
                        "is_deleted": false
                    },
                    "quantity": null,
                    "min_quantity": 0,
                    "serial_nos": [],
                    "created_at": "2022-02-10T08:31:38.756Z"
                }
            ],
            "track_quantity": true,
            "quantity": 0,
            "min_quantity": 0,
            "currency": "INR",
            "price": 21.15,
            "purchase_price": 21.15,
            "has_custom_tax": false,
            "is_available": true,
            "is_deleted": false,
            "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",
                "prefix": null,
                "work_phone_number": "9987654321",
                "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
            },
            "created_at": "2022-02-10T08:31:38.756Z",
            "product_no": 22,
        },
        {
            "product_uid": "dd8d0673-8a4b-11ec-885b-6dd8c514c720",
            "product_id": "C10003",
            "product_category": {
                "category_name": "Electronics",
                "category_uid": "10814d40-625e-11ec-beb9-a97099cd0da5"
            },
            "product_image": "",
            "product_barcode": "",
            "product_files": [],
            "brand": "Inventory Item",
            "product_name": "1 1/4\" Liquid Tight Conduit",
            "product_description": "",
            "product_type": "PRODUCT",
            "meta_data": [],
            "product_manual_link": "",
            "location_availability": [
                {
                    "location": {
                        "location_uid": "d5456d40-8a4b-11ec-885b-6dd8c514c720",
                        "location_name": "7000 Midwest Distribution : 7090 San Antonio Ops Warehouse",
                        "is_deleted": false
                    },
                    "quantity": null,
                    "min_quantity": 0,
                    "serial_nos": [],
                    "created_at": "2022-02-10T08:31:38.679Z"
                }
            ],
            "track_quantity": true,
            "quantity": 0,
            "min_quantity": 0,
            "currency": "INR",
            "price": 3.31,
            "purchase_price": 3.31,
            "has_custom_tax": false,
            "is_available": true,
            "is_deleted": false,
            "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",
                "prefix": null,
                "work_phone_number": "9987654321",
                "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
            },
            "created_at": "2022-02-10T08:31:38.679Z",
            "product_no": 15,
        },
        {
            "product_uid": "dd8d0676-8a4b-11ec-885b-6dd8c514c720",
            "product_id": "C10004",
            "product_category": {
                "category_name": "Electronics",
                "category_uid": "10814d40-625e-11ec-beb9-a97099cd0da5"
            },
            "product_image": "",
            "product_barcode": "",
            "product_files": [],
            "brand": "Inventory Item",
            "product_name": "1 1 Straight Connectors",
            "product_description": "",
            "product_type": "PRODUCT",
            "meta_data": [],
            "product_manual_link": "",
            "location_availability": [
                {
                    "location": {
                        "location_uid": "d5456d40-8a4b-11ec-885b-6dd8c514c720",
                        "location_name": "7000 Midwest Distribution : 7090 San Antonio Ops Warehouse",
                        "is_deleted": false
                    },
                    "quantity": null,
                    "min_quantity": 0,
                    "serial_nos": [],
                    "created_at": "2022-02-10T08:31:38.714Z"
                }
            ],
            "track_quantity": true,
            "quantity": 0,
            "min_quantity": 0,
            "currency": "INR",
            "price": 10.3,
            "purchase_price": 10.3,
            "has_custom_tax": false,
            "is_available": true,
            "is_deleted": false,
            "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",
                "prefix": null,
                "work_phone_number": "9987654321",
                "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
            },
            "created_at": "2022-02-10T08:31:38.715Z",
            "product_no": 18,
        },
        {
            "product_uid": "dd8d067b-8a4b-11ec-885b-6dd8c514c720",
            "product_id": "C10015",
            "product_category": {
                "category_name": "Electronics",
                "category_uid": "10814d40-625e-11ec-beb9-a97099cd0da5"
            },
            "product_image": "",
            "product_barcode": "",
            "product_files": [],
            "brand": "Inventory Item",
            "product_name": "100 Watt LED Street Light USED",
            "product_description": "",
            "product_type": "PRODUCT",
            "meta_data": [],
            "product_manual_link": "",
            "location_availability": [
                {
                    "location": {
                        "location_uid": "d5456d40-8a4b-11ec-885b-6dd8c514c720",
                        "location_name": "7000 Midwest Distribution : 7090 San Antonio Ops Warehouse",
                        "is_deleted": false
                    },
                    "quantity": null,
                    "min_quantity": 0,
                    "serial_nos": [],
                    "created_at": "2022-02-10T08:31:38.766Z"
                }
            ],
            "track_quantity": true,
            "quantity": 0,
            "min_quantity": 0,
            "currency": "INR",
            "price": 122.5,
            "purchase_price": 122.5,
            "has_custom_tax": false,
            "is_available": true,
            "is_deleted": false,
            "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",
                "prefix": null,
                "work_phone_number": "9987654321",
                "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
            },
            "created_at": "2022-02-10T08:31:38.766Z",
            "product_no": 23,
        }
    ],
    "total_records": 146,
    "current_page": 1,
    "total_pages": 37
}

Fetches all parts matching the query parameters

HTTP Request

GET /product

Query Parameters

This endpoint accepts multiple filters as a query parameters

Part query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
count true No of parts per page Number Any number
sort false sort order Enum ['ASC', 'DESC']
sort_by false sort by type Enum ['product_id', 'product_no', 'product_name', 'quantity', 'created_at']
filter.from_date false Filter by from date Date 2021-02-19
filter.to_date false Filter by to date Date 2021-02-19
filter.keyword false Filter by search query. Searches for part name, part id, brand, specification String Any valid string
filter.is_available false Filter by part availability Boolean true or false
filter.brand false Filter by brand String Zuper Electronics
filter.specification false Filter by specification String Semiconductor assembler
filter.product_id false Filter by part IDs Comma Seperated String ce4ee680-8ca2-11eb-9f8e-c7e91ecf30c6, ca29fe10-d60d-11ea-b654-5979bc62f918
filter.product_uid false Filter by part UIDs Comma Seperated String a4ee48e0-d60d-11ea-b654-5979bc62f918, 2286fb50-8278-11eb-84ff-eb2a762e383a
filter.location_uid false Filter by part location UIDs Comma Seperated String a4ee48e0-d60d-11ea-b654-5979bc62f918, 2286fb50-8278-11eb-84ff-eb2a762e383a
filter.product_category false Filter by part category UIDs Comma Seperated String 2b7005b0-61ec-11eb-be1a-5f41b7fdd76b, 458bfb70-61ec-11eb-be1a-5f41b7fdd76b
filter.min_quantity false Filter by minimum quantity Number 10
filter.created_at false Filter by created at date Date 2021-02-19
filter.custom_field false Filter by custom field Json Stringified REFER CUSTOM FIELD DETAILS

A single custom field details

Parameter Required Description Type Example
label true Custom field label String product_type
value true Custom field value String plastic fibre

Get Part Details

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

We get the part details of the specific part_uid:

{
    "type": "success",
    "data": {
        "product_uid": "6084a7a0-8f1e-11ec-b218-93dd904e78b5",
        "prefix": "Part",
        "product_id": "0001",
        "product_category": {
            "category_name": "Electronics",
            "category_uid": "10814d40-625e-11ec-beb9-a97099cd0da5"
        },
        "product_image": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/64.png",
        "product_barcode": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/46.png",
        "product_files": [
            {
                "file_name": "Part image",
                "file_url": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/4.png"
            }
        ],
        "brand": "Zuper",
        "specification": "Semiconductor assembler",
        "uom": "Piece",
        "product_name": "Bread Board",
        "product_description": "This is a semiconductor part",
        "product_type": "PARTS",
        "meta_data": [
            {
                "label": "Product Type",
                "value": "Plastic Fibre",
                "type": "SINGLE_LINE",
                "hide_to_fe": false,
                "group_name": "part",
                "group_uid": "1ff807b0-8a53-11ec-9012-d17ea45c5d12"
            }
        ],
        "product_manual_link": "https://s3.ap-south-1.amazonaws.com/staging.in.pro.zuper/attachments/5.png",
        "location_availability": [
            {
                "location": {
                    "is_deleted": false,
                    "location_name": "Chennai",
                    "location_uid": "25af5c20-625e-11ec-beb9-a97099cd0da5"
                },
                "quantity": 10000,
                "min_quantity": 10,
                "serial_nos": [],
                "created_at": "2022-02-16T12:49:04.619Z"
            }
        ],
        "track_quantity": true,
        "quantity": 10000,
        "min_quantity": 10,
        "currency": "USD",
        "price": 100,
        "purchase_price": 80,
        "has_custom_tax": true,
        "tax": {
            "tax_rate": 2,
            "tax_name": "GST"
        },
        "is_available": true,
        "is_deleted": false,
        "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",
            "prefix": null,
            "work_phone_number": "9987654321",
            "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
        },
        "created_at": "2022-02-16T11:48:37.293Z",
        "product_no": 145
    }
}

Fetches part details matching the product_uid

HTTP Request

GET /product/<product_uid>

Create Inward Transaction

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

Example request body:

{
    "transaction": {
        "product_uid": "6084a7a0-8f1e-11ec-b218-93dd904e78b5",
        "location_uid": "d5456d40-8a4b-11ec-885b-6dd8c514c720",
        "quantity": 50,
        "serial_nos": ["PT12345","PT12346"],
        "remarks": "Add products to location",
        "purchase_price": 80
    }
}

On successfull inward transaction of parts we get the below response:

{
    "type": "success",
    "message": "Product Transaction Created successfully",
    "data": {
        "transaction_uid": "3744df40-8f32-11ec-b218-93dd904e78b5"
    }
}

This endpoint allows us to create a inward transaction of a part.

HTTP Request

POST /product/<product_uid>/inward

Body Parameters

This endpoint accepts a part inward transaction object

Part Inward Transaction Creation Details

Parameter Required Description Type Example
product_uid true Part UID String 6084a7a0-8f1e-11ec-b218-93dd904e78b5
location_uid true Part Location UID String d5456d40-8a4b-11ec-885b-6dd8c514c720
quantity true Part Transaction Quantity Number 50
purchase_price false Part purchase price Number 80
serial_nos false Part serial numbers List ['PT12345', 'PT12346']
remarks false Transaction Remarks String Add products to location

Create Outward Transaction

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

Example request body:

{
    "transaction": {
        "product_uid": "6084a7a0-8f1e-11ec-b218-93dd904e78b5",
        "location_uid": "d5456d40-8a4b-11ec-885b-6dd8c514c720",
        "quantity": 50,
        "serial_nos": ["PT12345","PT12346"],
        "remarks": "Remove products from location",
        "purchase_price": 80
    }
}

On successfull outward transaction of parts we get the below response:

{
    "type": "success",
    "message": "Product Transaction Created successfully",
    "data": {
        "transaction_uid": "52a0a800-8f32-11ec-b218-93dd904e78b5"
    }
}

This endpoint allows us to create a outward transaction of a part.

HTTP Request

POST /product/<product_uid>/outward

Body Parameters

This endpoint accepts a part outward transaction object

Part Outward Transaction Creation Details

Parameter Required Description Type Example
product_uid true Part UID String 6084a7a0-8f1e-11ec-b218-93dd904e78b5
location_uid true Part Location UID String d5456d40-8a4b-11ec-885b-6dd8c514c720
quantity true Part Transaction Quantity Number 50
purchase_price false Part purchase price Number 80
serial_nos false Part serial numbers List ['PT12345', 'PT12346']
remarks false Transaction Remarks String Remove products from location

Create Transfer Transaction

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

Example request body:

{
    "transaction": {
        "product_uid": "f8abfb00-8f32-11ec-b218-93dd904e78b5",
        "from_location_uid": "90d508c0-88c8-11ec-a433-0b243bd93d6d",
        "to_location_uid": "25af5c20-625e-11ec-beb9-a97099cd0da5",
        "quantity": 100,
        "serial_nos": ["PT12345","PT12346"],
        "remarks": "Tranfer parts from Chennai to Banglore location",
        "purchase_price": 80
    }
}

On successfull transfer transaction of parts we get the below response:

{
    "type": "success",
    "message": "Product Transaction Created successfully",
    "data": {
        "transaction_uid": "3ff3d050-8f33-11ec-b218-93dd904e78b5"
    }
}

This endpoint allows us to create a transfer transaction of a part.

HTTP Request

POST /product/<product_uid>/transfer

Body Parameters

This endpoint accepts a part transfer transaction object

Part Transfer Transaction Creation Details

Parameter Required Description Type Example
product_uid true Part UID String f8abfb00-8f32-11ec-b218-93dd904e78b5
from_location_uid true Part Location UID String 90d508c0-88c8-11ec-a433-0b243bd93d6d
to_location_uid true Part Location UID String 25af5c20-625e-11ec-beb9-a97099cd0da5
quantity true Part Transaction Quantity Number 50
purchase_price false Part purchase price Number 80
serial_nos false Part serial numbers List ['PT12345', 'PT12346']
remarks false Transaction Remarks String Tranfer parts from Chennai to Banglore location

Get Part Transactions

curl "https://<host>/api/product/transaction?count=<count>&filter.type=<transaction_type>&page=<page_number>&sort=<sort_order>&sort_by=<sort_type>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the part transactions matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "transaction_uid": "3744df40-8f32-11ec-b218-93dd904e78b5",
            "transaction_type": "TRANSACTION",
            "module_name": "",
            "type": "INWARD",
            "product": {
                "product_uid": "6084a7a0-8f1e-11ec-b218-93dd904e78b5",
                "product_name": "Bread Board"
            },
            "to_location": {
                "location_uid": "d5456d40-8a4b-11ec-885b-6dd8c514c720",
                "location_name": "7000 Midwest Distribution : 7090 San Antonio Ops Warehouse"
            },
            "remarks": "Add products to location",
            "quantity": 50,
            "serial_nos": [
                "PT12345",
                "PT12346"
            ],
            "purchase_price": 80,
            "is_deleted": false,
            "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",
                "prefix": null,
                "work_phone_number": "9987654321",
                "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
            },
            "created_at": "2022-02-16T14:10:38.008Z"
        },
        {
            "transaction_uid": "52a0a800-8f32-11ec-b218-93dd904e78b5",
            "transaction_type": "TRANSACTION",
            "module_name": "",
            "type": "OUTWARD",
            "product": {
                "product_uid": "6084a7a0-8f1e-11ec-b218-93dd904e78b5",
                "product_name": "Bread Board"
            },
            "from_location": {
                "location_uid": "d5456d40-8a4b-11ec-885b-6dd8c514c720",
                "location_name": "7000 Midwest Distribution : 7090 San Antonio Ops Warehouse"
            },
            "remarks": "Add products to location",
            "quantity": 50,
            "serial_nos": [
                "PT12345",
                "PT12346"
            ],
            "purchase_price": null,
            "is_deleted": false,
            "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",
                "prefix": null,
                "work_phone_number": "9987654321",
                "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
            },
            "created_at": "2022-02-16T14:11:23.906Z"
        },
        {
            "transaction_uid": "3ff3d050-8f33-11ec-b218-93dd904e78b5",
            "transaction_type": "TRANSACTION",
            "module_name": "",
            "type": "TRANSFER",
            "product": {
                "product_uid": "f8abfb00-8f32-11ec-b218-93dd904e78b5",
                "product_name": "Board"
            },
            "from_location": {
                "location_uid": "90d508c0-88c8-11ec-a433-0b243bd93d6d",
                "location_name": "Banglore"
            },
            "to_location": {
                "location_name": "Chennai",
                "location_uid": "25af5c20-625e-11ec-beb9-a97099cd0da5"
            },
            "remarks": "Add products to location",
            "quantity": 100,
            "serial_nos": [
                "PT12345",
                "PT12346"
            ],
            "purchase_price": null,
            "is_deleted": false,
            "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",
                "prefix": null,
                "work_phone_number": "9987654321",
                "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
            },
            "created_at": "2022-02-16T14:18:02.070Z"
        }
    ],
    "total_records": 300,
    "current_page": 1,
    "total_pages": 100
}

Fetches all part transactions matching the query parameters

HTTP Request

GET /product/transaction

Query Parameters

This endpoint accepts multiple filters as a query parameters

Part transaction query param details

Parameter Required Description Type Example
page true Page no to fetch Number Any number
count true No of parts per page Number Any number
sort false sort order Enum ['ASC', 'DESC']
sort_by false sort by type Enum ['quantity', 'created_at']
filter.type false Filter by transaction type Enum ['INWARD', 'OUTWARD', 'TRANSFER']
filter.created_at false Filter by transaction date Date 2021-02-19
filter.created_at_from false Filter by transaction from date Date 2021-02-19
filter.created_at_to false Filter by transaction to date Date 2021-02-19
filter.product_uid false Filter by part UIDs Comma Seperated String a4ee48e0-d60d-11ea-b654-5979bc62f918, 2286fb50-8278-11eb-84ff-eb2a762e383a
filter.location_uid false Filter by part location UIDs Comma Seperated String a4ee48e0-d60d-11ea-b654-5979bc62f918, 2286fb50-8278-11eb-84ff-eb2a762e383a
filter.from_location false Filter by part from location UIDs Comma Seperated String a4ee48e0-d60d-11ea-b654-5979bc62f918, 2286fb50-8278-11eb-84ff-eb2a762e383a
filter.to_location false Filter by part to location UIDs Comma Seperated String a4ee48e0-d60d-11ea-b654-5979bc62f918, 2286fb50-8278-11eb-84ff-eb2a762e383a

Delete Part

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

Part with the specific product_uid is deleted:

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

Deletes a part matching the product_uid

HTTP Request

DELETE /product/<product_uid>

Locations

Add Locations

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

Example request body:

{
    "location": [
        {
            "job_uid": "aafdabb0-1f53-11eb-a213-fd7a07e06393",
            "track_time": "2021-01-09T12:45:00.000Z",
            "latitude": 13.0213,
            "longitude": 26.2231,
            "altitude": 36,
            "address": "Prakasam St, Gangai Karai Puram, T. Nagar, Chennai, Tamil Nadu 600017",
            "battery": 87,
            "signal_strength": 20,
            "is_offline": 0
        },
        {
            "job_uid": "3bbf6fe0-5199-11eb-ba10-93be85bf573a",
            "track_time": "2021-01-09T15:45:00.000Z",
            "latitude": 12.0213,
            "longitude": 24.0213,
            "altitude": 33,
            "address": "Plot No. 1 Guindy, SIDCO Industrial Estate, Chennai, Tamil Nadu 600032",
            "battery": 74,
            "signal_strength": 50,
            "is_offline": 1
        }
    ]
}

On successfull addition of location we get the below response:

{
    "type": "success",
    "message": "Geo Co-ordinates added successfully"
}

A single or multiple locations of a user can be added.

HTTP Request

POST /location

Body Parameters

This endpoint accepts an array of location objects

A Single Location Object Details

Parameter Default Description Type Example
job_uid null Current job_uid of the location's user. String aafdabb0-1f53-11eb-a213-fd7a07e06393
track_time null Time at which the user was present at the location. String 2021-01-09T12:45:00000Z
latitude null Latitude of the location Decimal 12.0213
longitude null Longitude of the location Decimal 80.2231
altitude null Altitude of the location Number 33
address null Address of the location String Prakasam St, Gangai Karai Puram, T. Nagar, Chennai, Tamil Nadu 600017
battery null Device battery percentage Number 87
signal_strength null Device signal strength Number 20
is_offline 0 User is online of offline Boolean 0 or 1

Ping Location

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

On successfull location ping we get the below response:

{
    "message": "Recent location time updated successfully",
    "type": "success"
}

The user's recent location time is updated.

HTTP Request

POST /location/ping

Locations of User by Date

curl "https://<host>/api/location/?user_uid=<user_uid>&date=<date>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the user's locations of a particular date:

{
    "type": "success",
    "data": {
        "locations": [
            {
                "job_uid": "5ecd3e00-5409-11eb-8018-7b91dfe0f0da",
                "track_time": "2021-01-15T12:45:00.000Z",
                "latitude": "12.0213000",
                "longitude": "80.2231000",
                "altitude": 33,
                "address": "Prakasam St, Gangai Karai Puram, T. Nagar, Chennai, Tamil Nadu 600017",
                "battery": 87,
                "signal_strength": 20,
                "is_offline": 0
            },
            {
                "job_uid": "3a930960-4f1e-11eb-b127-db270b8a78ee",
                "track_time": "2021-01-15T15:45:00.000Z",
                "latitude": "12.0213000",
                "longitude": "26.0213000",
                "altitude": 53,
                "address": "Plot No. 1 Guindy, SIDCO Industrial Estate, Chennai, Tamil Nadu 600032",
                "battery": 78,
                "signal_strength": 20,
                "is_offline": 0
            }
        ],
        "user": {
            "first_name": "Sriram",
            "last_name": "Palakula",
            "email": "[email protected]",
            "designation": "Admin",
            "profile_picture": "https://s3.ap-south-1.amazonaws.com/prod.app.zuperpro/assets/profile_picture.jpg",
            "work_phone_number": "9987654321"
        }
    }
}

Fetches all locations of a user on a particular date

HTTP Request

GET /location/?user_uid=<user_uid>&date=<date>

Query Parameters

This endpoint accepts a user_uid and date as a query parameter

User UID details

Parameter Description Type Example
user_uid The user's UID String 8366adeb-fea4-4c97-853b-88462021071d
date The date for which we want to fetch the locations String 2021-01-15

Recent Location of User

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

We get the user's recent location data:

{
    "type": "success",
    "data": {
        "job_uid": "aafdabb0-1f53-11eb-a213-fd7a07e06393",
        "track_time": "2021-01-15T07:36:26.000Z",
        "latitude": "126.0213000",
        "longitude": "80.2231000",
        "address": "Prakasam St, Gangai Karai Puram, T. Nagar, Chennai, Tamil Nadu 600017",
        "battery": 87,
        "is_offline": 0,
        "signal_strength": 20,
        "created_at": "2020-06-11T14:47:02.000Z",
        "user": {
            "user_uid": "8366adeb-fea4-4c97-853b-88462021071d",
            "emp_code": "210520",
            "first_name": "Sri",
            "last_name": "Ram",
            "email": "[email protected]",
            "designation": "Engineer",
            "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": 1,
            "is_deleted": 0
        },
        "is_occupied": true,
        "job_count": 0
    }
}

Fetches the recent location of the user

HTTP Request

GET /location/user/?user_uid=<user_uid>

Query Parameters

This endpoint accepts a user_uid as a query parameter

User UID details

Parameter Description Type Example
user_uid The user's UID String 8366adeb-fea4-4c97-853b-88462021071d

Recent Location of Team Users

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

We get the user's recent location data in a team:

{
    "type": "success",
    "data": [
        {
            "job_uid": "aafdabb0-1f53-11eb-a213-fd7a07e06393",
            "track_time": "2021-01-15T12:45:00.000Z",
            "latitude": "12.0213000",
            "longitude": "26.0213000",
            "address": "sample address",
            "battery": 87,
            "is_offline": 0,
            "signal_strength": 20,
            "created_at": "2021-01-15T07:34:45.000Z",
            "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
            },
            "is_occupied": true,
            "job_count": 0
        },
        {
            "job_uid": "5ecd3e00-5409-11eb-8018-7b91dfe0f0da",
            "track_time": "2021-01-15T12:45:00.000Z",
            "latitude": "12.0213000",
            "longitude": "20.0213000",
            "address": "sample address",
            "battery": 78,
            "is_offline": 0,
            "signal_strength": 22,
            "created_at": "2021-01-15T09:34:45.000Z",
            "user": {
                "user_uid": "7af6909b-9ede-4487-8d84-55ae0e991af8",
                "emp_code": "002",
                "first_name": "John",
                "last_name": "Doe",
                "email": "[email protected]",
                "designation": "TL",
                "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
            },
            "is_occupied": true,
            "job_count": 0
        }
    ]
}

Fetches the recent location of the users in a team

HTTP Request

GET /location/all/?team_uid=<team_uid>

Query Parameters

This endpoint accepts a team_uid as a query parameter

Team UID details

Parameter Description Type Example
team_uid The team's UID String f545d74e-1ea9-40d3-a063-c9b19d20dada

Recent Location of Job Users

curl "https://<host>/api/location/job?job_uid=<job_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the job users recent location data:

{
    "type": "success",
    "data": [
        {
            "job_uid": "5ecd3e00-5409-11eb-8018-7b91dfe0f0da",
            "track_time": "2021-01-15T07:34:45.000Z",
            "latitude": "126.0213000",
            "longitude": "80.2231000",
            "address": "Prakasam St, Gangai Karai Puram, T. Nagar, Chennai, Tamil Nadu 600017",
            "battery": 87,
            "is_offline": 0,
            "signal_strength": 65,
            "created_at": "2021-01-15T07:34:45.000Z",
            "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
            },
            "is_occupied": false,
            "job_count": 0
        },
        {
            "job_uid": "3a930960-4f1e-11eb-b127-db270b8a78ee",
            "track_time": "2021-01-15T07:34:45.000Z",
            "latitude": "16.0213000",
            "longitude": "70.2231000",
            "address": "Plot No. 1 Guindy, SIDCO Industrial Estate, Chennai, Tamil Nadu 600032",
            "battery": 45,
            "is_offline": 0,
            "signal_strength": 34,
            "created_at": "2021-01-15T07:34:45.000Z",
            "user": {
                "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
            },
            "is_occupied": false,
            "job_count": 0
        }
    ]
}

Fetched the recent location of all job users.

HTTP Request

GET /location/job/?job_uid=<job_uid>

Query Parameters

This endpoint accepts a job_uid as a query paramter

Job UID details

Parameter Description Type Example
job_uid The job's UID String 3a930960-4f1e-11eb-b127-db270b8a78ee

Service Territories

Create Service Territory

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

Example request body:


// Type: Zipcodes

{
    "territory": {
        "territory_zipcodes": [
            "600015",
            "600017"
        ],
        "territory_type": "ZIPCODE",
        "territory_color": "#4960a0",
        "territory_name": "APAC zone",
        "territory_description": "This is a southern territory",
        "teams": [
            {
                "team_uid": "ea11b4d7-7197-423e-9e31-f4a95793c042"
            }
        ]
    }
}

//Type: Geo Radius

{
    "territory": {
        "territory_type": "RADIUS",
        "territory_color": "#4960a0",
        "territory_radius": {
            "geo_cordinates": [13.0418, 80.2341],
            "radius": 60
        },
        "territory_name": "Northern Territory",
        "territory_description": "this is a nothern territory",
        "teams": [
            {
                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab"
            },
            {
                "team_uid": "ea11b4d7-7197-423e-9e31-f4a95793c042"
            }
        ]
    }
}


//Type: Geofence

{
    "territory": {
        "territory_type": "GEOFENCE",
        "territory_color": "#4960a0",
        "territory_coordinates": [
            [
                13.0431,
                80.1377
            ],
            [
                13.0393,
                80.1722
            ],
            [
                13.0249,
                80.1766
            ],
            [
                13.0169,
                80.1413
            ]
        ],
        "territory_name": "Western territory",
        "territory_description": "this is a western territory",
        "teams": [
            {
                "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab"          
            }
        ]
    }
}




On successfull creation of a service territory we get the below response:

{
    "type": "success",
    "message": "New Territory Created successfully",
    "data": {
        "territory_uid": "ccd9ede0-ead5-11eb-b74f-e97b9664ae3f"
    }
}

This endpoint allows us to create a new service territory.

HTTP Request

POST /territory

Body Parameters

This endpoint accepts a service territory object

Service Territory Creation Details

Parameter Required Description Type Example
territory_name true Territory name String APAC zone
territory_description false Customer UID of the customer String ff040f90-cd52-11ea-9c09-f5d3c9145a54
teams false Territory teams List of Objects REFER TEAM DETAILS
territory_color false Territory color String #4960a0
territory_type true Territory type Enum ['ZIPCODE', 'RADIUS', 'GEOFENCE']
territory_zipcodes true if territory type is ZIPCODE Territory zip codes List of zipcodes ["600015", "600017" ]
territory_radius true if territory type is RADIUS Territory radius Object REFER TERRITORY RADIUS DETAILS
territory_coordinates true if territory type is GEOFENCE Territory coordinates List of coordinates [[13.0431, 80.1377], [13.0393, 80.1722]]

Territory radius details

Parameter Required Description Type Example
radius true Territory radius Number 60
geo_cordinates true Territory's latitude and longitude List [13.0418, 80.2341]

A single team details

Parameter Required Description Type Example
team_uid true Team UID of the team String f488e669-92d0-44b9-912b-3182a790ee20

Update Service Territory

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

Example request body:


// Type: Zipcodes

{
    "territory": {
        "territory_zipcodes": [
            "600015",
            "600017",
            "600019"
        ],
        "territory_type": "ZIPCODE",
        "territory_color": "#4960a0",
        "territory_name": "APAC zone extended",
        "territory_description": "This is a southern territory with expansion",
        "teams": [
            {
                "team_uid": "ea11b4d7-7197-423e-9e31-f4a95793c042"
            }
        ]
    }
}

On successfull territory update we get the below response:

{
    "type": "success",
    "message": "Territory Updated successfully",
    "data": {
        "territory_uid": "07a07b20-eada-11eb-b4f2-1358a62a056b"
    }
}

This endpint allows us to update a service territory

HTTP Request

PUT /territory/<territory_uid>

Body Parameters

This endpoint accepts a job object

Service Territory Update Details

Parameter Required Description Type Example
territory_name true Territory name String APAC zone
territory_description false Customer UID of the customer String ff040f90-cd52-11ea-9c09-f5d3c9145a54
teams false Territory teams List of Objects REFER TEAM DETAILS
territory_color false Territory color String #4960a0
territory_type true Territory type Enum ['ZIPCODE', 'RADIUS', 'GEOFENCE']
territory_zipcodes true if territory type is ZIPCODE Territory zip codes List of zipcodes ["600015", "600017" ]
territory_radius true if territory type is RADIUS Territory radius Object REFER TERRITORY RADIUS DETAILS
territory_coordinates true if territory type is GEOFENCE Territory coordinates List of coordinates [[13.0431, 80.1377], [13.0393, 80.1722]]

Territory radius details

Parameter Required Description Type Example
radius true Territory radius Number 60
geo_cordinates true Territory's latitude and longitude List [13.0418, 80.2341]

A single team details

Parameter Required Description Type Example
team_uid true Team UID of the team String f488e669-92d0-44b9-912b-3182a790ee20

Get Service Territories

curl "https://<host>/api/territory?count=<count>&filter.type=<territory_type>&filter.keyword=<keyword>&filter.is_active=<is_active_flag>&page=<page_number>&sort=<sort_order>&sort_by=<sort_type>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the service territories matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "territory_radius": {
                "geo_cordinates": [
                    13.0368,
                    80.1645
                ],
                "radius": 2024
            },
            "territory_zipcodes": [],
            "territory_coordinates": [],
            "is_active": true,
            "is_deleted": false,
            "territory_type": "RADIUS",
            "territory_color": "#4960a0",
            "territory_name": "Southern territory",
            "territory_description": "This is a southern territory",
            "territory_uid": "7b5b4040-eada-11eb-b4f2-1358a62a056b",
            "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.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "created_at": "2021-07-22T10:49:27.732Z",
            "updated_at": "2021-07-22T10:49:27.735Z"
        },
        {
            "territory_radius": {
                "geo_cordinates": []
            },
            "territory_zipcodes": [
                "600015",
                "600017",
                "600019"
            ],
            "territory_coordinates": [],
            "is_active": true,
            "is_deleted": false,
            "territory_type": "ZIPCODE",
            "territory_color": "#4960a0",
            "territory_name": "APAC zone extended",
            "territory_description": "This is a southern territory with expansion",
            "territory_uid": "07a07b20-eada-11eb-b4f2-1358a62a056b",
            "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.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "created_at": "2021-07-22T10:46:13.168Z",
            "updated_at": "2021-07-22T10:55:04.274Z"
        },
        {
            "territory_radius": {
                "geo_cordinates": []
            },
            "territory_zipcodes": [],
            "territory_coordinates": [
                [
                    13.0431,
                    80.1377
                ],
                [
                    13.0393,
                    80.1722
                ],
                [
                    13.0249,
                    80.1766
                ],
                [
                    13.0160,
                    80.1413
                ]
            ],
            "is_active": true,
            "is_deleted": false,
            "territory_type": "GEOFENCE",
            "territory_color": "#4960a0",
            "territory_name": "test territory",
            "territory_description": "this is a test territory",
            "territory_uid": "ccd9ede0-ead5-11eb-b74f-e97b9664ae3f",
            "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.jpg",
                "is_active": true,
                "is_deleted": false
            },
            "created_at": "2021-07-22T10:15:55.081Z",
            "updated_at": "2021-07-22T10:15:55.085Z",
        },
        {
            "territory_radius": {
                "geo_cordinates": [
                    13.0418,
                    80.2341
                ],
                "radius": 60
            },
            "territory_zipcodes": [],
            "territory_coordinates": [],
            "is_active": true,
            "is_deleted": false,
            "territory_type": "RADIUS",
            "territory_color": "#4960a0",
            "territory_name": "Northern Territory",
            "territory_description": "this is a nothern territory",
            "territory_uid": "e4fbeb90-ead9-11eb-b4f2-1358a62a056b",
            "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-07-22T10:45:15.223Z",
            "updated_at": "2021-07-22T10:45:15.227Z"
        }
    ],
    "total_records": 15,
    "current_page": 1,
    "total_pages": 4
}

Fetches all service territories matching the query parameters

HTTP Request

GET /territory

Query Parameters

This endpoint accepts multiple filters as a query parameters

Territory 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 ['territory_name', 'created_at']
filter.keyword false Filter by search query. Searches for territory name String Any valid string
filter.type false Filter by territory type Enum ['ZIPCODE', 'RADIUS', 'GEOFENCE']
filter.is_active false Filter by active territories Boolean 0 or 1

Activate / Deactivate Service Territory

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

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

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

This endpoint allows us to activate / deactivate a service territory.

HTTP Request

PUT /territory/<territory_uid>/activate

Query Parameters

This endpoint accepts activation object as query parameter

Service Territory Activation Details

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

Get Service Territory Details

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

We get the service territory details of the specific territory_uid:

{
    "type": "success",
    "data": {
        "territory_radius": {
            "geo_cordinates": [
                13.0418,
                80.2341
            ],
            "radius": 60
        },
        "territory_zipcodes": [],
        "territory_coordinates": [],
        "is_active": true,
        "is_deleted": false,
        "territory_type": "RADIUS",
        "territory_color": "#4960a0",
        "territory_name": "Northern Territory",
        "territory_description": "this is a nothern territory",
        "teams": [
            {
                "team": {
                    "team_uid": "a9b5f157-73b8-4550-9b47-7e7dcd88a1ab",
                    "team_name": "support",
                    "team_color": "#4960a0",
                    "is_active": 1,
                    "is_deleted": 0
                }
            },
            {
                "team": {
                    "team_uid": "ea11b4d7-7197-423e-9e31-f4a95793c042",
                    "team_name": "marketing",
                    "team_color": "#8e44ad",
                    "is_active": 1,
                    "is_deleted": 0
                }
            }
        ],
        "territory_uid": "f0ce5930-ead9-11eb-b4f2-1358a62a056b",
        "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.jpg",
            "is_active": true,
            "is_deleted": false
        },
        "created_at": "2021-07-22T10:45:34.732Z",
        "updated_at": "2021-07-22T10:45:34.736Z"
    }
}

Fetches service territory details matching the territory_uid

HTTP Request

GET /territory/<territory_uid>

Delete Service Territory

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

Service Territory with the specific territory_uid is deleted:

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

Deletes service territory matching the territory_uid

HTTP Request

DELETE /territory/<territory_uid>

Webhooks

Create Webhook

curl "https://<host>/service/notifications/webhook" \
  -X POST \
  -H "Authorization: Bearer <token>"

Example request body:


{
    "web_hook": {
        "webhook_name": "Asset Webhook",
        "webhook_module": "ASSETS",
        "webhook_event": "asset.new",
        "webhook_url": "http://webhook.server.com/api/add_asset",
        "request_method": "POST",
        "headers": {
            "token": "Zmxrc2xrcmxrcXdlbGtmbGthc2FkbGtm"
        },
        "content_type": "application/json"
    }
}

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

{
    "type": "success",
    "message": "Webhook created successfully",
    "webhook_uid": "e014a510-03eb-11ec-a077-83d4f90eb0d8"
}

This endpoint allows us to create a new webhook.

HTTP Request

POST /webhook

Body Parameters

This endpoint accepts a webhook object

Job Creation Details

Parameter Required Description Type Example
webhook_name true Webhook name String Asset Webhook
webhook_module true Webhook module Enum ['JOB','CUSTOMER', 'PRODUCT', 'ESTIMATE', 'INVOICE', 'ASSETS', 'SERVICE_CONTRACT', 'TEAM', 'USER']
webhook_event true Webhook event String REFER WEBHOOK EVENT DETAILS
webhook_url true Webhook URL String http://webhook.server.com/api/add_asset
request_method true Webhook request method Enum ['POST', 'GET', 'PUT', 'DELETE']
headers true Webhook request headers Object {"token": "Zmxrc2xrcmxrcXdlbGtmbGthc2FkbGtm"}
content_type true Webhook request content type application/json

Update Webhook

curl "https://<host>/service/notifications/webhook/<webhook_uid>" \
  -X PUT \
  -H "Authorization: Bearer <token>"

Example request body:

{
    "web_hook": {
        "webhook_uid": "c01484e0-fff6-11eb-83a1-c9d8b9379b02",
        "webhook_url": "http://webhook.server.com/api/add_service_contract",
        "webhook_event": "service_contract.update",
        "webhook_name": "sync contract",
        "webhook_module": "SERVICE_CONTRACT",
        "is_active": true,
        "content_type": "application/json",
        "request_method": "POST",
        "headers": {},
        "created_at": "2021-08-18T07:34:41.000Z"
    }
}

On successfull webhook update we get the below response:

{
    "type": "success",
    "message": "Webhook details updated successfully",
    "webhook_uid": "c01484e0-fff6-11eb-83a1-c9d8b9379b02"
}

This endpoint allows us to update a webhook.

HTTP Request

PUT /webhook/<webhook_uid>

Body Parameters

This endpoint accepts a webhook object

Webhook Update Details

Parameter Required Description Type Example
webhook_name true Webhook name String Asset Webhook
webhook_module true Webhook module Enum ['JOB','CUSTOMER', 'PRODUCT', 'ESTIMATE', 'INVOICE', 'ASSETS', 'SERVICE_CONTRACT', 'TEAM', 'USER']
webhook_event true Webhook event String REFER WEBHOOK EVENT DETAILS
webhook_url true Webhook URL String http://webhook.server.com/api/add_service_contract
request_method true Webhook request method Enum ['POST', 'GET', 'PUT', 'DELETE']
headers true Webhook request headers Object {"token": "Zmxrc2xrcmxrcXdlbGtmbGthc2FkbGtm"}
content_type true Webhook request content type application/json

Webhook event details

Job events

Event Name webhook_event
New Job job.new
Update Job job.update
Schedule Job job.schedule
Reschedule Job job.update_schedule
Assign Users job.assign_users
Unassign Users job.unassign_users
Job Accept / Reject job.update_acceptance
Status Update job.status_update
Status Rollback job.status_rollback
Status Delete job.status_delete
Job Feedback job.feedback
New Note job.new_note
Delete Note job.delete_note
Delete Job job.delete

Customer events

Event Name webhook_event
New Customer customer.create
Customer Update customer.update
Customer Deactivate customer.deactivate
Customer Activate customer.activate
New Note customer.new_note

Product events

Event Name webhook_event
New Product product.new
Product Update product.update
Product Delete product.delete
New Product Location product.location_new
Product Location Update product.location_update
Product Location Delete product.location_delete
Product Transaction Inward product.transcation_inward
Product Transaction Outward product.transcation_outward
Product Transaction Transfer product.transcation_transfer

Estimate events

Event Name webhook_event
New Quote estimate.new
Quote Update estimate.update
Quote Status Update estimate.status_update
Print Quote estimate.print
Send Quote estimate.send
Quote New Note estimate.new_note
Quote New Attachment estimate.new_attachment
Quote Delete Attachment estimate.delete_attachment
Quote Delete Note estimate.delete_note
Quote Delete estimate.delete

Invoice events

Event Name webhook_event
New Invoice invoice.new
Invoice Update invoice.update
Invoice Status Update invoice.status_update
Print Invoice invoice.print
Send Invoice invoice.send
Invoice New Note invoice.new_note
Invoice Attachment invoice.new_attachment
Invoice Delete Attachment invoice.delete_attachment
Invoice Delete Note invoice.delete_note
Invoice Delete invoice.delete

Asset events

Event Name webhook_event
New Asset asset.new
Asset Update asset.update
Asset Delete asset.delete
Asset activate asset.activate
Asset Deactivate asset.deactivate

Service Contract events

Event Name webhook_event
New Service Contract service_contract.new
Service Contract Update service_contract.update
Service Contract Delete service_contract.delete
Service Contract Status Update service_contract.status_update
Service Contract Renewal service_contract.renew

Team events

Event Name webhook_event
New Team team.create
Team Update team.update
Team Delete team.delete

User events

Event Name webhook_event
New User Resource user.resource_create
User Resource Delete user.resource_delete
User Resource Update user.resource_edit
User Sos Trigger user.trigger_sos
User Activate user.activate
User Deactivate user.deactivate
User Delete user.delete
New User user.new
User Update user.update
User Work Hours Update user.work_hours_update

Get Webhooks

curl "https://<host>/service/notifications/webhook?count=<count>&filter.is_active=<is_active_flag>&page=<page_number>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the webhooks matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "webhook_uid": "c01484e0-fff6-11eb-83a1-c9d8b9379b02",
            "webhook_url": "http://webhook.server.com/api/contract_update",
            "webhook_event": "service_contract.update",
            "webhook_name": "Update Serivice Contract",
            "webhook_module": "SERVICE_CONTRACT",
            "is_active": true,
            "content_type": "application/json",
            "request_method": "POST",
            "headers": "{}",
            "created_at": "2021-08-18T07:34:41.000Z"
        },
        {
            "webhook_uid": "da7042c0-fff6-11eb-83a1-c9d8b9379b02",
            "webhook_url": "http://webhook.server.com/api/new_job",
            "webhook_event": "job.new",
            "webhook_name": "Add new job",
            "webhook_module": "JOB",
            "is_active": true,
            "content_type": "application/json",
            "request_method": "POST",
            "headers": "{}",
            "created_at": "2021-08-18T07:35:25.000Z"
        },
        {
            "webhook_uid": "dd050c80-fff8-11eb-a0f6-0fde677ec1d3",
            "webhook_url": "http://webhook.server.com/api/new_job",
            "webhook_event": "job.new",
            "webhook_name": "Sync job",
            "webhook_module": "JOB",
            "is_active": true,
            "content_type": "application/xml",
            "request_method": "POST",
            "headers": "{}",
            "created_at": "2021-08-18T07:49:49.000Z"
        },
        {
            "webhook_uid": "36e227f0-fffa-11eb-a0f6-0fde677ec1d3",
            "webhook_url": "http://webhook.server.com/api/new_job",
            "webhook_event": "job.new",
            "webhook_name": "add job",
            "webhook_module": "JOB",
            "is_active": true,
            "content_type": "application/json",
            "request_method": "POST",
            "headers": "{}",
            "created_at": "2021-08-18T07:59:29.000Z"
        },
        {
            "webhook_uid": "1f700dc0-0000-11ec-a0f6-0fde677ec1d3",
            "webhook_url": "http://webhook.server.com/api/job_update",
            "webhook_event": "job.update",
            "webhook_name": "Update job",
            "webhook_module": "JOB",
            "is_active": true,
            "content_type": "application/json",
            "request_method": "POST",
            "headers": "{}",
            "created_at": "2021-08-18T08:41:46.000Z"
        },
        {
            "webhook_uid": "324da530-03eb-11ec-a077-83d4f90eb0d8",
            "webhook_url": "http://webhook.server.com/api/new_job",
            "webhook_event": "job.new",
            "webhook_name": "New Job",
            "webhook_module": "JOB",
            "is_active": true,
            "content_type": "application/json",
            "request_method": "POST",
            "headers": "{\"api_key\":\"nofqw98e23kj4nkqfw92\"}",
            "created_at": "2021-08-23T08:22:03.000Z"
        },
        {
            "webhook_uid": "c717b3e0-03eb-11ec-a077-83d4f90eb0d8",
            "webhook_url": "http://webhook.server.com/api/new_asset",
            "webhook_event": "asset.new",
            "webhook_name": "Create asset",
            "webhook_module": "ASSETS",
            "is_active": true,
            "content_type": "application/json",
            "request_method": "POST",
            "headers": "{\"token\":\"Zmxrc2xrcmxrcXdlbGtmbGthc2FkbGtm\"}",
            "created_at": "2021-08-23T08:26:13.000Z"
        },
        {
            "webhook_uid": "e014a510-03eb-11ec-a077-83d4f90eb0d8",
            "webhook_url": "http://webhook.server.com/api/new_asset",
            "webhook_event": "asset.new",
            "webhook_name": "Add asset",
            "webhook_module": "ASSETS",
            "is_active": true,
            "content_type": "application/json",
            "request_method": "POST",
            "headers": "{\"token\":\"Zmxrc2xrcmxrcXdlbGtmbGthc2FkbGtm\"}",
            "created_at": "2021-08-23T08:26:55.000Z"
        }
    ],
    "total_pages": 1,
    "current_page": 1
}

Fetches all webhooks matching the query parameters

HTTP Request

GET /webhook

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
filter.is_active false Filter by active webhooks Boolean 0 or 1

Get Webhook Details

curl "https://<host>/service/notifications/webhook/<webhook_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the webhook details of the specific webhook_uid:

{
    "type": "success",
    "data": {
        "webhook_uid": "e014a510-03eb-11ec-a077-83d4f90eb0d8",
        "webhook_url": "http://webhook.server.com/api/new_asset",
        "webhook_event": "asset.new",
        "webhook_name": "Test asset",
        "webhook_module": "ASSETS",
        "is_active": 1,
        "content_type": "application/json",
        "request_method": "POST",
        "headers": "{\"token\":\"Zmxrc2xrcmxrcXdlbGtmbGthc2FkbGtm\"}",
        "created_at": "2021-08-23T08:26:55.000Z"
    }
}

Fetches webhook details matching the webhook_uid

HTTP Request

GET /webhook/<webhook_uid>

Get Webhook History

curl "https://<host>/service/notifications/webhook_history?count=<count>&filter.webhook_history_uid=<webhook_history_uid>&filter.response_status=<response_status>&page=<page_number>&filter.created_at=<created_date>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the webhook history details matching the query parameters:

{
    "type": "success",
    "data": [
        {
            "webhook_history_uid": "ada8a340-fff6-11eb-83a1-c9d8b9379b02",
            "response_status": null,
            "webhook": {
                "webhook_uid": "863f4be0-f9a4-11eb-8f6e-61056afeb7e4",
                "webhook_name": "Sync job",
                "webhook_module": "JOB",
                "webhook_url": "http://webhook.server.com/api/new_job",
                "webhook_event": "job.new",
                "content_type": "application/json",
                "request_method": "POST",
                "headers": "{}"
            }
        },
        {
            "webhook_history_uid": "051f60f0-fab1-11eb-b00c-f933ea67235f",
            "response_status": 200,
            "webhook": {
                "webhook_uid": "863f4be0-f9a4-11eb-8f6e-61056afeb7e2",
                "webhook_name": "Update job",
                "webhook_module": "JOB",
                "webhook_url": "http://webhook.server.com/api/update_job",
                "webhook_event": "job.update",
                "content_type": "application/json",
                "request_method": "GET",
                "headers": "{}"
            }
        },
        {
            "webhook_history_uid": "05202440-fab1-11eb-b00c-f933ea67235f",
            "response_status": 404,
            "webhook": {
                "webhook_uid": "863f4be0-f9a4-11eb-8f6e-61056afeb7e4",
                "webhook_name": "Sync job",
                "webhook_module": "JOB",
                "webhook_url": "http://webhook.server.com/api/new_job",
                "webhook_event": "job.new",
                "content_type": "application/json",
                "request_method": "POST",
                "headers": "{}"
            }
        },
        {
            "webhook_history_uid": "051ffd30-fab1-11eb-b00c-f933ea67235f",
            "response_status": 404,
            "webhook": {
                "webhook_uid": "863f4be0-f9a4-11eb-8f6e-61056afeb7e2",
                "webhook_name": "Update job",
                "webhook_module": "JOB",
                "webhook_url": "http://webhook.server.com/api/update_job",
                "webhook_event": "job.update",
                "content_type": "application/json",
                "request_method": "GET",
                "headers": "{}"
            }
        }
    ],
    "total_pages": 1,
    "current_page": 1
}

Fetches all webhook history details matching the query parameters

HTTP Request

GET /webhook_history

Query Parameters

This endpoint accepts multiple filters as a query parameters

Webhook history 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
filter.created_at false Filter by job created at date Date 2021-02-19
filter.webhook_history_uid false Filter by webhook history UIDS Comma Seperated String cf8ff0e0-cd56-11ea-b6a4-13c5940a5fcf, c0644220-cd82-11ea-838b-f1340f67ce12
filter.response_status false Filter by response status Boolean ['SUCCESS', 'FAILURE']

Get Webhook History Details

curl "https://<host>/service/notifications/webhook_history/<webhook_history_uid>" \
  -X GET \
  -H "Authorization: Bearer <token>"

We get the webhook details of the specific webhook_uid:

{
    "type": "success",
    "data": {
        "webhook_history_uid": "f2f852d0-056c-11ec-8133-cb58ef8b27c2",
        "response_status": 404,
        "request_body": "{\"delayed_job\":false,\"job_tags\":[],\"is_recurrence\":false,\"hide_to_fe\":false,\"is_deleted\":false,\"_id\":\"6125e1d9a5ec902f2f9c1331\",\"job_category\":\"611b8c6aa421ed7859f3ba47\",\"company_id\":\"10041\",\"scheduled_start_time\":\"2021-08-25T01:00:00.000Z\",\"scheduled_end_time\":\"2021-08-27T01:00:00.000Z\",\"scheduled_duration\":2880,\"due_date\":\"2021-08-29T13:00:00.000Z\",\"job_uid\":\"f17694d0-056c-11ec-95c2-5bad84366f7a\",\"job_title\":\"Test webook\",\"job_description\":\"\",\"job_priority\":\"LOW\",\"job_type\":\"NEW\",\"assigned_to\":[],\"assigned_to_team\":[],\"prefix\":\"w\",\"customer_address\":{\"street\":\"Rajaji Avenue Annexe\",\"city\":\"Chennai\",\"state\":\"TAMILNADU\",\"zip_code\":\"600087\",\"first_name\":\"Sriram\",\"last_name\":\"Palakula\",\"email\":\"[email protected]\"},\"customer_billing_address\":{\"street\":\"Rajaji Avenue Annexe\",\"city\":\"Chennai\",\"state\":\"TAMILNADU\",\"zip_code\":\"600087\"},\"custom_fields\":[{\"hide_to_fe\":false,\"_id\":\"6125e1d9a5ec902f2f9c1332\",\"label\":\"visit field\",\"value\":\"\",\"group_name\":\"visit\",\"group_uid\":\"53dccb50-ff44-11eb-b4c7-51e599684f86\",\"type\":\"SINGLE_LINE\"},{\"hide_to_fe\":false,\"_id\":\"6125e1d9a5ec902f2f9c1333\",\"label\":\"visit field 2\",\"value\":\"\",\"group_name\":\"visit\",\"group_uid\":\"53dccb50-ff44-11eb-b4c7-51e599684f86\",\"type\":\"SINGLE_LINE\"},{\"hide_to_fe\":false,\"_id\":\"6125e1d9a5ec902f2f9c1334\",\"label\":\"vis filed 3\",\"value\":\"\",\"group_name\":\"vist\",\"group_uid\":\"4f2ba280-ff48-11eb-b4c7-51e599684f86\",\"type\":\"SINGLE_LINE\"},{\"hide_to_fe\":false,\"_id\":\"6125e1d9a5ec902f2f9c1335\",\"label\":\"default label 1\",\"value\":\"\",\"group_name\":\"vist\",\"group_uid\":\"4f2ba280-ff48-11eb-b4c7-51e599684f86\",\"type\":\"SINGLE_LINE\"},{\"hide_to_fe\":false,\"_id\":\"6125e1d9a5ec902f2f9c1336\",\"label\":\"Text Input\",\"value\":\"\",\"group_name\":\"test grp\",\"group_uid\":\"8e33f290-0185-11ec-abc0-21154f34b0fc\",\"type\":\"SINGLE_LINE\"},{\"hide_to_fe\":false,\"_id\":\"6125e1d9a5ec902f2f9c1337\",\"label\":\"Time Input\",\"value\":\"\",\"group_name\":\"test grp\",\"group_uid\":\"8e33f290-0185-11ec-abc0-21154f34b0fc\",\"type\":\"TIME\"}],\"created_by\":165,\"customer\":\"611b8d44a421ed7859f3ba52\",\"products\":[],\"feedback_url\":\"https://c.zuper.co/TQj6H1Egf5422RmW8\",\"details_url\":\"https://c.zuper.co/MYibR8Fnr2kVu3d6\",\"job_status\":[],\"skills\":[],\"created_at\":\"2021-08-25T06:23:21.679Z\",\"updated_at\":\"2021-08-25T06:23:21.682Z\",\"work_order_number\":7,\"__v\":0,\"company_uid\":\"721e4393-32c6-40b8-a9c5-17f5997cb1be\",\"max_retries\":4,\"retry_count\":2}",
        "response_body": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot POST /api</pre>\n</body>\n</html>\n",
        "type": "AUTO_TRIGGERED",
        "attempt_no": 4,
        "created_at": "2021-08-25T06:23:23.000Z",
        "webhook": {
            "webhook_uid": "324da530-03eb-11ec-a077-83d4f90eb0d8",
            "webhook_name": "New Job",
            "webhook_module": "JOB",
            "webhook_url": "http://webhook.server.com/api/new_job",
            "webhook_event": "job.new",
            "content_type": "application/json",
            "request_method": "POST",
            "headers": "{\"api_key\":\"nofqw98e23kj4nkqfw92\"}"
        }
    }
}

Fetches webhook history details matching the webhook_history_uid

HTTP Request

GET /webhook_history/<webhook_history_uid>

Retry Webhook

curl "https://<host>/service/notifications/webhook/<webhook_history_uid>/retry" \
  -X POST \
  -H "Authorization: Bearer <token>"

Retriggers a webhook with specific webhook_history_uid:

{
    "message": "Webhook Retriggered",
    "type": "success",
    "data": {
        "webhook_history_uid": "ada8a340-fff6-11eb-83a1-c9d8b9379b02",
        "response_status": 200,
        "request_body": "{\"delayed_job\":true,\"job_tags\":[\"service\"],\"is_recurrence\":false,\"hide_to_fe\":false,\"is_deleted\":false,\"_id\":\"611b80d1a5ea69e4657e46e8\",\"job_category\":\"6077dd65ada9c5388d4cc8e3\",\"company_id\":\"86\",\"scheduled_start_time\":\"2021-08-17T01:15:00.000Z\",\"scheduled_end_time\":\"2021-08-17T01:45:00.000Z\",\"scheduled_duration\":30,\"due_date\":\"2021-04-17T13:00:00.000Z\",\"job_uid\":\"3a3daae0-ff3d-11eb-919a-63bbbdb7c2fc\",\"job_title\":\"ac service\",\"job_description\":\"services\",\"job_priority\":\"LOW\",\"job_type\":\"NEW\",\"assigned_to\":[{\"_id\":\"611b80d1a5ea69e4657e46e9\",\"team_id\":2,\"user_id\":93,\"acceptance_status\":\"AWAIT_RESPONSE\"}],\"assigned_to_team\":[],\"prefix\":\"service\",\"customer_address\":{\"street\":\"Rajaji Avenue Annexe\",\"city\":\"Chennai\",\"state\":\"TAMILNADU\",\"zip_code\":\"600087\",\"geo_cordinates\":[13.0382,80.1565]},\"customer_billing_address\":{\"street\":\"Rajaji Avenue Annexe\",\"city\":\"Chennai\",\"state\":\"TAMILNADU\",\"zip_code\":\"600087\"},\"custom_fields\":[{\"hide_to_fe\":false,\"_id\":\"611b80d1a5ea69e4657e46ea\",\"label\":\"Text Input\",\"value\":\"is present\"}],\"created_by\":93,\"customer\":\"5f1a435518045bd23f4fc108\",\"asset\":\"5f2bd2b31f613f33dbdcd79b\",\"property\":\"6013b9512f457696725b946d\",\"organization\":\"601391d570b9b4dfea77b610\",\"skills\":[{\"_id\":\"611b80d1a5ea69e4657e46eb\",\"skill_uid\":\"2300e800-eddb-4ec8-82fa-00d1d4060fe6\",\"skill_name\":\"Arrangement\",\"skill_percent\":30}],\"products\":[],\"feedback_url\":\"https://c.zuper.co/hCMr1crewkm43YQK9\",\"details_url\":\"https://c.zuper.co/Z6N2557hZtt9nWB9\",\"job_status\":[],\"created_at\":\"2021-08-17T09:26:41.102Z\",\"updated_at\":\"2021-08-17T09:26:41.106Z\",\"work_order_number\":60574,\"__v\":0,\"company_uid\":\"4698d906-c479-4deb-9605-3ccccf219bec\",\"max_retries\":4}",
        "response_body": "{\"type\":\"success\",\"message\":\"Job data synced successfully\"}",
        "type": "MANUALLY_TRIGGERED",
        "attempt_no": 7,
        "created_at": "2021-08-18T07:34:10.000Z",
        "webhook": {
            "webhook_uid": "863f4be0-f9a4-11eb-8f6e-61056afeb7e4",
            "webhook_name": "Sync Job",
            "webhook_module": "JOB",
            "webhook_url": "http://webhook.server.com/api/new_job",
            "webhook_event": "job.new",
            "content_type": "application/json",
            "request_method": "POST",
            "headers": "{}"
        }
    }
}

Fetches webhook details matching the webhook_uid

HTTP Request

POST /webhook/<webhook_history_uid>/retry

Delete Webhook

curl "https://<host>/service/notifications/webhook/<webhook_uid>" \
  -X DELETE \
  -H "Authorization: Bearer <token>"

Webhook with the specific webhook_uid is deleted:

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

Deletes webhook matching the webhook_uid

HTTP Request

DELETE /webhook/<webhook_uid>

Errors

The Zuper API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- The resource requested in not authorized.
403 Forbidden -- You tried to access a resource without proper privilege.
404 Not Found -- The specified resource could not be found.
405 Method Not Allowed -- You tried to access a resource with an invalid method.
409 Conflict -- The was a conflict with the targeted resource.
412 Validation Error -- Your request could not match the server pre conditions.
500 Internal Server Error -- We had a problem with our server. Try again later.
502 Bad Gateway -- We had a problem communicating with our server. Try again later.