|
Http Verb |
PATCH |
|---|---|
|
Url |
/integration/workforce/r1/work-shift-types/{workShiftTypeCode} |
|
Permissions required |
Core Additional Parameters: Edit (fsm.core.additionalparameter.edit) Resource Configuration: Edit (fsm.core.resource.configuration.edit) (Organizational Structure Entities: View (fsm.core.structure.view) or Organizational Structure Entities: Edit (fsm.core.structure.edit)) |
|
Last Modified Version |
r1 |
|
Tech Tags |
|
|
Available Async |
No |
BPMN Diagram
Business Logic
This Integration API updates a Workshift type.
The Private API Suite mandates the verification of OverITs’ software license and the required user permissions. Each call initiated by the Integration API will activate both validations. Only upon successful completion of these validations can the business processes commence.
STEP 1 - External System Validation
System takes Input fields and checks their existence in internal configuration.
API Verb: GET
Resource: External Systems
Input: externalSystemCode, active=true
Output: externalSystemId
If System can obtain the Output fields → continue to next step.
If System can’t obtain the Output fields → responds with error. Elaboration is stopped.
STEP 2 - Operation Center Validation
This step is skipped if operationCenterId is absent.
API Verb: GET
Resource: Operation Centers
Input: operationCenterCode, active=true
Output: operationCenterId
If System can obtain the Output fields → continue to next step.
If System can’t obtain the Output fields → responds with error. Elaboration is stopped.
STEP 3 - Work Shift Type Type Validation
System takes Input fields and checks their existence.
If System can obtain the Output fields → continue to next step.
If System can’t obtain the Output fields → responds with error. Elaboration is stopped.
STEP 4 - Work Shift Type Update
System takes Input fields and updates the entity.
API Verb: PATCH
Resource: Work Shift Types
Input: workShiftTypeCode, operationCenterCode, description, startTime, endTime, order, active, code, breakStartTime, breakEndTime, overtimeMinute
Output: Response State
If Response State is SUCCESS → elaboration is stopped. See Response payload fields.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
Path Parameters
As their name suggests, they are included in the URL path of the endpoint.
|
Field |
Note |
|---|---|
|
workShiftTypeCode |
Workshift type code |
Query String Parameters
Start with a ? and includes parameters listed one after the another separated by &.
Fields
|
Field |
Description |
Mandatory |
Constraint |
|
|---|---|---|---|---|
|
1 |
externalSystemCode |
External system code |
Y |
Not Blank |
Header Parameters
Parameters included in the request headers. Generally, request headers are used to keep authorization parameters.
Default.
Request Body Parameters
Request body parameters are used when clients send data to the API. They are shipped in a JSON Object only in POST, PUT, or PATCH requests.
|
Field |
Description |
Mandatory |
Constraint |
|
|---|---|---|---|---|
|
1 |
operationCenterCode |
Operation center code |
N |
Absent or Null or Not Blank |
|
2 |
description |
Workshift description |
N |
|
|
3 |
startTime |
Workshift start time |
N |
|
|
4 |
endTime |
Workshift end time |
N |
|
|
5 |
order |
Workshift ordering |
N |
|
|
6 |
active |
Enable/disable data |
N |
|
|
7 |
code |
Workshift unique code identifier |
N |
Absent or Not Blank |
|
8 |
breakStartTime |
Workshift break start time |
N |
|
|
9 |
breakEndTime |
Workshift break end time |
N |
|
|
10 |
overtimeMinute |
Workshift overtime minutes |
N |
|
|
11 |
note |
Note |
N |
|
The objects in input could have also the extension object that allows to add additional, customized data to this API. More info here How to use APIs: Custom data via Extension.
Request example
{baseUrl}/integration/workforce/r1/work-shift-types/{workShiftTypeCode}?externalSystemCode=SAP
{
"extension": {
"myFieldName": "myValue"
},
"code": "wk1",
"description": "example",
"startTime": "08:00",
"endTime": "13:00",
"order": 0,
"active": true,
"breakStartTime": "13:00",
"breakEndTime": "14:00",
"overtimeMinute": 5,
"operationCenterCode": "oc1",
"note": "string"
}
Response documentation
Response payload fields
Compliant with RFC Standard https://www.rfc-editor.org/rfc/rfc9457.html
Extension fields:
|
Field |
Description |
Note |
|---|---|---|
|
code |
Extension member of a Problem Details Object that contains the error code |
Only for ERROR |
Response example
Error example
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "External system string does not exist",
"instance": "/integration/workforce/r1/work-shift-types/{workShiftTypeCode}",
"code": "IA001_001"
}