Through this API a document management document is created (Guarantee or Document) and associated with an asset.
EndPoint
https://app.fracttal.com/api/items_document_management
Method POST
Input Parameters in the Body
Parameter | Type of field | Required | Description |
code | Text | Yes | Asset code |
id_type_item | Number | Optional | Type of asset. This data applies when there are different types of assets with the same code. Can be: |
name | Text | Yes | Warrantee Name |
description | Text | Optional | Warrantee Description |
group_description | Texto | Optional | Warrantee group. If an existing group will be associated, the name must be sent as it is created in Fracttal, in case a group with the sent description isn’t found, a new one will be created |
version | Text | Optional | Document version |
valid_from | Date | Optional | Validity start date |
valid_until | Date | Optional | End date of validity |
warranty | Boolean | Optional | Sent true if is guarantee, otherwise false |
iso_code | Text | Optional | ISO code of the document |
author | Text | Optional | Author |
Send the mandatory fields and parameters with the additional values that you want to insert.
Output parameters
Parameter | Type of field | Description |
success | Boolean | True if the insert was successful or false otherwise |
message | Text | 200 if successful |
data | Text | Json with the document detail inserted |
total | Number | Number of inserted documents. By default 1 |
Example:
Petition: (POST) https://app.fracttal.com/api/items_document_management
Body
{
"code":"AD-189",
"id_type_item":2,
"name":"Garantía de Buses Interurbanos",
"description":"Descripción Garantía",
"group_description":"Garantía Buses",
"version":"0.001",
"valid_from":"2015-10-27",
"valid_until":"2020-10-27",
"warranty":true,
"iso_code":"ISO 39001",
"author":"ISO"
}
Example Response:
{
"success": true,
"message": "200",
"data": [
{
"id_company": 69,
"id_group_attached": 5,
"groups_attached_description": "Garantía Buses 123",
"description": "Descripción Garantía",
"name": "Garantía de Buses Interurbanos",
"version": "0.001",
"valid_from": "2015-10-27T00:00:00+00:00",
"valid_through": "2020-10-27T00:00:00+00:00",
"author": "ISO",
"code_iso": "ISO 39001",
"is_warranty": true,
"id_item": 19,
"id_attached": 29,
"id": 28,
"status": true,
"item_description": "Buses Interurbanos { 189 } VOLVO O-500 RSD 9BM6340 VOLVO O-500 RSD 9BM634071GB007674 { AD-189 }",
"id_type_item": 2
}
],
"total": 1