Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

5.4.0

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

Description

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


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

On this page:

Related pages:

Resource URL Summary

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

PUT /up/v5/rest/scheduling/GetEmp

HTTP Headers

This API uses the standard ServiceBroker HTTP Headers.


API Specifics

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

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

URL

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 "Get Operative" APi.

GetOperative Object Format

{
    "empID": ""
}

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

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

Pass through parameter to the ServiceScheduling "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 "Get Operative" API response will be returned.

{
    "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 "Get Operative" API response will be returned.

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

Return Codes

In addition to the Standard Return Codes, the possible Return Codes from this API are:

 Click here to expand...
  • SP_EMPID_INVALID (5)
  • No labels