NextGen APIs

POST /scheduling/manual/r1/scheduling/activities-validations

Http Verb

POST

Url

/scheduling/manual/r1/scheduling/activities-validations

Permissions required


Personally Identifiable Information (PII)

No

Sensitive Information

No

Last Modified Version

r1 - 2024 W3 (FSM 18.0)

Released since

2024 W2 (FSM 17.0)

Deprecated since


Removed since


Tech Tags


Business Logic

API Overview

This API is designed to validate one or more work shifts for a resource, team (2024 W2 - FSM 17.0), or a crew shell (2024 W3 - FSM 18.0).

The work shifts in the request payload cannot be related to crew shell members. If the crew shell lacks technicians or a foreman, the validation of the work shift is blocked.

Details

For each workShiftId in the request payload, perform the following steps:

  1. Crew Shell Shift Check:

    • Verify if the workShiftId refers to a CrewShellShift.

    • If yes, check if the workShiftId is related to the Crew Shell Work Shift.

      • If not: The workShiftId is related to a Crew Shell Member. In this case, return the error MANUAL_SCHED_029.

      • If yes: Check if the crewShellId associated with the workShiftId has members assigned, and ensure that there is a CrewShellMember with foreman = true.

  2. Retrieve related operations

    1. For each workShiftId in input retrieve the related appointments

    2. Given the appointments retrieve all the operations associated with the appointments, by doing that we ensure that all the operations related to the workShiftId to validate are validated, this means that if a technician is working in a team is not mandatory to give all the work shifts of all the technicians

  3. Intervention Status and Work Order Operation Status Update:

    • Retrieve all intervention records associated with the workShiftId.

    • If intervention.status = "OPEN", set intervention.status = "FIXED".

    • Update the status of the work order operation through intervention.workOrderOperationId.

    • Update the status of the work order throughintervention.workOrderOperationId.workOrderId.

Header Parameters

Default.

Request Body Parameters

Field

Validations

Note

workShiftId


List<WorkShiftId>

Response documentation

Response payload fields

Response error codes

MANUAL_SCHED_027, MANUAL_SCHED_029, MANUAL_SCHED_023