NextGen APIs

POST /work-orders/execution/r1/interventions/resources-accounted-hours/validations

Http Verb

POST

Url

/work-orders/execution/r1/interventions/resources-accounted-hours/validations

Permissions required

Work Order Accounting Edit: fsm.core.workorder.accounting.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

PAGINATION ORDERING-SERVER-SIDE

Business Logic

This API saves the accounted hours of a resource related to a specific intervention.

Validation and Business Logic

  1. Check Intervention Validation Status:
    Check if the related intervention validation status record meets the following condition:

    • RescoureAccountedHour.validationStatusId == VALIDATION_IN_PROGRESS or RescoureAccountedHour.validationStatusId == AUTOMATIC_VALIDATION or RescoureAccountedHour.validationStatusId == MANUALLY_VALIDATED

    If such yes, return error EXECUTION_005.

  2. Check Validation Status Rule:

    1. Check if on the Validation Status rule table, for now configurable only on FSM product, if there is a Configuration that does not match with the current Resource Accounted Hours. If yes, return error EXECUTION_007.

  3. Date field validations:

    • If(RescoureAccountedHour.outcomeStartDate = null or RescoureAccountedHour.outcomeEndDate) and RescoureAccountedHour.customerAbsent = false) → return EXECUTION_006.

    • If RescoureAccountedHour.takeInCharge = null, set RescoureAccountedHour.takeInCharge = RescoureAccountedHour.outcomeStartDate.

Header Parameters

Default.

Request Body Parameters

Field

Validations

Note

resourceId



interventionId



workingHourType



Response documentation

Response payload fields


Response error codes

BASE_0001, BASE_0003, EXECUTION_005, EXECUTION_006.