NextGen APIs

PATCH /work-orders/r1/work-cycles/{workCycleId}/structures/{workCycleStructureId}

Http Verb

PATCH

Url

/work-orders/r1/work-cycles/{workCycleId}/structures/{workCycleStructureId}

Permissions required

WO Configuration: Edit (fsm.core.workorder.configuration.edit)

Personally Identifiable Information (PII)

No

Sensitive Information

No

Last Modified Version

r1

Released since

2024 W3 (FSM 18.0)

Deprecated since


Removed since


Tech Tags

MULTILANGUAGE-FIELDS

Business Logic

This API creates a new structure for the Work Cycle.

  1. Verify Mandatory Operations:

    • Check if there is at least one record with the same workCycleId and optionalOperation = false.

    • If not, return error WORKORDERS_027.

  2. Determine Operation Repeatability:

    • If workOrderOperationTypeId is not null:

      • Retrieve workOrderOperationTypeId.technicalObjectTypeId (assetType).

      • If assetType is "ASSET", set repeatable = true.

      • If assetType is "ACCOUNT", set repeatable = false.

    • Otherwise:

      • Retrieve workCycleId.workOrderTypeId.technicalObjectTypeId (assetType).

      • If assetType is "ASSET", set repeatable = true.

      • If assetType is "ACCOUNT", set repeatable = false.

  3. Set Default Duration and Team Cardinality:

    • If workCycleId.workOrderDuration is not null, set defaultDuration = workCycleId.workOrderDuration.

Path Parameters

Field

Note

workCycleId


workCycleStructureId


Header Parameters

Default.

Request Body Parameters

Field

Validations

Note

workCycleId



workOrderOperationTypeId



order

Unique


defaultDuration


 

teamCardinalityId



optionalOperation



Response documentation

Response error codes

NOT_FOUND, BASE_0001, BASE_0007, WORKORDERS_027, WORKORDERS_028