Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourGreen
title5.4.0

A pass-through API to ServiceScheduling Scheduling (when configured) which allows the ServiceSchedulingScheduling's "Get Operative" API to be called.  

Description

The sp:GetEmpRequest API method allows the details of an employee to be obtained.  


Info

In this context, the ServiceScheduling Scheduling "Get Operative" API is the sp:GetEmpRequest API.



Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

On this page:

Table of Contents
maxLevel2

Related pages:


Resource URL Summary

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

Pass Through Call to ServiceSchedulingScheduling's "Get Operative" API

PUT /up/v5/rest/scheduling/GetEmp

Include Page
_Default HTTP Headers
_Default HTTP Headers


API Specifics


Panel
borderColor#D3D3D3

Pass Through Call to

ServiceScheduling

Scheduling's "Get Operative" API

This RESTified API will perform a pass-through call to the ServiceScheduling Scheduling sub-system's "Get Operative" API (when configured).

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

PUT /up/v5/rest/scheduling/GetEmp

HTTP Request Body

This request requires a JSON object supplied in the HTTP request body, which defines the parameters that will be passed through to the ServiceScheduling the Scheduling "Get Operative" APi.

GetOperative Object Format

Code Block
languagejs
{
    "empID": ""
}

GetOperative Object Properties (Bold property names indicate the field is required)

PropertyTypeLengthDescriptionReq?servHoursPatts.servHoursPatt[].gracePeriod
empIDstringSS: 50

Pass through parameter to the ServiceScheduling the Scheduling "Get Operative" API.

Yes

empID 

fru-postingsBoolean 

Optional parameter. When supplied and true, response body will include the FRU postings for the employee

No

fru-Postings

HTTP Response

Success

On success, a JSON-formatted version of the ServiceScheduling Scheduling "Get Operative" API response will be returned.

Code Block
languagejs
{
    "Success": true,
    "Code": "0",
    "Message": "",
    "Payload": {
        "result": {
            "type": "OK",
            "code": "0"
        },
        "attr": {
            "type": 0,
            "name": "YO7_1_01 YORH_I01",
            "surname": "YORH_I01",
            "job-title": "Engineer",
            "efficiency": 100,
            "address1": "",
            "address2": "",
            "address3": "",
            "address4": "",
            "postcode": "YO1 9",
            "region-no": 12336,
            "region-ref": "UK_YO.YO1.YO1_9",
            "phone1": "",
            "phone2": "",
            "pager": "",
            "hand-held1": "",
            "hand-held2": "",
            "current-hand-held": "",
            "schedulable": 1,
            "max-overtime": 0,
            "printer": "",
            "inform-lead-time": 0,
            "work-region-no": 12336,
            "tz-type": 0,
            "tz-no": 0,
            "work-postcode": "YO1 9",
            "earmarked-jobs-max": 0,
            "default-start-loc": "3",
            "default-start-loc-postcode": "YO7 1",
            "default-end-loc": "3",
            "default-end-loc-postcode": "YO7 2",
            "tota": 0,
            "totb": 0,
            "default-lk-centre-loc": "3",
            "default-lk-centre-postcode": "YO7 3",
            "default-start-loc-region-no": 12426,
            "default-end-loc-region-no": 12427,
            "default-lk-centre-region-no": 12428,
            "vehicle-capacity": 0,
            "travel-status": 0,
            "travel-status-time": "",
            "travel-api-time": "",
            "last-moving-time": "",
            "show-operative-status": 0,
            "frozen-lead-days": 0,
            "frozen-day-trigger-time": "",
            "current-loc-type": "",
            "geo-fence-name": "",
            "last-stopped-ok": "",
            "last-stopped-overnight": "",
            "last-stopped-customer": ""
        }
    }
}

Error

On error, a JSON-formatted version of the ServiceScheduling Scheduling "Get Operative" API response will be returned.

Code Block
languagejs
{
    "Success": false,
    "Code": 9,
    "Payload": {
        "returnCode": {
            "type": "Error",
            "code": "SCH Error Code"
        }
    }
}

Return Codes

In addition to to the  Standard Return Codes, and the general ServiceScheduling Return Codes, the specfic ones for  Scheduling Error codes, the possible Return Codes from this API are:

Expand
  • SP_EMPID_INVALID (5)