> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fretatech.app.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Inserir cotação



## OpenAPI

````yaml /api-reference/integracao.yaml post /api/cotacao/incluir
openapi: 3.0.1
info:
  title: Integração Fretatech - Lado do parceiro
  description: >
    <p>Esse documento descreve uma base de como o ERP parceiro precisa se
    comportar, criando os devidos endpoins para que a Fretatech consiga acessar
    as informações necessárias.<br>Estes endpoints é como a Fretatech espera que
    seja o ambiente <strong>do lado do ERP parceiro</strong>.</p>


    <p>Para visitar a documentação do lado da fretatech, visite <a href="/">este
    link.</a></p>
  version: 1.0.0
servers:
  - url: /
security: []
paths:
  /api/cotacao/incluir:
    post:
      tags:
        - Cotacao
      summary: Inserir cotação
      operationId: Cotacao_InserirCotacaoExterna
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Cotacao'
      responses:
        '200':
          description: Cotação inserida com sucesso
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetornoCotacaoVO'
        '400':
          description: Requisição inválida
        '500':
          description: Não foi possível inserir a cotação
components:
  schemas:
    Cotacao:
      description: ''
      required:
        - itens
      type: object
      properties:
        itens:
          description: Itens da cotação
          type: array
          items:
            $ref: '#/components/schemas/ItemDaCotacaoVO'
        agencia:
          format: int32
          type: integer
        cliente:
          $ref: '#/components/schemas/ClienteEsporadicoVO'
        usuario:
          type: string
        validade:
          format: date-time
          type: string
        observacao:
          type: string
        finalizada:
          type: boolean
        forma_pagamento:
          type: string
        cotacao_origem:
          type: array
          items:
            type: string
        vendedor:
          type: string
        parcelas:
          type: array
          items:
            $ref: '#/components/schemas/ParcelamentoVO'
    RetornoCotacaoVO:
      type: object
      properties:
        guid:
          type: string
        data_hora:
          format: date-time
          type: string
        status:
          type: string
        mensagens:
          type: array
          items:
            type: string
    ItemDaCotacaoVO:
      type: object
      properties:
        agrupamento:
          format: int32
          type: integer
        origem:
          type: string
        destino:
          type: string
        ida:
          $ref: '#/components/schemas/ViagemDoItemDaCotacaoVO'
        volta:
          $ref: '#/components/schemas/ViagemDoItemDaCotacaoVO'
        valor:
          format: double
          type: number
        itinerario:
          type: array
          items:
            type: string
        distancia:
          format: double
          type: number
        km_adicional:
          format: int32
          type: integer
        detalhe_partida:
          $ref: '#/components/schemas/DetalheDaViagemVO'
        detalhe_destino:
          $ref: '#/components/schemas/DetalheDaViagemVO'
    ClienteEsporadicoVO:
      type: object
      properties:
        nome:
          type: string
        email:
          type: string
        documento:
          type: string
        codigo_federal:
          type: string
        cep:
          type: string
        bairro:
          type: string
        endereco:
          type: string
        numero:
          type: string
        complemento:
          type: string
        telefone:
          type: string
        codigo_externo:
          type: string
    ParcelamentoVO:
      required:
        - codigo_externo
        - valor
        - numero_parcela
        - status
      type: object
      properties:
        codigo_externo:
          type: string
        valor:
          format: double
          type: number
        numero_parcela:
          format: int32
          type: integer
        status:
          type: string
        data_vencimento:
          format: date-time
          type: string
        data_pagamento:
          format: date-time
          type: string
        id_boleto:
          type: string
    ViagemDoItemDaCotacaoVO:
      type: object
      properties:
        inicio:
          format: date-time
          type: string
        fim:
          format: date-time
          type: string
    DetalheDaViagemVO:
      type: object
      properties:
        bairro:
          maxLength: 40
          minLength: 0
          type: string
        cidade:
          maxLength: 40
          minLength: 0
          type: string
        local:
          maxLength: 40
          minLength: 0
          type: string
        localizacao:
          maxLength: 80
          minLength: 0
          type: string
        observacao:
          maxLength: 100
          minLength: 0
          type: string

````