NextGen APIs

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

Http Verb

DELETE

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 deletes a Work Cycle Structure.

The process follows these steps:

  1. Verify Existence of Other Work Cycle Structures:

    • Check if there is at least one other Work Cycle Structure record with workCycleStructure.workCycleId = {workCycleId}.

    • If no such record exists, trigger error WORKORDERS_036.

  2. Verify Existence of Other Mandatory Work Cycle Structures:

    • Check if there is at least one other Work Cycle Structure record with workCycleStructure.workCycleId = {workCycleId} and workCycleStructure.optionalOperation = false.

    • If no such record exists, trigger error WORKORDERS_037.

  3. Update Work Order Operations:

    • Search for all Work Order Operation records with workOrderOperation.workCycleStructureId = {workCycleStructureId}.

    • For each found record, if any, set workOrderOperation.workCycleStructureId to null.

  4. Delete Work Cycle Structure:

    • Delete the Work Cycle Structure record with workCycleStructure.id = {workCycleStructureId}.

Path Parameters

Field

Note

workCycleId


workCycleStructureId


Header Parameters

Default.

Response documentation


Response error codes

NOT_FOUND, BASE_0001, WORKORDERS_036, WORKORDERS_037