EmpAddAct RESTified API
Pass Through Call to Scheduling's "EmpAddActRequest" API
This RESTified API will perform a pass-through call to the Scheduling sub-system's "EmpAddActRequest" API (when configured).
URL
PUT /up/v5/rest/scheduling/EmpAddAct
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 "EmpAddActRequest" API.
EmpAddAct Object Format
EmpAddAct Object Properties
Property | Type | Length | Description | Req? | Field Mapping: Scheduling | |||||
---|---|---|---|---|---|---|---|---|---|---|
empID |
| SS: 25 | Identifier of the employee that the newly created standard activity will be allocated to. | Yes | empID | |||||
actType | string | SS: 30 | Type of standard activity which should be created | Yes | actType | |||||
expectedStart | string | SS: 8 | Date and time of when the new standard activity should start (employee local or default – see 12). If the time part isn’t supplied, it defaults to the start of the operative’s day. Local to the employee doing the activity or, if the employee has no timezone, local to the default timezone. Example: "2023-03-30" | Yes | expectedStart | |||||
expectedEnd | string | SS: 8 | Date and time (employee local or default) when the new standard activity should end. If the time part isn’t supplied, it defaults to the end of the operative’s day. If an empty string (“”) is supplied, the new activity will last indefinitely but this is only allowed if the employee is posted to the same FRU (but not necessarily to the same Team within that FRU) indefinitely, otherwise SP_POSTING_HAS_ENDDATE (285) will be returned. expectedEnd and expectedDuration cannot both be populated – if both are then SP_SA_CONFLICTING_END (665) will be returned. Local to the employee doing the activity or, if the employee has no timezone, local to the default timezone. Example: "2023-03-30" | No | expectedEnd | |||||
locType | string | SS: See Valid Values | Specifies where the new standard activity is to be located: at a supplied postal code (in Act.EndPostCode (below)), at the employee’s home region, at the employee’s depot’s region (not available in V4.4 if the operative isn’t on shift), at the employee’s work region, at the employee’s start region on the day of the activity (if he’s on shift), taking overrides into account, at the employee’s end region on the day of the activity (if he’s on shift), taking overrides into account Note: Can be missing but, unless StandardActivityTravelMode has a value other than NoTravel, this will result in SP_ACT_LOC_TYPE_INVALID (152) being returned, since the activity’s location must be known to SERVICEOptimizer for travel to be included. SS Valid Values: "Home", "Work", "Depot", "Supplied", "None" | No | locType | |||||
notes | String | SS: 503 | This field is for user annotation and can either be any text string or it can be empty (“”). It appears on the Gantt Show Activity Details window, where it can also be edited. | No | N/A | |||||
TZType | String SS: | SS: See Valid Values | Defaults to Employee Time Zone. SS Valid Values: "Home", "FRU", "Location", "Default" | No | TZType | |||||
Dispatch | Boolean |
| Determines whether or not this specific standard activity will be included in any dispatching process. Defaults to value associated with actType. | No | Dispatch | |||||
TravelMode | String | SS: See Valid Values | Determines whether the standard activity will be allocated travel and, if so, how that travel behaves w.r.t the start of the SA SS Valid Values: "None", "ETS", "ETA" | Yes | TravelMode | |||||
Duration | integer |
| The number of minutes the standard activity is expected to last. expectedEnd and expectedDuration cannot both be populated – if both are then SP_SA_CONFLICTING_END (665) will be returned. | No | Duration | |||||
options | Object | Pass through parameter to the Scheduling EmpAddAc API. |
HTTP Response
Success
On success, a JSON-formatted version of the Scheduling "EmpAddActRequest" API response will be returned.
{ "Success": true, "Code": 0, "Message": "OK", "Payload": { "result": { "type": "OK", "code": "0" }, "actID": "88139" } }
Error
On error, a JSON-formatted version of the Scheduling "EmpAddActRequest" 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 Error codes, the possible Return Codes from this API are: