/
GetEmployeeActivities RESTified API

GetEmployeeActivities RESTified API

5.4.0

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

Description

The sp:GetActsRequest API method returns the list of standard activities for a given employee on a given day. The activities are returned in order of their ExpectedStart.

The sp:GetActsRequest API method may also be used to return a standard activity for a given activity number. When searching using an activity number the employee identifier and the date field become optional parameters.

In this context, the ServiceScheduling "Get Employee Activities" API is the sp:GetActsRequest API.  

On this page:

Related pages:

Resource URL Summary

Pass Through Call to ServiceScheduling's "Get Employee Activities" API

PUT /up/v5/rest/scheduling/GetActs

HTTP Headers

This API uses the standard ServiceBroker HTTP Headers.


API Specifics

Pass Through Call to ServiceScheduling's "Get Employee Activities" API

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

URL

PUT /up/v5/rest/scheduling/GetActs

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 Employee Activities" APi.

GetEmployeeActivities Object Format

GetEmployeeActivities JSON
{
    "Tech": "EmpId",
    "Date": "spDate",
    "ActNo": "ActivityNo",
    "PreAct": "Numeric",
    "ActCount": "Numeric"
}

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

PropertyTypeLengthDescriptionReq?Mapping Field: Service Scheduling  
Tech

string

SS: OptEmpID (string)


SS: 25

Pass through parameter to the ServiceScheduling "Get Employee Activities" API. 

An employee ID must be supplied if the ActNo is missing.

Mandatory if ActNo not supplied. Otherwise optional.

No

EmpId

Date

string

SS: spDate (string)


SS: 8

Pass through parameter to the ServiceScheduling "Get Employee Activities" API. 

The date for which the activities are required.

Mandatory if EmpId is supplied. Otherwise optional.

Example: "2023-03-30"

Yes

Date

ActNo

string

SS: ActNo (unsigned integer)

SS: max 999999999

Pass through parameter to the ServiceScheduling "Get Employee Activities" API.

An ActNo must be supplied if the EmpID is missing.

Mandatory if EmpId not supplied. Otherwise optional.

No

ActNo

PreActunsigned integer

Pass through parameter to the ServiceScheduling "Get Employee Activities" API.

The start point for each batch; omit for 1st batch or for all.

No

PreAct

ActCountunsigned integer

Pass through parameter to the ServiceScheduling "Get Employee Activities" API. 

The number of activities to be returned in each batch, omit for all.

No

ActCount

HTTP Response

Success

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

{
    "Success": true,
    "Code": "0",
    "Message": "",
    "Payload": {
        "result": {
            "type": "OK",
            "code": "0"
        },
        "OffsetId": "PreAct",
        "OffsetCount": "ActCount",
        "Acts": [
            {Acts}
        ]
    }
}

Error

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

 Click here to expand...
  • SP_OK (0)
  • SP_EMPID_INVALID (5)
  • SP_DATE_INVALID (14)
  • SP_COUNT_INVALID (18)
  • SP_OUTSIDE_HORIZON (53)
  • SP_ACTIVITY_NO_INVALID (131)
  • SP_ACTIVITY_NOT_FOUND (157)
  • SP_EMP_NOT_POSTED (178)
  • SP_EMPID_DOES_NOT_EXIST (231)

Related content

Get Employee Activities SOAP API
Get Employee Activities SOAP API
More like this
Get Employee Activities SOAP API
Get Employee Activities SOAP API
More like this
Integration ServiceOptimizer Get Employee Activities SOAP API
Integration ServiceOptimizer Get Employee Activities SOAP API
More like this
_API GetActsRequest Response
_API GetActsRequest Response
More like this