How to create preventive maintenance based on meters?

WebAPI - How to create preventive maintenance based on meters?

This method allows to create a preventive maintenance based on a meter in a simplified manner.

 The method to be used when creating a preventive maintenance based on a meter:

 

POST url/api/mytenant/myorganization/maintenance/preventivemaintenances

 

Json example for creating a preventive maintenance:

 

1.       {

        "preventiveMaintenanceKey""0001",

        "description""Preventiva contador",

        "remarks"null,

        "projectionEndDate""2021-12-31T00:00:00",

        "joinPlans"true,

        "timeZoneId""GMT Standard Time",

        "workOrderType""MP",

        "workshop""MN",

        "responsible""001",

        "assetType"2,

        "parentLocation""ATC01",

        "location"null,

        "equipment""ATC02",

        "tool"null,

        "maintenanceRoute"null,

        "priorityLevel""N",

        "company""DEMO",

        "preventiveMaintenancePlans": [

            {

                "advanceTolerance"1,

                "delayTolerance"1,

                "events"0,

                "replacementStart"0,

                "interval"250.000000,

                "startValue"120.000000,

                "maintenancePlan""MP-000001_1",

                "operatingState"null,

                "replacementCriteria"0,

                "mainMaintenancePlan"null,

                "meter""0001",

                "expectedDuration""00:30:00"

            }

        ],

        "customer"null,

        "provider"null,

        "workOrderState""OT01",

        "schedulingCriteria"3

    }

This method allows to create a preventive maintenance according to the parameters filled in:

i.PreventiveMaintenanceKey: Preventive maintenance key. This field is mandatory.

ii.description: Short description of the preventive maintenance. This field is mandatory.

iii.remarks: Remarks.

iv.projectionEndDate: the preventive maintenance projected end date.

v.joinPlans: Join plans. Fill in this field with true or false. If this parameter is not sent, it is filled in as true by default, that is, active.

vi.timeZoneId: Time zone. If you don't edit this parameter, the standard time zone is selected by default.

vii.workOrderType: The work order type key. Mandatory field.

viii.workshop: The key of the workshop. Mandatory field.

ix.responsible: The key of the person in charge. Mandatory field.

x.assetType: The asset type (1- location; 2- equipment; 3- tool; 4- route). Mandatory field.

xi.parentLocation: The key of the selected asset parent location. Mandatory field.

xii.location: The location's key.

xiii.equipment: The equipment key.

xiv.tool: The tool's key.

xv.maintenanceRoute: The route's key.

xvi.priorityLevel: The key of the priority level. Mandatory field.

xvii.company: The company's key. Mandatory field.

xviii.preventiveMaintenancePlans: Scheduled worksheet.

    1. advanceTolerance: advance tolerance number.
    2. delayTolerance: delay tolerance number.
    3. events: number of events.
    4. replacementStart: Starts at. Defines the number of events being saved before starting to replace the main plan with another plan.
    5. interval: Interval value. Mandatory field for preventive maintenances based on meters.
    6. startValue: Start value. Mandatory field for preventive maintenances based on meters.
    7. maintenanceplan: The maintenance plan key. Mandatory field.
    8. operatingState: The key of the operating state.
    9. replacementCriteria: Replacement criteria. (0 - none; 1- main; 2- replacement).
    10. mainMaintenancePlan: The maintenance plan key.
    11. meter: The meter's key. Mandatory field for preventive maintenances based on meters.
    12. expectedDuration: Expected duration of the preventive plan. The format is the following: d.hh:mm:ss (d - days, hh - hours, mm - minutes, ss - seconds).

xix.customer: The customer's key.

xx.provider: The supplier's key.

xxi.workOrderState: The key of the WO state.

xxii.schedulingCriteria: Scheduling. (1- Fixed date; 2- Opening date; 3- Closing date). Mandatory field.

 

When this method is executed successfully, it returns HttpStatusCode.201Created.


    • Related Articles

    • Webapi - How to create a preventive maintenance based on replacement?

      This method allows to create a preventive maintenance based on a replacement criterion in a simplified manner. The method to be used when creating a preventive maintenance based on a replacement criterion: POST ...
    • Webapi - How to create a preventive maintenance based on recurrence?

      This method allows to create a preventive maintenance based on daily and monthly recurrence in a simplified manner. The method to be used when creating a preventive maintenance based in 2 recurrence plans, for example, daily and monthly is: POST ...
    • WebAPI – How do I create work orders?

      This method offers a simple way of creating a Work Order for a specific Asset, Location, Tool or Route. The method to be used to create a work order is: POST /api/mytenant/myorganization/maintenance/workorders/newWorkOrderInfo Json example to create ...
    • WebAPI - How to create a tool?

      This method allows to create a tool in a simplified manner. The method to be used when creating a tool is: POST url/api/mytenant/myorganization/assetmanagementcore/equipmentItems Json example for creating a tool: 1. { "equipmentKey": "PCR", ...
    • WebAPI – How do I update a work order?

      This method offers a simplified way of performing changes to the Work orders. The method to be used to create a work order is:    POST /api/mytenant/myorganization/maintenance/workorders/updateWorkOrderInfo/{{companyKey}}/{{workOrderKey}} The ...