|
Http Verb |
POST |
|---|---|
|
Url |
/integration/territory/organizational-structures/r1/operation-centers |
|
Permissions required |
Core Additional Parameters: Edit (fsm.core.additionalparameter.edit) Organizational Structure Entities: View (fsm.core.structure.view) or Organizational Structure Entities: Edit (fsm.core.structure.edit) |
|
Last Modified Version |
r1 |
|
Tech Tags |
MULTILANGUAGE-FIELDS |
|
Available Async |
No |
BPMN Diagram (TBD)
Business Logic
This Integration API creates or updates an Operation Center.
System verifies Permission Required and starts the elaboration that is organized in steps.
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 - Structure Center Validation
System takes Input fields and checks their existence in internal configuration.
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 - Operation Center Validation
System takes Input fields and checks their existence in internal configuration.
If System can’t obtain the Output fields → Update → continue to step Operation Center Update
If System can’t obtain the Output fields → Creation → continue to step Operation Center Creation
STEP 4 - Operation Center Update
System takes Input fields and updates the Operation center.
API Verb: PATCH
Resource: Operation Center
Input: operationCenterId, description, active, structureId, countryCode, timeZone, color
Output: Response State, code
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
STEP 5 - Operation Center Creation
System takes Input fields and creates the Operation center.
API Verb: POST
Resource: Operation Center
Input: code, description, active, structureId, countryCode, timeZone, color
Output: Response State, code
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.
Not present.
Query String Parameters
Start with a ? and includes parameters listed one after the another separated by &.
Not applicable.
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 |
externalSystemCode |
External System Code |
Y |
Not Blank |
|
2 |
code |
Operation Center Code Business key used for lookup |
Y |
Not Blank |
|
3 |
description |
Operation Center Description |
Y |
Not Blank |
|
4 |
active |
Flag for activation/deactivation (default ‘true’) |
N |
|
|
5 |
structureCode |
Structure Code |
Y |
Not Blank |
|
6 |
countryCode |
ISO Country Code |
N |
|
|
7 |
timeZone |
IANA Timezone |
N |
|
|
8 |
color |
Work Center color Hex-like UI field |
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
{
"externalSystemCode": "SAP",
"code": "OC_PGE_BAYAREA",
"description": [
{
"lang": "en",
"value": "Bay Area Operations Center"
}
],
"active": true,
"structureCode": "STR01",
"countryCode": "US",
"timeZone": "America/Los_Angeles",
"color": "#1E88E5",
"extension": {}
}
Response documentation
Response payload fields
Compliant with RFC Standard https://www.rfc-editor.org/rfc/rfc9457.html
Extension fields:
|
Field |
Description |
Note |
|---|---|---|
|
id |
Id of the resource created |
Only for SUCCESS |
|
code |
String Code of the resource created |
Only for SUCCESS |
|
code |
Extension member of a Problem Details Object that contains the error code |
Only for ERROR |
Response example
{
"id": 1581,
"code": "OC_PGE_BAYAREA"
}
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "Structure code STR_MAIN does not exist",
"instance": "/integration/territory/organizational-structures/r1/operation-centers",
"code": "IA001_001"
}