On This Page:
Related Pages:
The sp:GetActsRequest
API method can be used to get the standard activities for employees.
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.
Definition
The definition of this API is:
Click here to expand...
Web Service | Type | Description | Req? | Val? |
<sp:GetActsRequest>
| | | | |
| <EmpId>?</EmpId>
| EmpID
| An employee ID must be supplied if the ActNo is missing. Mandatory if ActNo not supplied. Otherwise optional | | |
| <ActNo>?</ActNo>
| WorkItemID
| An ActNo must be supplied if the EmpID is missing. Mandatory if EmpId not supplied. Otherwise optional | | |
| <Date>?</Date>
| spDate
| is the date for which the activities are required Mandatory if EmpId is supplied. Otherwise optional | | |
| <PreAct>?</PreAct>
| WorkItemID
| is the start point for each batch; omit for 1st batch or for all | | |
| <ActCount>?</ActCount>
| int
| is the number of activities to be returned in each batch, omit for all | | |
</sp:GetActsRequest>
|
| | | |
All of the fields to do with dates and times are local to what is specified in the tz_GAAPI database parameter (see [1]). This can be set such that dates and times are local to the timezone of the responsibility unit which contains the standard activity (which is the RU that the employee is posted to at the time of the activity), local to the employee that the activity belongs to, local to a specified or default timezone, or in GMT with or without daylight saving (BST).
Return Structure
The API returns a non-standard return structure.
Click here to expand...
Web Service | Type | Description | Req? | Val? |
<sp:GetActsResponse>
| | | | |
| <PreAct>?</PreAct>
| WorkItemID
| is the last activity ID of this batch if more are available | | |
| <ActCount>?</ActCount>
| int
| is the number of activities returned in this batch | | |
| <Acts>
|
| | | |
| | <ActNo>?</ActNo>
| WorkItemID
| is the internal reference number for the activity | | |
| | <ActType>?</ActType>
| ActTypeStr
| as specified when the activity was defined | | |
| | <ActCategory>?</ActCategory>
| ActCategoryDesc
| is the text describing the category of the activity type, usually “Other” | | |
| | <Postcode>?</Postcode>
| Postcode
| is where the activity will take place. Will be blank if this is a locationless Standard Activity. | | |
| | <Operative>?</Operative>
| EmpID
| is the identifier of the employee whose activities are being listed | | |
| | <ExpectedStart>?</ExpectedStart>
| spDateTime
| is the scheduled time to start travelling to this activity | | |
| | <ExpectedEnd>?</ExpectedEnd>
| spDateTime
| is the scheduled time the activity should finish | | |
| | <TravelTime>?</TravelTime>
| int
| is the expected journey time in minutes from the location of the previous job or activity to this activity | | |
| | <TravelHome>?</TravelHome>
| Int
| is the expected journey time in minutes from the location of this activity to the operative’s home. | | |
| | <CrewID>?</CrewID>
| EmpID
| Deprecated | | |
| | <CrewLeader>?</CrewLeader>
| Boolean
| Deprecated | | |
| </Acts>
|
| | | |
</sp:GetActsResponse>
|
| | | |
All of the fields to do with dates and times are local to what is specified in the tz_GAAPI database parameter (see [1]). This can be set such that dates and times are local to the timezone of the responsibility unit which contains the standard activity (which is the RU that the employee is posted to at the time of the activity), local to the employee that the activity belongs to, local to a specified or default timezone, or in GMT with or without daylight saving (BST).
Return Codes
In addition to the Standard Return 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)