Rest APIs

API Requests

In order to make REST API call, you need to combine our HTTP GET, POST or PUT methods, the URL to API service, the URI to a resource to query, submit data to, update, and one or more HTTP request headers.

Sandbox/Live URLs

The API Key is a prerequisite to login into the sandbox, which will be generated and shared to end client via secured mechanism before you start using our service.
  • Sandbox: The current version of the API lives at:https://sandboxapi.fieldengineer.io/v1
  • Live:

HTTP request headers

Access control of Field Engineer platform APIs comprises of authentication, authorization and auditing. Authentication will be done using API Keys which will determine who the end client is, authorization will determine what resources end client can access, and auditing logs records end client’s activity.

API Key will be generated and shared to end client via secured mechanism.

The commonly used HTTP request headers are:


Accept

The response format, which is required for operations with a response body. The syntax is:

Accept: application/<format>

Where format is json


Authorization

Include the API Key in the Authorization header with the Bearer authentication

Authorization: Bearer <API Key>

apiKey is the API key assigned to your company


Content-Type

The request format, which is required for operations with a request body. The syntax is:

Content-Type: application/<format>

Where format is json.


Username

username is your company Username


Workorder APIs

1) CREATE WORKORDER

 POST    /job

This endpoint will create a new job either in draft or active status. To create a workorder you need to send all the details as per schema specifications shown in Sample Request. If workorder is saved successfully, opportunityId and workOrderNumber will be returned in response.


Note: On performing CREATE or UPDATE request, the workorder is either saved as draft or created in active status but not posted to marketplace at this point of time.

  • The indicator publishToMarketPlace in CREATE/UPDATE workorder request body, if set to false/true then creates job in draft/active status respectively.
  • To post to markatplace you can use API ENABLE IN MARKETPLACE.

2) UPDATE WORKORDER

PUT    /job?endClientOrderNumber=<value>

This endpoint will update the workorder, but only if it is in draft status. To update workorder you will need to enter all the details per schema specifications shown in Sample Request. In order to update a workorder you will need to pass either endClientOrderNumber / workOrderNumber / opportunityId.

You cannot update an active workorder!


i) Sample Request

Both Create and Update workorder APIs will have same Response body.

 curl -X POST \
  https://sandboxapi.fieldengineer.io/v1/job \
  -H 'Content-Type: application/json' \
  -H 'apiKey: <API Key>' \
  -H 'cache-control: no-cache' \
  -H 'username: <Company eMail ID>' \
  -d '{<Request_json>}'
{
  "title": "FieldEngineer",
  "scheduledOn": "2021-04-20 05:58:59",
  "name": "Install adtran",
  "projectName": "WorkForce Inc",
  "jobType": "REMOTE",
  "endClientOrderNumber": "WFI100000",
  "address": {
    "parsed": {
      "address1": "Red Dog Road",
      "address2": "Suite 105",
      "city": "Naknek",
      "country": "US",
      "subDivision": "AK",
      "zip": "99633"
    },
    "unParsed": "Red Dog Rd, Naknek, AK 99633, USA"
  },
  "qualification": [
    {
      "isMandatory": false,
      "name": "CCIE Collaboration"
    },
    {
      "isMandatory": true,
      "name": "CCIE Data Center"
    }
  ],
  "routing": "PLATFORM_INTELLIGENCE",
  "pay": {
    "perHour": {
      "rate": "85",
      "hours": 1,
      "maxHours": 4
    },
    "fixed": null
  },
  "allowance": {
    "type": "Per Visit",
    "amount": 525.00,
    "numOfVisits": 2
  },
  "contact": [
    {
      "email": "jmonks@renchury.com",
      "extension": "10",
      "firstName": "Jerald",
      "lastName": "Monks",
      "mobile": "5534535434",
      "phone": "2323242342",
      "type": "PointOfContact"
    }
  ],
  "description": "Tools to Carry:Field Engineer Must carry Laptop, Console Cable for Adtran/Cisco Router",
  "task": [
    {
      "description": "Rack & Stack Cisco router in Rack",
      "isConfirmRequired": false,
      "isMediaRequired": true,
      "isSignatureRequired": false
    },
    {
      "description": "Take signature of onsite contact",
      "isConfirmRequired": false,
      "isMediaRequired": false,
      "isSignatureRequired": true
    },
    {
      "description": "Need to confirm if server room has space for the new router installation ",
      "isConfirmRequired": true,
      "isMediaRequired": false,
      "isSignatureRequired": false
    }
  ],
  "planning": [
    {
      "description": "Review the attached documents before going onsite"
    }
  ],
  "confidentialData": {
    "description": "PORT HANDOFF INFO LEC circuit ID: 38/KQGN/342340//SB Ord: CO15B0Q8 Media:"
  },
  "internalData": {
    "description": "Billing details - 3*$50=$150"
  },
  "customFields": {
    "groupName": "Custom group 1",
    "fields": [
      {
        "name": "Custom field 1",
        "value": "11abc1",
        "isPrivate": false
      },
      {
        "name": "Custom field 2",
        "value": "11abc2",
        "isPrivate": false
      }
    ]
  },
    "publishToMarketPlace": true,
    "fundingSource": "CASH"
}
json

ii) Sample Response

Both Create and Update workorder APIs will have same Response body.

{
    "payload": {
        "opportunityId": <opportunityId>,
        "workOrderNumber": <Work-Order-Number>
    },
    "result": {
        "code": "200",
        "message": "success"
    }
}
json

iii) Request Payload Details

This is applicable for both Create and Update workorder

Element Name Data Type Description
title string Job title
scheduledOn string Job scheduled date and time

Format: YYYY-MM-DD HH:MM:SS
(2020-04-20 05:58:59)

name string Job type
jobType string Indicating if Job is Remote or Onsite

Valid values:
- REMOTE
- JOB
projectName string Name of the project
endClientOrderNumber string End client order numebr
address object Service location address object with two possible ways to send address.

1. parsed address (individual address fields)
2. unparsed address(entire address in a single line)

NOTE: parsed and unparsed are not mutually exclusive, if parsed address type exists then system will always consider parsed, if parsed is null only then system considers the unparsed. Parsed address details

The datatype of parsed address is object. Following are its fields.

Element Name Datatype Description
address1 string address line 1
address2 string address line 2
city string city
country string country, in any format like 2 or 3 char code or full country name
subDivision string state, 2 char or full state name
zip string Zip/postal code
Unparsed address details
Element Name Datatype Description
unParsed string Entire address in a single line.
For e.g: 10 Corporate Place South, Suite 1-05,
Piscataway, NJ 08854
qualification array Qualifications are the skills required for performing this job. Fields
Element Name Datatype Description
isMandatory boolean true if qualification is mandatory else false
name string Qualification name
routing string How do you want to Route this job once posted?

Valid values:
- Platform Intelligence
- Marketplace Pool
- Private Pool
- Custom Rout
pay object Pay details can be provided `Per Hour`/ `Fixed` amount. Per Hour pay details

The datatype of Per Hour pay is object. Select this type of payment if you want to pay per hour. Following are its fields.

Element Name Datatype Description
hours numeric Number of hours
maxHours numeric Maximum number of hours you want to allocate for this job
rate numeric Rate per hour
Fixed pay details

The datatype of Fixed pay is object. Select this type of payment if you want to pay fixed amount for the job no matter how many visits/hours the job took to complete. Following are its fields.

Element Name Datatype Description
totalAmount numeric Total fixed cost amount
allowance object Allowance amount paid to the engineer. Fields
Element Name Datatype Description
type string Allowance type

Valid values:
- Fixed
- Per Visit
amount number Allowance amount
numOfVisits number Number of visits for allowed amount. Applicable when allowance type is Per Visit
contact array Point of contact(s) associated with the job. Fields
Element Name Datatype Description
email string
extension string
firstName string
lastName string
mobile string
phone string
type string Contact type - for e.g. onsite, point of contact
description string Job description
task object Tasks serve as a to do list for your engineer. You can track your engineer's progress as he completes task from his app. Fields
Element Name Datatype Description
description string task description
isMediaRequired boolean Indicator if any media is required to be uploaded to complete this task
isSignatureRequired boolean Indicator if signature is required to complete this task
isConfirmRequired boolean Indicator if confirmation is required after completing the job
planning object
Fields
Element Name Datatype Description
description string Planningitems is all information pertinent to the job pror to beginning. For example, equipment availability, shipping information
confidentialData object
Fields
Element Name Datatype Description
description string Provide if any confidential information associated to the job which will be visible to an engineer who accepts the job
internalData object
Fields
Element Name Datatype Description
description string Provide any information associated to the job which will be visible only to your company internal team
customFields object Optional custom fields to send if any Fields
Element Name Datatype Description
groupName string Group name associated with custom fields.

Reusable group with set of custom fields can be created and reused for future jobs. API will take care of creating/modifying a group. Name a group with set of custom fields and reuse the same group every time you have same set of custom fields else create new
fields array Array of custom fields
Element Name Datatype Description
name string Name of the custom field
value string Value of the custom field
isPrivate boolean true/false

true, if this field is not to be displayed to assigned engineer
publishToMarketPlace boolean Setting it to *true* will create the workorder in active status, and *false* in draft status.
fundingSource string You can pay visits/jobs through two types of funding sources either CREDIT or CASH.

Valid values:
- CREDIT
- CASH

3) POST JOB

PATCH    /workorder/status/active?endClientOrderNumber=<value>

This API is used to post the job from draft status to active status so that it is visible for engineers and they can start applying for it.

i) Sample Request

 curl -X POST \
  https://sandboxapi.fieldengineer.io/v1/workorder/status/active?endClientOrderNumber=<value> \
  -H 'Content-Type: application/json' \
  -H 'apiKey: <API Key>' \
  -H 'cache-control: no-cache' \
  -H 'username: <Company eMail ID>' \
  -d '{
  "fundingSource": "CASH"
}'

ii) Sample Response

{
    "payload": null,
    "result": {
        "code": "200",
        "message": "Success"
    }
}
Element Name Datatype Description
fundingSource string You can pay visits/jobs through two types of funding sources either CREDIT or CASH.

Valid values:
- CREDIT
- CASH

4) RETRIEVE WORKORDER DETAILS

GET    /job?workOrderNumber=<value>

Use this method to fetch particular workorder's details using either workOrderNumber /opportunityId /endClientOrderNumber.

This api can fetch details of workorders in Draft or Active status.

This API takes any one of these parameters as input. Other possible parameters that can be used with this API to request specific workorder details are:
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
workOrderNumber string Workorder Number
endClientOrderNumber string Client order Number

i) Sample Request

curl -X GET \
  https://sandboxapi.fieldengineer.io/v1/job?opportunityId=<value> \
  -H 'apiKey: <API Key>' \
  -H 'cache-control: no-cache' \
  -H 'username: <Company eMail ID>'
Curl

ii) Sample Response

{
  "payload": [
    {
      "workorderNumber": "W200401108595",
      "opportunityId": "b2a953eaac59284e87e672b63",
      "job": {
        "title": "FieldEngineer",
        "scheduledOn": "2020-04-20 05:58:59",
        "name": "Install adtran",
        "projectName": "WorkForce Inc",
        "jobType": "REMOTE",
        "endClientOrderNumber": "WFI100000",
        "address": {
          "parsed": {
            "address1": "Red Dog Road",
            "address2": "Suite 105",
            "city": "Naknek",
            "subDivision": "AK",
            "country": "US",
            "zip": "99633"
          },
          "unParsed": "Red Dog Road,Suite 105 Naknek  AK 99633 US",
          "latitude": 60.09358,
          "longitude": -151.61938,
          "formattedAddress": "Red Dog Road,Suite 105 Naknek  AK 99633 US"
        },
        "qualification": [
          {
            "name": "CCIE Data Center",
            "isMandatory": true
          },
          {
            "name": "CCIE Collaboration",
            "isMandatory": false
          }
        ],
        "pay": {
          "perHour": {
            "rate": 85,
            "hours": 1,
            "maxHours": 4
          },
          "fixed": null
        },
        "contact": [
          {
            "type": "PointOfContact",
            "firstName": "Jerald",
            "lastName": "Monks",
            "email": "jmonks@renchury.com",
            "phone": "2323242342",
            "extension": "10",
            "mobile": "5534535434"
          },
          {
            "type": "Onsite",
            "firstName": "Lewis",
            "lastName": "Beck",
            "email": "lbeck@client.com",
            "phone": "9797312343",
            "extension": "2",
            "mobile": "3232323233"
          }
        ],
        "description": "Tools to Carry:Field Engineer Must carry Laptop, Console Cable for Adtran/Cisco Router",
        "task": [
          {
            "description": "Rack & Stack Cisco router in Rack",
            "isMediaRequired": true,
            "isSignatureRequired": false,
            "isConfirmRequired": false
          },
          {
            "description": "Take signature of onsite contact",
            "isMediaRequired": false,
            "isSignatureRequired": true,
            "isConfirmRequired": false
          },
          {
            "description": "Need to confirm if server room has space for the new router installation ",
            "isMediaRequired": false,
            "isSignatureRequired": false,
            "isConfirmRequired": true
          }
        ],
        "planning": [
          {
            "description": "Review the attached documents before going onsite"
          }
        ],
        "confidentialData": {
          "description": "PORT HANDOFF INFO LEC circuit ID: 38/KQGN/342340//SB Ord: CO15B0Q8 Media:"
        },
        "internalData": {
          "description": "Billing details - 3*$50=$150"
        },
        "allowance": {
          "type": "Fixed",
          "amount": 10,
          "numOfVisits": 0
        },
        "customFields": {
          "groupName": null,
          "fields": [
            {
              "name": "Custom field 1",
              "value": "Devices",
              "private": true
            },
            {
              "name": "Custom field 2",
              "value": "Steps",
              "private": true
            }
          ]
        },
        "publishToMarketPlace": false,
        "fundingSource": null
      }
    }
  ],
  "result": {
    "code": "200",
    "message": "success"
  }
}
json

5) ENABLE IN MARKETPLACE

PATCH      /workorder/status/marketplace?opportunityId=<value>

This API is used to enable/disable the active workorders into/from marketplace.

This API takes any one of these parameters as input.
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
endClientOrderNumber string Client order Number

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/status/marketplace?opportunityId=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>' \
-d '{"action":<value>}'

ii) Sample Response

{
    "payload": null,
    "result": {
        "code": "200",
        "message": "success"
    }
}

iii) Request Payload Details

Element Name Datatype Description
action boolean false to publish workorder to marketplace true to remove from marketplace and just keep back in active status

6) LOCK WORKORDER

PATCH  /workorder/status/lock?endClientOrderNumber=<value>

This API can be used to set a temporary lock on the active workorder. Once the workorder is locked, it will not be visible to engineers any more, no further activities/action can happen, it will just be frozen in the status it was in when locked until its unlocked.

This API takes any one of these parameters as input.
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
workOrderNumber string Workorder Number
endClientOrderNumber string Client order Number

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/status/lock?endClientOrderNumber=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>'

ii) Sample Response

{
    "payload": {
        "opportunityId": <Opportunity_Id>,
        "workOrderNumber": <Work_Order_Number>
    },
    "result": {
        "code": "200",
        "message": "success"
    }
}

7) UNLOCK WORKORDER

PATCH     /workorder/status/unlock?endClientOrderNumber=<value>

Use this API to Unlock the workorder back to active status and resume normal actions on it such as it will now again be available for engineers to apply, can be assigned, and start working on visits till completion.

This API takes any one of these parameters as input.
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
workOrderNumber string Workorder Number
endClientOrderNumber string Client order Number

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/status/unlock?endClientOrderNumber=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>'

ii) Sample Response

{
    "payload": {
        "opportunityId": <Opportunity_Id>,
        "workOrderNumber": <Work_Order_Number>
    },
    "result": {
        "code": "200",
        "message": "success"
    }
}

8) CANCEL WORKORDER

PATCH     /workorder/status/cancel?endClientOrderNumber=<value>

This API will change the draft/active workorder to *cancel* status i.e. the workorder will be cancelled or discarded from job market from use.

One of these parameters can be passed in the url to cancel the job:
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
workOrderNumber string Workorder Number
endClientOrderNumber string Client order Number

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/status/cancel?endClientOrderNumber=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>'

ii) Sample Response

{
    "payload": null,
    "result": {
        "code": "200",
        "message": "Success"
    }
}

Depending on the status of the workorder prior to calling this method, the response messages are as follows:

Response messages
Workorder Status Message Code Message
draft 200 1 of 1 discarded
active 200 Success

9) WORKORDER APPLICANTS DETAILS

GET     /workorder/applicants?endClientOrderNumber=<value>

Use this API to get the details of all the engineers applied to the workorder such as how many engineers have applied, each engineer details including how many clients they have worked for, personal details, skills details etc.  

This API takes any one of these parameters as input.
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
workOrderNumber string Workorder Number
endClientOrderNumber string Client order Number

i) Sample Request

curl -X GET \
https://sandboxapi.fieldengineer.io/v1/workorder/applicants?endClientOrderNumber=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>'

ii) Sample Response

{
  "payload": [
    {
      "id": "P955550920",
      "firstName": "John",
      "lastName": "Mathew",
      "abountMe": "Lorem Ipsum",
      "contacts": [
        {
          "type": "Cell-Phone",
          "dialCode": "1",
          "number": "7328567290"
        },
        {
          "type": "Home-Phone",
          "dialCode": "1",
          "number": "2262567456"
        }
      ],
      "numOfClientsWorked": 3,
      "numOfJobsWorked": 87,
      "address": {
        "city": "Tucson",
        "subDivision": "AZ",
        "zip": "85737",
        "country": {
          "code": "US",
          "name": "United States"
        }
      },
      "skills": [
        {
          "name": {
            "shortName": "CCNA",
            "longName": "Cisco Certified Network Associate Wireless: CCNA Wireless"
          },
          "matched": false
        },
        {
          "name": {
            "shortName": "CCNA",
            "longName": "Cisco Certified Network Associate Service Provider (CCNA SP)"
          },
          "matched": false
        },
        {
          "name": {
            "shortName": "CCNP",
            "longName": "Cisco Certified Network Associate Voice: CCNA Voice"
          },
          "matched": false
        }
      ]
    },
    {
      "id": "P637624516",
      "firstName": "Paul",
      "lastName": "Aero",
      "abountMe": "search",
      "contacts": [
        {
          "type": "Cell-Phone",
          "dialCode": "1",
          "number": "7328222220"
        }
      ],
      "numOfClientsWorked": 5,
      "numOfJobsWorked": 180,
      "address": {
        "city": "Portland",
        "subDivision": "OR",
        "zip": "97209",
        "country": {
          "code": "US",
          "name": "United States"
        }
      },
      "skills": [
        {
          "name": {
            "shortName": "CCNA",
            "longName": "Cisco Certified Network Associate Wireless: CCNA Wireless"
          },
          "matched": false
        }
      ]
    }
  ],
  "result": {
    "code": "200",
    "message": "success"
  }
}

10) ASSIGN JOB

PATCH    /workorder/status/engineer/assign?endClientOrderNumber=<value>

With this API you can assign an active job to an engineer. If the engineers have applied to the job then you could select the best suited engineer and assign the job to him, else if you have a favorite engineer then you can directly assign it to him.

This API takes any one of these parameters as input.
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
workOrderNumber string Workorder Number
endClientOrderNumber string Client order Number

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/status/engineer/assign?endClientOrderNumber=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>' \
-d '{"engineerId":<value>}'

ii) Sample Response

{
    "payload": {
        "opportunityId": <Opportunity Id>,
        "workOrderNumber": null
    },
    "result": {
        "code": "200",
        "message": "success"
    }
}

iii) Request Payload Details

Element Name Datatype Description
engineerId string The Engineer ID e.g:P955550920

11) UNASSIGN JOB

PATCH    /workorder/status/engineer/unassign?opportunityId=<value>

Use this API to unassign an engineer from particular job who was previously offered this job.

This API takes any one of these parameters as input.
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
workOrderNumber string Workorder Number
endClientOrderNumber string Client order Number

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/status/engineer/unassign?opportunityId=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>' \
-d '{"engineerId":<Engineer ID>}'

ii) Sample Response

{
    "payload": null,
    "result": {
        "code": "200",
        "message": "success"
    }
}

12) VISIT DETAILS

GET    /workorder/visit?endClientOrderNumber=<value>

Use this API to get the submitted visit's details by the engineer of the in-progress job.

This API takes any one of these parameters as input.
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
workOrderNumber string Workorder Number
endClientOrderNumber string Client order Number

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/visit?endClientOrderNumber=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>'

ii) Sample Request

{
    "payload": {
        "list": [
            {
                "opportunityUserVisitId": "e17c75a6700c16b4170e30de7",
                "reportingDateTime": "2020-05-17T11:04:47.739Z",
                "reportingLongitude": "0.0",
                "reportingLatitude": "0.0",
                "approvedDateTime": null,
                "rejectedDateTime": "2020-05-17T11:04:47.739Z",
                "jobTitle": "FieldEngineerJob1",
                "workOrderNumber": "W200528113173",
                "routing": "platformIntelligence",
                "opportunityId": "a1c95bc89100d702aa87b2a44",
                "engineerName": "John Aero",
                "rate": "100.00",
                "payout": null,
                "allowance": null,
                "visit": {
                    "providerUnitCount": {
                        "minutes": 20
                    },
                    "closingNotes": "completed first visit for Site-survey. ",
                    "isAllowanceReported": false,
                    "reportingDateTime": "2020-05-17T11:04:47.739Z",
                    "reportedAllowanceAmount": null,
                    "reportedFixedAmount": null,
                    "visitExpense": [
                        {
                            "amount": null,
                            "description": null
                        }
                    ]
                }
            },
            {
                "opportunityUserVisitId": "e1dbc757808ff40253ddb0f7d",
                "reportingDateTime": "2020-04-17T11:04:47.739Z",
                "reportingLongitude": "0.0",
                "reportingLatitude": "0.0",
                "approvedDateTime": "2020-04-17T11:04:47.739Z",
                "rejectedDateTime": null,
                "jobTitle": "FieldEngineer1",
                "workOrderNumber": "W200528113173",
                "routing": "platformIntelligence",
                "opportunityId": "a1c95bc89100d702aa87b2a44",
                "engineerName": "John Aero",
                "rate": "50.00",
                "payout": null,
                "allowance": null,
                "visit": {
                    "providerUnitCount": {
                        "minutes": 20
                    },
                    "closingNotes": "Completed second visit to install first set of devices.",
                    "isAllowanceReported": false,
                    "reportingDateTime": "2020-04-17T11:04:47.739Z",
                    "reportedAllowanceAmount": null,
                    "reportedFixedAmount": null,
                    "visitExpense": [
                        {
                            "amount": null,
                            "description": null
                        }
                    ]
                }
            }
        ],
        "consumedHours": 20,
        "reportedAllowanceCount": 0,
        "consumedMinutes": 20,
        "page": {
            "number": 0,
            "numberOfElements": 2,
            "size": 20,
            "totalElements": 2,
            "totalPages": 1
        }
    },
    "result": {
        "code": "200",
        "message": "success"
    }
}

13) VISIT APPROVE

PATCH    /workorder/visit/status/approved

Use this API to collectively approve the visits i.e: total worked hours submitted by the engineer on particular workorder.

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/visit/status/approved?endClientOrderNumber=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>' \
-d '{
"visit": {
  "approveExcessHours":true ,
  "date": <Datetime of visit hours reported>,
  "visitId": <Unique Visit ID>
    }
}'

ii) Sample Response

{
    "payload": null,
    "result": {
        "code": "200",
        "message": "success"
    }

iii) Request Payload Details

Element Name Datatype Description
approveExcessHours boolean true to approve submitted hours for within the allotted maxHours also if exceeds. false to reject reported hours.
date string Datetime of the visit when engineer reported.
visitId string Unique visit ID generated when engineer reported the visit hours.

14) REJECT VISIT

PATCH    /workorder/visit/status/rejected

Use this API to reject particular visit reported by engineer if you think you do not approve with the hours submitted or expenses reported or any other details regarding the visit.

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/visit/status/rejected?endClientOrderNumber=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>' \
-d '{
"visit": {
  "date": <Datetime of visit hours reported>,
  "visitId": <Unique Visit ID>
    }
}'

ii) Sample Response

{
    "payload": null,
    "result": {
        "code": "200",
        "message": "Success"
    }
}

Note: If the visit was already approved then the Response code/message will be as follows:

Response message
Message Code Message
9999 Visit already approved

15) COMPLETE WORKORDER

PATCH    /workorder/status/complete?opportunityId=<value>

Use this API to complete the workorder once the posted job is completed by the assigned engineer. All the visits must be approved before you mark a job as complete.

This API takes any one of these parameters as input.
Element Name Datatype Description
opportunityId string Opportunity ID of the workorder
workOrderNumber string Workorder Number
endClientOrderNumber string Client order Number

i) Sample Request

curl -X PATCH \
https://sandboxapi.fieldengineer.io/v1/workorder/status/complete?opportunityId=<value> \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>'

ii) Sample Response

{
    "payload": {
        "opportunityId": <Opportunity ID>,
        "workOrderNumber": null
    },
    "result": {
        "code": "200",
        "message": "success"
    }
}

Engineer APIs

1) RETRIEVE ENGINEER DETAILS

GET    /engineer/<Engineer Id>

Use this API to get details of a particular engineer such as personal/profile details like name, contact, address, Unumber, skills, certifications, insurance, #past jobs and their details, #clients he worked for in the past etc.

Engineer Id details
Element Name Datatype Description
id string Unique Engineer record Id E.g: P955550920

i) Sample Request

curl -X POST \
https://api.feeagle.com/v3/engineer/<Engineer Id>  \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>'

ii) Sample Response

{
    "payload": {
        "id": "P955550920",
        "firstName": "John",
        "lastName": "Aero",
        "abountMe": "Lorem Ipsum",
        "contacts": [
            {
                "type": "Cell-Phone",
                "dialCode": "1",
                "number": "7328567290"
            }
        ],
        "address": {
            "city": "Tucson",
            "subDivision": "AZ",
            "zip": "85737",
            "country": {
                "code": "US",
                "name": "United States"
            }
        },
        "skills": [],
        "feePercent": 10,
        "insurancePercent": 1.5,
        "certifications": [
            {
                "id": "dfdfa7956bf211e89b7706803",
                "name": {
                    "shortName": "CCNA",
                    "longName": "Cisco Certified Network Associate Video (CCNA Video)"
                }
            },
            {
                "id": "dfdb329d6bf211e89b7706803",
                "name": {
                    "shortName": "CCNA",
                    "longName": "Cisco Certified Network Associate Service Provider Operations (CCNA SP Operations)"
                }
            },
            {
                "id": "ee19hb5j7hha2b1f6f3b4f2b",
                "name": {
                    "shortName": "CCNA",
                    "longName": "Cisco Certified Network Associate Voice: CCNA Voice"
                }
            },
            {
                "id": "gh3c7h4b89i4j3b04aii436b",
                "name": {
                    "shortName": "CCNA",
                    "longName": "Cisco Certified Network Associate Wireless: CCNA Wireless"
                }
            },
            {
                "id": "dfd2c6676bf211e89b7706803",
                "name": {
                    "shortName": "CCNA",
                    "longName": "Cisco Certified Network Associate Data Center (CCNA Data Center)"
                }
            },
            {
                "id": "b4d736fe03f2fef1ab93gb16",
                "name": {
                    "shortName": "CCNA",
                    "longName": "Cisco Certified Network Associate Security: CCNA Security"
                }
            },
            {
                "id": "d8fb0238f8de67457025254f6",
                "name": {
                    "shortName": "AO23K",
                    "longName": "A october 23 sk 1"
                }
            },
            {
                "id": "dfd6fe286bf211e89b7706803",
                "name": {
                    "shortName": "CCNA",
                    "longName": "Cisco Certified Network Associate Service Provider (CCNA SP)"
                }
            },
            {
                "id": "ga4i5abbheh77i9g89hcjg56",
                "name": {
                    "shortName": "CCNA",
                    "longName": "Cisco Certified Network Associate: CCNA"
                }
            }
        ],
        "pastJobs": {
            "numOfClientsWorked": 4,
            "numOfJobsWorked": 23,
            "completedJobs": [
                {
                    "date": "2020-05-30 10:56:38",
                    "name": "Install adtran",
                    "rating": 0,
                    "companyName": "Sangli & Co"
                },
                {
                    "date": "2020-06-11 10:56:38",
                    "name": "Install",
                    "rating": 3,
                    "companyName": "web"
                },
                {
                    "date": "2020-09-11 10:56:38",
                    "name": "Install adtran",
                    "rating": 3,
                    "companyName": "web"
                },
                {
                    "date": "2020-08-11 10:56:38",
                    "name": "Install adtran",
                    "rating": 3,
                    "companyName": "web"
                },
                {
                    "date": "2020-08-11 10:56:38",
                    "name": "Install adtran",
                    "rating": 3.5,
                    "companyName": "web"
                },
                {
                    "date": "2020-08-11 10:56:38",
                    "name": "Install adtran",
                    "rating": 0,
                    "companyName": "web"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "decoding",
                    "rating": 4,
                    "companyName": "web"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "decoding",
                    "rating": 3.75,
                    "companyName": "web"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "onsite",
                    "rating": 0,
                    "companyName": "web"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "onsite",
                    "rating": 0,
                    "companyName": "web"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "decoding",
                    "rating": 0,
                    "companyName": "web"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "Router Installation",
                    "rating": 4,
                    "companyName": "13_Feb_2020_Company1"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "Router Installation",
                    "rating": 4,
                    "companyName": "13_Feb_2020_Company1"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "Router Installation",
                    "rating": 4,
                    "companyName": "13_Feb_2020_Company1"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "Router Installation",
                    "rating": 4,
                    "companyName": "13_Feb_2020_Company1"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "Router Installation",
                    "rating": 4,
                    "companyName": "amazen"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "Router Installation",
                    "rating": 0,
                    "companyName": "amazen"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "Router Installation",
                    "rating": 0,
                    "companyName": "amazen"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "Router Installation",
                    "rating": 0,
                    "companyName": "amazen"
                },
                {
                    "date": "2020-08-25 15:15:06",
                    "name": "decoding",
                    "rating": 3.475,
                    "companyName": "web"
                }
            ]
        }
    },
    "result": {
        "code": "200",
        "message": "success"
    }
}

2) ENGINEER RATING

PATCH    /engineer/profile/rating

Use this API to rate the engineer's performance after completion of a job. You can rate the engineer for his Knowledge, Punctuality, Communication and Overall performance.

i) Sample Request

curl -X POST \
https://api.feeagle.com/v3/engineer/profile/rating  \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>' \
-d '{ "opportunityId": <Opportunity Id>,
"rating": [
 {
      
       "type": "Communication",
       "value": 3.5
 },
{
       
       "type": "Overall",
      "value": 3.5
},
 {
       
       "type": "Knowledge",
      "value": 3.5
},
 {
     
       "type": "Punctuality",
      "value": 3.5
        }
    ]
}' 

ii) Sample Response

{
    "payload": null,
    "result": {
        "code": "200",
        "message": "Successully Rated"
    }
}

iii) Request Payload Details

Element Name Data Type Description
opportunityId string Unique Opportunity Id of the job
rating object
Rating object fields
Element Name Datatype Description
type string description of the skill/quality of engineer your rating for.

Values:
- Communication
- Overall
- Knowledge
- Punctuality

iv) Response Status Codes

Status code Message Description
204 No Content If the valid values are not provided in the Request body then this status code is given in response.

3) SEARCH ENGINEER

POST    /talent?page=<Page Index>&size=<Page size>

Use this API to search for engineers near the location where the job is posted, having particular skills needed to perform the job.

Input query details
Query Name Datatype Description
page string Page index
size string Page size

i) Sample Request

curl -X POST \
https://api.feeagle.com/v3/talent?page=<Page Index>&size=<Page size>  \
-H 'Content-Type: application/json' \
-H 'apiKey: <API Key>' \
-H 'cache-control: no-cache' \
-H 'username: <Company eMail ID>' \
-d '{
"searchParam": {
    "skills":null,
    "location": {
        "lat": <latitude value>,
        "lon": <longitude value>
    }
}
}'

ii) Sample Response

{
    "payload": [
        {
            "firstName": "Jang",
            "qualification": [
                {
                    "name": "802.11n Planning and Optimization"
                }
            ],
            "address": {
                "zip": "08854",
                "country": "US",
                "city": "Piscataway Township",
                "latitude": 40.5487544,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P8211373"
        },
        {
            "firstName": "Paul",
            "qualification": [],
            "address": {
                "zip": "08830",
                "country": "US",
                "city": "Woodbridge Township",
                "latitude": 40.5487544,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P288589143"
        },
        {
            "firstName": "Sam",
            "qualification": [
                {
                    "name": "CCNA"
                }
            ],
            "address": {
                "zip": "08820",
                "country": "US",
                "city": "Edison",
                "latitude": 40.5487544,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P659122217"
        },
        {
            "firstName": "Mark",
            "qualification": [
                {
                    "name": "Cisco Multiservice Switching Service"
                },
                {
                    "name": "Avaya Classic Mail"
                },
                {
                    "name": "Cisco Cable Communications Specialist"
                },
                {
                    "name": "Cisco Call Manager"
                },
                {
                    "name": "Cisco Call Manager Express"
                }
            ],
            "address": {
                "zip": "08854",
                "country": "US",
                "city": "Piscataway",
                "latitude": 40.54875440000001,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P417827390"
        },
        {
            "firstName": "A",
            "qualification": [
                {
                    "name": "802.11n Planning and Optimization"
                },
                {
                    "name": "123123"
                }
            ],
            "address": {
                "zip": "08840",
                "country": "US",
                "city": "Metuchen",
                "latitude": 40.54875440000001,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P823966587"
        },
        {
            "firstName": "Das",
            "qualification": [],
            "address": {
                "zip": "08854",
                "country": "US",
                "city": "Piscataway",
                "latitude": 40.54875440000001,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P668787325"
        },
        {
            "firstName": "Test co",
            "qualification": [
                {
                    "name": "Cisco CCENT"
                },
                {
                    "name": "Cisco Certified Architect (CCAr)"
                },
                {
                    "name": "Cisco Business Application Engineer Specialist"
                },
                {
                    "name": "Cisco Access Routing and LAN Switching Specialist"
                }
            ],
            "address": {
                "zip": "08854",
                "country": "US",
                "city": "Piscataway",
                "latitude": 40.54875440000001,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P652904566"
        },
        {
            "firstName": "Vinay",
            "qualification": [],
            "address": {
                "zip": "08854",
                "country": "US",
                "city": "Piscataway",
                "latitude": 40.54875440000001,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P901999244"
        },
        {
            "firstName": "As",
            "qualification": [
                {
                    "name": "Avaya Certified Implementation Specialist (ACIS) – Avaya Aura Contact Center"
                },
                {
                    "name": "Avaya Certified Implementation Specialist (ACIS) – Avaya Aura Communication Manager"
                },
                {
                    "name": "Avaya Certified Implementation Specialist (ACIS) – Avaya Aura Communication Manager and CM Messaging"
                },
                {
                    "name": "Avaya Certified Implementation Specialist (ACIS) – Avaya Aura Conferencing – Standard Edition"
                },
                {
                    "name": "Avaya Certified Implementation Specialist (ACIS) – Avaya Aura Contact Center CCT and Multimedia"
                }
            ],
            "address": {
                "zip": "08854",
                "country": "US",
                "city": "Piscataway",
                "latitude": 40.54875440000001,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P396347759"
        },
        {
            "firstName": "Vinay",
            "qualification": [],
            "address": {
                "zip": "08854",
                "country": "US",
                "city": "Piscataway",
                "latitude": 40.54875440000001,
                "subDivision": "NJ",
                "longitude": -74.45521880000001
            },
            "isOffline": false,
            "id": "P794289136"
        }
    ],
    "result": {
        "code": "200",
        "message": "success"
    }
}

iii) Request Payload Details

Element Name Data Type Description
skills string Skill name required for the job.
location object Unique Engineer record Id E.g: P955550920 Location object fields
Element Name Datatype Description
lat number Latitude of the job/site location E.g: 40.54875440000001
lon number Longitude of the job/site location E.g: -74.45521880000001