/
GetEmployeeJobs RESTified API

GetEmployeeJobs RESTified API

5.4.0

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

Description

The sp:GetJobsRequest API method returns the list of jobs for a given employee on a given date. If they are resourced, they are returned in order of their ExpectedStart.

The sp:GetJobsRequest API method can also be used to obtain a list of unresourced jobs for a responsibility unit. An unresourced non-appointment will only be returned if its contract earliest falls on or before the supplied DispatchDate. There is no defined order that unresourced jobs are returned in.

The information returned is grouped together in several structures within a larger structure. It’s not expected that all of the information returned will be used by the caller, but all available information which might possibly be useful can be returned. Some fields may be null, either because they were not specified when the job was booked, or because they are only applicable to either appointments, SLA work or because the job is unresourced.     

In this context, the Scheduling "Get Employee Jobs" API is the sp:GetJobsRequest API.

On this page:

Related pages:

Resource URL Summary

Pass Through Call to Scheduling's "Get Employee Jobs" API

PUT /up/v5/rest/scheduling/GetJobs

HTTP Headers

This API uses the standard ServiceBroker HTTP Headers.


API Specifics

Pass Through Call to Scheduling's "Get Employee Jobs" API

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

URL

PUT /up/v5/rest/scheduling/GetJobs

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 Scheduling "Get Employee Jobs" APi.

GetEmployeeJobs Object Format

GetEmployeeJobs JSON
{
    "Tech": "EmpId",
    "DispatchDate": "DispatchDate",
    "FRU": "",
    "PrevJob": "",
     "Options": {
        "JobCount": 1
    },
	"JobInfoCount": "",
	"DispatchInfoCount": "",
	"AuditInfoCount": "",
	"CustomerInfoCount": "",
	"SparesInfoCount": "",
	"VirtualWorkDLInfo": ""
}

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

PropertyTypeTypeDescriptionReq?Field Mapping: Scheduling
Tech

string


SS: 25

Pass through parameter to the Scheduling "Get Employee Jobs" API.

The identifier of the employee whose list of jobs is to be extracted; Mandatory if RespUnit not supplied. Otherwise optional.

Yes

EmpID

DispatchDate

string

SS: 8

Pass through parameter to the Scheduling "Get Employee Jobs" API. 

The date on which the jobs are to be carried out.

Example: "2023-03-30"

Yes

DispatchDate

FRU

string


SS: 9

Pass through parameter to the Scheduling "Get Employee Jobs" API. 

The FRU for which unresourced jobs are to be extracted. If EmpID is supplied as well as RespUnit, EmpID is ignored.

Mandatory if EmpID and Dispatch Date not supplied. Otherwise optional

Yes

RespUnit

Optionsobject

Pass through parameter to the Scheduling GetEmployeeJobs API. 

No

see GetEmployeeJobs Jobs.Options.Objects

DispatchInfoCount

integer


A non-zero value should be supplied if Dispatch info is wanted

NoDispatchInfoCount
AuditInfoCount

integer


A non-zero value should be supplied if Audit info is wanted

NoAuditInfoCount
CustomerInfoCount

integer


A non-zero value should be supplied if Customer info is wanted

NoCustomerInfoCount
SparesInfoCount

integer


A non-zero value should be supplied if Spares info is wanted

NoSparesInfoCount
VirtualWorkDLInfo

boolean


When set to true, Virtual Work Dynamic Location information will be included in the response. By default the value for VirtualWorkDLInfo is treated as false and Virtual Work Dynamic Location information will not be included in the response

NoVirtualWorkDLInfo

HTTP Response

Success

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

{
    "Success": true,
    "Code": "0",
    "Message": "",
    "Payload": {
        "result": {
            "type": "OK",
            "code": "0"
        },
        "OffsetId": "JobID",
        "OffsetCount": "JobCount",
        "WorkItems": [
            {WorkItem CDM}
        ]
    }
}

Error

On error, a JSON-formatted version of the Scheduling "Get Employee Jobs" 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, and the Scheduling API return codes, the possible Return Codes from this API are:

 Click here to expand...
  • SP_OK (0)
  • SP_JOBID_INVALID (1)
  • SP_EMPID_INVALID (5)
  • SP_DATE_INVALID (14)
  • SP_UNIT_INVALID (28)
  • SP_OUTSIDE_HORIZON (53)
  • SP_EMP_NOT_POSTED (178)
  • SP_EMPID_DOES_NOT_EXIST (231)
  • SP_UNIT_NOT_SUPPLIED (261)

Related content

Get Employee Jobs SOAP API
Get Employee Jobs SOAP API
More like this
Get Employee Jobs SOAP API
Get Employee Jobs SOAP API
More like this
GetOperative RESTified API
GetOperative RESTified API
More like this