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

# Gera Demonstração do Resultado do Exercício (DRE)



## OpenAPI

````yaml /openapi/extat-openapi.json post /companies/demonstrative/dre
openapi: 3.0.0
info:
  contact:
    email: contato@cernedigital.io
    name: Cerne Digital
    url: https://cernedigital.io
  description: >-
    API REST da Extat Plataforma usada pelo painel web. Artefato OpenAPI 3.0
    para a documentação Mintlify (tags em PT-BR).
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://swagger.io/terms/
  title: Extat Plataforma - API REST
  version: '1.0'
servers:
  - url: https://golang-api-vgnqx.ondigitalocean.app/v1
security: []
tags:
  - name: Autenticação
  - name: Bancos
  - name: Contas Bancárias
  - name: Plano e Assinaturas
  - name: Empresa
  - name: Centros de Custo
  - name: Painel
  - name: Demonstrativos
  - name: Saúde
  - name: Convites
  - name: Membros
  - name: Onboarding
  - name: Fornecedores
  - name: Usuário
paths:
  /companies/demonstrative/dre:
    post:
      tags:
        - Demonstrativos
      summary: Gera Demonstração do Resultado do Exercício (DRE)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dre.DRERequestDTO'
        description: Parâmetros do período
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dre.DREResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    dre.DRERequestDTO:
      properties:
        end_date:
          type: string
        start_date:
          type: string
      required:
        - end_date
        - start_date
      type: object
    dre.DREResponse:
      properties:
        accumulated:
          $ref: '#/components/schemas/dre.AccumulatedTotals'
        accumulated_by_category:
          additionalProperties:
            type: string
          type: object
        data:
          items:
            $ref: '#/components/schemas/dre.TreeNodeDRE'
          type: array
        periods:
          items:
            $ref: '#/components/schemas/dre.PeriodItem'
          type: array
      type: object
    dre.AccumulatedTotals:
      properties:
        despesaTotal:
          type: number
        lucroOperacional:
          type: number
        receitaTotal:
          type: number
        resultadoLiquido:
          type: number
      type: object
    dre.TreeNodeDRE:
      properties:
        children:
          items:
            $ref: '#/components/schemas/dre.TreeNodeDRE'
          type: array
        data:
          $ref: '#/components/schemas/dre.NodeDataDRE'
        key:
          type: string
      type: object
    dre.PeriodItem:
      properties:
        key:
          type: string
        label:
          type: string
      type: object
    dre.NodeDataDRE:
      properties:
        ah:
          additionalProperties:
            type: string
          type: object
        av:
          additionalProperties:
            type: string
          type: object
        name:
          type: string
        operation:
          description: add | subtract | equals (only for parents)
          type: string
        parentOperation:
          type: string
        type:
          description: parent | child | grandchild
          type: string
        values:
          additionalProperties:
            type: string
          type: object
        variation:
          description: AH of the last month vs previous
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: >-
        Token da sessão no cabeçalho Authorization, no formato Bearer (mesmo
        esquema ApiKeyAuth do contrato).
      in: header
      name: Authorization
      type: apiKey

````