Through this web service a task plans can be associated to an asset.

In order to use this web server, the asset cannot be associated with any other task plan, must be a location, equipment or a tool and task within the task plans, cannot have triggers or subtasks related to meter readings.

EndPoint
https://app.fracttal.com/api/items_associate_tasks_plan/:item_code

Method PUT

Input Parameters

item_code, is the code of the asset to which the assignment of the task plans will be made.

The following are the parameters that must be sent in the body of the web service, for the task plans assignments.

Body

Parameter

Type of field

Required

Description

id_tasks_plan

Text

Yes

Id of the tasks plans (you can check it with the task plans query web service )

code_user

Text

Yes

Code of the user responsible for the transaction (user created as an inhouse personnel in Fracttal and with an associated account)

last_date_maintenance

Text

Optional

Date of last maintenance. By default, it’s the current date. Format: YYYY-MM-DD

Output parameters

Parameter

Type of field

Description

code

Text

Asset code

description

Text

Asset description

id_type_item

Number

Type of Asset.
1: Location
2: Equipment
3: Tools

id_group_task

Number

Id of the task plan to which it was associated

groups_tasks_description

Text

Description of the task plan to which it was associated

Example:
Petition: https://app.fracttal.com/api/items_associate_tasks_plan/185

Example Body:

{ 
"id_tasks_plan": "3",
"code_user": "32322",
"last_date_maintenance": "2019-10-25"
}

Example Response:

{ 
"success": true,
"message": "200",
"data": {
"id": 48,
"code": "185",
"description": "Buses Interurbanos { 185 } MERCEDES BENZ O-500 RSD MERCEDES BENZ O-500 RSD 9BM634071GB005938 { 185 }",
"id_type_item": 2,
"id_group_task": 3,
"groups_tasks_description": "New plan"
},
"total": 1
}

Did this answer your question?