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 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.     

Info

In this context, the ServiceScheduling Scheduling "Get Employee Jobs" API is the sp:GetJobsRequest 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 Employee Jobs" API

PUT /up/v5/rest/scheduling/GetJobs

Include Page
_Default HTTP Headers
_Default HTTP Headers


API Specifics


Panel
borderColor#D3D3D3

Pass Through Call to

ServiceScheduling

Scheduling's "Get Employee Jobs" API

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

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

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

GetEmployeeJobs Object Format

Code Block
languagejs
titleGetEmployeeJobs JSON
collapsetrue
{
    "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: ServiceScheduling Scheduling
Tech

string


SS: 25

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

Code Block
languagejs
{
    "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 ServiceScheduling Scheduling "Get Employee Jobs" 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 API return codes, the possible Return Codes from this API are:

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)