|
Http Verb |
POST |
|---|---|
|
Url |
/integration/work-orders/r1/work-orders |
|
Permissions required |
Core Additional Parameters: Edit (fsm.core.additionalparameter.edit) Facility Configuration: View (fsm.core.technicalobject.configuration.view) Organizational Structure Entities: View (fsm.core.structure.view) Customer: Edit (fsm.core.technicalobject.customer.edit) Resource: View (fsm.core.resource.view) WorkOrder: Edit (fsm.core.workorder.edit) WorkOrder: View (fsm.core.workorder.view) WO Configuration: View (fsm.core.workorder.configuration.view) ATTENTION: In addition, it is mandatory to configure:
|
|
Last Modified Version |
r1 |
|
Tech Tags |
|
|
Available Async |
Yes |
BPMN Diagram
Business Logic
This Integration API creates a new Work Order on a Account or on an Asset, depends on input object. Account and Asset cannot be present at the same time they are mutual exclusive.
If Account does not exist in internal configuration, system creates it. Otherwise, system evaluates useDefaultAccount:
-
If useDefaultAccount is true and both asset and account are not present → system creates a default account
-
If useDefaultAccount is false and both asset and account are not present → system returns error
-
If useDefaultAccount is true and asset is present → system returns error
-
If useDefaultAccount is true and account is present → system returns error
System evaluates the presence of input field workCycleCode to choose the WO creation method: if not null, the WO creation method will be ‘with Work Cycle’ otherwise it will be ‘with declared Operations’.
Only in case of WO creation method ‘with declared Operations’:
-
System evaluates input object operations to control the existence of almost one WO Operation because it’s forbidden to have a Work Order without Operations.
-
System evaluates the uniqueness of property operation.executionOrder because it’s forbidden to have multiple Operations with same value.
System verifies if disableWorkOrderActivation is false these mandatory fields are populated:
-
workOrder object: operationAssignments and if operationAssignments=”AGGREGATED”, also aggregatedCardinalityCode, aggregateDuration, aggregateResidualDuration;
-
operations object: cardinalityCode if operationAssignments=”DISTINCT”,
System returns error if both workCycleCode and declared Operations are populated.
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 - Work Order Existence
System takes Input fields and checks their existence in internal configuration because it’s forbidden to have multiple Work Order with the same Code and External System.
API Verb: GET
Resource: Work Orders
Input: externalCode, externalSystemId
Output: workOrderId, statusId
If System can obtain the Output fields and statusId is DRAFT → continue to next step.
If System can obtain the Output fields and statusId is not DRAFT → responds with error. Elaboration is stopped.
If System can’t obtain the Output fields → Creation → continue to step Work Order Type Validation.
Error Type:
-
Others - see link in Resource
STEP 2 - Parent Work Order Existence
System takes Input fields and checks their existence in internal configuration.
System checks the existence of a Parent Work Order.
This step is skipped if externalParentCode is absent.
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 Order Cancellation
System takes Input fields to set CANCELLED status on the Work Order and reset externalCode in internal configuration, in order to recreate a new Work Order.
If Response State is SUCCESS → continue to next step.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
STEP 4 - Account or Asset Validation
if Account is present then execute step 5a or if Asset is present then execute step 5b. Only one of this step can be executed mutually exclusive.
STEP 4a - Account Validation
System takes Input fields and checks their existence.
API Verb: GET
Resource: Accounts
Input: account.code OR account.code='externalSystemCode_operationCenterCode_externalCode'
Output: accountId
If System can obtain the Output fields → go to step Address Validation.
If System can’t obtain the Output fields with the real account.code → execute Real Account Creation Step account-creation
If System can’t obtain the Output fields with the calculated account.code → go to next step.
STEP 4b - Asset Validation
System takes Input fields and checks their existence.
If System can obtain the Output fields → continue to step Address Validation.
If System can’t obtain the Output fields → continue to next step.
STEP 5 - Default Value Validation (only for Default Account Creation)
System verifies the presence of some default variables in Tenant Properties, necessary to create a Default Account.
These variables must be configured on Next Gen Platform (Technical Configuration-Company) with this exact format:
"company.integration.defaultAccountCreation": true/false
"company.integration.defaultAccountType": "account.typeCode"
"company.integration.defaultPhoneNumber": "phoneNumberContact"
STEP 5a - Default Account Creation Check
System checks the presence of the first variable to enable the creation of a default account.
If System can obtain the Output fields and defaultAccountCreation=true → go to next step.
If System can obtain the Output fields and defaultAccountCreation=false → responds with error. Elaboration is stopped.
If System can’t obtain the Output fields → responds with error. Elaboration is stopped.
STEP 5b - Default Account Type Check
System checks the presence of the second variable.
API Verb: GET
Resource: Tenant
Input: company.integration.defaultAccountType
Output: account.typeCode
If System can obtain the Output fields → go to next step.
If System can obtain the Output fields → responds with error. Elaboration is stopped.
STEP 5c - Default Phone Number Check
System checks the presence of the third variable.
API Verb: GET
Resource: Tenant
Input: company.integration.defaultPhoneNumber
Output: phoneNumberContact
If System can obtain the Output fields → go to next step.
If System can’t obtain the Output fields → responds with error. Elaboration is stopped.
STEP 5d - Default Account Creation
Go to Step account-creation with these Input fields.
Input Fields calculated: typeId=defaultAccountType.id, code='externalSystemCode_operationCenterCode_externalCode', description='externalSystemCode_operationCenterCode_externalCode'
Default Account will not have any meters and contacts (except Default Phone Number).
STEP 6 - Meters Existence (only done for Account presence)
System verifies the existence of meters for the Customer.
If System can obtain the Output fields → continue to next step.
If System can’t obtain the Output fields → Customer has not meters. Continue to next step.
Error Type:
-
Others - see link in Resource
STEP 7 - Address Validation
If Account is present then execute step 6a or if Asset is present then execute step 6b. Only one of this step can be executed mutually exclusive.
STEP 7a - Address Validation by Account
System takes Input fields and retrieve the address of the asset.
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 7b - Address Validation by Asset
System takes Input fields and retrieve the address of the asset.
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 8 - Work Order Type Validation
System takes Input fields and checks their existence in internal configuration.
This step is skipped if Input fields are null or absent.
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 9 - Urgency Type Validation
System takes Input fields and checks their existence in internal configuration.
This step is skipped if Input fields are null and Work Order will not have Urgency.
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 10 - Operation Center Validation
System takes Input fields and checks their existence.
This step is skipped if Input fields are null or absent and Operation Center will be calculated in a later step.
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 11 - Work Center Validation
System takes Input fields and checks their existence.
This step is skipped if Input fields are null and Work Order will not have a Work Center.
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 12 - Work Cycle Code Validation
System takes Input fields and checks their existence.
This step is skipped if Input fields are null and Work Order will be create ‘with declared Operations’ in input.
If System can obtain the Output fields → go to step WO Type Comparison.
If System can’t obtain the Output fields → responds with error. Elaboration is stopped.
STEP 13 - Team Cardinality Validation
System evaluates input field operationsAssignment to decide the WO’s typology. If operationsAssignment is DISTINCT this step is skipped.
System takes Input fields and checks their existence.
This step is skipped if Input fields are null.
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 14 - Work Order Operations Validation
The following steps are executed for each WO Operations in Input.
All steps are skipped if Work Order is created ‘with Work Cycle’ in input.
STEP 14a - Team Cardinality Validation
System evaluates input field operationsAssignment to decide the WO’s typology. If operationsAssignment is AGGREGATED this step is skipped.
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 14b - Asset Validation only if AssetCode is present
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 14c - Address Validation if AssetCode is present
System takes Input fields and retrieve the address of the asset.
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.
Error Type:
-
Others - see link in Resource
STEP 14d - Operation Type Validation
System takes Input fields and retrieve the operation type.
API Verb: GET
Resource: Operation types
Input: operation.typeCode, active=true
Output: operationTypeId
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 15 - Work Order Type Comparison
System compares the workOrderTypeId from input fields with the workOrderTypeId from Work Cycle.
This step is skipped if Work Cycle in Input is null or absent.
If workOrderTypeId from input fields is null or absent, System takes workOrderTypeId from Work Cycle.
If workOrderTypeId from input fields is present, System compares it with workOrderTypeId from Work Cycle.
If they are the same → continue to next step.
If they are different → responds with error. Elaboration is stopped.
Error Type:
-
Others - see link in Resource
STEP 16 - Operation Center Calculation
System uses automatic calculation of Operation Center based on address.
This step is skipped if Operation Center in Input is present.
API Verb: GET
Resource: calculated-operation-center
Input: workOrderTypeId, referenceDate=startDate, addressId
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 17 - Work Order Code Generation
Only if validation is passed, system generates the work order unique code.
If Response State is SUCCESS → continue to next step.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
STEP 18 - Work Order Creation
STEP 18a - WO creation with declared Operations
System takes Input fields and creates the Work Order.
API Verb: POST
Resource: Work Orders
Input: externalSystemId, externalCode, addressId, typeId, operationCenterId, cardinalityId, urgencyId, workCenterId, description, workOrderCode, startDate, endDate, operationsAssignment, aggregateDuration, aggregateResidualDuration, notes, appointmentStartDate, appointmentEndDate, parentWorkOrderId
Output: workOrderId, Response State
If Response State is SUCCESS → continue to step Work Order Operation Creation.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
STEP 18b - WO creation with Work Cycle
System takes Input fields and creates the Work Order.
API Verb: POST
Resource: /{workCycleId}/work-orders
Input: externalSystemId, externalCode, addressId, workCycleId, operationCenterId, urgencyId, workCenterId, description, startDate, endDate, notes, appointmentStartDate, appointmentEndDate, activateWorkOrder=false
Output: workOrderId, Response State
If Response State is SUCCESS → continue to next step.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
STEP 18c - Update work order created from work cycle
System takes Input fields and updates the parentWorkOrderId of the Work Order.
This step is skipped if externalParentCode and workCycleCode are absent
If Response State is SUCCESS → continue to step Relationship WO and Meter Creation.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
STEP 19 - Activity Address Creation
System takes Input fields and creates an Activity Address.
This step is skipped if object operations.activityAddress is absent.
API Verb: POST
Resource: Addresses Batch
Input: list of [countryCode, districtCode, municipality, municipalityCode, postalCode, locality, toponym, street, streetNumber, streetNumberExtension, floor, lot, staircase, apartment, directions, xCoordinate, yCoordinate, description]
Output: Response State, list of[addressId] (only for SUCCESS)
If Response State is SUCCESS → continue to step Work Order Operation Creation.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
STEP 20 - Address Normalization
System evaluates input fields xCoordinate and yCoordinate to decide if Address Normalization is necessary.
This step is skipped if xCoordinate and yCoordinate are present.
If Response State is SUCCESS → continue to next step.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
STEP 21 - Work Order Operation Creation
This step is executed one time, as a batch operation, passing the list of WO Operations in Input.
System takes Input fields and creates the work order operations.
API Verb: POST
Resource: Operation
Input: List of: workOrderId, cardinalityId, typeId, addressId, defaultDuration, executionOrder, description, currentDuration, code, startDate, endDate, note, activityAddressId
Output: List of: workOrderOperationId, Response State
If Response State is SUCCESS → continue to next step.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
STEP 22 - Relationship WO and Meter Creation (only if Account is present)
System takes Input fields and creates the relationship between Customer and its Meters.
This step is skipped if Customer has no Meters.
API Verb: PUT
Resource: Work order meters
Input: workOrderId, List of meterId
Output: Response State
If Response State is SUCCESS → continue to next step.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
STEP 23 - Work Order Activation
System takes Input fields and activates the Work Order.
This step is skipped if disableWorkOrderActivation='true'.
If Response State is SUCCESS → elaboration is stopped. See Response payload fields.
If Response State is ERROR → elaboration is stopped. See Response payload fields.
If step is skipped → elaboration is stopped. See Response payload fields.
Error Type:
-
Others - see link in Resource
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 |
|---|---|---|---|---|---|
|
workOrder |
externalSystemCode |
|
External System Code |
Y |
Not Blank |
|
externalCode |
|
Work Order Code in External System |
Y |
Not Blank |
|
|
externalParentCode |
|
Parent Work Order Code in External System |
N |
Null or Not Blank |
|
|
typeCode |
|
Work Order Type Code (Mandatory for workCycleCode absent or null) |
N |
|
|
|
urgencyCode |
|
Urgency Code |
N |
Null or Not Blank |
|
|
operationCenterCode |
|
Operation Center Code |
N |
Null or Not Blank |
|
|
workCenterCode |
|
Work Center Code |
N |
Null or Not Blank |
|
|
aggregateCardinalityCode |
|
Cardinality Code |
N
|
Null or Not Blank |
|
|
startDate |
|
Work Order Start Date |
Y |
Not Null |
|
|
endDate |
|
Work Order End Date |
Y |
Not Null |
|
|
description |
|
Work Order Description |
N |
|
|
|
operationsAssignment |
|
Type of Operation Assignment: DISTINCT or AGGREGATED |
N
|
Null or Not Blank |
|
|
aggregateDuration |
|
Duration for ‘operationsAssignment’='AGGREGATED' |
N |
|
|
|
aggregateResidualDuration |
|
Residual Duration for ‘operationsAssignment’='AGGREGATED' |
N |
|
|
|
notes |
|
Work Order Notes |
N |
|
|
|
appointmentStartDate |
|
Work Order Appointment Start Date |
N |
|
|
|
appointmentEndDate |
|
Work Order Appointment End Date |
N |
|
|
|
workCycleCode |
|
Work Cycle Code |
N |
|
|
|
disableWorkOrderActivation |
|
Flag to leave Work Order in draft status after creation, if ‘true’ (instead of activating it, if ‘false’). Default ‘false’ |
N |
|
|
|
operations (minOccurs=0, maxOccurs=N) |
cardinalityCode |
|
Operation Cardinality Code |
N
|
Null or Not Blank |
|
typeCode |
|
Operation Type Code |
Y |
Not Blank |
|
|
assetCode |
|
Operation Asset Code |
Y for ‘asset.code’ or ‘account.code’ not present |
Null or Not Blank |
|
|
defaultDuration |
|
Duration of the Operation |
N |
|
|
|
executionOrder |
|
Operation Execution Order |
N |
|
|
|
description |
|
Description of the Operation |
N |
|
|
|
currentDuration |
|
Operation Remaining Time |
N |
|
|
|
code |
|
Code of the Operation |
N |
|
|
|
startDate |
|
Operation Start Date |
N |
|
|
|
endDate |
|
Operation End Date |
N |
|
|
|
note |
|
Operation Notes |
N |
|
|
|
activityAddress |
|
Available since 2025 W3 (FSM 21.0) by setting
|
N |
|
|
|
asset |
code |
|
Asset Code |
N |
|
|
account |
code |
|
Account Code |
N |
|
|
typeCode |
|
Account Type Code |
N |
Null or Not Blank |
|
|
operationCenterCode |
|
Operation Center Code |
N |
Null or Not Blank |
|
|
description |
|
Account Description |
N |
Null or Not Blank |
|
|
fiscalCode |
|
Account Fiscal Code |
N |
|
|
|
note |
|
Account Note |
N |
|
|
|
birthDate |
|
Account Birth Date |
N |
|
|
|
externalCode |
|
Account External Code |
N |
|
|
|
phoneNumberCode |
|
Code of Phone Number Mandatory (Contact with fixed type PHONE) |
N |
|
|
|
phoneNumberContact |
|
Phone Number Mandatory (Contact with fixed type PHONE) |
N |
Null or Not Blank |
|
|
useDefaultAccount |
|
Flag to activate the default account creation |
N |
|
|
|
address |
countryIsoAlphaCode |
|
Acronym of Nation (2 or 3 letters acronym) |
Y |
Not Blank |
|
districtAcronym |
|
Acronym of District |
N |
Null or Not Blank |
|
|
districtCode |
|
Code of District |
N |
Null or Not Blank |
|
|
municipality |
|
Municipality |
Y |
Not Blank |
|
|
municipalityCode |
|
Municipality code |
N |
|
|
|
locality |
|
Locality |
N |
|
|
|
postalCode |
|
PostalCode |
N |
|
|
|
toponym |
|
Toponym |
N |
|
|
|
street |
|
Street |
N |
|
|
|
streetNumber |
|
StreetNumber |
N |
|
|
|
streetNumberExtension |
|
Street number extension |
N |
|
|
|
floor |
|
Floor |
N |
|
|
|
lot |
|
Lot |
N |
|
|
|
staircase |
|
Staircase |
N |
|
|
|
apartment |
|
Apartment |
N |
|
|
|
directions |
|
Directions |
N |
|
|
|
description |
|
Address Description |
N |
|
|
|
yCoordinate |
|
Latitude |
N |
|
|
|
xCoordinate |
|
Longitude |
N |
|
|
|
contacts (minOccurs=0, maxOccurs=N) |
typeCode |
|
Contact Type Code |
Y |
Not Blank |
|
code |
|
Contact Code |
N |
|
|
|
contact |
|
Contact |
Y |
Not Blank |
|
|
meters (minOccurs=0, maxOccurs=N) |
typeCode |
|
Meter Type Code |
N |
Null or Not Blank |
|
brandCode |
|
Meter Brand Code |
N |
Null or Not Blank |
|
|
locationCode |
|
Meter Location Code |
N |
Null or Not Blank |
|
|
classCode |
|
Meter Class Code |
N |
Null or Not Blank |
|
|
productionYear |
|
Meter Production Year |
N |
|
|
|
serialNumber |
|
Meter Serial Number |
Y |
Not Blank |
|
|
digitNumber |
|
Meter Digit Number |
N |
|
|
|
acronym |
|
Meter Acronym |
N |
|
|
|
note |
|
Meter Note |
N |
|
|
|
minReading |
|
Meter Min Reading |
N |
|
|
|
maxReading |
|
Meter Max Reading |
N |
|
|
|
lastReadingDate |
|
Meter Last Reading Date |
N |
|
|
|
lastReading |
|
Meter Last Reading |
N |
|
|
|
active |
|
Flag for activation/deactivation (default ‘true’) |
N |
|
|
|
converter |
serialNumber |
Converter Serial Number |
N |
|
|
|
lastReading |
Converter Last Reading |
N |
|
||
|
minReading |
Converter Min Reading |
N |
|
||
|
maxReading |
Converter Max Reading |
N |
|
||
|
digitNumber |
Converter Digit Number |
N |
|
||
|
confirmDigitNumber |
Converter Confirm Digit Number |
N |
|
||
|
typeCode |
Converter Type Code |
N |
|
||
addressObject
|
Field |
Description |
|
|---|---|---|
|
1 |
description |
Description |
|
2 |
countryIsoAlphaCode |
Acronym of Nation (2 or 3 letters acronym) |
|
3 |
districtAcronym |
Acronym of District |
|
4 |
districtCode |
Code of the District |
|
5 |
municipality |
Municipality |
|
6 |
municipalityCode |
Municipality Code |
|
7 |
locality |
Locality |
|
8 |
postalCode |
Postal Code |
|
9 |
street |
Street |
|
10 |
streetNumber |
Street Number |
|
11 |
streetNumberExtension |
Street Number Extension |
|
12 |
floor |
Floor |
|
13 |
lot |
Lot |
|
14 |
staircase |
Stair Case |
|
15 |
apartament |
Apartment |
|
16 |
direction |
Direction |
|
17 |
yCoordinate |
Y Coordinate |
|
18 |
xCoordinate |
X Coordinate |
|
19 |
toponym |
Toponym |
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
Example for Customer ‘with declared Operations’.
{
"workOrder": {
"extension": {
"myFieldName": "myValue"
},
"externalSystemCode": "demoNextGen",
"typeCode": "woType1",
"operationCenterCode": "NextGenOperationCenter",
"externalCode": "ext0001",
"urgencyCode": "urgency1",
"workCenterCode": "workCenter1",
"startDate": "2023-11-20T14:44:47.106Z",
"endDate": "2023-11-20T15:44:47.106Z",
"operationsAssignment": "DISTINCT",
"aggregateDuration": 0,
"aggregateResidualDuration": 0,
"appointmentStartDate": "2023-11-20T14:44:47.106Z",
"appointmentEndDate": "2023-11-20T15:44:47.106Z",
"description": "description of the wo",
"notes": "note of the wo",
"disableWorkOrderActivation": "false"
},
"account": {
"extension": {
"myFieldName": "myValue"
},
"code": "customer1"
},
"operations":[
{
"extension": {
"myFieldName": "myValue"
},
"cardinalityCode": "cardinality1",
"typeCode": "opType1",
"defaultDuration": 60,
"executionOrder": 1,
"description": "description of the operation",
"currentDuration": 10,
"code": "operation1",
"startDate": "2023-11-20T14:44:47.106Z",
"endDate": "2023-11-20T14:54:47.106Z",
"note": "note of the operation"
}
]
}
Example for Customer ‘with Work Cycle’.
{
"workOrder": {
"extension": {
"myFieldName": "myValue"
},
"externalSystemCode": "demoNextGen",
"operationCenterCode": "NextGenOperationCenter",
"externalCode": "ext0001",
"urgencyCode": "urgency1",
"workCenterCode": "workCenter1",
"startDate": "2023-11-20T14:44:47.106Z",
"endDate": "2023-11-20T15:44:47.106Z",
"aggregateDuration": 0,
"aggregateResidualDuration": 0,
"appointmentStartDate": "2023-11-20T14:44:47.106Z",
"appointmentEndDate": "2023-11-20T15:44:47.106Z",
"description": "description of the wo",
"notes": "note of the wo",
"disableWorkOrderActivation": "false",
"workCycleCode": "WCY_001"
},
"account": {
"extension": {
"myFieldName": "myValue"
},
"code": "customer1"
}
}
Example for Asset
{
"workOrder": {
"extension": {
"myFieldName": "myValue"
},
"externalSystemCode": "demoNextGen",
"typeCode": "woType1",
"operationCenterCode": "NextGenOperationCenter",
"externalCode": "ext0001",
"urgencyCode": "urgency1",
"workCenterCode": "workCenter1",
"startDate": "2023-11-20T14:44:47.106Z",
"endDate": "2023-11-20T15:44:47.106Z",
"operationsAssignment": "DISTINCT",
"aggregateDuration": 0,
"aggregateResidualDuration": 0,
"appointmentStartDate": "2023-11-20T14:44:47.106Z",
"appointmentEndDate": "2023-11-20T15:44:47.106Z",
"description": "description of the wo",
"notes": "note of the wo",
"disableWorkOrderActivation": "false"
},
"asset": {
"extension": {
"myFieldName": "myValue"
},
"code": "asset1"
},
"operations":[
{
"extension": {
"myFieldName": "myValue"
},
"cardinalityCode": "cardinality1",
"typeCode": "opType1",
"defaultDuration": 60,
"executionOrder": 1,
"description": "description of the operation",
"currentDuration": 10,
"code": "operation1",
"startDate": "2023-11-20T14:44:47.106Z",
"endDate": "2023-11-20T14:54:47.106Z",
"note": "note of the operation"
}
]
}
Example for account creation
{
"workOrder": {
"extension": {
"myFieldName": "myValue"
},
"externalSystemCode": "SAP",
"externalCode": "ext0001",
"typeCode": "woType1",
"urgencyCode": "urgency1",
"operationCenterCode": "NextGenOperationCenter",
"workCenterCode": "workCenter1",
"aggregateCardinalityCode": "CAR_01",
"startDate": "2023-11-20T14:44:47.106Z",
"endDate": "2023-11-20T15:44:47.106Z",
"description": "description of the wo",
"operationsAssignment": "AGGREGATED",
"aggregateDuration": 0,
"aggregateResidualDuration": 0,
"notes": "note of the wo"
"appointmentStartDate": "2023-11-20T14:44:47.106Z",
"appointmentEndDate": "2023-11-20T15:44:47.106Z",
"disableWorkOrderActivation": "false"
},
"operations":[
{
"extension": {
"myFieldName": "myValue"
},
"cardinalityCode": "cardinality1",
"typeCode": "opType1",
"defaultDuration": 60,
"executionOrder": 10,
"description": "description of the operation",
"currentDuration": 10,
"code": "operation1",
"startDate": "2023-11-20T14:44:47.106Z",
"endDate": "2023-11-20T14:54:47.106Z",
"note": "note of the operation"
}
],
"account": {
"extension": {
"myFieldName": "myValue"
},
"code": "ACCOUNT_01",
"typeCode": "TYPE_01",
"operationCenterCode": "NextGenOperationCenter",
"description": "MARIO ROSSI",
"fiscalCode": "01234567890",
"note": "Note",
"birthDate": "2024-02-13T17:02:38.219Z",
"externalCode": "EXT_ACCOUNT_01",
"phoneNumberCode": "HOME",
"phoneNumberContact": "01111111111"
},
"address": {
"extension": {
"myFieldName": "myValue"
},
"streetNumber": 10,
"toponym": "via",
"street": "Roma",
"countryIsoAlphaCode": "IT",
"postalCode": "33080",
"municipality": "Fiume Veneto",
"districtAcronym": "PN"
},
"contacts": [
{
"extension": {
"myFieldName": "myValue"
},
"contact": "account_00@gmail.com",
"typeCode": "EMAIL",
"code": "E-MAIL"
}
],
"meters": [
{
"extension": {
"myFieldName": "myValue"
},
"serialNumber": "ADR_0123456",
"classCode": "1",
"productionYear": "2021",
"digitNumber": 2,
"acronym": "MTR_12345"
}
]
}
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": 123456,
"code": "CO0234590"
}
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "External system string does not exist",
"instance": "/integration/work-orders/r1/work-orders",
"code": "IA001_001"
}
Response error codes