---
updatedAt: 2025-10-21T10:41:56.000Z
agentTools:
  projectIndex: https://api.fracttal.com/v3-pt/llms.txt
---

# Criar documentos e associá-los a um ativo

Deve-se ter em conta que a quantidade de ativos que pode criar estejam limitados pelo plano que possuí sua empresa.

Esta API é utilizada para criar um documento de gerenciamento de documentos (Garantia ou Documento) e associá-lo a um ativo.

## Parâmetros de entrada

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Parâmetro
      </th>

      <th style={{ textAlign: "left" }}>
        Tipo
      </th>

      <th style={{ textAlign: "left" }}>
        Obrigátorio
      </th>

      <th style={{ textAlign: "left" }}>
        Descrição
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        <code>code</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Texto*
      </td>

      <td style={{ textAlign: "left" }}>
        Sim
      </td>

      <td style={{ textAlign: "left" }}>
        Código do ítem
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>id\_type\_item</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Número*
      </td>

      <td style={{ textAlign: "left" }}>
        Opcional
      </td>

      <td style={{ textAlign: "left" }}>
        Tipo de ativo. Pode ser:\
        1:para Localizações\
        2:para Equipamentos\
        3:para Ferramentas\
        4:para peças de reposição e suprimentos\
        5:para Digital
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>name</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Texto*
      </td>

      <td style={{ textAlign: "left" }}>
        Sim
      </td>

      <td style={{ textAlign: "left" }}>
        Nome da garantia
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>description</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Texto*
      </td>

      <td style={{ textAlign: "left" }}>
        Opcional
      </td>

      <td style={{ textAlign: "left" }}>
        Descrição da garantia
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>group\_description</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Texto*
      </td>

      <td style={{ textAlign: "left" }}>
        Opcional
      </td>

      <td style={{ textAlign: "left" }}>
        Grupo de garantia. Se um grupo existente for associado, o nome deve ser enviado como é criado em Fracttal, se nenhum grupo com a descrição enviada for encontrado, um novo grupo será criado.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>version</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Texto*
      </td>

      <td style={{ textAlign: "left" }}>
        Opcional
      </td>

      <td style={{ textAlign: "left" }}>
        Versão do documento
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>valid\_from</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Date*
      </td>

      <td style={{ textAlign: "left" }}>
        Opcional
      </td>

      <td style={{ textAlign: "left" }}>
        Data de início de validade
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>valid\_until</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Date*
      </td>

      <td style={{ textAlign: "left" }}>
        Opcional
      </td>

      <td style={{ textAlign: "left" }}>
        Data de expiração da validade
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>warranty</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Booleano*
      </td>

      <td style={{ textAlign: "left" }}>
        Opcional
      </td>

      <td style={{ textAlign: "left" }}>
        Se é garantia enviar true, caso contrário false
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>iso\_code</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Texto*
      </td>

      <td style={{ textAlign: "left" }}>
        Opcional
      </td>

      <td style={{ textAlign: "left" }}>
        Código de documento ISO
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        <code>author</code>
      </td>

      <td style={{ textAlign: "left" }}>
        *Texto*
      </td>

      <td style={{ textAlign: "left" }}>
        Opcional
      </td>

      <td style={{ textAlign: "left" }}>
        Autor
      </td>
    </tr>
  </tbody>
</Table>

\*\*Envie os campos obrigatórios e os parâmetros com os valores adicionais que você deseja inserir.

## Parâmetros de saída

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parâmetro
      </th>

      <th>
        Tipo
      </th>

      <th>
        Descrição
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <code>success</code>
      </td>

      <td>
        *Booleano*
      </td>

      <td>
        True se o encarte foi bem sucedido ou falso de outra forma.
      </td>
    </tr>

    <tr>
      <td>
        <code>message</code>
      </td>

      <td>
        *Texto*
      </td>

      <td>
        200 se bem sucedidos
      </td>
    </tr>

    <tr>
      <td>
        <code>data</code>
      </td>

      <td>
        *Texto*
      </td>

      <td>
        JSON com os detalhes dos documentos inseridos
      </td>
    </tr>

    <tr>
      <td>
        <code>total</code>
      </td>

      <td>
        *Número*
      </td>

      <td>
        Número de documentos inseridos. Por padrão 1
      </td>
    </tr>
  </tbody>
</Table>

## Exemplo:

Solicitação: **(POST)<https://app.fracttal.com/api/items_document_management>**

```json
{
	"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"
}
```

<HTMLBlock>{`
<p class="font">CONEXÃO DE TESTE</p>
<iframe class="frame-full" src="https://testapi.fracttal.com/crearActivo/es">
</iframe>
`}</HTMLBlock>

<HTMLBlock>{`
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Maven+Pro&display=swap" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Heebo' rel='stylesheet'>
<style>
      table {
      border-collapse: collapse;
      border-radius: 1em;
      overflow: hidden;
    }
    
    th,
    td {
      border: 1px solid #E5E5E5;
      padding: 1em;
    }


    body {
      margin: 1.5em;
    }

    .font{
font-size: 14px;
font-weight: 700;
line-height: 17px;
letter-spacing: 0em;
text-align: left;
    color: #4687F1;
      font-style: uppercase;
  }
    table thead {
      background: rgba(70, 135, 241, 0.1) !important;
      color: #4687F1 !important;
      font-size: 13px !important;
      line-height: 17px !important;
    }
  .type-get {
      background-color: #6bbd5b;
      color: white;
      font-size: .7rem;
      padding: .2rem;
      border-radius: .2rem;
      text-transform: uppercase;
      font-weight: bold;
  }
  
  .frame-full {
      width: 100%;
      height: 1000px;
      border-width: 0;
  }

  h1, h2, h3, h4, h5, h6 {
  	font-family: 'Heebo', sans-serif;
  }
  
  code {
  	max-height: 40vh!important;
  }
  
  hr.rounded {
    border-top: 5px solid black;
    border-radius: 5px;
  }
  
  #ReferencePlayground {
  	display: none;
  }
  .Reference-section {
  	display: none;
  }
</style>
`}</HTMLBlock>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "criar-documentos-e-associá-los-a-um-ativo",
    "version": "3-pt"
  },
  "servers": [
    {
      "url": "https://app.fracttal.com/api/items_document_management"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/ ": {
      "post": {
        "description": "",
        "operationId": "",
        "responses": {
          "200": {
            "description": ""
          }
        },
        "parameters": []
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```