openapi: 3.0.3
info:
  title: TOConline Open API
  version: 1.0.0
  contact: {}
servers:
  - url: '{{base_url}}'
paths:
  /api/customers:
    get:
      tags:
        - Empresa
        - Clientes, Moradas e Email
        - Clientes
      summary: Obter Todos os Clientes
      description: Obter Todos os Clientes
      operationId: obterTodosOsClientes
      responses:
        '200':
          description: ''
        '400':
          description: Autorização em falta
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '215'
            Date:
              schema:
                type: string
                example: Mon, 04 Mar 2024 15:42:15 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: BROKER_MISSING_AUTHORIZATION_HEADER
                        detail:
                          type: string
                          example: >-
                            Error BROKER_MISSING_AUTHORIZATION_HEADER occurred
                            while processing your request. Please contact
                            technical support.
                        status:
                          type: string
                          example: 400 - Bad Request
                    example:
                      - code: BROKER_MISSING_AUTHORIZATION_HEADER
                        detail: >-
                          Error BROKER_MISSING_AUTHORIZATION_HEADER occurred
                          while processing your request. Please contact
                          technical support.
                        status: 400 - Bad Request
              examples:
                Autorização em falta:
                  value:
                    errors:
                      - code: BROKER_MISSING_AUTHORIZATION_HEADER
                        detail: >-
                          Error BROKER_MISSING_AUTHORIZATION_HEADER occurred
                          while processing your request. Please contact
                          technical support.
                        status: 400 - Bad Request
        '401':
          description: Sessão inválida
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '192'
            Date:
              schema:
                type: string
                example: Mon, 04 Mar 2024 16:29:49 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
            WWW-Authenticate:
              schema:
                type: string
                example: >-
                  Bearer realm="api", error="invalid_token",
                  error_description="The access token provided is expired,
                  revoked, malformed, or invalid for other reasons."
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: AUTH_INVALID_SESSION_ID
                        detail:
                          type: string
                          example: >-
                            Error AUTH_INVALID_SESSION_ID occurred while
                            processing your request. Please contact technical
                            support.
                        status:
                          type: string
                          example: 401 - Unauthorized
                    example:
                      - code: AUTH_INVALID_SESSION_ID
                        detail: >-
                          Error AUTH_INVALID_SESSION_ID occurred while
                          processing your request. Please contact technical
                          support.
                        status: 401 - Unauthorized
              examples:
                Sessão inválida:
                  value:
                    errors:
                      - code: AUTH_INVALID_SESSION_ID
                        detail: >-
                          Error AUTH_INVALID_SESSION_ID occurred while
                          processing your request. Please contact technical
                          support.
                        status: 401 - Unauthorized
    post:
      tags:
        - Empresa
        - Clientes, Moradas e Email
        - Clientes
      summary: Criar Clientes
      description: Criar Clientes
      operationId: criarClientes
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        business_name:
                          type: string
                          example: Empresa de Contabilidade
                        contact_name:
                          type: string
                          example: Utilizador
                        email:
                          type: string
                          example: user@email.pt
                        internal_observations:
                          type: string
                          example: Empresa de teste
                        mobile_number:
                          type: number
                          example: 939038342
                        observations:
                          type: string
                          example: Empresa de teste
                        phone_number:
                          type: number
                          example: 309867004
                        tax_registration_number:
                          type: string
                          example: '221976302'
                        website:
                          type: string
                          example: https://toconline.pt
                    type:
                      type: string
                      example: customers
            examples:
              Criar Clientes:
                value:
                  data:
                    attributes:
                      business_name: Empresa de Contabilidade
                      contact_name: Utilizador
                      email: user@email.pt
                      internal_observations: Empresa de teste
                      mobile_number: 939038342
                      observations: Empresa de teste
                      phone_number: 309867004
                      tax_registration_number: '221976302'
                      website: https://toconline.pt
                    type: customers
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '754'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:04:01 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          business_name:
                            type: string
                            example: Empresa de Contabilidade
                          cashed_vat:
                            type: boolean
                            example: false
                          contact_name:
                            type: string
                            example: Utilizador
                          country_iso_alpha_2:
                            type: string
                            example: PT
                          data:
                            type: object
                            properties: {}
                          email:
                            type: string
                            example: testes@testes.pt
                          internal_observations:
                            type: string
                            example: Empresa de teste
                          is_tax_exempt:
                            type: boolean
                            example: false
                          mobile_number:
                            type: string
                            example: '939038342'
                          not_final_customer:
                            type: boolean
                            example: false
                          observations:
                            type: string
                            example: Empresa de teste
                          phone_number:
                            type: string
                            example: '309867004'
                          saft_import_id:
                            nullable: true
                            example: null
                          tax_country_region:
                            type: string
                            example: PT
                          tax_registration_number:
                            type: string
                            example: '221976302'
                          website:
                            type: string
                            example: http://testes.pt
                      id:
                        type: string
                        example: '62'
                      relationships:
                        type: object
                        properties:
                          addresses:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          defaults:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          email_addresses:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          main_address:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          main_email_address:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          tax_exemption_reason:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: customers
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        business_name: Empresa de Contabilidade
                        cashed_vat: false
                        contact_name: Utilizador
                        country_iso_alpha_2: PT
                        data: {}
                        email: testes@testes.pt
                        internal_observations: Empresa de teste
                        is_tax_exempt: false
                        mobile_number: '939038342'
                        not_final_customer: false
                        observations: Empresa de teste
                        phone_number: '309867004'
                        saft_import_id: null
                        tax_country_region: PT
                        tax_registration_number: '221976302'
                        website: http://testes.pt
                      id: '62'
                      relationships:
                        addresses:
                          data: []
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        defaults:
                          data: null
                        email_addresses:
                          data: []
                        main_address:
                          data: null
                        main_email_address:
                          data: null
                        tax_exemption_reason:
                          data: null
                      type: customers
        '400':
          description: NIF Inválido
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '113'
            Date:
              schema:
                type: string
                example: Mon, 04 Mar 2024 17:09:31 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA000
                        detail:
                          type: string
                          example: O NIF português '285008413' não é válido!
                        status:
                          type: string
                          example: 400 Bad Request
                    example:
                      - code: JA000
                        detail: O NIF português '285008413' não é válido!
                        status: 400 Bad Request
              examples:
                NIF Inválido:
                  value:
                    errors:
                      - code: JA000
                        detail: O NIF português '285008413' não é válido!
                        status: 400 Bad Request
        '403':
          description: Recurso já existe
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '180'
            Date:
              schema:
                type: string
                example: Mon, 04 Mar 2024 17:09:00 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA002
                        detail:
                          type: string
                          example: >-
                            Já existe o cliente Empresa de Gestão com o NIF
                            285008412 no país <NULL>. Por favor contacte o
                            suporte técnico
                        status:
                          type: string
                          example: 403 Forbidden
                    example:
                      - code: JA002
                        detail: >-
                          Já existe o cliente Empresa de Gestão com o NIF
                          285008412 no país <NULL>. Por favor contacte o suporte
                          técnico
                        status: 403 Forbidden
              examples:
                Recurso já existe:
                  value:
                    errors:
                      - code: JA002
                        detail: >-
                          Já existe o cliente Empresa de Gestão com o NIF
                          285008412 no país <NULL>. Por favor contacte o suporte
                          técnico
                        status: 403 Forbidden
    patch:
      tags:
        - Empresa
        - Clientes, Moradas e Email
        - Clientes
      summary: Atualizar dados do cliente
      description: Atualizar dados do cliente
      operationId: atualizarDadosDoCliente
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        business_name:
                          type: string
                          example: Empresa de Contabilidade
                        cashed_vat:
                          type: boolean
                          example: true
                        contact_name:
                          type: string
                          example: Contabilidade Xpto
                        country_iso_alpha_2:
                          type: string
                          example: US
                        email:
                          type: string
                          example: contabilidade@testes.pt
                        internal_observations:
                          type: string
                          example: Observações internas
                        is_tax_exempt:
                          type: boolean
                          example: true
                        mobile_number:
                          type: string
                          example: '939038343'
                        not_final_customer:
                          type: boolean
                          example: true
                        observations:
                          type: string
                          example: observações do cliente
                        phone_number:
                          type: string
                          example: '309867005'
                        tax_country_region:
                          type: string
                          example: NON-UE
                        tax_registration_number:
                          type: string
                          example: '238241904'
                        website:
                          type: string
                          example: http://contabilidade_xpto.pt
                    id:
                      type: string
                      example: '62'
                    type:
                      type: string
                      example: customers
            examples:
              Atualizar dados do cliente:
                value:
                  data:
                    attributes:
                      business_name: Empresa de Contabilidade
                      cashed_vat: true
                      contact_name: Contabilidade Xpto
                      country_iso_alpha_2: US
                      email: contabilidade@testes.pt
                      internal_observations: Observações internas
                      is_tax_exempt: true
                      mobile_number: '939038343'
                      not_final_customer: true
                      observations: observações do cliente
                      phone_number: '309867005'
                      tax_country_region: NON-UE
                      tax_registration_number: '238241904'
                      website: http://contabilidade_xpto.pt
                    id: '62'
                    type: customers
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '761'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:54:41 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            text/plain:
              examples:
                Sucesso:
                  value: |-
                    {
                        "data": {
                            "type": "customers",
                            "id": "62",
                            "attributes": {
                                "tax_registration_number": "238241904",
                                "business_name": "Empresa de Contabilidade",
                                "contact_name": "Contabilidade Xpto",
                                "website": "http://contabilidade_xpto.pt",
                                "phone_number": "309867005",
                                "mobile_number": "939038343",
                                "email": "contabilidade@testes.pt",
                                "observations": ""observações do cliente",
                                "internal_observations": "Observações internas",
                                "not_final_customer": true,
                                "cashed_vat": true,
                                "tax_country_region": "NON-UE",
                                "country_iso_alpha_2": "US",
                                "saft_import_id": null,
                                "is_tax_exempt": true,
                                "data": {}
                            },
                            "relationships": {
                                "addresses": {
                                    "data": []
                                },
                                "company": {
                                    "data": {
                                        "type": "current_company",
                                        "id": "800000046"
                                    }
                                },
                                "defaults": {
                                    "data": null
                                },
                                "email_addresses": {
                                    "data": []
                                },
                                "main_address": {
                                    "data": null
                                },
                                "main_email_address": {
                                    "data": null
                                },
                                "tax_exemption_reason": {
                                    "data": null
                                }
                            }
                        }
                    }
  /api/customers/{clientId}:
    get:
      tags:
        - Empresa
        - Clientes, Moradas e Email
        - Clientes
      summary: Obter Cliente por ID
      description: Obter Cliente por ID
      operationId: obterClientePorId
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '913'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:04:43 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          business_name:
                            type: string
                            example: Empresa de Testes
                          cashed_vat:
                            type: boolean
                            example: false
                          contact_name:
                            type: string
                            example: Testes
                          country_iso_alpha_2:
                            type: string
                            example: PT
                          data:
                            type: object
                            properties: {}
                          email:
                            type: string
                            example: testes@testes.pt
                          internal_observations:
                            type: string
                            example: Empresa de teste
                          is_tax_exempt:
                            type: boolean
                            example: false
                          mobile_number:
                            type: string
                            example: '939038342'
                          not_final_customer:
                            type: boolean
                            example: false
                          observations:
                            type: string
                            example: Empresa de teste
                          phone_number:
                            type: string
                            example: '309867004'
                          saft_import_id:
                            nullable: true
                            example: null
                          tax_country_region:
                            type: string
                            example: PT
                          tax_registration_number:
                            type: string
                            example: '221976302'
                          website:
                            type: string
                            example: http://testes.pt
                      id:
                        type: string
                        example: '62'
                      relationships:
                        type: object
                        properties:
                          addresses:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '68'
                                    type:
                                      type: string
                                      example: addresses
                                example:
                                  - id: '68'
                                    type: addresses
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          defaults:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '32'
                                  type:
                                    type: string
                                    example: customers_defaults
                          email_addresses:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '19'
                                    type:
                                      type: string
                                      example: email_addresses
                                example:
                                  - id: '19'
                                    type: email_addresses
                          main_address:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '68'
                                  type:
                                    type: string
                                    example: addresses
                          main_email_address:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '19'
                                  type:
                                    type: string
                                    example: email_addresses
                          tax_exemption_reason:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: customers
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        business_name: Empresa de Testes
                        cashed_vat: false
                        contact_name: Testes
                        country_iso_alpha_2: PT
                        data: {}
                        email: testes@testes.pt
                        internal_observations: Empresa de teste
                        is_tax_exempt: false
                        mobile_number: '939038342'
                        not_final_customer: false
                        observations: Empresa de teste
                        phone_number: '309867004'
                        saft_import_id: null
                        tax_country_region: PT
                        tax_registration_number: '221976302'
                        website: http://testes.pt
                      id: '62'
                      relationships:
                        addresses:
                          data:
                            - id: '68'
                              type: addresses
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        defaults:
                          data:
                            id: '32'
                            type: customers_defaults
                        email_addresses:
                          data:
                            - id: '19'
                              type: email_addresses
                        main_address:
                          data:
                            id: '68'
                            type: addresses
                        main_email_address:
                          data:
                            id: '19'
                            type: email_addresses
                        tax_exemption_reason:
                          data: null
                      type: customers
        '404':
          description: Recurso não encontrado
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '151'
            Date:
              schema:
                type: string
                example: Mon, 04 Mar 2024 16:31:04 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA015
                        detail:
                          type: string
                          example: >-
                            Erro de sistema JA015: recurso não existente. Por
                            favor contacte o suporte técnico.
                        status:
                          type: string
                          example: 404 Not Found
                    example:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
              examples:
                Recurso não encontrado:
                  value:
                    errors:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
    delete:
      tags:
        - Empresa
        - Clientes, Moradas e Email
        - Clientes
      summary: Remover Cliente
      description: Remover Cliente
      operationId: removerCliente
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '11'
            Date:
              schema:
                type: string
                example: Mon, 04 Mar 2024 17:11:36 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties: {}
              examples:
                Sucesso:
                  value:
                    meta: {}
        '400':
          description: Pedido Inválido
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '210'
            Date:
              schema:
                type: string
                example: Mon, 04 Mar 2024 17:12:43 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA011
                        detail:
                          type: string
                          example: >-
                            Erro de sistema JA011: pedido inválido. Por favor
                            contacte o suporte técnico.
                        status:
                          type: string
                          example: 400 Bad Request
                    example:
                      - code: JA011
                        detail: >-
                          Erro de sistema JA011: pedido inválido. Por favor
                          contacte o suporte técnico.
                        status: 400 Bad Request
                  jsonapi:
                    type: object
                    properties:
                      meta:
                        type: object
                        properties:
                          libversion:
                            type: string
                            example: 3.0.02b10
                      version:
                        type: string
                        example: '1.0'
              examples:
                Pedido Inválido:
                  value:
                    errors:
                      - code: JA011
                        detail: >-
                          Erro de sistema JA011: pedido inválido. Por favor
                          contacte o suporte técnico.
                        status: 400 Bad Request
                    jsonapi:
                      meta:
                        libversion: 3.0.02b10
                      version: '1.0'
        '404':
          description: Recurso não existente
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '151'
            Date:
              schema:
                type: string
                example: Mon, 04 Mar 2024 17:11:49 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA015
                        detail:
                          type: string
                          example: >-
                            Erro de sistema JA015: recurso não existente. Por
                            favor contacte o suporte técnico.
                        status:
                          type: string
                          example: 404 Not Found
                    example:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
              examples:
                Recurso não existente:
                  value:
                    errors:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
    parameters:
      - name: clientId
        in: path
        required: true
        schema:
          type: string
          example: '60'
        description: Id do cliente
  /api/addresses:
    get:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Moradas1
      summary: Obter Todas as Moradas
      description: Obter Todas as Moradas
      operationId: obterTodasAsMoradas
      responses:
        '200':
          description: ''
    post:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Moradas1
      summary: Criar Morada
      description: Criar Morada
      operationId: criarMorada
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        address_detail:
                          type: string
                          example: teste 3
                        addressable_id:
                          type: number
                          example: 7
                        addressable_type:
                          type: string
                          example: Supplier
                        city:
                          type: string
                          example: Setúbal
                        postcode:
                          type: string
                          example: 2910-099
                        region:
                          type: string
                          example: Setúbal
                    type:
                      type: string
                      example: addresses
            examples:
              Criar Morada:
                value:
                  data:
                    attributes:
                      address_detail: teste 3
                      addressable_id: 7
                      addressable_type: Supplier
                      city: Setúbal
                      postcode: 2910-099
                      region: Setúbal
                    type: addresses
      responses:
        '200':
          description: Criar Morada / Criar Morada
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '510'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:56:57 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          address_detail:
                            type: string
                            example: Av. Portugal n3
                          city:
                            type: string
                            example: Lisboa
                          code:
                            nullable: true
                            example: null
                          for_charge:
                            type: boolean
                            example: false
                          for_discharge:
                            type: boolean
                            example: false
                          is_national_holidays_workday:
                            type: boolean
                            example: false
                          is_primary:
                            type: boolean
                            example: false
                          is_saturday_workday:
                            type: boolean
                            example: false
                          is_sunday_workday:
                            type: boolean
                            example: false
                          name:
                            nullable: true
                            example: null
                          payroll_enumerations_tax_office_id:
                            nullable: true
                            example: null
                          postcode:
                            type: string
                            example: 1900-099
                          region:
                            type: string
                            example: Lisboa
                          subtype:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '74'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          country:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          customer:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          supplier:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          user:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: addresses
              examples:
                Criar Morada:
                  value:
                    data:
                      attributes:
                        address_detail: teste 3
                        city: Setúbal
                        code: null
                        for_charge: false
                        for_discharge: false
                        is_national_holidays_workday: false
                        is_primary: false
                        is_saturday_workday: false
                        is_sunday_workday: false
                        name: null
                        payroll_enumerations_tax_office_id: null
                        postcode: 2910-099
                        region: Setúbal
                        subtype: null
                      id: '74'
                      relationships:
                        company:
                          data: null
                        country:
                          data: null
                        customer:
                          data: null
                        supplier:
                          data: null
                        user:
                          data: null
                      type: addresses
    patch:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Moradas1
      summary: Atualizar Morada
      description: Atualizar Morada
      operationId: atualizarMorada
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        address_detail:
                          type: string
                          example: Avenida Principal
                        city:
                          type: string
                          example: Setúbal
                        country_id:
                          type: string
                          example: '3'
                        postcode:
                          type: string
                          example: 2910-099
                        region:
                          type: string
                          example: Setúbal
                    id:
                      type: string
                      example: '45'
                    type:
                      type: string
                      example: addresses
            examples:
              Atualizar Morada:
                value:
                  data:
                    attributes:
                      address_detail: Avenida Principal
                      city: Setúbal
                      country_id: '3'
                      postcode: 2910-099
                      region: Setúbal
                    id: '45'
                    type: addresses
      responses:
        '200':
          description: Atualizar Morada / Atualizar Morada
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '546'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:57:04 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          address_detail:
                            type: string
                            example: Avenida Principal n2
                          city:
                            type: string
                            example: Lisboa
                          code:
                            nullable: true
                            example: null
                          for_charge:
                            type: boolean
                            example: false
                          for_discharge:
                            type: boolean
                            example: false
                          is_national_holidays_workday:
                            type: boolean
                            example: false
                          is_primary:
                            type: boolean
                            example: true
                          is_saturday_workday:
                            type: boolean
                            example: false
                          is_sunday_workday:
                            type: boolean
                            example: false
                          name:
                            type: string
                            example: Sede
                          payroll_enumerations_tax_office_id:
                            nullable: true
                            example: null
                          postcode:
                            type: string
                            example: 1900-099
                          region:
                            type: string
                            example: Lisboa
                          subtype:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '45'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          country:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '3'
                                  type:
                                    type: string
                                    example: countries
                          customer:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          supplier:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          user:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: addresses
              examples:
                Atualizar Morada:
                  value:
                    data:
                      attributes:
                        address_detail: Avenida Principal
                        city: Setúbal
                        code: null
                        for_charge: false
                        for_discharge: false
                        is_national_holidays_workday: false
                        is_primary: true
                        is_saturday_workday: false
                        is_sunday_workday: false
                        name: Sede
                        payroll_enumerations_tax_office_id: null
                        postcode: 2910-099
                        region: Setúbal
                        subtype: null
                      id: '45'
                      relationships:
                        company:
                          data: null
                        country:
                          data:
                            id: '3'
                            type: countries
                        customer:
                          data: null
                        supplier:
                          data: null
                        user:
                          data: null
                      type: addresses
  /api/addresses/{id}:
    get:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Moradas1
      summary: Obter Morada por Id
      description: Obter Morada por Id
      operationId: obterMoradaPorId
      responses:
        '200':
          description: Obter Todas as Moradas Copy / Obter Todas as Moradas Copy
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '559'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:59:06 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          address_detail:
                            type: string
                            example: ''
                          city:
                            type: string
                            example: ''
                          code:
                            nullable: true
                            example: null
                          for_charge:
                            type: boolean
                            example: false
                          for_discharge:
                            type: boolean
                            example: false
                          is_national_holidays_workday:
                            type: boolean
                            example: false
                          is_primary:
                            type: boolean
                            example: true
                          is_saturday_workday:
                            type: boolean
                            example: false
                          is_sunday_workday:
                            type: boolean
                            example: false
                          name:
                            type: string
                            example: Main Address
                          payroll_enumerations_tax_office_id:
                            nullable: true
                            example: null
                          postcode:
                            type: string
                            example: ''
                          region:
                            nullable: true
                            example: null
                          subtype:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '3'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          country:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '1'
                                  type:
                                    type: string
                                    example: countries
                          customer:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          supplier:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          user:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000863'
                                  type:
                                    type: string
                                    example: current_company_users
                      type:
                        type: string
                        example: addresses
              examples:
                Obter Todas as Moradas Copy:
                  value:
                    data:
                      attributes:
                        address_detail: ''
                        city: ''
                        code: null
                        for_charge: false
                        for_discharge: false
                        is_national_holidays_workday: false
                        is_primary: true
                        is_saturday_workday: false
                        is_sunday_workday: false
                        name: Main Address
                        payroll_enumerations_tax_office_id: null
                        postcode: ''
                        region: null
                        subtype: null
                      id: '3'
                      relationships:
                        company:
                          data: null
                        country:
                          data:
                            id: '1'
                            type: countries
                        customer:
                          data: null
                        supplier:
                          data: null
                        user:
                          data:
                            id: '800000863'
                            type: current_company_users
                      type: addresses
    delete:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Moradas1
      summary: Apagar Morada
      description: Apagar Morada
      operationId: apagarMorada
      responses:
        '200':
          description: Apagar Morada / Apagar Morada
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '11'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:58:26 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties: {}
              examples:
                Apagar Morada:
                  value:
                    meta: {}
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '45'
        description: id da morada
  /api/contacts:
    get:
      tags:
        - API's Auxiliares
        - Contactos
      summary: Obter Todos os Contactos
      description: Obter Todos os Contactos
      operationId: obterTodosOsContactos
      responses:
        '200':
          description: ''
    post:
      tags:
        - API's Auxiliares
        - Contactos
      summary: Criar email de Cliente
      description: Criar email de Cliente
      operationId: criarEmailDeCliente
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        contactable_id:
                          type: number
                          example: 29
                        contactable_type:
                          type: string
                          example: Supplier
                        email:
                          type: string
                          example: user@email.pt
                        is_primary:
                          type: boolean
                          example: true
                        mobile_number:
                          nullable: true
                          example: null
                        name:
                          nullable: true
                          example: null
                        phone_number:
                          nullable: true
                          example: null
                        position:
                          nullable: true
                          example: null
                    type:
                      type: string
                      example: contacts
            examples:
              Criar Novo Contacto:
                value:
                  data:
                    attributes:
                      contactable_id: 29
                      contactable_type: Supplier
                      email: user@email.pt
                      is_primary: true
                      mobile_number: null
                      name: null
                      phone_number: null
                      position: null
                    type: contacts
              Criar email de Cliente:
                value:
                  data:
                    attributes:
                      categories:
                        - general
                      contactable_id: 61
                      contactable_type: Customer
                      email: user@email.pt
                      is_primary: true
                      mobile_number: null
                      name: Nome de Utilizador
                      phone_number: null
                      position: null
                    type: contacts
              Criar email de Cliente Copy:
                value:
                  data:
                    attributes:
                      categories:
                        - general
                      contactable_id: 4
                      contactable_type: Supplier
                      email: 4_sup@email.pt
                      is_primary: true
                      mobile_number: null
                      name: teste_supplier
                      phone_number: null
                      position: null
                    type: contacts
      responses:
        '200':
          description: Sucesso / Suceso / Criar Novo Contacto
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '210'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:37:01 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          email:
                            type: string
                            example: user@email.pt
                          is_primary:
                            type: boolean
                            example: true
                          mobile_number:
                            nullable: true
                            example: null
                          name:
                            type: string
                            nullable: true
                            example: Nome de Utilizador
                          phone_number:
                            nullable: true
                            example: null
                          position:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '29'
                      relationships:
                        type: object
                        properties:
                          supplier:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: contacts
              examples:
                Criar Novo Contacto:
                  value:
                    data:
                      attributes:
                        email: user@email.pt
                        is_primary: true
                        mobile_number: null
                        name: null
                        phone_number: null
                        position: null
                      id: '22'
                      relationships:
                        supplier:
                          data: null
                      type: contacts
                Suceso:
                  value:
                    data:
                      attributes:
                        email: 4_sup@email.pt
                        is_primary: true
                        mobile_number: null
                        name: teste_supplier
                        phone_number: null
                        position: null
                      id: '29'
                      relationships:
                        supplier:
                          data: null
                      type: contacts
                Sucesso:
                  value:
                    data:
                      attributes:
                        email: user@email.pt
                        is_primary: true
                        mobile_number: null
                        name: Nome de Utilizador
                        phone_number: null
                        position: null
                      id: '29'
                      relationships:
                        supplier:
                          data: null
                      type: contacts
    patch:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Email1
      summary: Atualizar email de Cliente
      description: Atualizar email de Cliente
      operationId: atualizarEmailDeCliente
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        email:
                          type: string
                          example: novo_sup@email.pt
                    id:
                      type: string
                      example: '24'
                    type:
                      type: string
                      example: contacts
            examples:
              Atualizar email de Cliente:
                value:
                  data:
                    attributes:
                      email: novo_sup@email.pt
                    id: '24'
                    type: contacts
              Atualizar email de Fornecedor:
                value:
                  data:
                    attributes:
                      email: novo_sup@email.pt
                    id: '24'
                    type: contacts
      responses:
        '200':
          description: Sucesso / Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '218'
            Date:
              schema:
                type: string
                example: Tue, 02 Jul 2024 08:47:04 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          email:
                            type: string
                            example: novo_sup@email.pt
                          is_primary:
                            type: boolean
                            example: true
                          mobile_number:
                            nullable: true
                            example: null
                          name:
                            type: string
                            example: teste_cmo
                          phone_number:
                            nullable: true
                            example: null
                          position:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '24'
                      relationships:
                        type: object
                        properties:
                          supplier:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: contacts
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        email: novo_sup@email.pt
                        is_primary: true
                        mobile_number: null
                        name: teste_cmo
                        phone_number: null
                        position: null
                      id: '24'
                      relationships:
                        supplier:
                          data: null
                      type: contacts
  /api/customers/{customerId}:
    get:
      tags:
        - Empresa
        - Clientes, Moradas e Email
        - Email
      summary: Obter Cliente por Id
      description: Obter Cliente por Id
      operationId: obterClientePorId1
      requestBody:
        content:
          application/json:
            examples:
              Obter Cliente por Id:
                value: ''
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '844'
            Date:
              schema:
                type: string
                example: Tue, 02 Jul 2024 09:07:41 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          business_name:
                            type: string
                            example: Manuel Ricardo Ribeiro
                          cashed_vat:
                            type: boolean
                            example: false
                          contact_name:
                            nullable: true
                            example: null
                          country_iso_alpha_2:
                            type: string
                            example: PT
                          data:
                            type: object
                            properties: {}
                          email:
                            nullable: true
                            example: null
                          internal_observations:
                            nullable: true
                            example: null
                          is_tax_exempt:
                            type: boolean
                            example: false
                          mobile_number:
                            nullable: true
                            example: null
                          not_final_customer:
                            type: boolean
                            example: false
                          observations:
                            nullable: true
                            example: null
                          phone_number:
                            nullable: true
                            example: null
                          saft_import_id:
                            nullable: true
                            example: null
                          tax_country_region:
                            type: string
                            example: PT
                          tax_registration_number:
                            type: string
                            example: '229659179'
                          website:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '61'
                      relationships:
                        type: object
                        properties:
                          addresses:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '67'
                                    type:
                                      type: string
                                      example: addresses
                                example:
                                  - id: '67'
                                    type: addresses
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          defaults:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '31'
                                  type:
                                    type: string
                                    example: customers_defaults
                          email_addresses:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '24'
                                    type:
                                      type: string
                                      example: email_addresses
                                example:
                                  - id: '24'
                                    type: email_addresses
                          main_address:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '67'
                                  type:
                                    type: string
                                    example: addresses
                          main_email_address:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '24'
                                  type:
                                    type: string
                                    example: email_addresses
                          tax_exemption_reason:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: customers
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        business_name: Manuel Ricardo Ribeiro
                        cashed_vat: false
                        contact_name: null
                        country_iso_alpha_2: PT
                        data: {}
                        email: null
                        internal_observations: null
                        is_tax_exempt: false
                        mobile_number: null
                        not_final_customer: false
                        observations: null
                        phone_number: null
                        saft_import_id: null
                        tax_country_region: PT
                        tax_registration_number: '229659179'
                        website: null
                      id: '61'
                      relationships:
                        addresses:
                          data:
                            - id: '67'
                              type: addresses
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        defaults:
                          data:
                            id: '31'
                            type: customers_defaults
                        email_addresses:
                          data:
                            - id: '24'
                              type: email_addresses
                        main_address:
                          data:
                            id: '67'
                            type: addresses
                        main_email_address:
                          data:
                            id: '24'
                            type: email_addresses
                        tax_exemption_reason:
                          data: null
                      type: customers
    parameters:
      - name: customerId
        in: path
        required: true
        schema:
          type: string
          example: ''
  /api/contacts/{contactId}:
    get:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Email1
      summary: Obter Contacto por Id
      description: Obter Contacto por Id
      operationId: obterContactoPorId
      requestBody:
        content:
          application/json:
            examples:
              Obter Contacto por Id:
                value: ''
      responses:
        '200':
          description: Sucesso / Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '243'
            Date:
              schema:
                type: string
                example: Tue, 02 Jul 2024 09:41:21 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          email:
                            type: string
                            example: user@email.pt
                          is_primary:
                            type: boolean
                            example: true
                          mobile_number:
                            nullable: true
                            example: null
                          name:
                            type: string
                            example: Nome de Utilizador
                          phone_number:
                            nullable: true
                            example: null
                          position:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '24'
                      relationships:
                        type: object
                        properties:
                          supplier:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: suppliers
                      type:
                        type: string
                        example: contacts
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        email: novo_sup@email.pt
                        is_primary: true
                        mobile_number: null
                        name: teste_cmo
                        phone_number: null
                        position: null
                      id: '24'
                      relationships:
                        supplier:
                          data:
                            id: '2'
                            type: suppliers
                      type: contacts
    parameters:
      - name: contactId
        in: path
        required: true
        schema:
          type: string
          example: ''
  /api/suppliers:
    get:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Fornecedores
      summary: Obter Todos os Fornecedores
      description: Obter Todos os Fornecedores
      operationId: obterTodosOsFornecedores
      responses:
        '200':
          description: ''
    post:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Fornecedores
      summary: Criar Fornecedor
      description: Criar Fornecedor
      operationId: criarFornecedor
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        accounting_number:
                          nullable: true
                          example: null
                        business_name:
                          type: string
                          example: A Empresa 3
                        country_iso_alpha_2:
                          type: string
                          example: PT
                        document_series_id:
                          nullable: true
                          example: null
                        internal_observations:
                          nullable: true
                          example: null
                        is_independent_worker:
                          type: boolean
                          example: false
                        is_tax_exempt:
                          type: boolean
                          example: false
                        is_taxable:
                          type: boolean
                          example: false
                        saft_import_id:
                          nullable: true
                          example: null
                        self_billing:
                          nullable: true
                          example: null
                        tax_country_region:
                          type: string
                          example: PT
                        tax_exemption_reason_id:
                          nullable: true
                          example: null
                        tax_registration_number:
                          type: string
                          example: '533186331'
                        trusted_email_source:
                          type: boolean
                          example: false
                        website:
                          type: string
                          example: www.a_empresa3.pt
                    type:
                      type: string
                      example: suppliers
            examples:
              Criar Fornecedor:
                value:
                  data:
                    attributes:
                      accounting_number: null
                      business_name: A Empresa 3
                      country_iso_alpha_2: PT
                      document_series_id: null
                      internal_observations: null
                      is_independent_worker: false
                      is_tax_exempt: false
                      is_taxable: false
                      saft_import_id: null
                      self_billing: null
                      tax_country_region: PT
                      tax_exemption_reason_id: null
                      tax_registration_number: '533186331'
                      trusted_email_source: false
                      website: www.a_empresa3.pt
                    type: suppliers
      responses:
        '200':
          description: Criar Fornecedor
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '649'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:31:33 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          business_name:
                            type: string
                            example: A Empresa 3
                          country_iso_alpha_2:
                            type: string
                            example: PT
                          document_series_id:
                            nullable: true
                            example: null
                          internal_observations:
                            nullable: true
                            example: null
                          is_independent_worker:
                            type: boolean
                            example: false
                          is_tax_exempt:
                            type: boolean
                            example: false
                          is_taxable:
                            type: boolean
                            example: false
                          saft_import_id:
                            nullable: true
                            example: null
                          self_billing:
                            nullable: true
                            example: null
                          tax_country_region:
                            type: string
                            example: PT
                          tax_registration_number:
                            type: string
                            example: '533186331'
                          website:
                            type: string
                            example: www.a_empresa3.pt
                      id:
                        type: string
                        example: '29'
                      relationships:
                        type: object
                        properties:
                          addresses:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          bank_accounts:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          contacts:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          defaults:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          main_address:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          main_contact:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          tax_exemption_reason:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: suppliers
              examples:
                Criar Fornecedor:
                  value:
                    data:
                      attributes:
                        business_name: A Empresa 3
                        country_iso_alpha_2: PT
                        document_series_id: null
                        internal_observations: null
                        is_independent_worker: false
                        is_tax_exempt: false
                        is_taxable: false
                        saft_import_id: null
                        self_billing: null
                        tax_country_region: PT
                        tax_registration_number: '533186331'
                        website: www.a_empresa3.pt
                      id: '29'
                      relationships:
                        addresses:
                          data: []
                        bank_accounts:
                          data: []
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        contacts:
                          data: []
                        defaults:
                          data: null
                        main_address:
                          data: null
                        main_contact:
                          data: null
                        tax_exemption_reason:
                          data: null
                      type: suppliers
    patch:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Fornecedores
      summary: Atualizar Fornecedor
      description: Atualizar Fornecedor
      operationId: atualizarFornecedor
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        accounting_number:
                          nullable: true
                          example: null
                        business_name:
                          type: string
                          example: A Empresa
                        country_iso_alpha_2:
                          type: string
                          example: PT
                        document_series_id:
                          nullable: true
                          example: null
                        internal_observations:
                          nullable: true
                          example: null
                        is_independent_worker:
                          type: boolean
                          example: false
                        is_tax_exempt:
                          type: boolean
                          example: false
                        is_taxable:
                          type: boolean
                          example: false
                        saft_import_id:
                          nullable: true
                          example: null
                        self_billing:
                          nullable: true
                          example: null
                        tax_country_region:
                          type: string
                          example: PT
                        tax_exemption_reason_id:
                          nullable: true
                          example: null
                        tax_registration_number:
                          type: string
                          example: '533186331'
                        trusted_email_source:
                          type: boolean
                          example: false
                        website:
                          type: string
                          example: www.a_empresa.pt
                    id:
                      type: string
                      example: '7'
                    type:
                      type: string
                      example: suppliers
            examples:
              Atualizar Fornecedor:
                value:
                  data:
                    attributes:
                      accounting_number: null
                      business_name: A Empresa
                      country_iso_alpha_2: PT
                      document_series_id: null
                      internal_observations: null
                      is_independent_worker: false
                      is_tax_exempt: false
                      is_taxable: false
                      saft_import_id: null
                      self_billing: null
                      tax_country_region: PT
                      tax_exemption_reason_id: null
                      tax_registration_number: '533186331'
                      trusted_email_source: false
                      website: www.a_empresa.pt
                    id: '7'
                    type: suppliers
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '645'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:01:27 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          business_name:
                            type: string
                            example: A Empresa
                          country_iso_alpha_2:
                            type: string
                            example: PT
                          document_series_id:
                            nullable: true
                            example: null
                          internal_observations:
                            nullable: true
                            example: null
                          is_independent_worker:
                            type: boolean
                            example: false
                          is_tax_exempt:
                            type: boolean
                            example: false
                          is_taxable:
                            type: boolean
                            example: false
                          saft_import_id:
                            nullable: true
                            example: null
                          self_billing:
                            nullable: true
                            example: null
                          tax_country_region:
                            type: string
                            example: PT
                          tax_registration_number:
                            type: string
                            example: '533186331'
                          website:
                            type: string
                            example: www.a_empresa.pt
                      id:
                        type: string
                        example: '7'
                      relationships:
                        type: object
                        properties:
                          addresses:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          bank_accounts:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          contacts:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          defaults:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          main_address:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          main_contact:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          tax_exemption_reason:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: suppliers
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        business_name: A Empresa
                        country_iso_alpha_2: PT
                        document_series_id: null
                        internal_observations: null
                        is_independent_worker: false
                        is_tax_exempt: false
                        is_taxable: false
                        saft_import_id: null
                        self_billing: null
                        tax_country_region: PT
                        tax_registration_number: '533186331'
                        website: www.a_empresa.pt
                      id: '7'
                      relationships:
                        addresses:
                          data: []
                        bank_accounts:
                          data: []
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        contacts:
                          data: []
                        defaults:
                          data: null
                        main_address:
                          data: null
                        main_contact:
                          data: null
                        tax_exemption_reason:
                          data: null
                      type: suppliers
  /api/suppliers/{supplierId}:
    get:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Email1
      summary: Obter Fornecedor por ID
      description: Obter Fornecedor por ID
      operationId: obterFornecedorPorId
      requestBody:
        content:
          application/json:
            examples:
              Obter Fornecedor po Id:
                value: ''
      responses:
        '200':
          description: Sucesso / Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '809'
            Date:
              schema:
                type: string
                example: Tue, 02 Jul 2024 09:02:55 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          business_name:
                            type: string
                            example: A Empresa
                          country_iso_alpha_2:
                            type: string
                            example: PT-AC
                          document_series_id:
                            nullable: true
                            example: null
                          internal_observations:
                            nullable: true
                            example: null
                          is_independent_worker:
                            type: boolean
                            example: false
                          is_tax_exempt:
                            type: boolean
                            example: false
                          is_taxable:
                            type: boolean
                            example: false
                          saft_import_id:
                            nullable: true
                            example: null
                          self_billing:
                            nullable: true
                            example: null
                          tax_country_region:
                            type: string
                            example: PT-AC
                          tax_registration_number:
                            type: string
                            example: '533186331'
                          website:
                            type: string
                            nullable: true
                            example: www.a_empresa.pt
                      id:
                        type: string
                        example: '7'
                      relationships:
                        type: object
                        properties:
                          addresses:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '45'
                                    type:
                                      type: string
                                      example: addresses
                                example:
                                  - id: '45'
                                    type: addresses
                                  - id: '59'
                                    type: addresses
                          bank_accounts:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '4'
                                    type:
                                      type: string
                                      example: bank_accounts
                                example:
                                  - id: '4'
                                    type: bank_accounts
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          contacts:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '17'
                                    type:
                                      type: string
                                      example: contacts
                                example:
                                  - id: '17'
                                    type: contacts
                          defaults:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '4'
                                  type:
                                    type: string
                                    example: suppliers_defaults
                          main_address:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '45'
                                  type:
                                    type: string
                                    example: addresses
                          main_contact:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '17'
                                  type:
                                    type: string
                                    example: contacts
                          tax_exemption_reason:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: suppliers
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        business_name: Empresa123
                        country_iso_alpha_2: PT
                        document_series_id: null
                        internal_observations: null
                        is_independent_worker: false
                        is_tax_exempt: false
                        is_taxable: false
                        saft_import_id: null
                        self_billing: null
                        tax_country_region: PT
                        tax_registration_number: '564964417'
                        website: null
                      id: '4'
                      relationships:
                        addresses:
                          data:
                            - id: '44'
                              type: addresses
                        bank_accounts:
                          data:
                            - id: '7'
                              type: bank_accounts
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        contacts:
                          data:
                            - id: '29'
                              type: contacts
                        defaults:
                          data:
                            id: '3'
                            type: suppliers_defaults
                        main_address:
                          data:
                            id: '44'
                            type: addresses
                        main_contact:
                          data:
                            id: '29'
                            type: contacts
                        tax_exemption_reason:
                          data: null
                      type: suppliers
    delete:
      tags:
        - Empresa
        - Fornecedores, Moradas e Email
        - Fornecedores
      summary: Remover Fornecedor
      description: Remover Fornecedor
      operationId: removerFornecedor
      responses:
        '200':
          description: ''
        '403':
          description: Erro Documentos Emitidos
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '146'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:17:21 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA002
                        detail:
                          type: string
                          example: >-
                            O fornecedor não pode ser apagado porque tem
                            documentos ou pagamentos emitidos!
                        status:
                          type: string
                          example: 403 Forbidden
                    example:
                      - code: JA002
                        detail: >-
                          O fornecedor não pode ser apagado porque tem
                          documentos ou pagamentos emitidos!
                        status: 403 Forbidden
              examples:
                Erro Documentos Emitidos:
                  value:
                    errors:
                      - code: JA002
                        detail: >-
                          O fornecedor não pode ser apagado porque tem
                          documentos ou pagamentos emitidos!
                        status: 403 Forbidden
    parameters:
      - name: supplierId
        in: path
        required: true
        schema:
          type: string
          example: ''
  /api/products:
    get:
      tags:
        - Empresa
        - Produtos e Serviços
        - Produtos
      summary: Obter Todos os Produtos
      description: Obter Todos os Produtos
      operationId: obterTodosOsProdutos
      responses:
        '200':
          description: ''
    post:
      tags:
        - Empresa
        - Produtos e Serviços
        - Produtos
      summary: Criar Produto
      description: Criar Produto
      operationId: criarProduto
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        item_code:
                          type: number
                          example: 777777
                        item_description:
                          type: string
                          example: Product with a family
                        item_family_id:
                          type: number
                          example: 4
                        sales_price:
                          type: number
                          example: 100
                        sales_price_includes_vat:
                          type: boolean
                          example: false
                        tax_code:
                          type: string
                          example: NOR
                        type:
                          type: string
                          example: Product
                    type:
                      type: string
                      example: products
            examples:
              Criar Produto:
                value:
                  data:
                    attributes:
                      item_code: 777777
                      item_description: Product with a family
                      item_family_id: 4
                      sales_price: 100
                      sales_price_includes_vat: false
                      tax_code: NOR
                      type: Product
                    type: products
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '1013'
            Date:
              schema:
                type: string
                example: Thu, 29 Aug 2024 15:47:15 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          accounting_number:
                            nullable: true
                            example: null
                          applied_tax_code:
                            type: string
                            example: NOR
                          applied_tax_exemption_reason_id:
                            nullable: true
                            example: null
                          customs_cost:
                            type: number
                            example: 0
                          ean_barcode:
                            nullable: true
                            example: null
                          estimated_total_cost:
                            type: number
                            example: 0
                          financial_cost:
                            type: number
                            example: 0
                          is_active:
                            type: boolean
                            example: true
                          is_merchandise:
                            nullable: true
                            example: null
                          item_code:
                            type: string
                            example: '777777'
                          item_description:
                            type: string
                            example: Product with a family
                          location_in_warehouse:
                            nullable: true
                            example: null
                          notes:
                            nullable: true
                            example: null
                          other_cost:
                            type: number
                            example: 0
                          product_inventory_type:
                            nullable: true
                            example: null
                          purchase_price:
                            nullable: true
                            example: null
                          sales_price:
                            type: number
                            example: 100
                          sales_price_2:
                            nullable: true
                            example: null
                          sales_price_2_vat_display:
                            nullable: true
                            example: null
                          sales_price_3:
                            nullable: true
                            example: null
                          sales_price_3_vat_display:
                            nullable: true
                            example: null
                          sales_price_includes_vat:
                            type: boolean
                            example: false
                          sales_price_vat_display:
                            type: number
                            example: 123
                          service_group:
                            nullable: true
                            example: null
                          tax_code:
                            type: string
                            example: NOR
                          transport_cost:
                            type: number
                            example: 0
                      id:
                        type: string
                        example: '21'
                      relationships:
                        type: object
                        properties:
                          applied_tax_exemption_reason:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          item_families:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '4'
                                  type:
                                    type: string
                                    example: item_families
                          tax_exemption_reasons:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          unit_of_measure:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: units_of_measure
                      type:
                        type: string
                        example: products
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          scalar:
                            type: number
                            example: 1
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        accounting_number: null
                        applied_tax_code: NOR
                        applied_tax_exemption_reason_id: null
                        customs_cost: 0
                        ean_barcode: null
                        estimated_total_cost: 0
                        financial_cost: 0
                        is_active: true
                        is_merchandise: null
                        item_code: '777777'
                        item_description: Product with a family
                        location_in_warehouse: null
                        notes: null
                        other_cost: 0
                        product_inventory_type: null
                        purchase_price: null
                        sales_price: 100
                        sales_price_2: null
                        sales_price_2_vat_display: null
                        sales_price_3: null
                        sales_price_3_vat_display: null
                        sales_price_includes_vat: false
                        sales_price_vat_display: 123
                        service_group: null
                        tax_code: NOR
                        transport_cost: 0
                      id: '21'
                      relationships:
                        applied_tax_exemption_reason:
                          data: null
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        item_families:
                          data:
                            id: '4'
                            type: item_families
                        tax_exemption_reasons:
                          data: null
                        unit_of_measure:
                          data:
                            id: '2'
                            type: units_of_measure
                      type: products
                    meta:
                      observed:
                        scalar: 1
    patch:
      tags:
        - Empresa
        - Produtos e Serviços
        - Produtos
      summary: Atualizar Produto
      description: Atualizar Produto
      operationId: atualizarProduto
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        item_family_id:
                          type: number
                          example: 4
                    id:
                      type: string
                      example: '6'
                    type:
                      type: string
                      example: products
            examples:
              Associar Produto a Familia de Produto:
                value:
                  data:
                    attributes:
                      item_family_id: 4
                    id: '6'
                    type: products
      responses:
        '200':
          description: ''
  /api/products/{id}:
    delete:
      tags:
        - Empresa
        - Produtos e Serviços
        - Produtos
      summary: Apagar Produto
      description: Apagar Produto
      operationId: apagarProduto
      responses:
        '200':
          description: ''
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
  /api/services:
    get:
      tags:
        - Empresa
        - Produtos e Serviços
        - Serviços
      summary: Obter Todos os Serviços
      description: Obter Todos os Serviços
      operationId: obterTodosOsServiOs
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '982'
            Date:
              schema:
                type: string
                example: Thu, 29 Aug 2024 15:35:19 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        attributes:
                          type: object
                          properties:
                            accounting_number:
                              nullable: true
                              example: null
                            applied_tax_code:
                              type: string
                              example: NOR
                            applied_tax_exemption_reason_id:
                              nullable: true
                              example: null
                            customs_cost:
                              type: number
                              example: 0
                            ean_barcode:
                              type: string
                              example: ''
                            estimated_total_cost:
                              type: number
                              example: 0
                            financial_cost:
                              type: number
                              example: 0
                            is_active:
                              type: boolean
                              example: true
                            is_merchandise:
                              nullable: true
                              example: null
                            item_code:
                              type: string
                              example: '54321'
                            item_description:
                              type: string
                              example: Serviço1
                            location_in_warehouse:
                              nullable: true
                              example: null
                            notes:
                              type: string
                              example: Notas de Serviço
                            other_cost:
                              type: number
                              example: 0
                            product_inventory_type:
                              nullable: true
                              example: null
                            purchase_price:
                              type: number
                              example: 0
                            sales_price:
                              type: number
                              example: 10
                            sales_price_2:
                              type: number
                              example: 20
                            sales_price_2_vat_display:
                              type: number
                              example: 24.6
                            sales_price_3:
                              type: number
                              example: 30
                            sales_price_3_vat_display:
                              type: number
                              example: 36.9
                            sales_price_includes_vat:
                              type: boolean
                              example: false
                            sales_price_vat_display:
                              type: number
                              example: 12.3
                            service_group:
                              type: string
                              example: G1
                            tax_code:
                              type: string
                              example: NOR
                            transport_cost:
                              type: number
                              example: 0
                        id:
                          type: string
                          example: '7'
                        relationships:
                          type: object
                          properties:
                            applied_tax_exemption_reason:
                              type: object
                              properties:
                                data:
                                  nullable: true
                                  example: null
                            company:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '800000046'
                                    type:
                                      type: string
                                      example: current_company
                            item_families:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '4'
                                    type:
                                      type: string
                                      example: item_families
                            tax_exemption_reasons:
                              type: object
                              properties:
                                data:
                                  nullable: true
                                  example: null
                            unit_of_measure:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '5'
                                    type:
                                      type: string
                                      example: units_of_measure
                        type:
                          type: string
                          example: services
                    example:
                      - attributes:
                          accounting_number: null
                          applied_tax_code: NOR
                          applied_tax_exemption_reason_id: null
                          customs_cost: 0
                          ean_barcode: ''
                          estimated_total_cost: 0
                          financial_cost: 0
                          is_active: true
                          is_merchandise: null
                          item_code: '54321'
                          item_description: Serviço1
                          location_in_warehouse: null
                          notes: Notas de Serviço
                          other_cost: 0
                          product_inventory_type: null
                          purchase_price: 0
                          sales_price: 10
                          sales_price_2: 20
                          sales_price_2_vat_display: 24.6
                          sales_price_3: 30
                          sales_price_3_vat_display: 36.9
                          sales_price_includes_vat: false
                          sales_price_vat_display: 12.3
                          service_group: G1
                          tax_code: NOR
                          transport_cost: 0
                        id: '7'
                        relationships:
                          applied_tax_exemption_reason:
                            data: null
                          company:
                            data:
                              id: '800000046'
                              type: current_company
                          item_families:
                            data:
                              id: '4'
                              type: item_families
                          tax_exemption_reasons:
                            data: null
                          unit_of_measure:
                            data:
                              id: '5'
                              type: units_of_measure
                        type: services
              examples:
                Sucesso:
                  value:
                    data:
                      - attributes:
                          accounting_number: null
                          applied_tax_code: NOR
                          applied_tax_exemption_reason_id: null
                          customs_cost: 0
                          ean_barcode: ''
                          estimated_total_cost: 0
                          financial_cost: 0
                          is_active: true
                          is_merchandise: null
                          item_code: '54321'
                          item_description: Serviço1
                          location_in_warehouse: null
                          notes: Notas de Serviço
                          other_cost: 0
                          product_inventory_type: null
                          purchase_price: 0
                          sales_price: 10
                          sales_price_2: 20
                          sales_price_2_vat_display: 24.6
                          sales_price_3: 30
                          sales_price_3_vat_display: 36.9
                          sales_price_includes_vat: false
                          sales_price_vat_display: 12.3
                          service_group: G1
                          tax_code: NOR
                          transport_cost: 0
                        id: '7'
                        relationships:
                          applied_tax_exemption_reason:
                            data: null
                          company:
                            data:
                              id: '800000046'
                              type: current_company
                          item_families:
                            data:
                              id: '4'
                              type: item_families
                          tax_exemption_reasons:
                            data: null
                          unit_of_measure:
                            data:
                              id: '5'
                              type: units_of_measure
                        type: services
    post:
      tags:
        - Empresa
        - Produtos e Serviços
        - Serviços
      summary: Criar Serviço
      description: Criar Serviço
      operationId: criarServiO
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          customs_cost:
                            type: number
                            example: 0
                          ean_barcode:
                            type: string
                            example: ''
                          estimated_total_cost:
                            type: number
                            example: 0
                          financial_cost:
                            type: number
                            example: 0
                          item_code:
                            type: string
                            example: '333333'
                          item_description:
                            type: string
                            example: Serviço NOR
                          other_cost:
                            type: number
                            example: 0
                          purchase_price:
                            type: number
                            example: 0
                          sales_price:
                            type: number
                            example: 10
                          sales_price_2:
                            type: number
                            example: 20
                          sales_price_3:
                            type: number
                            example: 30
                          transport_cost:
                            type: number
                            example: 0
                          type:
                            type: string
                            example: Service
                      type:
                        type: string
                        example: services
                  example:
                    - attributes:
                        customs_cost: 0
                        ean_barcode: ''
                        estimated_total_cost: 0
                        financial_cost: 0
                        item_code: '333333'
                        item_description: Serviço NOR
                        other_cost: 0
                        purchase_price: 0
                        sales_price: 10
                        sales_price_2: 20
                        sales_price_3: 30
                        transport_cost: 0
                        type: Service
                      type: services
            examples:
              Criar Serviço:
                value:
                  data:
                    - attributes:
                        customs_cost: 0
                        ean_barcode: ''
                        estimated_total_cost: 0
                        financial_cost: 0
                        item_code: '333333'
                        item_description: Serviço NOR
                        other_cost: 0
                        purchase_price: 0
                        sales_price: 10
                        sales_price_2: 20
                        sales_price_3: 30
                        transport_cost: 0
                        type: Service
                      type: services
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '952'
            Date:
              schema:
                type: string
                example: Thu, 29 Aug 2024 15:46:46 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        attributes:
                          type: object
                          properties:
                            accounting_number:
                              nullable: true
                              example: null
                            applied_tax_code:
                              nullable: true
                              example: null
                            applied_tax_exemption_reason_id:
                              nullable: true
                              example: null
                            customs_cost:
                              type: number
                              example: 0
                            ean_barcode:
                              type: string
                              example: ''
                            estimated_total_cost:
                              type: number
                              example: 0
                            financial_cost:
                              type: number
                              example: 0
                            is_active:
                              type: boolean
                              example: true
                            is_merchandise:
                              nullable: true
                              example: null
                            item_code:
                              type: string
                              example: '333333'
                            item_description:
                              type: string
                              example: Serviço NOR
                            location_in_warehouse:
                              nullable: true
                              example: null
                            notes:
                              nullable: true
                              example: null
                            other_cost:
                              type: number
                              example: 0
                            product_inventory_type:
                              nullable: true
                              example: null
                            purchase_price:
                              type: number
                              example: 0
                            sales_price:
                              type: number
                              example: 10
                            sales_price_2:
                              type: number
                              example: 20
                            sales_price_2_vat_display:
                              nullable: true
                              example: null
                            sales_price_3:
                              type: number
                              example: 30
                            sales_price_3_vat_display:
                              nullable: true
                              example: null
                            sales_price_includes_vat:
                              nullable: true
                              example: null
                            sales_price_vat_display:
                              nullable: true
                              example: null
                            service_group:
                              nullable: true
                              example: null
                            tax_code:
                              nullable: true
                              example: null
                            transport_cost:
                              type: number
                              example: 0
                        id:
                          type: string
                          example: '19'
                        relationships:
                          type: object
                          properties:
                            applied_tax_exemption_reason:
                              type: object
                              properties:
                                data:
                                  nullable: true
                                  example: null
                            company:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '800000046'
                                    type:
                                      type: string
                                      example: current_company
                            item_families:
                              type: object
                              properties:
                                data:
                                  nullable: true
                                  example: null
                            tax_exemption_reasons:
                              type: object
                              properties:
                                data:
                                  nullable: true
                                  example: null
                            unit_of_measure:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '2'
                                    type:
                                      type: string
                                      example: units_of_measure
                        type:
                          type: string
                          example: services
                    example:
                      - attributes:
                          accounting_number: null
                          applied_tax_code: null
                          applied_tax_exemption_reason_id: null
                          customs_cost: 0
                          ean_barcode: ''
                          estimated_total_cost: 0
                          financial_cost: 0
                          is_active: true
                          is_merchandise: null
                          item_code: '333333'
                          item_description: Serviço NOR
                          location_in_warehouse: null
                          notes: null
                          other_cost: 0
                          product_inventory_type: null
                          purchase_price: 0
                          sales_price: 10
                          sales_price_2: 20
                          sales_price_2_vat_display: null
                          sales_price_3: 30
                          sales_price_3_vat_display: null
                          sales_price_includes_vat: null
                          sales_price_vat_display: null
                          service_group: null
                          tax_code: null
                          transport_cost: 0
                        id: '19'
                        relationships:
                          applied_tax_exemption_reason:
                            data: null
                          company:
                            data:
                              id: '800000046'
                              type: current_company
                          item_families:
                            data: null
                          tax_exemption_reasons:
                            data: null
                          unit_of_measure:
                            data:
                              id: '2'
                              type: units_of_measure
                        type: services
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          scalar:
                            type: number
                            example: 1
              examples:
                Sucesso:
                  value:
                    data:
                      - attributes:
                          accounting_number: null
                          applied_tax_code: null
                          applied_tax_exemption_reason_id: null
                          customs_cost: 0
                          ean_barcode: ''
                          estimated_total_cost: 0
                          financial_cost: 0
                          is_active: true
                          is_merchandise: null
                          item_code: '333333'
                          item_description: Serviço NOR
                          location_in_warehouse: null
                          notes: null
                          other_cost: 0
                          product_inventory_type: null
                          purchase_price: 0
                          sales_price: 10
                          sales_price_2: 20
                          sales_price_2_vat_display: null
                          sales_price_3: 30
                          sales_price_3_vat_display: null
                          sales_price_includes_vat: null
                          sales_price_vat_display: null
                          service_group: null
                          tax_code: null
                          transport_cost: 0
                        id: '19'
                        relationships:
                          applied_tax_exemption_reason:
                            data: null
                          company:
                            data:
                              id: '800000046'
                              type: current_company
                          item_families:
                            data: null
                          tax_exemption_reasons:
                            data: null
                          unit_of_measure:
                            data:
                              id: '2'
                              type: units_of_measure
                        type: services
                    meta:
                      observed:
                        scalar: 1
    delete:
      tags:
        - Empresa
        - Produtos e Serviços
        - Serviços
      summary: Apagar Serviço
      description: Apagar Serviço
      operationId: apagarServiO
      responses:
        '200':
          description: ''
    patch:
      tags:
        - Empresa
        - Produtos e Serviços
        - Serviços
      summary: Atualizar Serviço
      description: Atualizar Serviço
      operationId: atualizarServiO
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        item_family_id:
                          type: number
                          example: 4
                    id:
                      type: string
                      example: '7'
                    type:
                      type: string
                      example: services
            examples:
              Atualizar Serviço:
                value:
                  data:
                    attributes:
                      item_family_id: 4
                    id: '7'
                    type: services
      responses:
        '200':
          description: ''
  /api/v1/commercial_sales_documents:
    post:
      tags:
        - Vendas
        - Documentos de Venda
      summary: Criar Documento de Venda
      description: Criar Documento de Venda
      operationId: criarDocumentoDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                apply_retention_when_paid:
                  type: boolean
                  example: true
                currency_conversion_rate:
                  type: number
                  example: 1.21
                currency_iso_code:
                  type: string
                  example: EUR
                customer_address_detail:
                  type: string
                  example: Praceta da Liberdade n5
                customer_business_name:
                  type: string
                  example: Ricardo Ribeiro
                customer_city:
                  type: string
                  example: Lisboa
                customer_country:
                  type: string
                  example: PT
                customer_postcode:
                  type: string
                  example: 1000-101
                customer_tax_registration_number:
                  type: string
                  example: '229659179'
                date:
                  type: string
                  example: '2023-01-01'
                document_type:
                  type: string
                  example: FT
                due_date:
                  type: string
                  example: '2023-02-01'
                external_reference:
                  type: string
                  example: Referência do documento externo
                finalize:
                  type: boolean
                  example: false
                lines:
                  type: array
                  items:
                    type: object
                    properties: {}
                  example:
                    - {}
                notes:
                  type: string
                  example: Notas ao documento
                operation_country:
                  type: string
                  example: PT-MA
                payment_mechanism:
                  type: string
                  example: MO
                retention:
                  type: number
                  example: 7.5
                retention_type:
                  type: string
                  example: IRS
                settlement_expression:
                  type: string
                  example: '7.5'
                vat_included_prices:
                  type: boolean
                  example: false
            examples:
              Criar Documento de Venda:
                value:
                  apply_retention_when_paid: true
                  currency_conversion_rate: 1.21
                  currency_iso_code: EUR
                  customer_address_detail: Praceta da Liberdade n5
                  customer_business_name: Ricardo Ribeiro
                  customer_city: Lisboa
                  customer_country: PT
                  customer_postcode: 1000-101
                  customer_tax_registration_number: '229659179'
                  date: '2023-01-01'
                  document_type: FT
                  due_date: '2023-02-01'
                  external_reference: Referência do documento externo
                  finalize: false
                  lines:
                    - {}
                  notes: Notas ao documento
                  operation_country: PT-MA
                  payment_mechanism: MO
                  retention: 7.5
                  retention_type: IRS
                  settlement_expression: '7.5'
                  vat_included_prices: false
      responses:
        '200':
          description: ''
  /api/v1/commercial_sales_documents/:
    get:
      tags:
        - Vendas
        - Documentos de Venda
      summary: Obter Todos os Documentos de Venda
      description: Obter Todos os Documentos de Venda
      operationId: obterTodosOsDocumentosDeVenda
      responses:
        '200':
          description: ''
  /api/v1/commercial_sales_documents/{salesDocumentId}:
    get:
      tags:
        - Vendas
        - Documentos de Venda
      summary: Obter Todos os Documentos de Venda por Id
      description: Obter Todos os Documentos de Venda por Id
      operationId: obterTodosOsDocumentosDeVendaPorId
      responses:
        '200':
          description: ''
    parameters:
      - name: salesDocumentId
        in: path
        required: true
        schema:
          type: string
  /api/commercial_sales_documents:
    get:
      tags:
        - Versões Anteriores
        - Vendas1
        - Documentos de Venda1
      summary: Obter  Todos os Documentos de Venda Finalizados
      description: Obter  Todos os Documentos de Venda Finalizados
      operationId: obterTodosOsDocumentosDeVendaFinalizados
      parameters:
        - name: filter[status]
          in: query
          schema:
            type: string
            example: '1'
          description: Filtro sobre o estado do documento (1 = finalizado, 0 = em aberto)
      responses:
        '200':
          description: ''
    post:
      tags:
        - Versões Anteriores
        - Vendas1
        - Documentos de Venda1
      summary: Criar Cabeçalho de Documentos de Venda
      description: >-
        | Atributo | Descrição | Opcional |

        | --- | --- | --- |

        | document_type | Tipo de documento. "FT": fatura, "FS": fatura
        simplificada, "FR": fatura-recibo. | Não |

        | date | Data do documento; por omissão, a data do pedido. | Sim |

        | document_series_prefix | Em alternativa ao campo "document_series_id".
        | Sim |

        | customer_tax_registration_number | NIF do cliente. se o cliente com o
        NIF indicado não existir, será criado automaticamente. | Sim |

        | customer_business_name | Nome do cliente. | Não |

        | customer_address_detail | Morada do cliente. | Sim |

        | customer_postcode | Código postal do cliente, no formato 0000-000. |
        Sim |

        | customer_city | Cidade/Localidade do cliente. | Sim |

        | customer_country | País do cliente. Por omissão, "PT"; é o código ISO
        alpha-2 do país do cliente. | Sim |

        | customer_id | No caso do cliente já existir e não pretender criar um
        novo. | Sim |

        | due_date | Data de vencimento; por omissão, a data do documento, ou a
        referente ao prazo de pagamento configurado no cliente. | Sim |

        | settlement_expression | Desconto no cabeçalho, em percentagem; são
        suportados descontos compostos, como "3+5" | Sim |

        | payment_mechanism | Modos de pagamento aceites. | Sim |

        | vat_included_prices | Os preços nas linhas são com IVA incluído? Por
        omissão, não (false). | Sim |

        | operation_country | A região de operação para efeitos de IVA. | Sim |

        | currency_iso_code | É o código ISO da moeda do documento. | Sim |

        | currency_conversion_rate | É a taxa de conversão para EUR. | Sim |

        | retention | Percentagem de retenção a aplicar sobre os serviços. | Sim
        |

        | retention_type | Tipo de retenção ("IRS" ou "IRC"). Por omissão,
        "IRS". | Sim |

        | apply_retention_when_paid | A retenção é feita logo no documento
        (false) ou apenas no recebimento (true). Por omissão, false. | Sim |

        | notes | Notas ao documento. | Sim |

        | external_reference | Referência do documento externo. | Sim |
      operationId: criarCabeAlhoDeDocumentosDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        apply_retention_when_paid:
                          type: boolean
                          example: true
                        currency_conversion_rate:
                          type: number
                          example: 1.21
                        currency_iso_code:
                          type: string
                          example: EUR
                        customer_id:
                          type: number
                          example: 2
                        date:
                          type: string
                          example: '2023-01-01'
                        document_type:
                          type: string
                          example: FT
                        due_date:
                          type: string
                          example: '2023-02-01'
                        external_reference:
                          type: string
                          example: Referência do documento externo
                        notes:
                          type: string
                          example: Notas ao documento
                        operation_country:
                          type: string
                          example: PT-MA
                        payment_mechanism:
                          type: string
                          example: MO
                        retention:
                          type: number
                          example: 7.5
                        retention_type:
                          type: string
                          example: IRS
                        settlement_expression:
                          type: string
                          example: '7.5'
                        vat_included_prices:
                          type: boolean
                          example: false
                    type:
                      type: string
                      example: commercial_sales_documents
            examples:
              Criar Cabeçalho de Documentos de Venda:
                value:
                  data:
                    attributes:
                      apply_retention_when_paid: true
                      currency_conversion_rate: 1.21
                      currency_iso_code: EUR
                      customer_id: 2
                      date: '2023-01-01'
                      document_type: FT
                      due_date: '2023-02-01'
                      external_reference: Referência do documento externo
                      notes: Notas ao documento
                      operation_country: PT-MA
                      payment_mechanism: MO
                      retention: 7.5
                      retention_type: IRS
                      settlement_expression: '7.5'
                      vat_included_prices: false
                    type: commercial_sales_documents
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '4542'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 14:24:53 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          acts_as_shipment_document:
                            type: boolean
                            example: false
                          apply_retention_when_paid:
                            type: boolean
                            example: true
                          base_currency_conversion_difference:
                            nullable: true
                            example: null
                          base_currency_gross_total:
                            nullable: true
                            example: null
                          base_currency_net_total:
                            nullable: true
                            example: null
                          base_currency_other_retentions:
                            nullable: true
                            example: null
                          base_currency_other_taxes_total:
                            nullable: true
                            example: null
                          base_currency_pending_total:
                            nullable: true
                            example: null
                          base_currency_retention_aware_gross_total:
                            nullable: true
                            example: null
                          base_currency_retention_total:
                            nullable: true
                            example: null
                          base_currency_settlement_total:
                            nullable: true
                            example: null
                          base_currency_tax_payable:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_int:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_ise:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_nor:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_red:
                            nullable: true
                            example: null
                          base_currency_vat_total_int:
                            nullable: true
                            example: null
                          base_currency_vat_total_nor:
                            nullable: true
                            example: null
                          base_currency_vat_total_red:
                            nullable: true
                            example: null
                          cashed_vat:
                            type: boolean
                            example: false
                          child_documents_ids:
                            nullable: true
                            example: null
                          communication_code:
                            nullable: true
                            example: null
                          communication_code_source:
                            type: string
                            example: webservice
                          communication_status:
                            type: string
                            example: unsent
                          created_at:
                            type: string
                            example: '2024-03-05 14:24:53.318028'
                          currency_amount:
                            nullable: true
                            example: null
                          currency_conversion_rate:
                            type: number
                            example: 1
                          currency_iso_code:
                            type: string
                            example: EUR
                          customer_address_detail:
                            type: string
                            example: ''
                          customer_business_name:
                            type: string
                            example: Gabriel
                          customer_city:
                            type: string
                            example: ''
                          customer_country:
                            type: string
                            example: PT
                          customer_postcode:
                            type: string
                            example: ''
                          customer_tax_country_region:
                            type: string
                            example: PT
                          customer_tax_registration_number:
                            type: string
                            example: '123456789'
                          date:
                            type: string
                            example: '2023-01-01'
                          description:
                            nullable: true
                            example: null
                          document_area:
                            type: string
                            example: FT
                          document_hash_sum:
                            nullable: true
                            example: null
                          document_no:
                            nullable: true
                            example: null
                          document_series_no:
                            nullable: true
                            example: null
                          document_series_prefix:
                            type: string
                            example: '2023'
                          document_type:
                            type: string
                            example: FT
                          due_date:
                            type: string
                            example: '2023-02-01'
                          due_days:
                            nullable: true
                            example: null
                          email_readed:
                            type: boolean
                            example: false
                          emailed:
                            nullable: true
                            example: null
                          end_date:
                            nullable: true
                            example: null
                          expected_shipment_unloading_time:
                            nullable: true
                            example: null
                          expired:
                            nullable: true
                            example: null
                          external_reference:
                            type: string
                            example: Referência do documento externo
                          fulfilled_mask:
                            type: number
                            example: 0
                          gross_total:
                            type: number
                            example: 0
                          hash_control:
                            nullable: true
                            example: null
                          invoice_counter:
                            nullable: true
                            example: null
                          is_active:
                            nullable: true
                            example: null
                          is_document_to_self:
                            type: boolean
                            example: false
                          is_invoice_receipt:
                            nullable: true
                            example: null
                          is_receipt:
                            nullable: true
                            example: null
                          is_third_party:
                            type: boolean
                            example: false
                          issue_finalized:
                            nullable: true
                            example: null
                          line_settlement_with_tax:
                            type: number
                            example: 0
                          line_settlement_with_tax_unrounded:
                            type: number
                            example: 0
                          line_settlement_without_tax:
                            type: number
                            example: 0
                          line_settlement_without_tax_unrounded:
                            type: number
                            example: 0
                          made_available_to:
                            type: boolean
                            example: true
                          manual_registration_number:
                            type: string
                            example: ''
                          manual_registration_series:
                            type: string
                            example: ''
                          manual_registration_type:
                            nullable: true
                            example: null
                          net_settlement_total:
                            nullable: true
                            example: null
                          net_total:
                            type: number
                            example: 0
                          notes:
                            type: string
                            example: Notas ao documento
                          operation_country:
                            type: string
                            example: PT-MA
                          other_retentions:
                            type: number
                            example: 0
                          other_taxes_total:
                            type: number
                            example: 0
                          parent_document_area:
                            nullable: true
                            example: null
                          parent_document_reference:
                            type: string
                            example: ''
                          parent_document_type:
                            nullable: true
                            example: null
                          parent_documents_ids:
                            nullable: true
                            example: null
                          payment_mechanism:
                            type: string
                            example: MO
                          pending_retention_value:
                            type: number
                            example: 0
                          pending_total:
                            type: number
                            example: 0
                          periodicity:
                            nullable: true
                            example: null
                          periodicity_type:
                            nullable: true
                            example: null
                          printed:
                            nullable: true
                            example: null
                          public_link:
                            type: string
                            example: ''
                          receipts_ids:
                            nullable: true
                            example: null
                          reference:
                            nullable: true
                            example: null
                          reference_document_type:
                            nullable: true
                            example: null
                          required_mask:
                            type: number
                            example: 0
                          retention:
                            type: number
                            example: 7.5
                          retention_aware_gross_total:
                            type: number
                            example: 0
                          retention_type:
                            type: string
                            example: IRS
                          retention_value:
                            type: number
                            example: 0
                          retention_value_unrounded:
                            type: number
                            example: 0
                          scheduled_description:
                            nullable: true
                            example: null
                          scheduled_end_date:
                            nullable: true
                            example: null
                          scheduled_interval:
                            nullable: true
                            example: null
                          scheduled_invoice_id:
                            nullable: true
                            example: null
                          scheduled_start_date:
                            nullable: true
                            example: null
                          send_email:
                            nullable: true
                            example: null
                          settlement:
                            nullable: true
                            example: null
                          settlement_expression:
                            type: string
                            example: '7.5'
                          settlement_percentage:
                            type: number
                            example: 7.5
                          settlement_total:
                            type: number
                            example: 0
                          settlement_with_tax:
                            type: number
                            example: 0
                          settlement_with_tax_unrounded:
                            type: number
                            example: 0
                          settlement_without_tax:
                            type: number
                            example: 0
                          settlement_without_tax_unrounded:
                            type: number
                            example: 0
                          shipment_address_detail:
                            nullable: true
                            example: null
                          shipment_city:
                            nullable: true
                            example: null
                          shipment_country:
                            nullable: true
                            example: null
                          shipment_from_address_detail:
                            nullable: true
                            example: null
                          shipment_from_city:
                            nullable: true
                            example: null
                          shipment_from_country:
                            nullable: true
                            example: null
                          shipment_from_postcode:
                            nullable: true
                            example: null
                          shipment_loading_time:
                            nullable: true
                            example: null
                          shipment_postcode:
                            nullable: true
                            example: null
                          sort_status:
                            type: number
                            example: 0
                          start_date:
                            nullable: true
                            example: null
                          status:
                            type: number
                            example: 0
                          system_entry_date:
                            nullable: true
                            example: null
                          tax_payable:
                            type: number
                            example: 0
                          third_party_type:
                            type: number
                            example: 0
                          total_pending_quantity:
                            nullable: true
                            example: null
                          updated_at:
                            type: string
                            example: '2024-03-05 14:24:53.318028'
                          vat_incidence_int:
                            type: number
                            example: 0
                          vat_incidence_int_unrounded:
                            type: number
                            example: 0
                          vat_incidence_ise:
                            type: number
                            example: 0
                          vat_incidence_ise_unrounded:
                            type: number
                            example: 0
                          vat_incidence_nor:
                            type: number
                            example: 0
                          vat_incidence_nor_unrounded:
                            type: number
                            example: 0
                          vat_incidence_red:
                            type: number
                            example: 0
                          vat_incidence_red_unrounded:
                            type: number
                            example: 0
                          vat_included_prices:
                            type: boolean
                            example: false
                          vat_percentage_int:
                            nullable: true
                            example: null
                          vat_percentage_nor:
                            nullable: true
                            example: null
                          vat_percentage_red:
                            nullable: true
                            example: null
                          vat_total_int:
                            type: number
                            example: 0
                          vat_total_int_unrounded:
                            type: number
                            example: 0
                          vat_total_nor:
                            type: number
                            example: 0
                          vat_total_nor_unrounded:
                            type: number
                            example: 0
                          vat_total_red:
                            type: number
                            example: 0
                          vat_total_red_unrounded:
                            type: number
                            example: 0
                          vehicle_registration:
                            nullable: true
                            example: null
                          voided_reason:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '66'
                      relationships:
                        type: object
                        properties:
                          bank_accounts:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          cash_accounts:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          commercial_document_series:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '72'
                                  type:
                                    type: string
                                    example: commercial_document_series
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          currency:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '1'
                                  type:
                                    type: string
                                    example: currencies
                          customer:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: customers
                          lines:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          tax_exemption_reasons:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          user:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000863'
                                  type:
                                    type: string
                                    example: current_company_users
                      type:
                        type: string
                        example: commercial_sales_documents
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          scalar:
                            type: number
                            example: 1
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        acts_as_shipment_document: false
                        apply_retention_when_paid: true
                        base_currency_conversion_difference: null
                        base_currency_gross_total: null
                        base_currency_net_total: null
                        base_currency_other_retentions: null
                        base_currency_other_taxes_total: null
                        base_currency_pending_total: null
                        base_currency_retention_aware_gross_total: null
                        base_currency_retention_total: null
                        base_currency_settlement_total: null
                        base_currency_tax_payable: null
                        base_currency_vat_incidence_int: null
                        base_currency_vat_incidence_ise: null
                        base_currency_vat_incidence_nor: null
                        base_currency_vat_incidence_red: null
                        base_currency_vat_total_int: null
                        base_currency_vat_total_nor: null
                        base_currency_vat_total_red: null
                        cashed_vat: false
                        child_documents_ids: null
                        communication_code: null
                        communication_code_source: webservice
                        communication_status: unsent
                        created_at: '2024-03-05 14:24:53.318028'
                        currency_amount: null
                        currency_conversion_rate: 1
                        currency_iso_code: EUR
                        customer_address_detail: ''
                        customer_business_name: Gabriel
                        customer_city: ''
                        customer_country: PT
                        customer_postcode: ''
                        customer_tax_country_region: PT
                        customer_tax_registration_number: '123456789'
                        date: '2023-01-01'
                        description: null
                        document_area: FT
                        document_hash_sum: null
                        document_no: null
                        document_series_no: null
                        document_series_prefix: '2023'
                        document_type: FT
                        due_date: '2023-02-01'
                        due_days: null
                        email_readed: false
                        emailed: null
                        end_date: null
                        expected_shipment_unloading_time: null
                        expired: null
                        external_reference: Referência do documento externo
                        fulfilled_mask: 0
                        gross_total: 0
                        hash_control: null
                        invoice_counter: null
                        is_active: null
                        is_document_to_self: false
                        is_invoice_receipt: null
                        is_receipt: null
                        is_third_party: false
                        issue_finalized: null
                        line_settlement_with_tax: 0
                        line_settlement_with_tax_unrounded: 0
                        line_settlement_without_tax: 0
                        line_settlement_without_tax_unrounded: 0
                        made_available_to: true
                        manual_registration_number: ''
                        manual_registration_series: ''
                        manual_registration_type: null
                        net_settlement_total: null
                        net_total: 0
                        notes: Notas ao documento
                        operation_country: PT-MA
                        other_retentions: 0
                        other_taxes_total: 0
                        parent_document_area: null
                        parent_document_reference: ''
                        parent_document_type: null
                        parent_documents_ids: null
                        payment_mechanism: MO
                        pending_retention_value: 0
                        pending_total: 0
                        periodicity: null
                        periodicity_type: null
                        printed: null
                        public_link: ''
                        receipts_ids: null
                        reference: null
                        reference_document_type: null
                        required_mask: 0
                        retention: 7.5
                        retention_aware_gross_total: 0
                        retention_type: IRS
                        retention_value: 0
                        retention_value_unrounded: 0
                        scheduled_description: null
                        scheduled_end_date: null
                        scheduled_interval: null
                        scheduled_invoice_id: null
                        scheduled_start_date: null
                        send_email: null
                        settlement: null
                        settlement_expression: '7.5'
                        settlement_percentage: 7.5
                        settlement_total: 0
                        settlement_with_tax: 0
                        settlement_with_tax_unrounded: 0
                        settlement_without_tax: 0
                        settlement_without_tax_unrounded: 0
                        shipment_address_detail: null
                        shipment_city: null
                        shipment_country: null
                        shipment_from_address_detail: null
                        shipment_from_city: null
                        shipment_from_country: null
                        shipment_from_postcode: null
                        shipment_loading_time: null
                        shipment_postcode: null
                        sort_status: 0
                        start_date: null
                        status: 0
                        system_entry_date: null
                        tax_payable: 0
                        third_party_type: 0
                        total_pending_quantity: null
                        updated_at: '2024-03-05 14:24:53.318028'
                        vat_incidence_int: 0
                        vat_incidence_int_unrounded: 0
                        vat_incidence_ise: 0
                        vat_incidence_ise_unrounded: 0
                        vat_incidence_nor: 0
                        vat_incidence_nor_unrounded: 0
                        vat_incidence_red: 0
                        vat_incidence_red_unrounded: 0
                        vat_included_prices: false
                        vat_percentage_int: null
                        vat_percentage_nor: null
                        vat_percentage_red: null
                        vat_total_int: 0
                        vat_total_int_unrounded: 0
                        vat_total_nor: 0
                        vat_total_nor_unrounded: 0
                        vat_total_red: 0
                        vat_total_red_unrounded: 0
                        vehicle_registration: null
                        voided_reason: null
                      id: '66'
                      relationships:
                        bank_accounts:
                          data: null
                        cash_accounts:
                          data: null
                        commercial_document_series:
                          data:
                            id: '72'
                            type: commercial_document_series
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        currency:
                          data:
                            id: '1'
                            type: currencies
                        customer:
                          data:
                            id: '2'
                            type: customers
                        lines:
                          data: []
                        tax_exemption_reasons:
                          data: null
                        user:
                          data:
                            id: '800000863'
                            type: current_company_users
                      type: commercial_sales_documents
                    meta:
                      observed:
                        scalar: 1
    patch:
      tags:
        - Versões Anteriores
        - Vendas1
        - Documentos de Venda1
      summary: Atualizar Documentos de Venda
      description: Atualizar Documentos de Venda
      operationId: atualizarDocumentosDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        status:
                          type: number
                          example: 1
                    id:
                      type: string
                      example: '65'
                    type:
                      type: string
                      example: commercial_sales_documents
            examples:
              Atualizar Documentos de Venda:
                value:
                  data:
                    attributes:
                      acts_as_shipment_document: false
                      apply_retention_when_paid: true
                      base_currency_conversion_difference: null
                      base_currency_gross_total: null
                      base_currency_net_total: null
                      base_currency_other_taxes_total: null
                      base_currency_pending_total: null
                      base_currency_retention_aware_gross_total: null
                      base_currency_retention_total: null
                      base_currency_settlement_total: null
                      base_currency_tax_payable: null
                      base_currency_vat_incidence_int: null
                      base_currency_vat_incidence_ise: null
                      base_currency_vat_incidence_nor: null
                      base_currency_vat_incidence_red: null
                      base_currency_vat_total_int: null
                      base_currency_vat_total_nor: null
                      base_currency_vat_total_red: null
                      cashed_vat: false
                      child_documents_ids: null
                      communication_code: null
                      communication_code_source: webservice
                      communication_status: unsent
                      created_at: '2024-03-05 14:24:53.318028'
                      currency_amount: null
                      currency_conversion_rate: 1
                      currency_iso_code: EUR
                      customer_address_detail: ''
                      customer_business_name: Gabriel
                      customer_city: ''
                      customer_country: PT
                      customer_postcode: ''
                      customer_tax_country_region: PT
                      customer_tax_registration_number: '123456789'
                      date: '2023-01-01'
                      description: null
                      document_area: FT
                      document_hash_sum: null
                      document_no: null
                      document_series_no: null
                      document_series_prefix: '2023'
                      document_type: FT
                      due_date: '2023-02-01'
                      due_days: null
                      email_readed: false
                      emailed: null
                      end_date: null
                      expected_shipment_unloading_time: null
                      expired: null
                      external_reference: Referência do documento externo
                      fulfilled_mask: 0
                      gross_total: 0
                      hash_control: null
                      invoice_counter: null
                      is_active: null
                      is_document_to_self: false
                      is_invoice_receipt: null
                      is_receipt: null
                      is_third_party: false
                      issue_finalized: null
                      line_settlement_with_tax: 0
                      line_settlement_with_tax_unrounded: 0
                      line_settlement_without_tax: 0
                      line_settlement_without_tax_unrounded: 0
                      made_available_to: true
                      manual_registration_number: ''
                      manual_registration_series: ''
                      manual_registration_type: null
                      net_settlement_total: null
                      net_total: 0
                      notes: Notas ao documento
                      operation_country: PT-MA
                      other_retentions: 0
                      other_taxes_total: 0
                      parent_document_area: null
                      parent_document_reference: ''
                      parent_document_type: null
                      parent_documents_ids: null
                      payment_mechanism: MO
                      pending_retention_value: 0
                      pending_total: 0
                      periodicity: null
                      periodicity_type: null
                      printed: null
                      receipts_ids: null
                      reference: null
                      reference_document_type: null
                      required_mask: 0
                      retention: 7.5
                      retention_aware_gross_total: 0
                      retention_type: IRS
                      retention_value: 0
                      retention_value_unrounded: 0
                      scheduled_description: null
                      scheduled_end_date: null
                      scheduled_interval: null
                      scheduled_invoice_id: null
                      scheduled_start_date: null
                      send_email: null
                      settlement: null
                      settlement_expression: '7.5'
                      settlement_percentage: 7.5
                      settlement_total: 0
                      settlement_with_tax: 0
                      settlement_with_tax_unrounded: 0
                      settlement_without_tax: 0
                      settlement_without_tax_unrounded: 0
                      shipment_address_detail: null
                      shipment_city: null
                      shipment_country: null
                      shipment_from_address_detail: null
                      shipment_from_city: null
                      shipment_from_country: null
                      shipment_from_postcode: null
                      shipment_loading_time: null
                      shipment_postcode: null
                      sort_status: 0
                      start_date: null
                      status: 0
                      system_entry_date: null
                      tax_payable: 0
                      third_party_type: 0
                      total_pending_quantity: null
                      updated_at: '2024-03-05 14:24:53.318028'
                      vat_incidence_int: 0
                      vat_incidence_int_unrounded: 0
                      vat_incidence_ise: 0
                      vat_incidence_ise_unrounded: 0
                      vat_incidence_nor: 0
                      vat_incidence_nor_unrounded: 0
                      vat_incidence_red: 0
                      vat_incidence_red_unrounded: 0
                      vat_included_prices: false
                      vat_percentage_int: null
                      vat_percentage_nor: null
                      vat_percentage_red: null
                      vat_total_int: 0
                      vat_total_int_unrounded: 0
                      vat_total_nor: 0
                      vat_total_nor_unrounded: 0
                      vat_total_red: 0
                      vat_total_red_unrounded: 0
                      vehicle_registration: null
                      voided_reason: null
                    id: '66'
                    type: commercial_sales_documents
              Finalizar Documento de Venda:
                value:
                  data:
                    attributes:
                      status: 1
                    id: '65'
                    type: commercial_sales_documents
      responses:
        '200':
          description: Atualizar Linhas de Documentos de Venda
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '4577'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 14:55:50 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          acts_as_shipment_document:
                            type: boolean
                            example: false
                          apply_retention_when_paid:
                            type: boolean
                            example: true
                          base_currency_conversion_difference:
                            nullable: true
                            example: null
                          base_currency_gross_total:
                            nullable: true
                            example: null
                          base_currency_net_total:
                            nullable: true
                            example: null
                          base_currency_other_retentions:
                            nullable: true
                            example: null
                          base_currency_other_taxes_total:
                            nullable: true
                            example: null
                          base_currency_pending_total:
                            nullable: true
                            example: null
                          base_currency_retention_aware_gross_total:
                            nullable: true
                            example: null
                          base_currency_retention_total:
                            nullable: true
                            example: null
                          base_currency_settlement_total:
                            nullable: true
                            example: null
                          base_currency_tax_payable:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_int:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_ise:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_nor:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_red:
                            nullable: true
                            example: null
                          base_currency_vat_total_int:
                            nullable: true
                            example: null
                          base_currency_vat_total_nor:
                            nullable: true
                            example: null
                          base_currency_vat_total_red:
                            nullable: true
                            example: null
                          cashed_vat:
                            type: boolean
                            example: false
                          child_documents_ids:
                            nullable: true
                            example: null
                          communication_code:
                            nullable: true
                            example: null
                          communication_code_source:
                            type: string
                            example: webservice
                          communication_status:
                            type: string
                            example: unsent
                          created_at:
                            type: string
                            example: '2024-03-05 14:24:53.318028'
                          currency_amount:
                            nullable: true
                            example: null
                          currency_conversion_rate:
                            type: number
                            example: 1
                          currency_iso_code:
                            type: string
                            example: EUR
                          customer_address_detail:
                            type: string
                            example: ''
                          customer_business_name:
                            type: string
                            example: Gabriel
                          customer_city:
                            type: string
                            example: ''
                          customer_country:
                            type: string
                            example: PT
                          customer_postcode:
                            type: string
                            example: ''
                          customer_tax_country_region:
                            type: string
                            example: PT
                          customer_tax_registration_number:
                            type: string
                            example: '123456789'
                          date:
                            type: string
                            example: '2023-01-01'
                          description:
                            nullable: true
                            example: null
                          document_area:
                            type: string
                            example: FT
                          document_hash_sum:
                            nullable: true
                            example: null
                          document_no:
                            nullable: true
                            example: null
                          document_series_no:
                            nullable: true
                            example: null
                          document_series_prefix:
                            type: string
                            example: '2023'
                          document_type:
                            type: string
                            example: FT
                          due_date:
                            type: string
                            example: '2023-02-01'
                          due_days:
                            nullable: true
                            example: null
                          email_readed:
                            type: boolean
                            example: false
                          emailed:
                            nullable: true
                            example: null
                          end_date:
                            nullable: true
                            example: null
                          expected_shipment_unloading_time:
                            nullable: true
                            example: null
                          expired:
                            nullable: true
                            example: null
                          external_reference:
                            type: string
                            example: Referência do documento externo
                          fulfilled_mask:
                            type: number
                            example: 0
                          gross_total:
                            type: number
                            example: 0
                          hash_control:
                            nullable: true
                            example: null
                          invoice_counter:
                            nullable: true
                            example: null
                          is_active:
                            nullable: true
                            example: null
                          is_document_to_self:
                            type: boolean
                            example: false
                          is_invoice_receipt:
                            nullable: true
                            example: null
                          is_receipt:
                            nullable: true
                            example: null
                          is_third_party:
                            type: boolean
                            example: false
                          issue_finalized:
                            nullable: true
                            example: null
                          line_settlement_with_tax:
                            type: number
                            example: 0
                          line_settlement_with_tax_unrounded:
                            type: number
                            example: 0
                          line_settlement_without_tax:
                            type: number
                            example: 0
                          line_settlement_without_tax_unrounded:
                            type: number
                            example: 0
                          made_available_to:
                            type: boolean
                            example: true
                          manual_registration_number:
                            type: string
                            example: ''
                          manual_registration_series:
                            type: string
                            example: ''
                          manual_registration_type:
                            nullable: true
                            example: null
                          net_settlement_total:
                            nullable: true
                            example: null
                          net_total:
                            type: number
                            example: 0
                          notes:
                            type: string
                            example: Notas ao documento
                          operation_country:
                            type: string
                            example: PT-MA
                          other_retentions:
                            type: number
                            example: 0
                          other_taxes_total:
                            type: number
                            example: 0
                          parent_document_area:
                            nullable: true
                            example: null
                          parent_document_reference:
                            type: string
                            example: ''
                          parent_document_type:
                            nullable: true
                            example: null
                          parent_documents_ids:
                            nullable: true
                            example: null
                          payment_mechanism:
                            type: string
                            example: MO
                          pending_retention_value:
                            type: number
                            example: 0
                          pending_total:
                            type: number
                            example: 0
                          periodicity:
                            nullable: true
                            example: null
                          periodicity_type:
                            nullable: true
                            example: null
                          printed:
                            nullable: true
                            example: null
                          public_link:
                            type: string
                            example: ''
                          receipts_ids:
                            nullable: true
                            example: null
                          reference:
                            nullable: true
                            example: null
                          reference_document_type:
                            nullable: true
                            example: null
                          required_mask:
                            type: number
                            example: 0
                          retention:
                            type: number
                            example: 7.5
                          retention_aware_gross_total:
                            type: number
                            example: 0
                          retention_type:
                            type: string
                            example: IRS
                          retention_value:
                            type: number
                            example: 0
                          retention_value_unrounded:
                            type: number
                            example: 0
                          scheduled_description:
                            nullable: true
                            example: null
                          scheduled_end_date:
                            nullable: true
                            example: null
                          scheduled_interval:
                            nullable: true
                            example: null
                          scheduled_invoice_id:
                            nullable: true
                            example: null
                          scheduled_start_date:
                            nullable: true
                            example: null
                          send_email:
                            nullable: true
                            example: null
                          settlement:
                            nullable: true
                            example: null
                          settlement_expression:
                            type: string
                            example: '7.5'
                          settlement_percentage:
                            type: number
                            example: 7.5
                          settlement_total:
                            type: number
                            example: 0
                          settlement_with_tax:
                            type: number
                            example: 0
                          settlement_with_tax_unrounded:
                            type: number
                            example: 0
                          settlement_without_tax:
                            type: number
                            example: 0
                          settlement_without_tax_unrounded:
                            type: number
                            example: 0
                          shipment_address_detail:
                            nullable: true
                            example: null
                          shipment_city:
                            nullable: true
                            example: null
                          shipment_country:
                            nullable: true
                            example: null
                          shipment_from_address_detail:
                            nullable: true
                            example: null
                          shipment_from_city:
                            nullable: true
                            example: null
                          shipment_from_country:
                            nullable: true
                            example: null
                          shipment_from_postcode:
                            nullable: true
                            example: null
                          shipment_loading_time:
                            nullable: true
                            example: null
                          shipment_postcode:
                            nullable: true
                            example: null
                          sort_status:
                            type: number
                            example: 0
                          start_date:
                            nullable: true
                            example: null
                          status:
                            type: number
                            example: 0
                          system_entry_date:
                            nullable: true
                            example: null
                          tax_payable:
                            type: number
                            example: 0
                          third_party_type:
                            type: number
                            example: 0
                          total_pending_quantity:
                            nullable: true
                            example: null
                          updated_at:
                            type: string
                            example: '2024-03-05 14:55:50.985066'
                          vat_incidence_int:
                            type: number
                            example: 0
                          vat_incidence_int_unrounded:
                            type: number
                            example: 0
                          vat_incidence_ise:
                            type: number
                            example: 0
                          vat_incidence_ise_unrounded:
                            type: number
                            example: 0
                          vat_incidence_nor:
                            type: number
                            example: 0
                          vat_incidence_nor_unrounded:
                            type: number
                            example: 0
                          vat_incidence_red:
                            type: number
                            example: 0
                          vat_incidence_red_unrounded:
                            type: number
                            example: 0
                          vat_included_prices:
                            type: boolean
                            example: false
                          vat_percentage_int:
                            type: number
                            example: 13
                          vat_percentage_nor:
                            nullable: true
                            example: null
                          vat_percentage_red:
                            nullable: true
                            example: null
                          vat_total_int:
                            type: number
                            example: 0
                          vat_total_int_unrounded:
                            type: number
                            example: 0
                          vat_total_nor:
                            type: number
                            example: 0
                          vat_total_nor_unrounded:
                            type: number
                            example: 0
                          vat_total_red:
                            type: number
                            example: 0
                          vat_total_red_unrounded:
                            type: number
                            example: 0
                          vehicle_registration:
                            nullable: true
                            example: null
                          voided_reason:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '66'
                      relationships:
                        type: object
                        properties:
                          bank_accounts:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          cash_accounts:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          commercial_document_series:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '72'
                                  type:
                                    type: string
                                    example: commercial_document_series
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          currency:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '1'
                                  type:
                                    type: string
                                    example: currencies
                          customer:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: customers
                          lines:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          tax_exemption_reasons:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          user:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000863'
                                  type:
                                    type: string
                                    example: current_company_users
                      type:
                        type: string
                        example: commercial_sales_documents
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          scalar:
                            type: number
                            example: 1
              examples:
                Atualizar Linhas de Documentos de Venda:
                  value:
                    data:
                      attributes:
                        acts_as_shipment_document: false
                        apply_retention_when_paid: true
                        base_currency_conversion_difference: null
                        base_currency_gross_total: null
                        base_currency_net_total: null
                        base_currency_other_retentions: null
                        base_currency_other_taxes_total: null
                        base_currency_pending_total: null
                        base_currency_retention_aware_gross_total: null
                        base_currency_retention_total: null
                        base_currency_settlement_total: null
                        base_currency_tax_payable: null
                        base_currency_vat_incidence_int: null
                        base_currency_vat_incidence_ise: null
                        base_currency_vat_incidence_nor: null
                        base_currency_vat_incidence_red: null
                        base_currency_vat_total_int: null
                        base_currency_vat_total_nor: null
                        base_currency_vat_total_red: null
                        cashed_vat: false
                        child_documents_ids: null
                        communication_code: null
                        communication_code_source: webservice
                        communication_status: unsent
                        created_at: '2024-03-05 14:24:53.318028'
                        currency_amount: null
                        currency_conversion_rate: 1
                        currency_iso_code: EUR
                        customer_address_detail: ''
                        customer_business_name: Gabriel
                        customer_city: ''
                        customer_country: PT
                        customer_postcode: ''
                        customer_tax_country_region: PT
                        customer_tax_registration_number: '123456789'
                        date: '2023-01-01'
                        description: null
                        document_area: FT
                        document_hash_sum: null
                        document_no: null
                        document_series_no: null
                        document_series_prefix: '2023'
                        document_type: FT
                        due_date: '2023-02-01'
                        due_days: null
                        email_readed: false
                        emailed: null
                        end_date: null
                        expected_shipment_unloading_time: null
                        expired: null
                        external_reference: Referência do documento externo
                        fulfilled_mask: 0
                        gross_total: 0
                        hash_control: null
                        invoice_counter: null
                        is_active: null
                        is_document_to_self: false
                        is_invoice_receipt: null
                        is_receipt: null
                        is_third_party: false
                        issue_finalized: null
                        line_settlement_with_tax: 0
                        line_settlement_with_tax_unrounded: 0
                        line_settlement_without_tax: 0
                        line_settlement_without_tax_unrounded: 0
                        made_available_to: true
                        manual_registration_number: ''
                        manual_registration_series: ''
                        manual_registration_type: null
                        net_settlement_total: null
                        net_total: 0
                        notes: Notas ao documento
                        operation_country: PT-MA
                        other_retentions: 0
                        other_taxes_total: 0
                        parent_document_area: null
                        parent_document_reference: ''
                        parent_document_type: null
                        parent_documents_ids: null
                        payment_mechanism: MO
                        pending_retention_value: 0
                        pending_total: 0
                        periodicity: null
                        periodicity_type: null
                        printed: null
                        public_link: ''
                        receipts_ids: null
                        reference: null
                        reference_document_type: null
                        required_mask: 0
                        retention: 7.5
                        retention_aware_gross_total: 0
                        retention_type: IRS
                        retention_value: 0
                        retention_value_unrounded: 0
                        scheduled_description: null
                        scheduled_end_date: null
                        scheduled_interval: null
                        scheduled_invoice_id: null
                        scheduled_start_date: null
                        send_email: null
                        settlement: null
                        settlement_expression: '7.5'
                        settlement_percentage: 7.5
                        settlement_total: 0
                        settlement_with_tax: 0
                        settlement_with_tax_unrounded: 0
                        settlement_without_tax: 0
                        settlement_without_tax_unrounded: 0
                        shipment_address_detail: null
                        shipment_city: null
                        shipment_country: null
                        shipment_from_address_detail: null
                        shipment_from_city: null
                        shipment_from_country: null
                        shipment_from_postcode: null
                        shipment_loading_time: null
                        shipment_postcode: null
                        sort_status: 0
                        start_date: null
                        status: 0
                        system_entry_date: null
                        tax_payable: 0
                        third_party_type: 0
                        total_pending_quantity: null
                        updated_at: '2024-03-05 14:55:50.985066'
                        vat_incidence_int: 0
                        vat_incidence_int_unrounded: 0
                        vat_incidence_ise: 0
                        vat_incidence_ise_unrounded: 0
                        vat_incidence_nor: 0
                        vat_incidence_nor_unrounded: 0
                        vat_incidence_red: 0
                        vat_incidence_red_unrounded: 0
                        vat_included_prices: false
                        vat_percentage_int: 13
                        vat_percentage_nor: null
                        vat_percentage_red: null
                        vat_total_int: 0
                        vat_total_int_unrounded: 0
                        vat_total_nor: 0
                        vat_total_nor_unrounded: 0
                        vat_total_red: 0
                        vat_total_red_unrounded: 0
                        vehicle_registration: null
                        voided_reason: null
                      id: '66'
                      relationships:
                        bank_accounts:
                          data: null
                        cash_accounts:
                          data: null
                        commercial_document_series:
                          data:
                            id: '72'
                            type: commercial_document_series
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        currency:
                          data:
                            id: '1'
                            type: currencies
                        customer:
                          data:
                            id: '2'
                            type: customers
                        lines:
                          data: []
                        tax_exemption_reasons:
                          data: null
                        user:
                          data:
                            id: '800000863'
                            type: current_company_users
                      type: commercial_sales_documents
                    meta:
                      observed:
                        scalar: 1
        '404':
          description: Not Found
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '151'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 15:03:58 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA015
                        detail:
                          type: string
                          example: >-
                            Erro de sistema JA015: recurso não existente. Por
                            favor contacte o suporte técnico.
                        status:
                          type: string
                          example: 404 Not Found
                    example:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
              examples:
                Not Found:
                  value:
                    errors:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
  /api/v1/commercial_sales_receipts:
    get:
      tags:
        - Vendas
        - Recibos de Venda
      summary: Obter Todos os Recibos de Venda
      description: Obter Todos os Recibos de Venda
      operationId: obterTodosOsRecibosDeVenda
      responses:
        '200':
          description: ''
    post:
      tags:
        - Vendas
        - Recibos de Venda
      summary: Criar Cabeçalho Recibo de Venda
      description: Criar Cabeçalho Recibo de Venda
      operationId: criarCabeAlhoReciboDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cash_account_id:
                  type: number
                  example: 2
                check_number:
                  nullable: true
                  example: null
                company_id:
                  type: number
                  example: 800000046
                country_id:
                  type: number
                  example: 1
                created_at:
                  type: string
                  example: '2024-02-23 11:49:25.209661'
                currency_conversion_rate:
                  type: number
                  example: 1
                currency_id:
                  type: number
                  example: 1
                customer_id:
                  type: number
                  example: 57
                date:
                  type: string
                  example: '2024-02-24'
                deleted:
                  type: boolean
                  example: true
                gross_total:
                  type: number
                  example: 10.69
                internal_observations:
                  type: string
                  example: ''
                lines:
                  type: array
                  items:
                    type: object
                    properties:
                      cashed_vat_amount:
                        nullable: true
                        example: null
                      gross_total:
                        type: number
                        example: 11.38
                      net_total:
                        type: number
                        example: 9.25
                      receivable_id:
                        type: number
                        example: 12
                      receivable_type:
                        type: string
                        example: Document
                      received_value:
                        type: number
                        example: 10.69
                      retention_total:
                        type: number
                        example: 0.69
                      settlement_amount:
                        type: number
                        example: 0
                      settlement_percentage:
                        type: number
                        example: 0
                  example:
                    - cashed_vat_amount: null
                      gross_total: 11.38
                      net_total: 9.25
                      receivable_id: 12
                      receivable_type: Document
                      received_value: 10.69
                      retention_total: 0.69
                      settlement_amount: 0
                      settlement_percentage: 0
                manual_registration_number:
                  nullable: true
                  example: null
                manual_registration_series:
                  nullable: true
                  example: null
                manual_registration_type:
                  nullable: true
                  example: null
                net_total:
                  type: number
                  example: 9.25
                observations:
                  type: string
                  example: ''
                payment_mechanism:
                  type: string
                  example: MO
                saft_import_id:
                  nullable: true
                  example: null
                standalone:
                  type: boolean
                  example: true
                third_party_id:
                  nullable: true
                  example: null
                third_party_type:
                  nullable: true
                  example: null
                updated_at:
                  type: string
                  example: '2024-02-28 14:04:52.678033'
                user_id:
                  type: number
                  example: 800000863
            examples:
              Criar Cabeçalho Recibo de Venda:
                value:
                  cash_account_id: 2
                  check_number: null
                  company_id: 800000046
                  country_id: 1
                  created_at: '2024-02-23 11:49:25.209661'
                  currency_conversion_rate: 1
                  currency_id: 1
                  customer_id: 57
                  date: '2024-02-24'
                  deleted: true
                  gross_total: 10.69
                  internal_observations: ''
                  lines:
                    - cashed_vat_amount: null
                      gross_total: 11.38
                      net_total: 9.25
                      receivable_id: 12
                      receivable_type: Document
                      received_value: 10.69
                      retention_total: 0.69
                      settlement_amount: 0
                      settlement_percentage: 0
                  manual_registration_number: null
                  manual_registration_series: null
                  manual_registration_type: null
                  net_total: 9.25
                  observations: ''
                  payment_mechanism: MO
                  saft_import_id: null
                  standalone: true
                  third_party_id: null
                  third_party_type: null
                  updated_at: '2024-02-28 14:04:52.678033'
                  user_id: 800000863
      responses:
        '200':
          description: ''
  /api/commercial_sales_receipt_lines:
    get:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Obter Todas as Linhas de Recibos de Venda
      description: Obter Todas as Linhas de Recibos de Venda
      operationId: obterTodasAsLinhasDeRecibosDeVenda
      responses:
        '200':
          description: ''
    post:
      tags:
        - Vendas
        - Recibos de Venda
      summary: Adicionar Linha a Recibo de Venda
      description: Adicionar Linha a Recibo de Venda
      operationId: adicionarLinhaAReciboDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        cashed_vat_amount:
                          nullable: true
                          example: null
                        gross_total:
                          type: number
                          example: 10.69
                        net_total:
                          type: number
                          example: 9.27
                        receipt_id:
                          type: number
                          example: 13
                        receivable_id:
                          type: number
                          example: 12
                        receivable_type:
                          type: string
                          example: Document
                        received_value:
                          type: number
                          example: 10.69
                        retention_total:
                          type: number
                          example: 0.72
                        settlement_amount:
                          type: number
                          example: 0
                        settlement_percentage:
                          type: number
                          example: 0
                    type:
                      type: string
                      example: commercial_sales_receipt_lines
            examples:
              Adicionar Linha a Recibo de Venda:
                value:
                  data:
                    attributes:
                      cashed_vat_amount: null
                      gross_total: 10.69
                      net_total: 9.27
                      receipt_id: 13
                      receivable_id: 12
                      receivable_type: Document
                      received_value: 10.69
                      retention_total: 0.72
                      settlement_amount: 0
                      settlement_percentage: 0
                    type: commercial_sales_receipt_lines
      responses:
        '200':
          description: ''
    delete:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Remover Linhas de Recibos de Venda
      description: Remover Linhas de Recibos de Venda
      operationId: removerLinhasDeRecibosDeVenda
      responses:
        '200':
          description: ''
    patch:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Atualizar Linhas de Recibos de Venda
      description: Atualizar Linhas de Recibos de Venda
      operationId: atualizarLinhasDeRecibosDeVenda
      responses:
        '200':
          description: ''
  /api/v1/commercial_sales_receipts/{salesReceiptId}:
    get:
      tags:
        - Vendas
        - Recibos de Venda
      summary: Obter Recibo de Venda por ID
      description: Obter Recibo de Venda por ID
      operationId: obterReciboDeVendaPorId
      responses:
        '200':
          description: ''
    delete:
      tags:
        - Vendas
        - Recibos de Venda
      summary: Apagar Recibo de Venda
      description: Apagar Recibo de Venda
      operationId: apagarReciboDeVenda
      responses:
        '200':
          description: ''
    patch:
      tags:
        - Vendas
        - Recibos de Venda
      summary: Atualizar Recibo de Venda
      description: Atualizar Recibo de Venda
      operationId: atualizarReciboDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cash_account_id:
                  type: number
                  example: 2
                check_number:
                  nullable: true
                  example: null
                company_id:
                  type: number
                  example: 800000046
                country_id:
                  type: number
                  example: 1
                created_at:
                  type: string
                  example: '2024-02-23 11:49:25.209661'
                currency_conversion_rate:
                  type: number
                  example: 1
                currency_id:
                  type: number
                  example: 1
                customer_id:
                  type: number
                  example: 57
                date:
                  type: string
                  example: '2024-02-24'
                deleted:
                  type: boolean
                  example: true
                document_no:
                  type: string
                  example: RC 2023/1
                document_series_id:
                  type: number
                  example: 66
                gross_total:
                  type: number
                  example: 10.69
                id:
                  type: number
                  example: 2
                internal_observations:
                  type: string
                  example: ''
                lines:
                  type: array
                  items:
                    type: object
                    properties:
                      cashed_vat_amount:
                        nullable: true
                        example: null
                      gross_total:
                        type: number
                        example: 11.38
                      id:
                        type: number
                        example: 2
                      net_total:
                        type: number
                        example: 9.25
                      receipt_id:
                        type: number
                        example: 2
                      receivable_id:
                        type: number
                        example: 12
                      receivable_type:
                        type: string
                        example: Document
                      received_value:
                        type: number
                        example: 10.69
                      retention_total:
                        type: number
                        example: 0.69
                      settlement_amount:
                        type: number
                        example: 0
                      settlement_percentage:
                        type: number
                        example: 0
                  example:
                    - cashed_vat_amount: null
                      gross_total: 11.38
                      id: 2
                      net_total: 9.25
                      receipt_id: 2
                      receivable_id: 12
                      receivable_type: Document
                      received_value: 10.69
                      retention_total: 0.69
                      settlement_amount: 0
                      settlement_percentage: 0
                manual_registration_number:
                  nullable: true
                  example: null
                manual_registration_series:
                  nullable: true
                  example: null
                manual_registration_type:
                  nullable: true
                  example: null
                net_total:
                  type: number
                  example: 9.25
                observations:
                  type: string
                  example: ''
                payment_mechanism:
                  type: string
                  example: MO
                saft_import_id:
                  nullable: true
                  example: null
                standalone:
                  type: boolean
                  example: true
                third_party_id:
                  nullable: true
                  example: null
                third_party_type:
                  nullable: true
                  example: null
                updated_at:
                  type: string
                  example: '2024-02-27 11:19:15.761393'
                user_id:
                  type: number
                  example: 800000863
            examples:
              Atualizar Recibo de Venda:
                value:
                  cash_account_id: 2
                  check_number: null
                  company_id: 800000046
                  country_id: 1
                  created_at: '2024-02-23 11:49:25.209661'
                  currency_conversion_rate: 1
                  currency_id: 1
                  customer_id: 57
                  date: '2024-02-24'
                  deleted: true
                  document_no: RC 2023/1
                  document_series_id: 66
                  gross_total: 10.69
                  id: 2
                  internal_observations: ''
                  lines:
                    - cashed_vat_amount: null
                      gross_total: 11.38
                      id: 2
                      net_total: 9.25
                      receipt_id: 2
                      receivable_id: 12
                      receivable_type: Document
                      received_value: 10.69
                      retention_total: 0.69
                      settlement_amount: 0
                      settlement_percentage: 0
                  manual_registration_number: null
                  manual_registration_series: null
                  manual_registration_type: null
                  net_total: 9.25
                  observations: ''
                  payment_mechanism: MO
                  saft_import_id: null
                  standalone: true
                  third_party_id: null
                  third_party_type: null
                  updated_at: '2024-02-27 11:19:15.761393'
                  user_id: 800000863
      responses:
        '200':
          description: ''
    parameters:
      - name: salesReceiptId
        in: path
        required: true
        schema:
          type: string
  /api/v1/commercial_sales_receipts/{salesReceiptId}/void:
    patch:
      tags:
        - Vendas
        - Recibos de Venda
      summary: Anular Recibo de Venda
      description: Anular Recibo de Venda
      operationId: anularReciboDeVenda
      responses:
        '200':
          description: ''
    parameters:
      - name: salesReceiptId
        in: path
        required: true
        schema:
          type: string
  /api/v1/commercial_sales_receipt_lines/:
    delete:
      tags:
        - Vendas
        - Recibos de Venda
      summary: Apagar Linhas de Recibo de Venda
      description: Apagar Linhas de Recibo de Venda
      operationId: apagarLinhasDeReciboDeVenda
      responses:
        '200':
          description: ''
  /api/url_for_print/{salesDocumentId}:
    get:
      tags:
        - Vendas
        - Descarregar PDF de Documentos de Venda
      summary: Descarregar PDF de Documentos de Venda
      description: Descarregar PDF de Documentos de Venda
      operationId: descarregarPdfDeDocumentosDeVenda
      parameters:
        - name: filter[type]
          in: query
          schema:
            type: string
            example: Document
          description: Tipo do documento a imprimir (Document = Documento de venda)
      responses:
        '200':
          description: >-
            Descarregar PDF de Documentos de Venda / Descarregar PDF de
            Documentos de Venda
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '671'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:43:29 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          url:
                            type: object
                            properties:
                              host:
                                type: string
                                example: integration.toconline.pt
                              path:
                                type: string
                                example: >-
                                  /public-file/eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJleHAiOjIwODgwOTYyMDksImlhdCI6MTcwOTY2NDIwOSwibmJmIjoxNzA5NjY0MjA5LCJhcmNoaXZlIjp7ImlkIjoiY1dQSUxkVlkyIiwiZW50aXR5X2lkIjoiODAwMDAwMDQ2In19.herbicMeAYAzFgcb22h9uUZDugfYiGCYokXakor3nIVSo2psCyZLvN9Ps1vH4SUTkfe4cW0mWuOveujHnNby7fA4JoOvoqZX18vw1hRrmPANtW8n3yg62sjiw6PWR7WIMgXPPdXQbS8peHHTo5E6i2qSd16a40mzarSEbc3y8TRppjr1NpKTVyZKL6eWT9Av7xk23X4M-AHOxZzmgsyFA4RVr2ggk_Fqdj1eFbBobvC8y0-dtckvOzS7_ihjaLUTReBCT9Ic-cVV0LrwpIXYEa6nKHG_r3Pzdw2K_jesJHGGDQjgbQEXvKBAu8vOJhoFCRuGpdZTG9H02pdaCFGRWA
                              port:
                                type: number
                                example: 443
                              scheme:
                                type: string
                                example: https
                      id:
                        type: string
                        example: '10'
                      type:
                        type: string
                        example: url_for_print
              examples:
                Descarregar PDF de Documentos de Venda:
                  value:
                    data:
                      attributes:
                        url:
                          host: integration.toconline.pt
                          path: >-
                            /public-file/eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJleHAiOjIwODgwOTYyMDksImlhdCI6MTcwOTY2NDIwOSwibmJmIjoxNzA5NjY0MjA5LCJhcmNoaXZlIjp7ImlkIjoiY1dQSUxkVlkyIiwiZW50aXR5X2lkIjoiODAwMDAwMDQ2In19.herbicMeAYAzFgcb22h9uUZDugfYiGCYokXakor3nIVSo2psCyZLvN9Ps1vH4SUTkfe4cW0mWuOveujHnNby7fA4JoOvoqZX18vw1hRrmPANtW8n3yg62sjiw6PWR7WIMgXPPdXQbS8peHHTo5E6i2qSd16a40mzarSEbc3y8TRppjr1NpKTVyZKL6eWT9Av7xk23X4M-AHOxZzmgsyFA4RVr2ggk_Fqdj1eFbBobvC8y0-dtckvOzS7_ihjaLUTReBCT9Ic-cVV0LrwpIXYEa6nKHG_r3Pzdw2K_jesJHGGDQjgbQEXvKBAu8vOJhoFCRuGpdZTG9H02pdaCFGRWA
                          port: 443
                          scheme: https
                      id: '10'
                      type: url_for_print
    parameters:
      - name: salesDocumentId
        in: path
        required: true
        schema:
          type: string
          example: '10'
        description: Id do documento de venda
  /api/send_document_at_webservice:
    patch:
      tags:
        - Vendas
        - Comunicação de de Documentos à AT
      summary: Comunicação de Documentos à AT
      description: Comunicação de Documentos à AT
      operationId: comunicaODeDocumentosAt
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        communication_code:
                          type: string
                          example: <communication_code>
                        communication_message:
                          type: string
                          example: <communication_message>
                        communication_status:
                          type: string
                          example: <communciation_status>
                    id:
                      type: string
                      example: <document_id>
                    type:
                      type: string
                      example: send_document_at_webservice
            examples:
              Comunicação de Documentos à AT:
                value:
                  data:
                    attributes:
                      communication_code: <communication_code>
                      communication_message: <communication_message>
                      communication_status: <communciation_status>
                    id: <document_id>
                    type: send_document_at_webservice
      responses:
        '200':
          description: ''
  /api/email/document:
    patch:
      tags:
        - Vendas
        - Envio de Recibos por email
      summary: Envio de Documentos por email
      description: Envio de Documentos por email
      operationId: envioDeDocumentosPorEmail
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        from_email:
                          type: string
                          example: email.do.remetente@mail.mail
                        from_name:
                          type: string
                          example: Nome do remetente
                        subject:
                          type: string
                          example: Assunto da mensagem
                        to_email:
                          type: string
                          example: email.do.destinatario@mail.mail
                        type:
                          type: string
                          example: Receipt
                    id:
                      type: string
                      example: <id do documento ou do recibo>
                    type:
                      type: string
                      example: email/document
            examples:
              Envio de Documentos por email:
                value:
                  data:
                    attributes:
                      from_email: email.do.remetente@mail.mail
                      from_name: Nome do remetente
                      subject: Assunto da mensagem
                      to_email: mail.do.destinatario@mail.mail
                      type: Document
                    id: 3
                    type: email/document
              Envio de Recibos por email:
                value:
                  data:
                    attributes:
                      from_email: email.do.remetente@mail.mail
                      from_name: Nome do remetente
                      subject: Assunto da mensagem
                      to_email: email.do.destinatario@mail.mail
                      type: Receipt
                    id: <id do documento ou do recibo>
                    type: email/document
      responses:
        '200':
          description: ''
  /api/v1/commercial_purchases_documents:
    get:
      tags:
        - Compras
        - Documentos de Compra
      summary: Obter Todos os Documentos de Compra Finalizados
      description: Obter Todos os Documentos de Compra Finalizados
      operationId: obterTodosOsDocumentosDeCompraFinalizados
      parameters:
        - name: filter[status]
          in: query
          schema:
            type: string
            example: '1'
          description: '@@@@@@@@@'
      responses:
        '200':
          description: ''
    post:
      tags:
        - Compras
        - Documentos de Compra
      summary: Criar Cabeçalho de Documentos de Compra
      description: Criar Cabeçalho de Documentos de Compra
      operationId: criarCabeAlhoDeDocumentosDeCompra
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                currency_conversion_rate:
                  type: number
                  example: 1.21
                currency_id:
                  type: number
                  example: 1
                currency_iso_code:
                  type: string
                  example: USD
                date:
                  type: string
                  example: '2023-01-01'
                document_series_id:
                  type: number
                  example: 1
                document_type:
                  type: string
                  example: FC
                due_date:
                  type: string
                  example: '2023-02-01'
                external_reference:
                  type: string
                  example: Referência do documento externo
                lines:
                  type: array
                  items:
                    type: object
                    properties:
                      item_id:
                        type: number
                        example: 2
                      item_type:
                        type: string
                        example: Product
                      tax_id:
                        type: number
                        example: 1
                      unit_of_measure_id:
                        type: number
                        example: 2
                  example:
                    - item_id: 2
                      item_type: Product
                      tax_id: 1
                      unit_of_measure_id: 2
                notes:
                  type: string
                  example: Notas ao documento
                retention_total:
                  type: number
                  example: 9.99
                retention_type:
                  type: string
                  example: TD
                settlement_expression:
                  type: string
                  example: '7.5'
                supplier_address_detail:
                  type: string
                  example: Morada do fornecedor
                supplier_business_name:
                  type: string
                  example: Nome do fornecedor
                supplier_city:
                  type: string
                  example: Cidade/Localidade do fornecedor
                supplier_country:
                  type: string
                  example: PT
                supplier_id:
                  type: number
                  example: 1
                supplier_postcode:
                  type: string
                  example: 0000-000
                supplier_tax_registration_number:
                  type: string
                  example: '999999990'
                tax_exemption_reason_id:
                  type: number
                  example: 1
                vat_included_prices:
                  type: boolean
                  example: false
            examples:
              Criar Cabeçalho de Documentos de Compra:
                value:
                  currency_conversion_rate: 1.21
                  currency_id: 1
                  currency_iso_code: USD
                  date: '2023-01-01'
                  document_series_id: 1
                  document_type: FC
                  due_date: '2023-02-01'
                  external_reference: Referência do documento externo
                  lines:
                    - item_id: 2
                      item_type: Product
                      tax_id: 1
                      unit_of_measure_id: 2
                  notes: Notas ao documento
                  retention_total: 9.99
                  retention_type: TD
                  settlement_expression: '7.5'
                  supplier_address_detail: Morada do fornecedor
                  supplier_business_name: Nome do fornecedor
                  supplier_city: Cidade/Localidade do fornecedor
                  supplier_country: PT
                  supplier_id: 1
                  supplier_postcode: 0000-000
                  supplier_tax_registration_number: '999999990'
                  tax_exemption_reason_id: 1
                  vat_included_prices: false
      responses:
        '200':
          description: ''
  /api/v1/commercial_purchases_document_lines/:
    post:
      tags:
        - Compras
        - Documentos de Compra
      summary: Criar Linha de Documentos de Compra para Produto
      description: Criar Linha de Documentos de Compra para Produto
      operationId: criarLinhaDeDocumentosDeCompraParaProduto
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                lines:
                  type: array
                  items: {}
                  example: []
            examples:
              Criar Linha de Documento de Compra para Categoria de Despesa:
                value:
                  lines: []
              Criar Linha de Documentos de Compra para Produto:
                value:
                  data:
                    attributes:
                      item_code: PTEST
                      item_type: Product
                      quantity: 1
                      settlement_expression: '3'
                      unit_price: 20
                    relationships:
                      document:
                        data:
                          id: <id do documento>
                          type: commercial_purchases_documents
                      tax:
                        data:
                          id: '1'
                          type: taxes
                    type: commercial_purchases_document_lines
      responses:
        '200':
          description: ''
  /api/v1/commercial_purchases_documents/:
    get:
      tags:
        - Compras
        - Documentos de Compra
      summary: Obter Todos os Documentos de Compra
      description: Obter Todos os Documentos de Compra
      operationId: obterTodosOsDocumentosDeCompra
      responses:
        '200':
          description: ''
  /api/v1/commercial_purchases_payments:
    get:
      tags:
        - Compras
        - Pagamentos
      summary: Obter todos os Pagamentos
      description: Obter todos os Pagamentos
      operationId: obterTodosOsPagamentos
      responses:
        '200':
          description: ''
    post:
      tags:
        - Compras
        - Pagamentos
      summary: Criar Cabeçalho de Pagamentos
      description: Criar Cabeçalho de Pagamentos
      operationId: criarCabeAlhoDePagamentos
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cash_account_id:
                  type: number
                  example: 2
                check_number:
                  nullable: true
                  example: null
                company_id:
                  type: number
                  example: 800000046
                country_id:
                  type: number
                  example: 1
                currency_conversion_rate:
                  type: number
                  example: 1
                currency_id:
                  type: number
                  example: 1
                date:
                  type: string
                  example: '2024-02-29'
                document_series_id:
                  type: number
                  example: 12
                gross_total:
                  type: number
                  example: 11.3
                internal_observations:
                  type: string
                  example: Comentário interno
                net_total:
                  type: number
                  example: 0
                observations:
                  type: string
                  example: Comentários visíveis
                payment_mechanism:
                  type: string
                  example: MO
                supplier_id:
                  type: number
                  example: 9
                third_party_id:
                  nullable: true
                  example: null
                third_party_type:
                  nullable: true
                  example: null
            examples:
              Criar Cabeçalho de Pagamentos:
                value:
                  cash_account_id: 2
                  check_number: null
                  company_id: 800000046
                  country_id: 1
                  currency_conversion_rate: 1
                  currency_id: 1
                  date: '2024-02-29'
                  document_series_id: 12
                  gross_total: 11.3
                  internal_observations: Comentário interno
                  net_total: 0
                  observations: Comentários visíveis
                  payment_mechanism: MO
                  supplier_id: 9
                  third_party_id: null
                  third_party_type: null
      responses:
        '200':
          description: ''
  /api/commercial_purchases_payment_lines:
    post:
      tags:
        - Versões Anteriores
        - Compras1
        - Pagamentos1
      summary: Adicionar Linha a Pagamentos
      description: Adicionar Linha a Pagamentos
      operationId: adicionarLinhaAPagamentos
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        cashed_vat_amount:
                          nullable: true
                          example: null
                        gross_total:
                          type: number
                          example: 30
                        net_total:
                          type: number
                          example: 12
                        paid_value:
                          type: number
                          example: 20
                        payable_id:
                          type: number
                          example: 6
                        payable_type:
                          type: string
                          example: Purchases::DocumentLine
                        payment_id:
                          type: number
                          example: 5
                        retention_total:
                          type: number
                          example: 2
                        settlement_amount:
                          type: number
                          example: 10
                        settlement_percentage:
                          type: number
                          example: 1
                    type:
                      type: string
                      example: commercial_purchases_payment_lines
            examples:
              Adicionar Linha a Pagamentos:
                value:
                  data:
                    attributes:
                      paid_value: 50
                      payable_id: 2
                      payable_type: Purchases::Document
                      settlement_percentage: 3
                    type: commercial_purchases_payment_lines
              Criar Linhas de Pagamento:
                value:
                  data:
                    attributes:
                      cashed_vat_amount: null
                      gross_total: 30
                      net_total: 12
                      paid_value: 20
                      payable_id: 6
                      payable_type: Purchases::DocumentLine
                      payment_id: 5
                      retention_total: 2
                      settlement_amount: 10
                      settlement_percentage: 1
                    type: commercial_purchases_payment_lines
      responses:
        '200':
          description: ''
    delete:
      tags:
        - Versões Anteriores
        - Compras1
        - Pagamentos1
      summary: Remover Linhas de Pagamento
      description: Remover Linhas de Pagamento
      operationId: removerLinhasDePagamento
      responses:
        '200':
          description: ''
    patch:
      tags:
        - Versões Anteriores
        - Compras1
        - Pagamentos1
      summary: Atualizar Linhas de Pagamento
      description: Atualizar Linhas de Pagamento
      operationId: atualizarLinhasDePagamento
      responses:
        '200':
          description: ''
  /api/v1/commercial_purchases_payments/:
    delete:
      tags:
        - Compras
        - Pagamentos
      summary: Remover Pagamentos
      description: Remover Pagamentos
      operationId: removerPagamentos
      responses:
        '200':
          description: ''
    patch:
      tags:
        - Compras
        - Pagamentos
      summary: Finalizar Pagamento
      description: Finalizar Pagamento
      operationId: finalizarPagamento
      responses:
        '200':
          description: ''
  /api/v1/commercial_purchases_payments/{id}:
    get:
      tags:
        - Compras
        - Pagamentos
      summary: Obter Pagamento por Id
      description: Obter Pagamento por Id
      operationId: obterPagamentoPorId
      responses:
        '200':
          description: ''
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '4'
        description: TODO
  /api/v1/commercial_purchases_payment_lines/:
    delete:
      tags:
        - Compras
        - Pagamentos
      summary: Remover Linhas de Pagamentos
      description: Remover Linhas de Pagamentos
      operationId: removerLinhasDePagamentos
      responses:
        '200':
          description: ''
  /api/url_for_print/{purchasesDocumentId}:
    get:
      tags:
        - Compras
        - Descarregar PDF de Documentos de Compra
      summary: Descarregar PDF de Documentos de Compra
      description: Descarregar PDF de Documentos de Compra
      operationId: descarregarPdfDeDocumentosDeCompra
      parameters:
        - name: filter[type]
          in: query
          schema:
            type: string
            example: PurchasesDocument
          description: >-
            Tipo do documento a imprimir (PurchasesDocument = Documento de
            compra)
      responses:
        '200':
          description: ''
    parameters:
      - name: purchasesDocumentId
        in: path
        required: true
        schema:
          type: string
          example: '10'
        description: Id do documento de compra
  /api/commercial_sales_document_lines:
    post:
      tags:
        - Versões Anteriores
        - Vendas1
        - Documentos de Venda1
      summary: Criar Linha de Documentos de Venda para um Produto
      description: Criar Linha de Documentos de Venda para um Produto
      operationId: criarLinhaDeDocumentosDeVendaParaUmProduto
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        description:
                          type: string
                          example: Descrição da linha
                        document_id:
                          type: number
                          example: 66
                    type:
                      type: string
                      example: commercial_sales_document_lines
            examples:
              Criar Linha  de Documento de Venda para uma Descrição Sem Valor:
                value:
                  data:
                    attributes:
                      description: Descrição da linha
                      document_id: 66
                    type: commercial_sales_document_lines
              Criar Linha de Documentos de Venda para um Descritor:
                value:
                  data:
                    attributes:
                      description: Descrição da linha para Descritor
                      document_id: 66
                      item_type: TaxDescriptor
                      quantity: 1
                      settlement_expression: '3'
                      tax_descriptor_id: 2
                      tax_id: 2
                      unit_of_measure_id: 2
                      unit_price: 9.99
                    type: commercial_sales_document_lines
              Criar Linha de Documentos de Venda para um Produto:
                value:
                  data:
                    attributes:
                      document_id: 66
                      item_id: 2
                      item_type: Product
                      quantity: 1
                      settlement_expression: '3'
                      tax_id: 2
                      unit_of_measure_id: 2
                      unit_price: 9.99
                    type: commercial_sales_document_lines
              Criar Linha de Documentos de Venda para um Serviço:
                value:
                  data:
                    attributes:
                      document_id: 66
                      item_id: 7
                      item_type: Service
                      quantity: 1
                      settlement_expression: '3'
                      tax_id: 2
                      unit_of_measure_id: 2
                      unit_price: 9.99
                    type: commercial_sales_document_lines
      responses:
        '200':
          description: >-
            Sucesso / Criar Linha de Documentos de Venda para um Serviço / Criar
            Linha de Documentos de Venda para um Descritor / Criar Linha  de
            Documento de Venda para uma Descrição Sem Valor
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '1453'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 14:27:22 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          amount:
                            type: number
                            nullable: true
                            example: 10.13
                          amount_with_header_settlement:
                            type: number
                            nullable: true
                            example: 10.95
                          base_currency_amount:
                            nullable: true
                            example: null
                          base_currency_net_amount:
                            nullable: true
                            example: null
                          base_currency_net_unit_price:
                            nullable: true
                            example: null
                          base_currency_settlement_with_tax:
                            nullable: true
                            example: null
                          base_currency_settlement_without_tax:
                            nullable: true
                            example: null
                          base_currency_tax_amount:
                            nullable: true
                            example: null
                          base_currency_unit_price:
                            nullable: true
                            example: null
                          created_at:
                            type: string
                            example: '2024-03-05 14:25:52.160841'
                          date:
                            nullable: true
                            example: null
                          description:
                            type: string
                            example: Isto é uma breve descrição
                          exemption_reason:
                            nullable: true
                            example: null
                          imported_quantity:
                            nullable: true
                            example: null
                          item_code:
                            type: string
                            example: '1000'
                          item_id:
                            type: number
                            nullable: true
                            example: 2
                          item_type:
                            type: string
                            example: Product
                          item_unit_price_includes_vat:
                            type: boolean
                            example: false
                          locked:
                            nullable: true
                            example: null
                          net_amount:
                            type: number
                            nullable: true
                            example: 8.96
                          net_amount_with_header_settlement:
                            type: number
                            nullable: true
                            example: 9.69
                          net_settlement_amount:
                            nullable: true
                            example: null
                          net_tax_amount:
                            nullable: true
                            example: null
                          net_unit_price:
                            type: number
                            nullable: true
                            example: 8.9635
                          original_document_no:
                            nullable: true
                            example: null
                          pending_quantity:
                            type: number
                            nullable: true
                            example: 1
                          pending_retention_value:
                            nullable: true
                            example: null
                          pending_total:
                            nullable: true
                            example: null
                          quantity:
                            type: number
                            nullable: true
                            example: 1
                          retention_value:
                            type: number
                            nullable: true
                            example: null
                          settlement_amount:
                            type: number
                            nullable: true
                            example: 0.3
                          settlement_expression:
                            type: string
                            nullable: true
                            example: '3'
                          settlement_percentage:
                            type: number
                            example: 3
                          settlement_with_tax:
                            type: number
                            nullable: true
                            example: 0.34
                          settlement_without_tax:
                            type: number
                            nullable: true
                            example: 0.3
                          tax_amount:
                            type: number
                            nullable: true
                            example: 1.17
                          tax_code:
                            type: string
                            nullable: true
                            example: INT
                          tax_country_region:
                            type: string
                            example: PT
                          tax_descriptor_id:
                            type: number
                            nullable: true
                            example: null
                          tax_percentage:
                            type: number
                            nullable: true
                            example: 13
                          unit_price:
                            type: number
                            nullable: true
                            example: 9.99
                          updated_at:
                            type: string
                            example: '2024-03-05 14:25:52.160841'
                      id:
                        type: string
                        example: '132'
                      relationships:
                        type: object
                        properties:
                          document:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '66'
                                  type:
                                    type: string
                                    example: commercial_sales_documents
                          product:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          service:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          tax:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: taxes
                                nullable: true
                          tax_descriptor:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          unit_of_measure:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: units_of_measure
                                nullable: true
                      type:
                        type: string
                        example: commercial_sales_document_lines
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          lines:
                            type: number
                            example: 1
                          scalar:
                            type: number
                            example: 1
              examples:
                Criar Linha  de Documento de Venda para uma Descrição Sem Valor:
                  value:
                    data:
                      attributes:
                        amount: null
                        amount_with_header_settlement: null
                        base_currency_amount: null
                        base_currency_net_amount: null
                        base_currency_net_unit_price: null
                        base_currency_settlement_with_tax: null
                        base_currency_settlement_without_tax: null
                        base_currency_tax_amount: null
                        base_currency_unit_price: null
                        created_at: '2024-03-05 14:27:22.265972'
                        date: null
                        description: Descrição da linha
                        exemption_reason: null
                        imported_quantity: null
                        item_code: ''
                        item_id: null
                        item_type: ''
                        item_unit_price_includes_vat: false
                        locked: null
                        net_amount: null
                        net_amount_with_header_settlement: null
                        net_settlement_amount: null
                        net_tax_amount: null
                        net_unit_price: null
                        original_document_no: null
                        pending_quantity: null
                        pending_retention_value: null
                        pending_total: null
                        quantity: null
                        retention_value: null
                        settlement_amount: null
                        settlement_expression: null
                        settlement_percentage: 0
                        settlement_with_tax: null
                        settlement_without_tax: null
                        tax_amount: null
                        tax_code: null
                        tax_country_region: PT-MA
                        tax_descriptor_id: null
                        tax_percentage: null
                        unit_price: null
                        updated_at: '2024-03-05 14:27:22.265972'
                      id: '136'
                      relationships:
                        document:
                          data:
                            id: '66'
                            type: commercial_sales_documents
                        product:
                          data: null
                        service:
                          data: null
                        tax:
                          data: null
                        tax_descriptor:
                          data: null
                        unit_of_measure:
                          data: null
                      type: commercial_sales_document_lines
                    meta:
                      observed:
                        lines: 1
                        scalar: 0
                Criar Linha de Documentos de Venda para um Descritor:
                  value:
                    data:
                      attributes:
                        amount: 10.13
                        amount_with_header_settlement: 10.95
                        base_currency_amount: null
                        base_currency_net_amount: null
                        base_currency_net_unit_price: null
                        base_currency_settlement_with_tax: null
                        base_currency_settlement_without_tax: null
                        base_currency_tax_amount: null
                        base_currency_unit_price: null
                        created_at: '2024-03-05 14:26:41.652972'
                        date: null
                        description: Descrição da linha para Descritor
                        exemption_reason: null
                        imported_quantity: null
                        item_code: '>JU'
                        item_id: null
                        item_type: TaxDescriptor
                        item_unit_price_includes_vat: false
                        locked: null
                        net_amount: 8.96
                        net_amount_with_header_settlement: 9.69
                        net_settlement_amount: null
                        net_tax_amount: null
                        net_unit_price: 8.9635
                        original_document_no: null
                        pending_quantity: 1
                        pending_retention_value: null
                        pending_total: null
                        quantity: 1
                        retention_value: null
                        settlement_amount: 0.3
                        settlement_expression: '3'
                        settlement_percentage: 3
                        settlement_with_tax: 0.34
                        settlement_without_tax: 0.3
                        tax_amount: 1.17
                        tax_code: INT
                        tax_country_region: PT
                        tax_descriptor_id: 2
                        tax_percentage: 13
                        unit_price: 9.99
                        updated_at: '2024-03-05 14:26:41.652972'
                      id: '134'
                      relationships:
                        document:
                          data:
                            id: '66'
                            type: commercial_sales_documents
                        product:
                          data: null
                        service:
                          data: null
                        tax:
                          data:
                            id: '2'
                            type: taxes
                        tax_descriptor:
                          data: null
                        unit_of_measure:
                          data:
                            id: '2'
                            type: units_of_measure
                      type: commercial_sales_document_lines
                    meta:
                      observed:
                        lines: 1
                        scalar: 1
                Criar Linha de Documentos de Venda para um Serviço:
                  value:
                    data:
                      attributes:
                        amount: 10.13
                        amount_with_header_settlement: 10.95
                        base_currency_amount: null
                        base_currency_net_amount: null
                        base_currency_net_unit_price: null
                        base_currency_settlement_with_tax: null
                        base_currency_settlement_without_tax: null
                        base_currency_tax_amount: null
                        base_currency_unit_price: null
                        created_at: '2024-03-05 14:26:31.875183'
                        date: null
                        description: Serviço1
                        exemption_reason: null
                        imported_quantity: null
                        item_code: '54321'
                        item_id: 7
                        item_type: Service
                        item_unit_price_includes_vat: false
                        locked: null
                        net_amount: 8.96
                        net_amount_with_header_settlement: 9.69
                        net_settlement_amount: null
                        net_tax_amount: null
                        net_unit_price: 8.9635
                        original_document_no: null
                        pending_quantity: 1
                        pending_retention_value: null
                        pending_total: null
                        quantity: 1
                        retention_value: 0.67
                        settlement_amount: 0.3
                        settlement_expression: '3'
                        settlement_percentage: 3
                        settlement_with_tax: 0.34
                        settlement_without_tax: 0.3
                        tax_amount: 1.17
                        tax_code: INT
                        tax_country_region: PT
                        tax_descriptor_id: null
                        tax_percentage: 13
                        unit_price: 9.99
                        updated_at: '2024-03-05 14:26:31.875183'
                      id: '133'
                      relationships:
                        document:
                          data:
                            id: '66'
                            type: commercial_sales_documents
                        product:
                          data: null
                        service:
                          data: null
                        tax:
                          data:
                            id: '2'
                            type: taxes
                        tax_descriptor:
                          data: null
                        unit_of_measure:
                          data:
                            id: '2'
                            type: units_of_measure
                      type: commercial_sales_document_lines
                    meta:
                      observed:
                        lines: 1
                        scalar: 1
                Sucesso:
                  value:
                    data:
                      attributes:
                        amount: 10.13
                        amount_with_header_settlement: 10.95
                        base_currency_amount: null
                        base_currency_net_amount: null
                        base_currency_net_unit_price: null
                        base_currency_settlement_with_tax: null
                        base_currency_settlement_without_tax: null
                        base_currency_tax_amount: null
                        base_currency_unit_price: null
                        created_at: '2024-03-05 14:25:52.160841'
                        date: null
                        description: Isto é uma breve descrição
                        exemption_reason: null
                        imported_quantity: null
                        item_code: '1000'
                        item_id: 2
                        item_type: Product
                        item_unit_price_includes_vat: false
                        locked: null
                        net_amount: 8.96
                        net_amount_with_header_settlement: 9.69
                        net_settlement_amount: null
                        net_tax_amount: null
                        net_unit_price: 8.9635
                        original_document_no: null
                        pending_quantity: 1
                        pending_retention_value: null
                        pending_total: null
                        quantity: 1
                        retention_value: null
                        settlement_amount: 0.3
                        settlement_expression: '3'
                        settlement_percentage: 3
                        settlement_with_tax: 0.34
                        settlement_without_tax: 0.3
                        tax_amount: 1.17
                        tax_code: INT
                        tax_country_region: PT
                        tax_descriptor_id: null
                        tax_percentage: 13
                        unit_price: 9.99
                        updated_at: '2024-03-05 14:25:52.160841'
                      id: '132'
                      relationships:
                        document:
                          data:
                            id: '66'
                            type: commercial_sales_documents
                        product:
                          data: null
                        service:
                          data: null
                        tax:
                          data:
                            id: '2'
                            type: taxes
                        tax_descriptor:
                          data: null
                        unit_of_measure:
                          data:
                            id: '2'
                            type: units_of_measure
                      type: commercial_sales_document_lines
                    meta:
                      observed:
                        lines: 1
                        scalar: 1
    patch:
      tags:
        - Versões Anteriores
        - Vendas1
        - Documentos de Venda1
      summary: Atualizar Linha de Documentos de Venda
      description: Atualizar Linha de Documentos de Venda
      operationId: atualizarLinhaDeDocumentosDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        amount:
                          type: number
                          example: 0
                        amount_with_header_settlement:
                          type: number
                          example: 0
                        base_currency_amount:
                          nullable: true
                          example: null
                        base_currency_net_amount:
                          nullable: true
                          example: null
                        base_currency_net_unit_price:
                          nullable: true
                          example: null
                        base_currency_settlement_with_tax:
                          nullable: true
                          example: null
                        base_currency_settlement_without_tax:
                          nullable: true
                          example: null
                        base_currency_tax_amount:
                          nullable: true
                          example: null
                        base_currency_unit_price:
                          nullable: true
                          example: null
                        created_at:
                          type: string
                          example: '2024-03-05 14:25:28.275949'
                        date:
                          nullable: true
                          example: null
                        description:
                          type: string
                          example: Isto é uma NOVA breve descrição
                        exemption_reason:
                          nullable: true
                          example: null
                        imported_quantity:
                          nullable: true
                          example: null
                        item_code:
                          type: string
                          example: '1000'
                        item_id:
                          type: number
                          example: 2
                        item_type:
                          type: string
                          example: Product
                        item_unit_price_includes_vat:
                          type: boolean
                          example: false
                        locked:
                          nullable: true
                          example: null
                        net_amount:
                          type: number
                          example: 0
                        net_amount_with_header_settlement:
                          type: number
                          example: 0
                        net_settlement_amount:
                          nullable: true
                          example: null
                        net_tax_amount:
                          nullable: true
                          example: null
                        net_unit_price:
                          type: number
                          example: 2
                        original_document_no:
                          nullable: true
                          example: null
                        pending_quantity:
                          nullable: true
                          example: null
                        pending_retention_value:
                          nullable: true
                          example: null
                        pending_total:
                          nullable: true
                          example: null
                        quantity:
                          nullable: true
                          example: null
                        retention_value:
                          nullable: true
                          example: null
                        settlement_amount:
                          nullable: true
                          example: null
                        settlement_expression:
                          nullable: true
                          example: null
                        settlement_percentage:
                          type: number
                          example: 0
                        settlement_with_tax:
                          type: number
                          example: 0
                        settlement_without_tax:
                          type: number
                          example: 0
                        tax_amount:
                          type: number
                          example: 0
                        tax_code:
                          type: string
                          example: INT
                        tax_country_region:
                          type: string
                          example: PT
                        tax_descriptor_id:
                          nullable: true
                          example: null
                        tax_percentage:
                          type: number
                          example: 13
                        unit_price:
                          type: number
                          example: 2
                        updated_at:
                          type: string
                          example: '2024-03-05 14:25:28.275949'
                    id:
                      type: string
                      example: '131'
                    type:
                      type: string
                      example: commercial_sales_document_lines
            examples:
              Atualizar Linha de Documentos de Venda:
                value:
                  data:
                    attributes:
                      amount: 0
                      amount_with_header_settlement: 0
                      base_currency_amount: null
                      base_currency_net_amount: null
                      base_currency_net_unit_price: null
                      base_currency_settlement_with_tax: null
                      base_currency_settlement_without_tax: null
                      base_currency_tax_amount: null
                      base_currency_unit_price: null
                      created_at: '2024-03-05 14:25:28.275949'
                      date: null
                      description: Isto é uma NOVA breve descrição
                      exemption_reason: null
                      imported_quantity: null
                      item_code: '1000'
                      item_id: 2
                      item_type: Product
                      item_unit_price_includes_vat: false
                      locked: null
                      net_amount: 0
                      net_amount_with_header_settlement: 0
                      net_settlement_amount: null
                      net_tax_amount: null
                      net_unit_price: 2
                      original_document_no: null
                      pending_quantity: null
                      pending_retention_value: null
                      pending_total: null
                      quantity: null
                      retention_value: null
                      settlement_amount: null
                      settlement_expression: null
                      settlement_percentage: 0
                      settlement_with_tax: 0
                      settlement_without_tax: 0
                      tax_amount: 0
                      tax_code: INT
                      tax_country_region: PT
                      tax_descriptor_id: null
                      tax_percentage: 13
                      unit_price: 2
                      updated_at: '2024-03-05 14:25:28.275949'
                    id: '131'
                    type: commercial_sales_document_lines
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '1518'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 14:43:46 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          amount:
                            type: number
                            example: 2.09
                          amount_with_header_settlement:
                            type: number
                            example: 2.26
                          base_currency_amount:
                            nullable: true
                            example: null
                          base_currency_net_amount:
                            nullable: true
                            example: null
                          base_currency_net_unit_price:
                            nullable: true
                            example: null
                          base_currency_settlement_with_tax:
                            nullable: true
                            example: null
                          base_currency_settlement_without_tax:
                            nullable: true
                            example: null
                          base_currency_tax_amount:
                            nullable: true
                            example: null
                          base_currency_unit_price:
                            nullable: true
                            example: null
                          created_at:
                            type: string
                            example: '2024-03-05 14:25:28.275949'
                          date:
                            nullable: true
                            example: null
                          description:
                            type: string
                            example: Isto é uma NOVA breve descrição
                          exemption_reason:
                            nullable: true
                            example: null
                          imported_quantity:
                            nullable: true
                            example: null
                          item_code:
                            type: string
                            example: '1000'
                          item_id:
                            type: number
                            example: 2
                          item_type:
                            type: string
                            example: Product
                          item_unit_price_includes_vat:
                            type: boolean
                            example: false
                          locked:
                            nullable: true
                            example: null
                          net_amount:
                            type: number
                            example: 1.85
                          net_amount_with_header_settlement:
                            type: number
                            example: 2
                          net_settlement_amount:
                            nullable: true
                            example: null
                          net_tax_amount:
                            nullable: true
                            example: null
                          net_unit_price:
                            type: number
                            example: 1.85
                          original_document_no:
                            nullable: true
                            example: null
                          pending_quantity:
                            nullable: true
                            example: null
                          pending_retention_value:
                            nullable: true
                            example: null
                          pending_total:
                            nullable: true
                            example: null
                          quantity:
                            type: number
                            example: 1
                          retention_value:
                            nullable: true
                            example: null
                          settlement_amount:
                            nullable: true
                            example: null
                          settlement_expression:
                            nullable: true
                            example: null
                          settlement_percentage:
                            type: number
                            example: 0
                          settlement_with_tax:
                            type: number
                            example: 0
                          settlement_without_tax:
                            type: number
                            example: 0
                          tax_amount:
                            type: number
                            example: 0.24
                          tax_code:
                            type: string
                            example: INT
                          tax_country_region:
                            type: string
                            example: PT
                          tax_descriptor_id:
                            nullable: true
                            example: null
                          tax_percentage:
                            type: number
                            example: 13
                          unit_price:
                            type: number
                            example: 2
                          updated_at:
                            type: string
                            example: '2024-03-05 14:43:46.935053'
                      id:
                        type: string
                        example: '131'
                      relationships:
                        type: object
                        properties:
                          document:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '66'
                                  type:
                                    type: string
                                    example: commercial_sales_documents
                          product:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          service:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          tax:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: taxes
                          tax_descriptor:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          unit_of_measure:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '5'
                                  type:
                                    type: string
                                    example: units_of_measure
                      type:
                        type: string
                        example: commercial_sales_document_lines
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          lines:
                            type: number
                            example: 1
                          scalar:
                            type: number
                            example: 1
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        amount: 2.09
                        amount_with_header_settlement: 2.26
                        base_currency_amount: null
                        base_currency_net_amount: null
                        base_currency_net_unit_price: null
                        base_currency_settlement_with_tax: null
                        base_currency_settlement_without_tax: null
                        base_currency_tax_amount: null
                        base_currency_unit_price: null
                        created_at: '2024-03-05 14:25:28.275949'
                        date: null
                        description: Isto é uma NOVA breve descrição
                        exemption_reason: null
                        imported_quantity: null
                        item_code: '1000'
                        item_id: 2
                        item_type: Product
                        item_unit_price_includes_vat: false
                        locked: null
                        net_amount: 1.85
                        net_amount_with_header_settlement: 2
                        net_settlement_amount: null
                        net_tax_amount: null
                        net_unit_price: 1.85
                        original_document_no: null
                        pending_quantity: null
                        pending_retention_value: null
                        pending_total: null
                        quantity: 1
                        retention_value: null
                        settlement_amount: null
                        settlement_expression: null
                        settlement_percentage: 0
                        settlement_with_tax: 0
                        settlement_without_tax: 0
                        tax_amount: 0.24
                        tax_code: INT
                        tax_country_region: PT
                        tax_descriptor_id: null
                        tax_percentage: 13
                        unit_price: 2
                        updated_at: '2024-03-05 14:43:46.935053'
                      id: '131'
                      relationships:
                        document:
                          data:
                            id: '66'
                            type: commercial_sales_documents
                        product:
                          data: null
                        service:
                          data: null
                        tax:
                          data:
                            id: '2'
                            type: taxes
                        tax_descriptor:
                          data: null
                        unit_of_measure:
                          data:
                            id: '5'
                            type: units_of_measure
                      type: commercial_sales_document_lines
                    meta:
                      observed:
                        lines: 1
                        scalar: 1
  /api/commercial_sales_documents/{salesDocumentId}:
    get:
      tags:
        - Versões Anteriores
        - Vendas1
        - Documentos de Venda1
      summary: Obter Documentos de Venda por Id
      description: Obter Documentos de Venda por Id
      operationId: obterDocumentosDeVendaPorId
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '5173'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 14:28:42 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          acts_as_shipment_document:
                            type: boolean
                            example: false
                          apply_retention_when_paid:
                            type: boolean
                            example: true
                          base_currency_conversion_difference:
                            nullable: true
                            example: null
                          base_currency_gross_total:
                            nullable: true
                            example: null
                          base_currency_net_total:
                            nullable: true
                            example: null
                          base_currency_other_retentions:
                            nullable: true
                            example: null
                          base_currency_other_taxes_total:
                            nullable: true
                            example: null
                          base_currency_pending_total:
                            nullable: true
                            example: null
                          base_currency_retention_aware_gross_total:
                            nullable: true
                            example: null
                          base_currency_retention_total:
                            nullable: true
                            example: null
                          base_currency_settlement_total:
                            nullable: true
                            example: null
                          base_currency_tax_payable:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_int:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_ise:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_nor:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_red:
                            nullable: true
                            example: null
                          base_currency_vat_total_int:
                            nullable: true
                            example: null
                          base_currency_vat_total_nor:
                            nullable: true
                            example: null
                          base_currency_vat_total_red:
                            nullable: true
                            example: null
                          cashed_vat:
                            type: boolean
                            example: false
                          child_documents_ids:
                            nullable: true
                            example: null
                          communication_code:
                            nullable: true
                            example: null
                          communication_code_source:
                            type: string
                            example: webservice
                          communication_status:
                            type: string
                            example: unsent
                          created_at:
                            type: string
                            example: '2024-03-05 14:24:53.318028'
                          currency_amount:
                            nullable: true
                            example: null
                          currency_conversion_rate:
                            type: number
                            example: 1
                          currency_iso_code:
                            type: string
                            example: EUR
                          customer_address_detail:
                            type: string
                            example: ''
                          customer_business_name:
                            type: string
                            example: Gabriel
                          customer_city:
                            type: string
                            example: ''
                          customer_country:
                            type: string
                            example: PT
                          customer_postcode:
                            type: string
                            example: ''
                          customer_tax_country_region:
                            type: string
                            example: PT
                          customer_tax_registration_number:
                            type: string
                            example: '123456789'
                          date:
                            type: string
                            example: '2023-01-01'
                          description:
                            nullable: true
                            example: null
                          document_area:
                            type: string
                            example: FT
                          document_hash_sum:
                            nullable: true
                            example: null
                          document_no:
                            nullable: true
                            example: null
                          document_series_no:
                            nullable: true
                            example: null
                          document_series_prefix:
                            type: string
                            example: '2023'
                          document_type:
                            type: string
                            example: FT
                          due_date:
                            type: string
                            example: '2023-02-01'
                          due_days:
                            nullable: true
                            example: null
                          email_readed:
                            type: boolean
                            example: false
                          emailed:
                            nullable: true
                            example: null
                          end_date:
                            nullable: true
                            example: null
                          expected_shipment_unloading_time:
                            nullable: true
                            example: null
                          expired:
                            nullable: true
                            example: null
                          external_reference:
                            type: string
                            example: Referência do documento externo
                          fulfilled_mask:
                            type: number
                            example: 0
                          gross_total:
                            type: number
                            example: 30.39
                          hash_control:
                            nullable: true
                            example: null
                          invoice_counter:
                            nullable: true
                            example: null
                          is_active:
                            nullable: true
                            example: null
                          is_document_to_self:
                            type: boolean
                            example: false
                          is_invoice_receipt:
                            nullable: true
                            example: null
                          is_receipt:
                            nullable: true
                            example: null
                          is_third_party:
                            type: boolean
                            example: false
                          issue_finalized:
                            nullable: true
                            example: null
                          line_settlement_with_tax:
                            type: number
                            example: 1.02
                          line_settlement_with_tax_unrounded:
                            type: number
                            example: 1.015983
                          line_settlement_without_tax:
                            type: number
                            example: 0.9
                          line_settlement_without_tax_unrounded:
                            type: number
                            example: 0.8991
                          made_available_to:
                            type: boolean
                            example: true
                          manual_registration_number:
                            type: string
                            example: ''
                          manual_registration_series:
                            type: string
                            example: ''
                          manual_registration_type:
                            nullable: true
                            example: null
                          net_settlement_total:
                            nullable: true
                            example: null
                          net_total:
                            type: number
                            example: 26.89
                          notes:
                            type: string
                            example: Notas ao documento
                          operation_country:
                            type: string
                            example: PT-MA
                          other_retentions:
                            type: number
                            example: 0
                          other_taxes_total:
                            type: number
                            example: 0
                          parent_document_area:
                            nullable: true
                            example: null
                          parent_document_reference:
                            type: string
                            example: ''
                          parent_document_type:
                            nullable: true
                            example: null
                          parent_documents_ids:
                            nullable: true
                            example: null
                          payment_mechanism:
                            type: string
                            example: MO
                          pending_retention_value:
                            type: number
                            example: 0.67
                          pending_total:
                            type: number
                            example: 30.39
                          periodicity:
                            nullable: true
                            example: null
                          periodicity_type:
                            nullable: true
                            example: null
                          printed:
                            nullable: true
                            example: null
                          public_link:
                            type: string
                            example: ''
                          receipts_ids:
                            nullable: true
                            example: null
                          reference:
                            nullable: true
                            example: null
                          reference_document_type:
                            nullable: true
                            example: null
                          required_mask:
                            type: number
                            example: 0
                          retention:
                            type: number
                            example: 7.5
                          retention_aware_gross_total:
                            type: number
                            example: 29.72
                          retention_type:
                            type: string
                            example: IRS
                          retention_value:
                            type: number
                            example: 0.67
                          retention_value_unrounded:
                            type: number
                            example: 0.6722645625
                          scheduled_description:
                            nullable: true
                            example: null
                          scheduled_end_date:
                            nullable: true
                            example: null
                          scheduled_interval:
                            nullable: true
                            example: null
                          scheduled_invoice_id:
                            nullable: true
                            example: null
                          scheduled_start_date:
                            nullable: true
                            example: null
                          send_email:
                            nullable: true
                            example: null
                          settlement:
                            nullable: true
                            example: null
                          settlement_expression:
                            type: string
                            example: '7.5'
                          settlement_percentage:
                            type: number
                            example: 7.5
                          settlement_total:
                            type: number
                            example: 3.08
                          settlement_with_tax:
                            type: number
                            example: 2.46
                          settlement_with_tax_unrounded:
                            type: number
                            example: 2.463758775
                          settlement_without_tax:
                            type: number
                            example: 2.18
                          settlement_without_tax_unrounded:
                            type: number
                            example: 2.1803175
                          shipment_address_detail:
                            nullable: true
                            example: null
                          shipment_city:
                            nullable: true
                            example: null
                          shipment_country:
                            nullable: true
                            example: null
                          shipment_from_address_detail:
                            nullable: true
                            example: null
                          shipment_from_city:
                            nullable: true
                            example: null
                          shipment_from_country:
                            nullable: true
                            example: null
                          shipment_from_postcode:
                            nullable: true
                            example: null
                          shipment_loading_time:
                            nullable: true
                            example: null
                          shipment_postcode:
                            nullable: true
                            example: null
                          sort_status:
                            type: number
                            example: 0
                          start_date:
                            nullable: true
                            example: null
                          status:
                            type: number
                            example: 0
                          system_entry_date:
                            nullable: true
                            example: null
                          tax_payable:
                            type: number
                            example: 3.5
                          third_party_type:
                            type: number
                            example: 0
                          total_pending_quantity:
                            nullable: true
                            example: null
                          updated_at:
                            type: string
                            example: '2024-03-05 14:26:41.652972'
                          vat_incidence_int:
                            type: number
                            example: 26.89
                          vat_incidence_int_unrounded:
                            type: number
                            example: 26.8905825
                          vat_incidence_ise:
                            type: number
                            example: 0
                          vat_incidence_ise_unrounded:
                            type: number
                            example: 0
                          vat_incidence_nor:
                            type: number
                            example: 0
                          vat_incidence_nor_unrounded:
                            type: number
                            example: 0
                          vat_incidence_red:
                            type: number
                            example: 0
                          vat_incidence_red_unrounded:
                            type: number
                            example: 0
                          vat_included_prices:
                            type: boolean
                            example: false
                          vat_percentage_int:
                            type: number
                            example: 13
                          vat_percentage_nor:
                            nullable: true
                            example: null
                          vat_percentage_red:
                            nullable: true
                            example: null
                          vat_total_int:
                            type: number
                            example: 3.5
                          vat_total_int_unrounded:
                            type: number
                            example: 3.495775725
                          vat_total_nor:
                            type: number
                            example: 0
                          vat_total_nor_unrounded:
                            type: number
                            example: 0
                          vat_total_red:
                            type: number
                            example: 0
                          vat_total_red_unrounded:
                            type: number
                            example: 0
                          vehicle_registration:
                            nullable: true
                            example: null
                          voided_reason:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '66'
                      relationships:
                        type: object
                        properties:
                          bank_accounts:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          cash_accounts:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          commercial_document_series:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '72'
                                  type:
                                    type: string
                                    example: commercial_document_series
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          currency:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '1'
                                  type:
                                    type: string
                                    example: currencies
                          customer:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: customers
                          lines:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '131'
                                    type:
                                      type: string
                                      example: commercial_sales_document_lines
                                example:
                                  - id: '131'
                                    type: commercial_sales_document_lines
                                  - id: '132'
                                    type: commercial_sales_document_lines
                                  - id: '133'
                                    type: commercial_sales_document_lines
                                  - id: '134'
                                    type: commercial_sales_document_lines
                                  - id: '136'
                                    type: commercial_sales_document_lines
                          tax_exemption_reasons:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          user:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000863'
                                  type:
                                    type: string
                                    example: current_company_users
                      type:
                        type: string
                        example: commercial_sales_documents
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        acts_as_shipment_document: false
                        apply_retention_when_paid: true
                        base_currency_conversion_difference: null
                        base_currency_gross_total: null
                        base_currency_net_total: null
                        base_currency_other_retentions: null
                        base_currency_other_taxes_total: null
                        base_currency_pending_total: null
                        base_currency_retention_aware_gross_total: null
                        base_currency_retention_total: null
                        base_currency_settlement_total: null
                        base_currency_tax_payable: null
                        base_currency_vat_incidence_int: null
                        base_currency_vat_incidence_ise: null
                        base_currency_vat_incidence_nor: null
                        base_currency_vat_incidence_red: null
                        base_currency_vat_total_int: null
                        base_currency_vat_total_nor: null
                        base_currency_vat_total_red: null
                        cashed_vat: false
                        child_documents_ids: null
                        communication_code: null
                        communication_code_source: webservice
                        communication_status: unsent
                        created_at: '2024-03-05 14:24:53.318028'
                        currency_amount: null
                        currency_conversion_rate: 1
                        currency_iso_code: EUR
                        customer_address_detail: ''
                        customer_business_name: Gabriel
                        customer_city: ''
                        customer_country: PT
                        customer_postcode: ''
                        customer_tax_country_region: PT
                        customer_tax_registration_number: '123456789'
                        date: '2023-01-01'
                        description: null
                        document_area: FT
                        document_hash_sum: null
                        document_no: null
                        document_series_no: null
                        document_series_prefix: '2023'
                        document_type: FT
                        due_date: '2023-02-01'
                        due_days: null
                        email_readed: false
                        emailed: null
                        end_date: null
                        expected_shipment_unloading_time: null
                        expired: null
                        external_reference: Referência do documento externo
                        fulfilled_mask: 0
                        gross_total: 30.39
                        hash_control: null
                        invoice_counter: null
                        is_active: null
                        is_document_to_self: false
                        is_invoice_receipt: null
                        is_receipt: null
                        is_third_party: false
                        issue_finalized: null
                        line_settlement_with_tax: 1.02
                        line_settlement_with_tax_unrounded: 1.015983
                        line_settlement_without_tax: 0.9
                        line_settlement_without_tax_unrounded: 0.8991
                        made_available_to: true
                        manual_registration_number: ''
                        manual_registration_series: ''
                        manual_registration_type: null
                        net_settlement_total: null
                        net_total: 26.89
                        notes: Notas ao documento
                        operation_country: PT-MA
                        other_retentions: 0
                        other_taxes_total: 0
                        parent_document_area: null
                        parent_document_reference: ''
                        parent_document_type: null
                        parent_documents_ids: null
                        payment_mechanism: MO
                        pending_retention_value: 0.67
                        pending_total: 30.39
                        periodicity: null
                        periodicity_type: null
                        printed: null
                        public_link: ''
                        receipts_ids: null
                        reference: null
                        reference_document_type: null
                        required_mask: 0
                        retention: 7.5
                        retention_aware_gross_total: 29.72
                        retention_type: IRS
                        retention_value: 0.67
                        retention_value_unrounded: 0.6722645625
                        scheduled_description: null
                        scheduled_end_date: null
                        scheduled_interval: null
                        scheduled_invoice_id: null
                        scheduled_start_date: null
                        send_email: null
                        settlement: null
                        settlement_expression: '7.5'
                        settlement_percentage: 7.5
                        settlement_total: 3.08
                        settlement_with_tax: 2.46
                        settlement_with_tax_unrounded: 2.463758775
                        settlement_without_tax: 2.18
                        settlement_without_tax_unrounded: 2.1803175
                        shipment_address_detail: null
                        shipment_city: null
                        shipment_country: null
                        shipment_from_address_detail: null
                        shipment_from_city: null
                        shipment_from_country: null
                        shipment_from_postcode: null
                        shipment_loading_time: null
                        shipment_postcode: null
                        sort_status: 0
                        start_date: null
                        status: 0
                        system_entry_date: null
                        tax_payable: 3.5
                        third_party_type: 0
                        total_pending_quantity: null
                        updated_at: '2024-03-05 14:26:41.652972'
                        vat_incidence_int: 26.89
                        vat_incidence_int_unrounded: 26.8905825
                        vat_incidence_ise: 0
                        vat_incidence_ise_unrounded: 0
                        vat_incidence_nor: 0
                        vat_incidence_nor_unrounded: 0
                        vat_incidence_red: 0
                        vat_incidence_red_unrounded: 0
                        vat_included_prices: false
                        vat_percentage_int: 13
                        vat_percentage_nor: null
                        vat_percentage_red: null
                        vat_total_int: 3.5
                        vat_total_int_unrounded: 3.495775725
                        vat_total_nor: 0
                        vat_total_nor_unrounded: 0
                        vat_total_red: 0
                        vat_total_red_unrounded: 0
                        vehicle_registration: null
                        voided_reason: null
                      id: '66'
                      relationships:
                        bank_accounts:
                          data: null
                        cash_accounts:
                          data: null
                        commercial_document_series:
                          data:
                            id: '72'
                            type: commercial_document_series
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        currency:
                          data:
                            id: '1'
                            type: currencies
                        customer:
                          data:
                            id: '2'
                            type: customers
                        lines:
                          data:
                            - id: '131'
                              type: commercial_sales_document_lines
                            - id: '132'
                              type: commercial_sales_document_lines
                            - id: '133'
                              type: commercial_sales_document_lines
                            - id: '134'
                              type: commercial_sales_document_lines
                            - id: '136'
                              type: commercial_sales_document_lines
                        tax_exemption_reasons:
                          data: null
                        user:
                          data:
                            id: '800000863'
                            type: current_company_users
                      type: commercial_sales_documents
        '404':
          description: Id inválido
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '151'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 14:27:40 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA015
                        detail:
                          type: string
                          example: >-
                            Erro de sistema JA015: recurso não existente. Por
                            favor contacte o suporte técnico.
                        status:
                          type: string
                          example: 404 Not Found
                    example:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
              examples:
                Id inválido:
                  value:
                    errors:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
    parameters:
      - name: salesDocumentId
        in: path
        required: true
        schema:
          type: string
          example: '66'
        description: Id do documento de venda
  /api/commercial_sales_documents/{id}/lines:
    get:
      tags:
        - Versões Anteriores
        - Vendas1
        - Documentos de Venda1
      summary: Obter Todas as Linhas de Documentos de Venda
      description: Obter Todas as Linhas de Documentos de Venda
      operationId: obterTodasAsLinhasDeDocumentosDeVenda
      responses:
        '200':
          description: Obter Todas as Linhas do Documentos de Venda
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '7328'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 14:33:01 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        attributes:
                          type: object
                          properties:
                            amount:
                              type: number
                              nullable: true
                              example: 0
                            amount_with_header_settlement:
                              type: number
                              nullable: true
                              example: 0
                            base_currency_amount:
                              nullable: true
                              example: null
                            base_currency_net_amount:
                              nullable: true
                              example: null
                            base_currency_net_unit_price:
                              nullable: true
                              example: null
                            base_currency_settlement_with_tax:
                              nullable: true
                              example: null
                            base_currency_settlement_without_tax:
                              nullable: true
                              example: null
                            base_currency_tax_amount:
                              nullable: true
                              example: null
                            base_currency_unit_price:
                              nullable: true
                              example: null
                            created_at:
                              type: string
                              example: '2024-03-05 14:25:28.275949'
                            date:
                              nullable: true
                              example: null
                            description:
                              type: string
                              example: Isto é uma breve descrição
                            exemption_reason:
                              nullable: true
                              example: null
                            imported_quantity:
                              nullable: true
                              example: null
                            item_code:
                              type: string
                              example: '1000'
                            item_id:
                              type: number
                              nullable: true
                              example: 2
                            item_type:
                              type: string
                              example: Product
                            item_unit_price_includes_vat:
                              type: boolean
                              example: false
                            locked:
                              nullable: true
                              example: null
                            net_amount:
                              type: number
                              nullable: true
                              example: 0
                            net_amount_with_header_settlement:
                              type: number
                              nullable: true
                              example: 0
                            net_settlement_amount:
                              nullable: true
                              example: null
                            net_tax_amount:
                              nullable: true
                              example: null
                            net_unit_price:
                              type: number
                              nullable: true
                              example: 2
                            original_document_no:
                              nullable: true
                              example: null
                            pending_quantity:
                              type: number
                              nullable: true
                              example: null
                            pending_retention_value:
                              nullable: true
                              example: null
                            pending_total:
                              nullable: true
                              example: null
                            quantity:
                              type: number
                              nullable: true
                              example: null
                            retention_value:
                              type: number
                              nullable: true
                              example: null
                            settlement_amount:
                              type: number
                              nullable: true
                              example: null
                            settlement_expression:
                              type: string
                              nullable: true
                              example: null
                            settlement_percentage:
                              type: number
                              example: 0
                            settlement_with_tax:
                              type: number
                              nullable: true
                              example: 0
                            settlement_without_tax:
                              type: number
                              nullable: true
                              example: 0
                            tax_amount:
                              type: number
                              nullable: true
                              example: 0
                            tax_code:
                              type: string
                              nullable: true
                              example: INT
                            tax_country_region:
                              type: string
                              example: PT
                            tax_descriptor_id:
                              type: number
                              nullable: true
                              example: null
                            tax_percentage:
                              type: number
                              nullable: true
                              example: 13
                            unit_price:
                              type: number
                              nullable: true
                              example: 2
                            updated_at:
                              type: string
                              example: '2024-03-05 14:25:28.275949'
                        id:
                          type: string
                          example: '131'
                        relationships:
                          type: object
                          properties:
                            document:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '66'
                                    type:
                                      type: string
                                      example: commercial_sales_documents
                            product:
                              type: object
                              properties:
                                data:
                                  nullable: true
                                  example: null
                            service:
                              type: object
                              properties:
                                data:
                                  nullable: true
                                  example: null
                            tax:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '2'
                                    type:
                                      type: string
                                      example: taxes
                                  nullable: true
                            tax_descriptor:
                              type: object
                              properties:
                                data:
                                  nullable: true
                                  example: null
                            unit_of_measure:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '5'
                                    type:
                                      type: string
                                      example: units_of_measure
                                  nullable: true
                        type:
                          type: string
                          example: commercial_sales_document_lines
                    example:
                      - attributes:
                          amount: 0
                          amount_with_header_settlement: 0
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:25:28.275949'
                          date: null
                          description: Isto é uma breve descrição
                          exemption_reason: null
                          imported_quantity: null
                          item_code: '1000'
                          item_id: 2
                          item_type: Product
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: 0
                          net_amount_with_header_settlement: 0
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: 2
                          original_document_no: null
                          pending_quantity: null
                          pending_retention_value: null
                          pending_total: null
                          quantity: null
                          retention_value: null
                          settlement_amount: null
                          settlement_expression: null
                          settlement_percentage: 0
                          settlement_with_tax: 0
                          settlement_without_tax: 0
                          tax_amount: 0
                          tax_code: INT
                          tax_country_region: PT
                          tax_descriptor_id: null
                          tax_percentage: 13
                          unit_price: 2
                          updated_at: '2024-03-05 14:25:28.275949'
                        id: '131'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data:
                              id: '2'
                              type: taxes
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data:
                              id: '5'
                              type: units_of_measure
                        type: commercial_sales_document_lines
                      - attributes:
                          amount: 10.13
                          amount_with_header_settlement: 10.95
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:25:52.160841'
                          date: null
                          description: Isto é uma breve descrição
                          exemption_reason: null
                          imported_quantity: null
                          item_code: '1000'
                          item_id: 2
                          item_type: Product
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: 8.96
                          net_amount_with_header_settlement: 9.69
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: 8.9635
                          original_document_no: null
                          pending_quantity: 1
                          pending_retention_value: null
                          pending_total: null
                          quantity: 1
                          retention_value: null
                          settlement_amount: 0.3
                          settlement_expression: '3'
                          settlement_percentage: 3
                          settlement_with_tax: 0.34
                          settlement_without_tax: 0.3
                          tax_amount: 1.17
                          tax_code: INT
                          tax_country_region: PT
                          tax_descriptor_id: null
                          tax_percentage: 13
                          unit_price: 9.99
                          updated_at: '2024-03-05 14:25:52.160841'
                        id: '132'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data:
                              id: '2'
                              type: taxes
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data:
                              id: '2'
                              type: units_of_measure
                        type: commercial_sales_document_lines
                      - attributes:
                          amount: 10.13
                          amount_with_header_settlement: 10.95
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:26:31.875183'
                          date: null
                          description: Serviço1
                          exemption_reason: null
                          imported_quantity: null
                          item_code: '54321'
                          item_id: 7
                          item_type: Service
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: 8.96
                          net_amount_with_header_settlement: 9.69
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: 8.9635
                          original_document_no: null
                          pending_quantity: 1
                          pending_retention_value: null
                          pending_total: null
                          quantity: 1
                          retention_value: 0.67
                          settlement_amount: 0.3
                          settlement_expression: '3'
                          settlement_percentage: 3
                          settlement_with_tax: 0.34
                          settlement_without_tax: 0.3
                          tax_amount: 1.17
                          tax_code: INT
                          tax_country_region: PT
                          tax_descriptor_id: null
                          tax_percentage: 13
                          unit_price: 9.99
                          updated_at: '2024-03-05 14:26:31.875183'
                        id: '133'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data:
                              id: '2'
                              type: taxes
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data:
                              id: '2'
                              type: units_of_measure
                        type: commercial_sales_document_lines
                      - attributes:
                          amount: 10.13
                          amount_with_header_settlement: 10.95
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:26:41.652972'
                          date: null
                          description: Descrição da linha para Descritor
                          exemption_reason: null
                          imported_quantity: null
                          item_code: '>JU'
                          item_id: null
                          item_type: TaxDescriptor
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: 8.96
                          net_amount_with_header_settlement: 9.69
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: 8.9635
                          original_document_no: null
                          pending_quantity: 1
                          pending_retention_value: null
                          pending_total: null
                          quantity: 1
                          retention_value: null
                          settlement_amount: 0.3
                          settlement_expression: '3'
                          settlement_percentage: 3
                          settlement_with_tax: 0.34
                          settlement_without_tax: 0.3
                          tax_amount: 1.17
                          tax_code: INT
                          tax_country_region: PT
                          tax_descriptor_id: 2
                          tax_percentage: 13
                          unit_price: 9.99
                          updated_at: '2024-03-05 14:26:41.652972'
                        id: '134'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data:
                              id: '2'
                              type: taxes
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data:
                              id: '2'
                              type: units_of_measure
                        type: commercial_sales_document_lines
                      - attributes:
                          amount: null
                          amount_with_header_settlement: null
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:27:22.265972'
                          date: null
                          description: Descrição da linha
                          exemption_reason: null
                          imported_quantity: null
                          item_code: ''
                          item_id: null
                          item_type: ''
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: null
                          net_amount_with_header_settlement: null
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: null
                          original_document_no: null
                          pending_quantity: null
                          pending_retention_value: null
                          pending_total: null
                          quantity: null
                          retention_value: null
                          settlement_amount: null
                          settlement_expression: null
                          settlement_percentage: 0
                          settlement_with_tax: null
                          settlement_without_tax: null
                          tax_amount: null
                          tax_code: null
                          tax_country_region: PT-MA
                          tax_descriptor_id: null
                          tax_percentage: null
                          unit_price: null
                          updated_at: '2024-03-05 14:27:22.265972'
                        id: '136'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data: null
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data: null
                        type: commercial_sales_document_lines
              examples:
                Obter Todas as Linhas do Documentos de Venda:
                  value:
                    data:
                      - attributes:
                          amount: 0
                          amount_with_header_settlement: 0
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:25:28.275949'
                          date: null
                          description: Isto é uma breve descrição
                          exemption_reason: null
                          imported_quantity: null
                          item_code: '1000'
                          item_id: 2
                          item_type: Product
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: 0
                          net_amount_with_header_settlement: 0
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: 2
                          original_document_no: null
                          pending_quantity: null
                          pending_retention_value: null
                          pending_total: null
                          quantity: null
                          retention_value: null
                          settlement_amount: null
                          settlement_expression: null
                          settlement_percentage: 0
                          settlement_with_tax: 0
                          settlement_without_tax: 0
                          tax_amount: 0
                          tax_code: INT
                          tax_country_region: PT
                          tax_descriptor_id: null
                          tax_percentage: 13
                          unit_price: 2
                          updated_at: '2024-03-05 14:25:28.275949'
                        id: '131'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data:
                              id: '2'
                              type: taxes
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data:
                              id: '5'
                              type: units_of_measure
                        type: commercial_sales_document_lines
                      - attributes:
                          amount: 10.13
                          amount_with_header_settlement: 10.95
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:25:52.160841'
                          date: null
                          description: Isto é uma breve descrição
                          exemption_reason: null
                          imported_quantity: null
                          item_code: '1000'
                          item_id: 2
                          item_type: Product
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: 8.96
                          net_amount_with_header_settlement: 9.69
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: 8.9635
                          original_document_no: null
                          pending_quantity: 1
                          pending_retention_value: null
                          pending_total: null
                          quantity: 1
                          retention_value: null
                          settlement_amount: 0.3
                          settlement_expression: '3'
                          settlement_percentage: 3
                          settlement_with_tax: 0.34
                          settlement_without_tax: 0.3
                          tax_amount: 1.17
                          tax_code: INT
                          tax_country_region: PT
                          tax_descriptor_id: null
                          tax_percentage: 13
                          unit_price: 9.99
                          updated_at: '2024-03-05 14:25:52.160841'
                        id: '132'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data:
                              id: '2'
                              type: taxes
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data:
                              id: '2'
                              type: units_of_measure
                        type: commercial_sales_document_lines
                      - attributes:
                          amount: 10.13
                          amount_with_header_settlement: 10.95
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:26:31.875183'
                          date: null
                          description: Serviço1
                          exemption_reason: null
                          imported_quantity: null
                          item_code: '54321'
                          item_id: 7
                          item_type: Service
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: 8.96
                          net_amount_with_header_settlement: 9.69
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: 8.9635
                          original_document_no: null
                          pending_quantity: 1
                          pending_retention_value: null
                          pending_total: null
                          quantity: 1
                          retention_value: 0.67
                          settlement_amount: 0.3
                          settlement_expression: '3'
                          settlement_percentage: 3
                          settlement_with_tax: 0.34
                          settlement_without_tax: 0.3
                          tax_amount: 1.17
                          tax_code: INT
                          tax_country_region: PT
                          tax_descriptor_id: null
                          tax_percentage: 13
                          unit_price: 9.99
                          updated_at: '2024-03-05 14:26:31.875183'
                        id: '133'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data:
                              id: '2'
                              type: taxes
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data:
                              id: '2'
                              type: units_of_measure
                        type: commercial_sales_document_lines
                      - attributes:
                          amount: 10.13
                          amount_with_header_settlement: 10.95
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:26:41.652972'
                          date: null
                          description: Descrição da linha para Descritor
                          exemption_reason: null
                          imported_quantity: null
                          item_code: '>JU'
                          item_id: null
                          item_type: TaxDescriptor
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: 8.96
                          net_amount_with_header_settlement: 9.69
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: 8.9635
                          original_document_no: null
                          pending_quantity: 1
                          pending_retention_value: null
                          pending_total: null
                          quantity: 1
                          retention_value: null
                          settlement_amount: 0.3
                          settlement_expression: '3'
                          settlement_percentage: 3
                          settlement_with_tax: 0.34
                          settlement_without_tax: 0.3
                          tax_amount: 1.17
                          tax_code: INT
                          tax_country_region: PT
                          tax_descriptor_id: 2
                          tax_percentage: 13
                          unit_price: 9.99
                          updated_at: '2024-03-05 14:26:41.652972'
                        id: '134'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data:
                              id: '2'
                              type: taxes
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data:
                              id: '2'
                              type: units_of_measure
                        type: commercial_sales_document_lines
                      - attributes:
                          amount: null
                          amount_with_header_settlement: null
                          base_currency_amount: null
                          base_currency_net_amount: null
                          base_currency_net_unit_price: null
                          base_currency_settlement_with_tax: null
                          base_currency_settlement_without_tax: null
                          base_currency_tax_amount: null
                          base_currency_unit_price: null
                          created_at: '2024-03-05 14:27:22.265972'
                          date: null
                          description: Descrição da linha
                          exemption_reason: null
                          imported_quantity: null
                          item_code: ''
                          item_id: null
                          item_type: ''
                          item_unit_price_includes_vat: false
                          locked: null
                          net_amount: null
                          net_amount_with_header_settlement: null
                          net_settlement_amount: null
                          net_tax_amount: null
                          net_unit_price: null
                          original_document_no: null
                          pending_quantity: null
                          pending_retention_value: null
                          pending_total: null
                          quantity: null
                          retention_value: null
                          settlement_amount: null
                          settlement_expression: null
                          settlement_percentage: 0
                          settlement_with_tax: null
                          settlement_without_tax: null
                          tax_amount: null
                          tax_code: null
                          tax_country_region: PT-MA
                          tax_descriptor_id: null
                          tax_percentage: null
                          unit_price: null
                          updated_at: '2024-03-05 14:27:22.265972'
                        id: '136'
                        relationships:
                          document:
                            data:
                              id: '66'
                              type: commercial_sales_documents
                          product:
                            data: null
                          service:
                            data: null
                          tax:
                            data: null
                          tax_descriptor:
                            data: null
                          unit_of_measure:
                            data: null
                        type: commercial_sales_document_lines
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '66'
  /api/commercial_sales_documents/{id}:
    delete:
      tags:
        - Versões Anteriores
        - Vendas1
        - Documentos de Venda1
      summary: Remover Documentos de Venda
      description: Remover Documentos de Venda
      operationId: removerDocumentosDeVenda
      responses:
        '200':
          description: Remover Documentos de Venda
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '34'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 15:03:33 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          scalar:
                            type: number
                            example: 1
              examples:
                Remover Documentos de Venda:
                  value:
                    meta:
                      observed:
                        scalar: 1
        '403':
          description: Id de Documento Finalizado
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '119'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 15:02:46 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA002
                        detail:
                          type: string
                          example: Não é possível eliminar documentos já finalizados
                        status:
                          type: string
                          example: 403 Forbidden
                    example:
                      - code: JA002
                        detail: Não é possível eliminar documentos já finalizados
                        status: 403 Forbidden
              examples:
                Id de Documento Finalizado:
                  value:
                    errors:
                      - code: JA002
                        detail: Não é possível eliminar documentos já finalizados
                        status: 403 Forbidden
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '66'
  /api/commercial_sales_document_lines/{salesDocumentLineId}:
    delete:
      tags:
        - Versões Anteriores
        - Vendas1
        - Documentos de Venda1
      summary: Remover Linhas de Documentos de Venda
      description: Remover Linhas de Documentos de Venda
      operationId: removerLinhasDeDocumentosDeVenda
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '44'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 15:02:12 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          lines:
                            type: number
                            example: 5
                          scalar:
                            type: number
                            example: 1
              examples:
                Sucesso:
                  value:
                    meta:
                      observed:
                        lines: 5
                        scalar: 1
        '404':
          description: Not Found
          headers:
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '151'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 14:59:01 GMT
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: JA015
                        detail:
                          type: string
                          example: >-
                            Erro de sistema JA015: recurso não existente. Por
                            favor contacte o suporte técnico.
                        status:
                          type: string
                          example: 404 Not Found
                    example:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
              examples:
                Not Found:
                  value:
                    errors:
                      - code: JA015
                        detail: >-
                          Erro de sistema JA015: recurso não existente. Por
                          favor contacte o suporte técnico.
                        status: 404 Not Found
    parameters:
      - name: salesDocumentLineId
        in: path
        required: true
        schema:
          type: string
          example: '131'
        description: Id da Linha do Documento de Venda
  /api/commercial_sales_receipts:
    get:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Obter Todos os Recibos de Venda
      description: Obter Todos os Recibos de Venda
      operationId: obterTodosOsRecibosDeVenda1
      parameters:
        - name: filter[document_no]
          in: query
          schema:
            type: string
            example: RC 2023/1
          description: '@@@@@@@@@'
      responses:
        '200':
          description: ''
    post:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Criar Cabeçalho de Recibo de Venda
      description: Criar Cabeçalho de Recibo de Venda
      operationId: criarCabeAlhoDeReciboDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        date:
                          type: string
                          example: '2025-06-01'
                        document_series_id:
                          type: number
                          example: 66
                        gross_total:
                          type: number
                          example: 10
                        net_total:
                          type: number
                          example: 20
                        payment_mechanism:
                          type: string
                          example: MO
                    type:
                      type: string
                      example: commercial_sales_receipts
            examples:
              Criar Cabeçalho de Recibo de Venda:
                value:
                  data:
                    attributes:
                      date: '2025-06-01'
                      document_series_id: 66
                      gross_total: 10
                      net_total: 20
                      payment_mechanism: MO
                    type: commercial_sales_receipts
      responses:
        '200':
          description: ''
    patch:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Atualizar Recibos de Venda
      description: Atualizar Recibos de Venda
      operationId: atualizarRecibosDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        deleted:
                          type: boolean
                          example: true
                    id:
                      type: string
                      example: '3'
                    type:
                      type: string
                      example: commercial_sales_receipts
            examples:
              Anulação de Recibo de Venda:
                value:
                  data:
                    attributes:
                      deleted: true
                    id: '3'
                    type: commercial_sales_receipts
      responses:
        '200':
          description: ''
  /api/commercial_sales_receipt_lines/{id}:
    get:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Obter Recibo de Venda por ID Copy
      description: Obter Recibo de Venda por ID Copy
      operationId: obterReciboDeVendaPorIdCopy
      responses:
        '200':
          description: ''
    post:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Criar Linhas de Recibos de Venda
      description: Criar Linhas de Recibos de Venda
      operationId: criarLinhasDeRecibosDeVenda
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        receipt_id:
                          type: number
                          example: 9
                        receivable_id:
                          type: number
                          example: 12
                        receivable_type:
                          type: string
                          example: Document
                        received_value:
                          type: number
                          example: 2
                        settlement_percentage:
                          type: string
                          example: '3'
                    type:
                      type: string
                      example: commercial_sales_receipt_lines
            examples:
              Criar Linhas de Recibos de Venda:
                value:
                  data:
                    attributes:
                      receipt_id: 9
                      receivable_id: 12
                      receivable_type: Document
                      received_value: 2
                      settlement_percentage: '3'
                    type: commercial_sales_receipt_lines
      responses:
        '200':
          description: ''
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '2'
        description: TODO
  /api/commercial_sales_receipts/{salesReceiptId}:
    get:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Obter Recibo de Venda por ID
      description: Obter Recibo de Venda por ID
      operationId: obterReciboDeVendaPorId1
      responses:
        '200':
          description: ''
    delete:
      tags:
        - Versões Anteriores
        - Vendas1
        - Recibos de Venda1
      summary: Remover Recibos de Venda
      description: Remover Recibos de Venda
      operationId: removerRecibosDeVenda
      responses:
        '200':
          description: ''
    parameters:
      - name: salesReceiptId
        in: path
        required: true
        schema:
          type: string
          example: '2'
        description: Id do recibo de venda
  /api/commercial_purchases_documents:
    get:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Obter Todos os Documentos de Compra
      description: Obter Todos os Documentos de Compra
      operationId: obterTodosOsDocumentosDeCompra1
      parameters:
        - name: filter[document_no]
          in: query
          schema:
            type: string
            example: FC 2023/1
          description: '@@@@@@@@@'
        - name: filter[status]
          in: query
          schema:
            type: string
            example: '0'
          description: '@@@@@@@@@'
        - name: filter[supplier_tax_registration_number]
          in: query
          schema:
            type: string
            example: '999999990'
          description: '@@@@@@@@@'
      responses:
        '200':
          description: ''
    post:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Criar Cabeçalho de Documentos de Compra
      description: Criar Cabeçalho de Documentos de Compra
      operationId: criarCabeAlhoDeDocumentosDeCompra1
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        company_id:
                          type: number
                          example: 2
                        document_series_id:
                          type: number
                          example: 125
                        document_type:
                          type: string
                          example: FC
                    type:
                      type: string
                      example: commercial_purchases_documents
            examples:
              Criar Cabeçalho de Documentos de Compra:
                value:
                  data:
                    attributes:
                      company_id: 2
                      document_series_id: 125
                      document_type: FC
                    type: commercial_purchases_documents
      responses:
        '200':
          description: Criar Cabeçalho de Documentos de Compra
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '3373'
            Date:
              schema:
                type: string
                example: Wed, 06 Mar 2024 10:52:52 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          acts_as_shipment_document:
                            nullable: true
                            example: null
                          apply_retention_when_paid:
                            nullable: true
                            example: null
                          base_currency_gross_total:
                            nullable: true
                            example: null
                          base_currency_net_total:
                            nullable: true
                            example: null
                          base_currency_pending_total:
                            nullable: true
                            example: null
                          base_currency_retention_total:
                            nullable: true
                            example: null
                          base_currency_settlement_total:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_int:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_ise:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_nor:
                            nullable: true
                            example: null
                          base_currency_vat_incidence_red:
                            nullable: true
                            example: null
                          base_currency_vat_total_int:
                            nullable: true
                            example: null
                          base_currency_vat_total_nor:
                            nullable: true
                            example: null
                          base_currency_vat_total_red:
                            nullable: true
                            example: null
                          cashed_vat:
                            nullable: true
                            example: null
                          child_documents_ids:
                            nullable: true
                            example: null
                          communication_code:
                            nullable: true
                            example: null
                          communication_code_source:
                            nullable: true
                            example: null
                          communication_status:
                            nullable: true
                            example: null
                          created_at:
                            type: string
                            example: '2024-03-06 10:52:52.637757'
                          currency_conversion_rate:
                            type: number
                            example: 1
                          currency_iso_code:
                            type: string
                            example: EUR
                          date:
                            type: string
                            example: '2024-03-06'
                          document_area:
                            type: string
                            example: FC
                          document_hash_sum:
                            nullable: true
                            example: null
                          document_no:
                            nullable: true
                            example: null
                          document_series_prefix:
                            type: string
                            example: '2023'
                          document_type:
                            type: string
                            example: FC
                          due_date:
                            type: string
                            example: '2024-03-06'
                          emailed:
                            nullable: true
                            example: null
                          external_reference:
                            type: string
                            example: ''
                          gross_total:
                            type: number
                            example: 0
                          hash_control:
                            nullable: true
                            example: null
                          is_third_party:
                            nullable: true
                            example: null
                          line_settlement_with_tax:
                            type: number
                            example: 0
                          line_settlement_with_tax_unrounded:
                            type: number
                            example: 0
                          line_settlement_without_tax:
                            type: number
                            example: 0
                          line_settlement_without_tax_unrounded:
                            type: number
                            example: 0
                          net_total:
                            type: number
                            example: 0
                          notes:
                            type: string
                            example: ''
                          operation_country:
                            nullable: true
                            example: null
                          parent_document_area:
                            nullable: true
                            example: null
                          parent_documents_ids:
                            nullable: true
                            example: null
                          payments_ids:
                            nullable: true
                            example: null
                          pending_retention_value:
                            type: number
                            example: 0
                          pending_total:
                            type: number
                            example: 0
                          printed:
                            nullable: true
                            example: null
                          public_link:
                            type: string
                            example: ''
                          retention:
                            nullable: true
                            example: null
                          retention_type:
                            nullable: true
                            example: null
                          retention_value:
                            type: number
                            example: 0
                          retention_value_unrounded:
                            type: number
                            example: 0
                          settlement_expression:
                            nullable: true
                            example: null
                          settlement_percentage:
                            type: number
                            example: 0
                          settlement_total:
                            type: number
                            example: 0
                          settlement_with_tax:
                            type: number
                            example: 0
                          settlement_with_tax_unrounded:
                            type: number
                            example: 0
                          settlement_without_tax:
                            type: number
                            example: 0
                          settlement_without_tax_unrounded:
                            type: number
                            example: 0
                          shipment_country:
                            nullable: true
                            example: null
                          shipment_loading_address_detail:
                            nullable: true
                            example: null
                          shipment_loading_city:
                            nullable: true
                            example: null
                          shipment_loading_country:
                            nullable: true
                            example: null
                          shipment_loading_postcode:
                            nullable: true
                            example: null
                          shipment_loading_time:
                            nullable: true
                            example: null
                          shipment_unloading_address_detail:
                            nullable: true
                            example: null
                          shipment_unloading_city:
                            nullable: true
                            example: null
                          shipment_unloading_country:
                            nullable: true
                            example: null
                          shipment_unloading_postcode:
                            nullable: true
                            example: null
                          shipment_unloading_time:
                            nullable: true
                            example: null
                          status:
                            type: number
                            example: 0
                          supplier_address_detail:
                            type: string
                            example: ''
                          supplier_business_name:
                            type: string
                            example: Fornecedor Indiferenciado
                          supplier_city:
                            type: string
                            example: ''
                          supplier_country:
                            type: string
                            example: PT
                          supplier_postcode:
                            type: string
                            example: ''
                          supplier_tax_country_region:
                            type: string
                            example: PT
                          supplier_tax_registration_number:
                            type: string
                            example: '999999990'
                          system_entry_date:
                            nullable: true
                            example: null
                          tax_payable:
                            type: number
                            example: 0
                          third_party_type:
                            nullable: true
                            example: null
                          total_pending_quantity:
                            nullable: true
                            example: null
                          updated_at:
                            type: string
                            example: '2024-03-06 10:52:52.637757'
                          vat_incidence_int:
                            type: number
                            example: 0
                          vat_incidence_int_unrounded:
                            type: number
                            example: 0
                          vat_incidence_ise:
                            type: number
                            example: 0
                          vat_incidence_ise_unrounded:
                            type: number
                            example: 0
                          vat_incidence_nor:
                            type: number
                            example: 0
                          vat_incidence_nor_unrounded:
                            type: number
                            example: 0
                          vat_incidence_red:
                            type: number
                            example: 0
                          vat_incidence_red_unrounded:
                            type: number
                            example: 0
                          vat_included_prices:
                            type: boolean
                            example: false
                          vat_percentage_int:
                            nullable: true
                            example: null
                          vat_percentage_nor:
                            nullable: true
                            example: null
                          vat_percentage_red:
                            nullable: true
                            example: null
                          vat_total_int:
                            type: number
                            example: 0
                          vat_total_int_unrounded:
                            type: number
                            example: 0
                          vat_total_nor:
                            type: number
                            example: 0
                          vat_total_nor_unrounded:
                            type: number
                            example: 0
                          vat_total_red:
                            type: number
                            example: 0
                          vat_total_red_unrounded:
                            type: number
                            example: 0
                          vehicle_registration:
                            nullable: true
                            example: null
                          voided_reason:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '41'
                      relationships:
                        type: object
                        properties:
                          commercial_document_series:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '125'
                                  type:
                                    type: string
                                    example: commercial_document_series
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          currency:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '1'
                                  type:
                                    type: string
                                    example: currencies
                          lines:
                            type: object
                            properties:
                              data:
                                type: array
                                items: {}
                                example: []
                          supplier:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '9'
                                  type:
                                    type: string
                                    example: suppliers
                          tax_exemption_reasons:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          user:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000863'
                                  type:
                                    type: string
                                    example: current_company_users
                      type:
                        type: string
                        example: commercial_purchases_documents
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          scalar:
                            type: number
                            example: 1
              examples:
                Criar Cabeçalho de Documentos de Compra:
                  value:
                    data:
                      attributes:
                        acts_as_shipment_document: null
                        apply_retention_when_paid: null
                        base_currency_gross_total: null
                        base_currency_net_total: null
                        base_currency_pending_total: null
                        base_currency_retention_total: null
                        base_currency_settlement_total: null
                        base_currency_vat_incidence_int: null
                        base_currency_vat_incidence_ise: null
                        base_currency_vat_incidence_nor: null
                        base_currency_vat_incidence_red: null
                        base_currency_vat_total_int: null
                        base_currency_vat_total_nor: null
                        base_currency_vat_total_red: null
                        cashed_vat: null
                        child_documents_ids: null
                        communication_code: null
                        communication_code_source: null
                        communication_status: null
                        created_at: '2024-03-06 10:52:52.637757'
                        currency_conversion_rate: 1
                        currency_iso_code: EUR
                        date: '2024-03-06'
                        document_area: FC
                        document_hash_sum: null
                        document_no: null
                        document_series_prefix: '2023'
                        document_type: FC
                        due_date: '2024-03-06'
                        emailed: null
                        external_reference: ''
                        gross_total: 0
                        hash_control: null
                        is_third_party: null
                        line_settlement_with_tax: 0
                        line_settlement_with_tax_unrounded: 0
                        line_settlement_without_tax: 0
                        line_settlement_without_tax_unrounded: 0
                        net_total: 0
                        notes: ''
                        operation_country: null
                        parent_document_area: null
                        parent_documents_ids: null
                        payments_ids: null
                        pending_retention_value: 0
                        pending_total: 0
                        printed: null
                        public_link: ''
                        retention: null
                        retention_type: null
                        retention_value: 0
                        retention_value_unrounded: 0
                        settlement_expression: null
                        settlement_percentage: 0
                        settlement_total: 0
                        settlement_with_tax: 0
                        settlement_with_tax_unrounded: 0
                        settlement_without_tax: 0
                        settlement_without_tax_unrounded: 0
                        shipment_country: null
                        shipment_loading_address_detail: null
                        shipment_loading_city: null
                        shipment_loading_country: null
                        shipment_loading_postcode: null
                        shipment_loading_time: null
                        shipment_unloading_address_detail: null
                        shipment_unloading_city: null
                        shipment_unloading_country: null
                        shipment_unloading_postcode: null
                        shipment_unloading_time: null
                        status: 0
                        supplier_address_detail: ''
                        supplier_business_name: Fornecedor Indiferenciado
                        supplier_city: ''
                        supplier_country: PT
                        supplier_postcode: ''
                        supplier_tax_country_region: PT
                        supplier_tax_registration_number: '999999990'
                        system_entry_date: null
                        tax_payable: 0
                        third_party_type: null
                        total_pending_quantity: null
                        updated_at: '2024-03-06 10:52:52.637757'
                        vat_incidence_int: 0
                        vat_incidence_int_unrounded: 0
                        vat_incidence_ise: 0
                        vat_incidence_ise_unrounded: 0
                        vat_incidence_nor: 0
                        vat_incidence_nor_unrounded: 0
                        vat_incidence_red: 0
                        vat_incidence_red_unrounded: 0
                        vat_included_prices: false
                        vat_percentage_int: null
                        vat_percentage_nor: null
                        vat_percentage_red: null
                        vat_total_int: 0
                        vat_total_int_unrounded: 0
                        vat_total_nor: 0
                        vat_total_nor_unrounded: 0
                        vat_total_red: 0
                        vat_total_red_unrounded: 0
                        vehicle_registration: null
                        voided_reason: null
                      id: '41'
                      relationships:
                        commercial_document_series:
                          data:
                            id: '125'
                            type: commercial_document_series
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        currency:
                          data:
                            id: '1'
                            type: currencies
                        lines:
                          data: []
                        supplier:
                          data:
                            id: '9'
                            type: suppliers
                        tax_exemption_reasons:
                          data: null
                        user:
                          data:
                            id: '800000863'
                            type: current_company_users
                      type: commercial_purchases_documents
                    meta:
                      observed:
                        scalar: 1
    delete:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Remover Documentos de Compra
      description: Remover Documentos de Compra
      operationId: removerDocumentosDeCompra
      responses:
        '200':
          description: ''
    patch:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Atualizar Documentos de Compra
      description: Atualizar Documentos de Compra
      operationId: atualizarDocumentosDeCompra
      responses:
        '200':
          description: ''
  /api/commercial_purchases_document_lines:
    get:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Obter Todas as Linhas de Documentos de Compra
      description: Obter Todas as Linhas de Documentos de Compra
      operationId: obterTodasAsLinhasDeDocumentosDeCompra
      responses:
        '200':
          description: ''
    post:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Criar Linhas de Documentos de Categoria de Despesa
      description: Criar Linhas de Documentos de Categoria de Despesa
      operationId: criarLinhasDeDocumentosDeCategoriaDeDespesa
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        document_id:
                          type: number
                          example: 2
                        item_id:
                          type: number
                          example: 2
                        item_type:
                          type: string
                          example: Product
                    type:
                      type: string
                      example: commercial_purchases_document_lines
            examples:
              Criar Linhas de Documentos de Categoria de Despesa:
                value:
                  data:
                    attributes:
                      document_id: 2
                      item_id: 2
                      item_type: Purchases::ExpenseCategory
                    type: commercial_purchases_document_lines
              Criar Linhas de Documentos de Compra para Produto:
                value:
                  data:
                    attributes:
                      document_id: 2
                      item_id: 2
                      item_type: Product
                    type: commercial_purchases_document_lines
      responses:
        '200':
          description: >-
            Criar Linhas de Documentos de Compra / Criar Linhas de Documentos de
            Compra para Produto
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '1371'
            Date:
              schema:
                type: string
                example: Wed, 06 Mar 2024 10:54:07 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          amount:
                            type: number
                            example: 0
                          amount_with_header_settlement:
                            type: number
                            example: 0
                          base_currency_amount:
                            nullable: true
                            example: null
                          base_currency_net_amount:
                            nullable: true
                            example: null
                          base_currency_net_unit_price:
                            nullable: true
                            example: null
                          base_currency_settlement_with_tax:
                            nullable: true
                            example: null
                          base_currency_settlement_without_tax:
                            nullable: true
                            example: null
                          base_currency_tax_amount:
                            nullable: true
                            example: null
                          base_currency_unit_price:
                            nullable: true
                            example: null
                          created_at:
                            type: string
                            example: '2024-03-06 11:02:10.416093'
                          date:
                            nullable: true
                            example: null
                          description:
                            type: string
                            example: Impostos Sobre o Rendimento
                          imported_quantity:
                            nullable: true
                            example: null
                          item_code:
                            type: string
                            example: '241'
                          item_id:
                            type: number
                            example: 2
                          item_type:
                            type: string
                            example: Purchases::ExpenseCategory
                          item_unit_price_includes_vat:
                            type: boolean
                            example: false
                          net_amount:
                            type: number
                            example: 0
                          net_amount_with_header_settlement:
                            type: number
                            example: 0
                          net_unit_price:
                            type: number
                            example: 0
                          original_document_no:
                            nullable: true
                            example: null
                          pending_quantity:
                            nullable: true
                            example: null
                          pending_retention_value:
                            nullable: true
                            example: null
                          pending_total:
                            nullable: true
                            example: null
                          quantity:
                            nullable: true
                            example: null
                          retention_value:
                            nullable: true
                            example: null
                          settlement_amount:
                            nullable: true
                            example: null
                          settlement_expression:
                            nullable: true
                            example: null
                          settlement_percentage:
                            type: number
                            example: 0
                          settlement_with_tax:
                            type: number
                            example: 0
                          settlement_without_tax:
                            type: number
                            example: 0
                          tax_amount:
                            type: number
                            example: 0
                          tax_code:
                            type: string
                            example: NOR
                          tax_country_region:
                            type: string
                            example: PT-AC
                          tax_percentage:
                            type: number
                            example: 16
                          unit_price:
                            type: number
                            example: 0
                          updated_at:
                            type: string
                            example: '2024-03-06 11:02:10.416093'
                      id:
                        type: string
                        example: '40'
                      relationships:
                        type: object
                        properties:
                          document:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: commercial_purchases_documents
                          expense_category:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          product:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          tax:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          unit_of_measure:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: units_of_measure
                      type:
                        type: string
                        example: commercial_purchases_document_lines
                  meta:
                    type: object
                    properties:
                      observed:
                        type: object
                        properties:
                          lines:
                            type: number
                            example: 1
                          scalar:
                            type: number
                            example: 1
              examples:
                Criar Linhas de Documentos de Compra:
                  value:
                    data:
                      attributes:
                        amount: 0
                        amount_with_header_settlement: 0
                        base_currency_amount: null
                        base_currency_net_amount: null
                        base_currency_net_unit_price: null
                        base_currency_settlement_with_tax: null
                        base_currency_settlement_without_tax: null
                        base_currency_tax_amount: null
                        base_currency_unit_price: null
                        created_at: '2024-03-06 11:02:10.416093'
                        date: null
                        description: Impostos Sobre o Rendimento
                        imported_quantity: null
                        item_code: '241'
                        item_id: 2
                        item_type: Purchases::ExpenseCategory
                        item_unit_price_includes_vat: false
                        net_amount: 0
                        net_amount_with_header_settlement: 0
                        net_unit_price: 0
                        original_document_no: null
                        pending_quantity: null
                        pending_retention_value: null
                        pending_total: null
                        quantity: null
                        retention_value: null
                        settlement_amount: null
                        settlement_expression: null
                        settlement_percentage: 0
                        settlement_with_tax: 0
                        settlement_without_tax: 0
                        tax_amount: 0
                        tax_code: NOR
                        tax_country_region: PT-AC
                        tax_percentage: 16
                        unit_price: 0
                        updated_at: '2024-03-06 11:02:10.416093'
                      id: '40'
                      relationships:
                        document:
                          data:
                            id: '2'
                            type: commercial_purchases_documents
                        expense_category:
                          data: null
                        product:
                          data: null
                        tax:
                          data: null
                        unit_of_measure:
                          data:
                            id: '2'
                            type: units_of_measure
                      type: commercial_purchases_document_lines
                    meta:
                      observed:
                        lines: 1
                        scalar: 1
                Criar Linhas de Documentos de Compra para Produto:
                  value:
                    data:
                      attributes:
                        amount: 0
                        amount_with_header_settlement: 0
                        base_currency_amount: null
                        base_currency_net_amount: null
                        base_currency_net_unit_price: null
                        base_currency_settlement_with_tax: null
                        base_currency_settlement_without_tax: null
                        base_currency_tax_amount: null
                        base_currency_unit_price: null
                        created_at: '2024-03-06 10:54:07.943067'
                        date: null
                        description: Isto é uma breve descrição
                        imported_quantity: null
                        item_code: '1000'
                        item_id: 2
                        item_type: Product
                        item_unit_price_includes_vat: false
                        net_amount: 0
                        net_amount_with_header_settlement: 0
                        net_unit_price: 2
                        original_document_no: null
                        pending_quantity: null
                        pending_retention_value: null
                        pending_total: null
                        quantity: null
                        retention_value: null
                        settlement_amount: null
                        settlement_expression: null
                        settlement_percentage: 0
                        settlement_with_tax: 0
                        settlement_without_tax: 0
                        tax_amount: 0
                        tax_code: INT
                        tax_country_region: PT-AC
                        tax_percentage: 9
                        unit_price: 2
                        updated_at: '2024-03-06 10:54:07.943067'
                      id: '31'
                      relationships:
                        document:
                          data:
                            id: '2'
                            type: commercial_purchases_documents
                        expense_category:
                          data: null
                        product:
                          data: null
                        tax:
                          data: null
                        unit_of_measure:
                          data:
                            id: '5'
                            type: units_of_measure
                      type: commercial_purchases_document_lines
                    meta:
                      observed:
                        lines: 1
                        scalar: 1
    delete:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Remover Linhas de Documentos de Compra
      description: Remover Linhas de Documentos de Compra
      operationId: removerLinhasDeDocumentosDeCompra
      responses:
        '200':
          description: ''
    patch:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Atualizar Linhas de Documentos de Compra
      description: Atualizar Linhas de Documentos de Compra
      operationId: atualizarLinhasDeDocumentosDeCompra
      responses:
        '200':
          description: ''
  /api/v1/commercial_purchases_documents/{id}/finalize:
    patch:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Finalizar Documentos de Compra
      description: Finalizar Documentos de Compra
      operationId: finalizarDocumentosDeCompra
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
            examples:
              Finalizar Documentos de Compra:
                value: {}
      responses:
        '200':
          description: Finalizar Documentos de Compra
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '4170'
            Date:
              schema:
                type: string
                example: Wed, 06 Mar 2024 11:06:17 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  acts_as_shipment_document:
                    nullable: true
                    example: null
                  apply_retention_when_paid:
                    nullable: true
                    example: null
                  base_currency_gross_total:
                    nullable: true
                    example: null
                  base_currency_net_total:
                    nullable: true
                    example: null
                  base_currency_pending_total:
                    nullable: true
                    example: null
                  base_currency_retention_total:
                    nullable: true
                    example: null
                  base_currency_settlement_total:
                    nullable: true
                    example: null
                  base_currency_vat_incidence_int:
                    nullable: true
                    example: null
                  base_currency_vat_incidence_ise:
                    nullable: true
                    example: null
                  base_currency_vat_incidence_nor:
                    nullable: true
                    example: null
                  base_currency_vat_incidence_red:
                    nullable: true
                    example: null
                  base_currency_vat_total_int:
                    nullable: true
                    example: null
                  base_currency_vat_total_nor:
                    nullable: true
                    example: null
                  base_currency_vat_total_red:
                    nullable: true
                    example: null
                  cashed_vat:
                    nullable: true
                    example: null
                  child_documents_ids:
                    nullable: true
                    example: null
                  communication_code:
                    nullable: true
                    example: null
                  communication_code_source:
                    nullable: true
                    example: null
                  communication_status:
                    nullable: true
                    example: null
                  company_id:
                    type: number
                    example: 800000046
                  created_at:
                    type: string
                    example: '2024-03-06 10:52:52.637757'
                  currency_conversion_rate:
                    type: number
                    example: 1
                  currency_id:
                    type: number
                    example: 1
                  currency_iso_code:
                    type: string
                    example: EUR
                  date:
                    type: string
                    example: '2024-03-06'
                  document_area:
                    type: string
                    example: FC
                  document_hash_sum:
                    nullable: true
                    example: null
                  document_no:
                    type: string
                    example: FC 2023/4
                  document_series_id:
                    type: number
                    example: 125
                  document_series_prefix:
                    type: string
                    example: '2023'
                  document_type:
                    type: string
                    example: FC
                  due_date:
                    type: string
                    example: '2024-03-06'
                  emailed:
                    nullable: true
                    example: null
                  external_reference:
                    type: string
                    example: ''
                  gross_total:
                    type: number
                    example: 0
                  hash_control:
                    nullable: true
                    example: null
                  id:
                    type: number
                    example: 41
                  is_third_party:
                    nullable: true
                    example: null
                  line_settlement_with_tax:
                    type: number
                    example: 0
                  line_settlement_with_tax_unrounded:
                    type: number
                    example: 0
                  line_settlement_without_tax:
                    type: number
                    example: 0
                  line_settlement_without_tax_unrounded:
                    type: number
                    example: 0
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: number
                          example: 0
                        amount_with_header_settlement:
                          type: number
                          example: 0
                        base_currency_amount:
                          nullable: true
                          example: null
                        base_currency_net_amount:
                          nullable: true
                          example: null
                        base_currency_net_unit_price:
                          nullable: true
                          example: null
                        base_currency_settlement_with_tax:
                          nullable: true
                          example: null
                        base_currency_settlement_without_tax:
                          nullable: true
                          example: null
                        base_currency_tax_amount:
                          nullable: true
                          example: null
                        base_currency_unit_price:
                          nullable: true
                          example: null
                        created_at:
                          type: string
                          example: '2024-03-06 11:05:50.019855'
                        date:
                          nullable: true
                          example: null
                        description:
                          type: string
                          example: Impostos Sobre o Rendimento
                        document_id:
                          type: number
                          example: 41
                        expense_category_id:
                          type: number
                          example: 2
                        id:
                          type: number
                          example: 41
                        imported_quantity:
                          nullable: true
                          example: null
                        item_code:
                          type: string
                          example: '241'
                        item_id:
                          type: number
                          example: 2
                        item_type:
                          type: string
                          example: Purchases::ExpenseCategory
                        item_unit_price_includes_vat:
                          type: boolean
                          example: false
                        net_amount:
                          type: number
                          example: 0
                        net_amount_with_header_settlement:
                          type: number
                          example: 0
                        net_unit_price:
                          type: number
                          example: 0
                        original_document_no:
                          nullable: true
                          example: null
                        pending_quantity:
                          nullable: true
                          example: null
                        pending_retention_value:
                          nullable: true
                          example: null
                        pending_total:
                          nullable: true
                          example: null
                        quantity:
                          nullable: true
                          example: null
                        retention_value:
                          nullable: true
                          example: null
                        settlement_amount:
                          nullable: true
                          example: null
                        settlement_expression:
                          nullable: true
                          example: null
                        settlement_percentage:
                          type: number
                          example: 0
                        settlement_with_tax:
                          type: number
                          example: 0
                        settlement_without_tax:
                          type: number
                          example: 0
                        tax_amount:
                          type: number
                          example: 0
                        tax_code:
                          type: string
                          example: NOR
                        tax_country_region:
                          type: string
                          example: PT
                        tax_id:
                          type: number
                          example: 1
                        tax_percentage:
                          type: number
                          example: 23
                        unit_of_measure_id:
                          type: number
                          example: 2
                        unit_price:
                          type: number
                          example: 0
                        updated_at:
                          type: string
                          example: '2024-03-06 11:05:50.019855'
                    example:
                      - amount: 0
                        amount_with_header_settlement: 0
                        base_currency_amount: null
                        base_currency_net_amount: null
                        base_currency_net_unit_price: null
                        base_currency_settlement_with_tax: null
                        base_currency_settlement_without_tax: null
                        base_currency_tax_amount: null
                        base_currency_unit_price: null
                        created_at: '2024-03-06 11:05:50.019855'
                        date: null
                        description: Impostos Sobre o Rendimento
                        document_id: 41
                        expense_category_id: 2
                        id: 41
                        imported_quantity: null
                        item_code: '241'
                        item_id: 2
                        item_type: Purchases::ExpenseCategory
                        item_unit_price_includes_vat: false
                        net_amount: 0
                        net_amount_with_header_settlement: 0
                        net_unit_price: 0
                        original_document_no: null
                        pending_quantity: null
                        pending_retention_value: null
                        pending_total: null
                        quantity: null
                        retention_value: null
                        settlement_amount: null
                        settlement_expression: null
                        settlement_percentage: 0
                        settlement_with_tax: 0
                        settlement_without_tax: 0
                        tax_amount: 0
                        tax_code: NOR
                        tax_country_region: PT
                        tax_id: 1
                        tax_percentage: 23
                        unit_of_measure_id: 2
                        unit_price: 0
                        updated_at: '2024-03-06 11:05:50.019855'
                  net_total:
                    type: number
                    example: 0
                  notes:
                    type: string
                    example: ''
                  operation_country:
                    nullable: true
                    example: null
                  parent_document_area:
                    nullable: true
                    example: null
                  parent_documents_ids:
                    nullable: true
                    example: null
                  payments_ids:
                    nullable: true
                    example: null
                  pending_retention_value:
                    type: number
                    example: 0
                  pending_total:
                    type: number
                    example: 0
                  printed:
                    nullable: true
                    example: null
                  public_link:
                    type: string
                    example: ''
                  retention:
                    nullable: true
                    example: null
                  retention_type:
                    nullable: true
                    example: null
                  retention_value:
                    type: number
                    example: 0
                  retention_value_unrounded:
                    type: number
                    example: 0
                  settlement_expression:
                    nullable: true
                    example: null
                  settlement_percentage:
                    type: number
                    example: 0
                  settlement_total:
                    type: number
                    example: 0
                  settlement_with_tax:
                    type: number
                    example: 0
                  settlement_with_tax_unrounded:
                    type: number
                    example: 0
                  settlement_without_tax:
                    type: number
                    example: 0
                  settlement_without_tax_unrounded:
                    type: number
                    example: 0
                  shipment_country:
                    nullable: true
                    example: null
                  shipment_loading_address_detail:
                    nullable: true
                    example: null
                  shipment_loading_city:
                    nullable: true
                    example: null
                  shipment_loading_country:
                    nullable: true
                    example: null
                  shipment_loading_postcode:
                    nullable: true
                    example: null
                  shipment_loading_time:
                    nullable: true
                    example: null
                  shipment_unloading_address_detail:
                    nullable: true
                    example: null
                  shipment_unloading_city:
                    nullable: true
                    example: null
                  shipment_unloading_country:
                    nullable: true
                    example: null
                  shipment_unloading_postcode:
                    nullable: true
                    example: null
                  shipment_unloading_time:
                    nullable: true
                    example: null
                  status:
                    type: number
                    example: 1
                  supplier_address_detail:
                    type: string
                    example: ''
                  supplier_business_name:
                    type: string
                    example: Fornecedor Indiferenciado
                  supplier_city:
                    type: string
                    example: ''
                  supplier_country:
                    type: string
                    example: PT
                  supplier_id:
                    type: number
                    example: 9
                  supplier_postcode:
                    type: string
                    example: ''
                  supplier_tax_country_region:
                    type: string
                    example: PT
                  supplier_tax_registration_number:
                    type: string
                    example: '999999990'
                  system_entry_date:
                    type: string
                    example: '2024-03-06 11:06:17.132657'
                  tax_payable:
                    type: number
                    example: 0
                  third_party_type:
                    nullable: true
                    example: null
                  total_pending_quantity:
                    nullable: true
                    example: null
                  updated_at:
                    type: string
                    example: '2024-03-06 11:06:17.132657'
                  user_id:
                    type: number
                    example: 800000863
                  vat_incidence_int:
                    type: number
                    example: 0
                  vat_incidence_int_unrounded:
                    type: number
                    example: 0
                  vat_incidence_ise:
                    type: number
                    example: 0
                  vat_incidence_ise_unrounded:
                    type: number
                    example: 0
                  vat_incidence_nor:
                    type: number
                    example: 0
                  vat_incidence_nor_unrounded:
                    type: number
                    example: 0
                  vat_incidence_red:
                    type: number
                    example: 0
                  vat_incidence_red_unrounded:
                    type: number
                    example: 0
                  vat_included_prices:
                    type: boolean
                    example: false
                  vat_percentage_int:
                    nullable: true
                    example: null
                  vat_percentage_nor:
                    type: number
                    example: 23
                  vat_percentage_red:
                    nullable: true
                    example: null
                  vat_total_int:
                    type: number
                    example: 0
                  vat_total_int_unrounded:
                    type: number
                    example: 0
                  vat_total_nor:
                    type: number
                    example: 0
                  vat_total_nor_unrounded:
                    type: number
                    example: 0
                  vat_total_red:
                    type: number
                    example: 0
                  vat_total_red_unrounded:
                    type: number
                    example: 0
                  vehicle_registration:
                    nullable: true
                    example: null
                  voided_reason:
                    nullable: true
                    example: null
              examples:
                Finalizar Documentos de Compra:
                  value:
                    acts_as_shipment_document: null
                    apply_retention_when_paid: null
                    base_currency_gross_total: null
                    base_currency_net_total: null
                    base_currency_pending_total: null
                    base_currency_retention_total: null
                    base_currency_settlement_total: null
                    base_currency_vat_incidence_int: null
                    base_currency_vat_incidence_ise: null
                    base_currency_vat_incidence_nor: null
                    base_currency_vat_incidence_red: null
                    base_currency_vat_total_int: null
                    base_currency_vat_total_nor: null
                    base_currency_vat_total_red: null
                    cashed_vat: null
                    child_documents_ids: null
                    communication_code: null
                    communication_code_source: null
                    communication_status: null
                    company_id: 800000046
                    created_at: '2024-03-06 10:52:52.637757'
                    currency_conversion_rate: 1
                    currency_id: 1
                    currency_iso_code: EUR
                    date: '2024-03-06'
                    document_area: FC
                    document_hash_sum: null
                    document_no: FC 2023/4
                    document_series_id: 125
                    document_series_prefix: '2023'
                    document_type: FC
                    due_date: '2024-03-06'
                    emailed: null
                    external_reference: ''
                    gross_total: 0
                    hash_control: null
                    id: 41
                    is_third_party: null
                    line_settlement_with_tax: 0
                    line_settlement_with_tax_unrounded: 0
                    line_settlement_without_tax: 0
                    line_settlement_without_tax_unrounded: 0
                    lines:
                      - amount: 0
                        amount_with_header_settlement: 0
                        base_currency_amount: null
                        base_currency_net_amount: null
                        base_currency_net_unit_price: null
                        base_currency_settlement_with_tax: null
                        base_currency_settlement_without_tax: null
                        base_currency_tax_amount: null
                        base_currency_unit_price: null
                        created_at: '2024-03-06 11:05:50.019855'
                        date: null
                        description: Impostos Sobre o Rendimento
                        document_id: 41
                        expense_category_id: 2
                        id: 41
                        imported_quantity: null
                        item_code: '241'
                        item_id: 2
                        item_type: Purchases::ExpenseCategory
                        item_unit_price_includes_vat: false
                        net_amount: 0
                        net_amount_with_header_settlement: 0
                        net_unit_price: 0
                        original_document_no: null
                        pending_quantity: null
                        pending_retention_value: null
                        pending_total: null
                        quantity: null
                        retention_value: null
                        settlement_amount: null
                        settlement_expression: null
                        settlement_percentage: 0
                        settlement_with_tax: 0
                        settlement_without_tax: 0
                        tax_amount: 0
                        tax_code: NOR
                        tax_country_region: PT
                        tax_id: 1
                        tax_percentage: 23
                        unit_of_measure_id: 2
                        unit_price: 0
                        updated_at: '2024-03-06 11:05:50.019855'
                    net_total: 0
                    notes: ''
                    operation_country: null
                    parent_document_area: null
                    parent_documents_ids: null
                    payments_ids: null
                    pending_retention_value: 0
                    pending_total: 0
                    printed: null
                    public_link: ''
                    retention: null
                    retention_type: null
                    retention_value: 0
                    retention_value_unrounded: 0
                    settlement_expression: null
                    settlement_percentage: 0
                    settlement_total: 0
                    settlement_with_tax: 0
                    settlement_with_tax_unrounded: 0
                    settlement_without_tax: 0
                    settlement_without_tax_unrounded: 0
                    shipment_country: null
                    shipment_loading_address_detail: null
                    shipment_loading_city: null
                    shipment_loading_country: null
                    shipment_loading_postcode: null
                    shipment_loading_time: null
                    shipment_unloading_address_detail: null
                    shipment_unloading_city: null
                    shipment_unloading_country: null
                    shipment_unloading_postcode: null
                    shipment_unloading_time: null
                    status: 1
                    supplier_address_detail: ''
                    supplier_business_name: Fornecedor Indiferenciado
                    supplier_city: ''
                    supplier_country: PT
                    supplier_id: 9
                    supplier_postcode: ''
                    supplier_tax_country_region: PT
                    supplier_tax_registration_number: '999999990'
                    system_entry_date: '2024-03-06 11:06:17.132657'
                    tax_payable: 0
                    third_party_type: null
                    total_pending_quantity: null
                    updated_at: '2024-03-06 11:06:17.132657'
                    user_id: 800000863
                    vat_incidence_int: 0
                    vat_incidence_int_unrounded: 0
                    vat_incidence_ise: 0
                    vat_incidence_ise_unrounded: 0
                    vat_incidence_nor: 0
                    vat_incidence_nor_unrounded: 0
                    vat_incidence_red: 0
                    vat_incidence_red_unrounded: 0
                    vat_included_prices: false
                    vat_percentage_int: null
                    vat_percentage_nor: 23
                    vat_percentage_red: null
                    vat_total_int: 0
                    vat_total_int_unrounded: 0
                    vat_total_nor: 0
                    vat_total_nor_unrounded: 0
                    vat_total_red: 0
                    vat_total_red_unrounded: 0
                    vehicle_registration: null
                    voided_reason: null
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '41'
  /api/v1/commercial_purchases_documents/{id}/void:
    patch:
      tags:
        - Versões Anteriores
        - Compras1
        - Documentos de Compra1
      summary: Anular Documentos de Compra
      description: Anular Documentos de Compra
      operationId: anularDocumentosDeCompra
      responses:
        '200':
          description: ''
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '41'
  /api/commercial_purchases_payments:
    get:
      tags:
        - Versões Anteriores
        - Compras1
        - Pagamentos1
      summary: Obter todos os Pagamentos
      description: Obter todos os Pagamentos
      operationId: obterTodosOsPagamentos1
      responses:
        '200':
          description: ''
    post:
      tags:
        - Versões Anteriores
        - Compras1
        - Pagamentos1
      summary: Criar Cabeçalho Pagamento
      description: Criar Cabeçalho Pagamento
      operationId: criarCabeAlhoPagamento
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        check_number:
                          nullable: true
                          example: null
                        currency_conversion_rate:
                          type: number
                          example: 1
                        date:
                          type: string
                          example: '2024-02-29'
                        document_no:
                          type: string
                          example: PF 2023/1
                        document_series_id:
                          type: number
                          example: 12
                        gross_total:
                          type: number
                          example: 11.3
                        internal_observations:
                          type: string
                          example: Comentário interno
                        net_total:
                          type: number
                          example: 0
                        observations:
                          type: string
                          example: Comentários visíveis
                        payment_mechanism:
                          type: string
                          example: MO
                        third_party_id:
                          nullable: true
                          example: null
                        third_party_type:
                          nullable: true
                          example: null
                    type:
                      type: string
                      example: commercial_purchases_payments
            examples:
              Criar Cabeçalho Pagamento:
                value:
                  data:
                    attributes:
                      check_number: null
                      currency_conversion_rate: 1
                      date: '2024-02-29'
                      document_no: PF 2023/1
                      document_series_id: 12
                      gross_total: 11.3
                      internal_observations: Comentário interno
                      net_total: 0
                      observations: Comentários visíveis
                      payment_mechanism: MO
                      third_party_id: null
                      third_party_type: null
                    type: commercial_purchases_payments
      responses:
        '200':
          description: ''
  /api/commercial_purchases_payments/{id}:
    get:
      tags:
        - Versões Anteriores
        - Compras1
        - Pagamentos1
      summary: Obter Pagamento por Id
      description: Obter Pagamento por Id
      operationId: obterPagamentoPorId1
      responses:
        '200':
          description: ''
    delete:
      tags:
        - Versões Anteriores
        - Compras1
        - Pagamentos1
      summary: Remover  Pagamento
      description: Remover  Pagamento
      operationId: removerPagamento
      responses:
        '200':
          description: ''
    patch:
      tags:
        - Versões Anteriores
        - Compras1
        - Pagamentos1
      summary: Atualizar Pagamento
      description: Atualizar Pagamento
      operationId: atualizarPagamento
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        check_number:
                          nullable: true
                          example: null
                        currency_conversion_rate:
                          type: number
                          example: 1
                        date:
                          type: string
                          example: '2024-02-29'
                        deleted:
                          type: boolean
                          example: false
                        document_no:
                          type: string
                          example: PF 2023/2
                        document_series_id:
                          type: number
                          example: 12
                        gross_total:
                          type: number
                          example: 0
                        internal_observations:
                          type: string
                          example: Comentário interno
                        net_total:
                          type: number
                          example: 0
                        observations:
                          type: string
                          example: Comentários visíveis
                        payment_mechanism:
                          type: string
                          example: MO
                        standalone:
                          type: boolean
                          example: true
                        third_party_id:
                          nullable: true
                          example: null
                        third_party_type:
                          type: string
                          example: ''
                    id:
                      type: string
                      example: '4'
                    type:
                      type: string
                      example: commercial_purchases_payments
            examples:
              Atualizar Pagamento:
                value:
                  data:
                    attributes:
                      check_number: null
                      currency_conversion_rate: 1
                      date: '2024-02-29'
                      deleted: false
                      document_no: PF 2023/2
                      document_series_id: 12
                      gross_total: 0
                      internal_observations: Comentário interno
                      net_total: 0
                      observations: Comentários visíveis
                      payment_mechanism: MO
                      standalone: true
                      third_party_id: null
                      third_party_type: ''
                    id: '4'
                    type: commercial_purchases_payments
      responses:
        '200':
          description: ''
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '4'
        description: TODO
  /api/commercial_purchases_payment_lines/{id}:
    get:
      tags:
        - Versões Anteriores
        - Compras1
        - Pagamentos1
      summary: Obter Linhas de Pagamento
      description: Obter Linhas de Pagamento
      operationId: obterLinhasDePagamento
      responses:
        '200':
          description: ''
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '2'
        description: TODO
  /api/contacts/{id}:
    get:
      tags:
        - API's Auxiliares
        - Contactos
      summary: Obter Contacto por Id
      description: Obter Contacto por Id
      operationId: obterContactoPorId1
      responses:
        '200':
          description: Obter Contacto por Id
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '209'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 18:34:44 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          email:
                            type: string
                            example: user@email.pt
                          is_primary:
                            type: boolean
                            example: true
                          mobile_number:
                            nullable: true
                            example: null
                          name:
                            nullable: true
                            example: null
                          phone_number:
                            nullable: true
                            example: null
                          position:
                            nullable: true
                            example: null
                      id:
                        type: string
                        example: '4'
                      relationships:
                        type: object
                        properties:
                          supplier:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: contacts
              examples:
                Obter Contacto por Id:
                  value:
                    data:
                      attributes:
                        email: user@email.pt
                        is_primary: true
                        mobile_number: null
                        name: null
                        phone_number: null
                        position: null
                      id: '4'
                      relationships:
                        supplier:
                          data: null
                      type: contacts
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '4'
        description: id do Contacto
  /api/tax_descriptors:
    get:
      tags:
        - API's Auxiliares
        - Descritores de Taxa
      summary: Obter Todos os Descritores de Taxa
      description: Obter Todos os Descritores de Taxa
      operationId: obterTodosOsDescritoresDeTaxa
      responses:
        '200':
          description: ''
    post:
      tags:
        - API's Auxiliares
        - Descritores de Taxa
      summary: Criar Descritores de Taxa
      description: Criar Descritores de Taxa
      operationId: criarDescritoresDeTaxa
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        allow_negative:
                          type: boolean
                          example: false
                        description:
                          type: string
                          example: Teste descritor
                        notation:
                          type: string
                          example: '>TEST1'
                        other_tax_code:
                          type: boolean
                          example: false
                        saft_import_id:
                          nullable: true
                          example: null
                        suggested_tax_code:
                          nullable: true
                          example: null
                        supports_tax_code:
                          type: boolean
                          example: true
                    type:
                      type: string
                      example: tax_descriptors
            examples:
              Criar Descritores de Taxa:
                value:
                  data:
                    attributes:
                      allow_negative: false
                      description: Teste descritor
                      notation: '>TEST1'
                      other_tax_code: false
                      saft_import_id: null
                      suggested_tax_code: null
                      supports_tax_code: true
                    type: tax_descriptors
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '376'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 10:02:45 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          allow_negative:
                            type: boolean
                            example: false
                          company_id:
                            type: number
                            example: 800000046
                          description:
                            type: string
                            example: Teste descritor
                          notation:
                            type: string
                            example: A1
                          other_tax_code:
                            type: boolean
                            example: false
                          saft_import_id:
                            nullable: true
                            example: null
                          suggested_tax_code:
                            type: string
                            example: NOR
                          supports_tax_code:
                            type: boolean
                            example: true
                      id:
                        type: string
                        example: '1003'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          tax_exemption_reasons:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: tax_descriptors
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        allow_negative: false
                        company_id: 800000046
                        description: Teste descritor
                        notation: A1
                        other_tax_code: false
                        saft_import_id: null
                        suggested_tax_code: NOR
                        supports_tax_code: true
                      id: '1003'
                      relationships:
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        tax_exemption_reasons:
                          data: null
                      type: tax_descriptors
  /api/tax_descriptors/{taxDescriptorId}:
    get:
      tags:
        - API's Auxiliares
        - Descritores de Taxa
      summary: Obter Descritores  de Taxa por Id
      description: Obter Descritores  de Taxa por Id
      operationId: obterDescritoresDeTaxaPorId
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '376'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 10:05:16 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          allow_negative:
                            type: boolean
                            example: false
                          company_id:
                            type: number
                            example: 800000046
                          description:
                            type: string
                            example: Teste descritor
                          notation:
                            type: string
                            example: A1
                          other_tax_code:
                            type: boolean
                            example: false
                          saft_import_id:
                            nullable: true
                            example: null
                          suggested_tax_code:
                            type: string
                            example: NOR
                          supports_tax_code:
                            type: boolean
                            example: true
                      id:
                        type: string
                        example: '1003'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          tax_exemption_reasons:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: tax_descriptors
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        allow_negative: false
                        company_id: 800000046
                        description: Teste descritor
                        notation: A1
                        other_tax_code: false
                        saft_import_id: null
                        suggested_tax_code: NOR
                        supports_tax_code: true
                      id: '1003'
                      relationships:
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        tax_exemption_reasons:
                          data: null
                      type: tax_descriptors
    delete:
      tags:
        - API's Auxiliares
        - Descritores de Taxa
      summary: Remover Descritores de Taxa
      description: Remover Descritores de Taxa
      operationId: removerDescritoresDeTaxa
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '11'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 10:07:15 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties: {}
              examples:
                Sucesso:
                  value:
                    meta: {}
    parameters:
      - name: taxDescriptorId
        in: path
        required: true
        schema:
          type: string
          example: '1003'
        description: Id do descritor de taxa
  /api/item_families:
    get:
      tags:
        - API's Auxiliares
        - Família de Item
      summary: Obter Todas as Família de Item
      description: Obter Todas as Família de Item
      operationId: obterTodasAsFamLiaDeItem
      responses:
        '200':
          description: ''
    post:
      tags:
        - API's Auxiliares
        - Família de Item
      summary: Criar Família de Item
      description: Criar Família de Item
      operationId: criarFamLiaDeItem
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        name:
                          type: string
                          example: Frutas
                    type:
                      type: string
                      example: item_families
            examples:
              Criar Família de Item:
                value:
                  data:
                    attributes:
                      name: Frutas
                    type: item_families
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '154'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 10:32:36 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Frutas
                      id:
                        type: string
                        example: '6'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                      type:
                        type: string
                        example: item_families
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        name: Frutas
                      id: '6'
                      relationships:
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                      type: item_families
  /api/item_families/{id}:
    get:
      tags:
        - API's Auxiliares
        - Família de Item
      summary: Obter Família de Item por ID
      description: Obter Família de Item por ID
      operationId: obterFamLiaDeItemPorId
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '166'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 10:31:46 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                            example: FamiliaDeServiço1
                      id:
                        type: string
                        example: '5'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                      type:
                        type: string
                        example: item_families
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        name: FamiliaDeServiço1
                      id: '5'
                      relationships:
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                      type: item_families
    delete:
      tags:
        - API's Auxiliares
        - Família de Item
      summary: Remover Família de Item
      description: Remover Família de Item
      operationId: removerFamLiaDeItem
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '11'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 10:28:53 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties: {}
              examples:
                Sucesso:
                  value:
                    meta: {}
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '2'
        description: TODO
  /api/countries:
    get:
      tags:
        - API's Auxiliares
        - Países
      summary: Obter Todos os Países
      description: Obter Todos os Países
      operationId: obterTodosOsPaSes
      parameters:
        - name: filter[iso_alpha_2]
          in: query
          schema:
            type: string
            example: PT
      responses:
        '200':
          description: ' / Sucesso'
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '159'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 10:54:29 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content: {}
  /api/oss_countries:
    get:
      tags:
        - API's Auxiliares
        - Países
      summary: Obter Todos os Países OSS
      description: Obter Todos os Países OSS
      operationId: obterTodosOsPaSesOss
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '3814'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 10:54:33 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        attributes:
                          type: object
                          properties:
                            default_name:
                              type: string
                              example: Luxembourg
                            iso_alpha_2:
                              type: string
                              example: LU
                            iso_alpha_3:
                              type: string
                              example: LUX
                            tax_country_region:
                              type: string
                              example: LU
                        id:
                          type: string
                          example: '234'
                        type:
                          type: string
                          example: oss_countries
                    example:
                      - attributes:
                          default_name: Luxembourg
                          iso_alpha_2: LU
                          iso_alpha_3: LUX
                          tax_country_region: LU
                        id: '234'
                        type: oss_countries
                      - attributes:
                          default_name: Austria
                          iso_alpha_2: AT
                          iso_alpha_3: AUT
                          tax_country_region: AT
                        id: '235'
                        type: oss_countries
                      - attributes:
                          default_name: Malta
                          iso_alpha_2: MT
                          iso_alpha_3: MLT
                          tax_country_region: MT
                        id: '21'
                        type: oss_countries
                      - attributes:
                          default_name: Romania
                          iso_alpha_2: RO
                          iso_alpha_3: ROU
                          tax_country_region: RO
                        id: '230'
                        type: oss_countries
                      - attributes:
                          default_name: Latvia
                          iso_alpha_2: LV
                          iso_alpha_3: LVA
                          tax_country_region: LV
                        id: '79'
                        type: oss_countries
                      - attributes:
                          default_name: Poland
                          iso_alpha_2: PL
                          iso_alpha_3: POL
                          tax_country_region: PL
                        id: '27'
                        type: oss_countries
                      - attributes:
                          default_name: Bulgaria
                          iso_alpha_2: BG
                          iso_alpha_3: BGR
                          tax_country_region: BG
                        id: '170'
                        type: oss_countries
                      - attributes:
                          default_name: Germany
                          iso_alpha_2: DE
                          iso_alpha_3: DEU
                          tax_country_region: DE
                        id: '19'
                        type: oss_countries
                      - attributes:
                          default_name: Sweden
                          iso_alpha_2: SE
                          iso_alpha_3: SWE
                          tax_country_region: SE
                        id: '151'
                        type: oss_countries
                      - attributes:
                          default_name: Greece
                          iso_alpha_2: GR
                          iso_alpha_3: GRC
                          tax_country_region: EL
                        id: '196'
                        type: oss_countries
                      - attributes:
                          default_name: Denmark
                          iso_alpha_2: DK
                          iso_alpha_3: DNK
                          tax_country_region: DK
                        id: '25'
                        type: oss_countries
                      - attributes:
                          default_name: Netherlands
                          iso_alpha_2: NL
                          iso_alpha_3: NLD
                          tax_country_region: NL
                        id: '52'
                        type: oss_countries
                      - attributes:
                          default_name: Slovenia
                          iso_alpha_2: SI
                          iso_alpha_3: SVN
                          tax_country_region: SI
                        id: '246'
                        type: oss_countries
                      - attributes:
                          default_name: Finland
                          iso_alpha_2: FI
                          iso_alpha_3: FIN
                          tax_country_region: FI
                        id: '117'
                        type: oss_countries
                      - attributes:
                          default_name: Hungary
                          iso_alpha_2: HU
                          iso_alpha_3: HUN
                          tax_country_region: HU
                        id: '100'
                        type: oss_countries
                      - attributes:
                          default_name: Czech Republic
                          iso_alpha_2: CZ
                          iso_alpha_3: CZE
                          tax_country_region: CZ
                        id: '212'
                        type: oss_countries
                      - attributes:
                          default_name: Ireland
                          iso_alpha_2: IE
                          iso_alpha_3: IRL
                          tax_country_region: IE
                        id: '164'
                        type: oss_countries
                      - attributes:
                          default_name: Slovakia
                          iso_alpha_2: SK
                          iso_alpha_3: SVK
                          tax_country_region: SK
                        id: '237'
                        type: oss_countries
                      - attributes:
                          default_name: France
                          iso_alpha_2: FR
                          iso_alpha_3: FRA
                          tax_country_region: FR
                        id: '107'
                        type: oss_countries
                      - attributes:
                          default_name: Italy
                          iso_alpha_2: IT
                          iso_alpha_3: ITA
                          tax_country_region: IT
                        id: '205'
                        type: oss_countries
                      - attributes:
                          default_name: Estonia
                          iso_alpha_2: EE
                          iso_alpha_3: EST
                          tax_country_region: EE
                        id: '250'
                        type: oss_countries
                      - attributes:
                          default_name: Monaco
                          iso_alpha_2: MC
                          iso_alpha_3: MCO
                          tax_country_region: MC
                        id: '204'
                        type: oss_countries
                      - attributes:
                          default_name: Lithuania
                          iso_alpha_2: LT
                          iso_alpha_3: LTU
                          tax_country_region: LT
                        id: '59'
                        type: oss_countries
                      - attributes:
                          default_name: Belgium
                          iso_alpha_2: BE
                          iso_alpha_3: BEL
                          tax_country_region: BE
                        id: '55'
                        type: oss_countries
                      - attributes:
                          default_name: Spain
                          iso_alpha_2: ES
                          iso_alpha_3: ESP
                          tax_country_region: ES
                        id: '232'
                        type: oss_countries
                      - attributes:
                          default_name: Cyprus
                          iso_alpha_2: CY
                          iso_alpha_3: CYP
                          tax_country_region: CY
                        id: '94'
                        type: oss_countries
                      - attributes:
                          default_name: Croatia
                          iso_alpha_2: HR
                          iso_alpha_3: HRV
                          tax_country_region: HR
                        id: '122'
                        type: oss_countries
              examples:
                Sucesso:
                  value:
                    data:
                      - attributes:
                          default_name: Luxembourg
                          iso_alpha_2: LU
                          iso_alpha_3: LUX
                          tax_country_region: LU
                        id: '234'
                        type: oss_countries
                      - attributes:
                          default_name: Austria
                          iso_alpha_2: AT
                          iso_alpha_3: AUT
                          tax_country_region: AT
                        id: '235'
                        type: oss_countries
                      - attributes:
                          default_name: Malta
                          iso_alpha_2: MT
                          iso_alpha_3: MLT
                          tax_country_region: MT
                        id: '21'
                        type: oss_countries
                      - attributes:
                          default_name: Romania
                          iso_alpha_2: RO
                          iso_alpha_3: ROU
                          tax_country_region: RO
                        id: '230'
                        type: oss_countries
                      - attributes:
                          default_name: Latvia
                          iso_alpha_2: LV
                          iso_alpha_3: LVA
                          tax_country_region: LV
                        id: '79'
                        type: oss_countries
                      - attributes:
                          default_name: Poland
                          iso_alpha_2: PL
                          iso_alpha_3: POL
                          tax_country_region: PL
                        id: '27'
                        type: oss_countries
                      - attributes:
                          default_name: Bulgaria
                          iso_alpha_2: BG
                          iso_alpha_3: BGR
                          tax_country_region: BG
                        id: '170'
                        type: oss_countries
                      - attributes:
                          default_name: Germany
                          iso_alpha_2: DE
                          iso_alpha_3: DEU
                          tax_country_region: DE
                        id: '19'
                        type: oss_countries
                      - attributes:
                          default_name: Sweden
                          iso_alpha_2: SE
                          iso_alpha_3: SWE
                          tax_country_region: SE
                        id: '151'
                        type: oss_countries
                      - attributes:
                          default_name: Greece
                          iso_alpha_2: GR
                          iso_alpha_3: GRC
                          tax_country_region: EL
                        id: '196'
                        type: oss_countries
                      - attributes:
                          default_name: Denmark
                          iso_alpha_2: DK
                          iso_alpha_3: DNK
                          tax_country_region: DK
                        id: '25'
                        type: oss_countries
                      - attributes:
                          default_name: Netherlands
                          iso_alpha_2: NL
                          iso_alpha_3: NLD
                          tax_country_region: NL
                        id: '52'
                        type: oss_countries
                      - attributes:
                          default_name: Slovenia
                          iso_alpha_2: SI
                          iso_alpha_3: SVN
                          tax_country_region: SI
                        id: '246'
                        type: oss_countries
                      - attributes:
                          default_name: Finland
                          iso_alpha_2: FI
                          iso_alpha_3: FIN
                          tax_country_region: FI
                        id: '117'
                        type: oss_countries
                      - attributes:
                          default_name: Hungary
                          iso_alpha_2: HU
                          iso_alpha_3: HUN
                          tax_country_region: HU
                        id: '100'
                        type: oss_countries
                      - attributes:
                          default_name: Czech Republic
                          iso_alpha_2: CZ
                          iso_alpha_3: CZE
                          tax_country_region: CZ
                        id: '212'
                        type: oss_countries
                      - attributes:
                          default_name: Ireland
                          iso_alpha_2: IE
                          iso_alpha_3: IRL
                          tax_country_region: IE
                        id: '164'
                        type: oss_countries
                      - attributes:
                          default_name: Slovakia
                          iso_alpha_2: SK
                          iso_alpha_3: SVK
                          tax_country_region: SK
                        id: '237'
                        type: oss_countries
                      - attributes:
                          default_name: France
                          iso_alpha_2: FR
                          iso_alpha_3: FRA
                          tax_country_region: FR
                        id: '107'
                        type: oss_countries
                      - attributes:
                          default_name: Italy
                          iso_alpha_2: IT
                          iso_alpha_3: ITA
                          tax_country_region: IT
                        id: '205'
                        type: oss_countries
                      - attributes:
                          default_name: Estonia
                          iso_alpha_2: EE
                          iso_alpha_3: EST
                          tax_country_region: EE
                        id: '250'
                        type: oss_countries
                      - attributes:
                          default_name: Monaco
                          iso_alpha_2: MC
                          iso_alpha_3: MCO
                          tax_country_region: MC
                        id: '204'
                        type: oss_countries
                      - attributes:
                          default_name: Lithuania
                          iso_alpha_2: LT
                          iso_alpha_3: LTU
                          tax_country_region: LT
                        id: '59'
                        type: oss_countries
                      - attributes:
                          default_name: Belgium
                          iso_alpha_2: BE
                          iso_alpha_3: BEL
                          tax_country_region: BE
                        id: '55'
                        type: oss_countries
                      - attributes:
                          default_name: Spain
                          iso_alpha_2: ES
                          iso_alpha_3: ESP
                          tax_country_region: ES
                        id: '232'
                        type: oss_countries
                      - attributes:
                          default_name: Cyprus
                          iso_alpha_2: CY
                          iso_alpha_3: CYP
                          tax_country_region: CY
                        id: '94'
                        type: oss_countries
                      - attributes:
                          default_name: Croatia
                          iso_alpha_2: HR
                          iso_alpha_3: HRV
                          tax_country_region: HR
                        id: '122'
                        type: oss_countries
  /api/units_of_measure:
    get:
      tags:
        - API's Auxiliares
        - Unidades de Medida
      summary: Obter Todas as Unidades de Medida
      description: Obter Todas as Unidades de Medida
      operationId: obterTodasAsUnidadesDeMedida
      parameters:
        - name: filter[unit_of_measure]
          in: query
          schema:
            type: string
            example: horas
      responses:
        '200':
          description: ' / Sucesso'
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '188'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:10:54 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content: {}
    post:
      tags:
        - API's Auxiliares
        - Unidades de Medida
      summary: Criar Unidades de Medida
      description: Criar Unidades de Medida
      operationId: criarUnidadesDeMedida
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        is_default:
                          type: boolean
                          example: false
                        unit_of_measure:
                          type: string
                          example: Anos Luz
                    type:
                      type: string
                      example: units_of_measure
            examples:
              Criar Unidades de Medida:
                value:
                  data:
                    attributes:
                      is_default: false
                      unit_of_measure: Anos Luz
                    type: units_of_measure
      responses:
        '200':
          description: Criar Unidades de Medida
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '190'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:08:32 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          is_default:
                            type: boolean
                            example: false
                          unit_of_measure:
                            type: string
                            example: Anos Luz
                      id:
                        type: string
                        example: '11'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                      type:
                        type: string
                        example: units_of_measure
              examples:
                Criar Unidades de Medida:
                  value:
                    data:
                      attributes:
                        is_default: false
                        unit_of_measure: Anos Luz
                      id: '11'
                      relationships:
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                      type: units_of_measure
  /api/units_of_measure/{unitsOfMeasureId}:
    get:
      tags:
        - API's Auxiliares
        - Unidades de Medida
      summary: Obter Unidade de Medida por ID
      description: Obter Unidade de Medida por ID
      operationId: obterUnidadeDeMedidaPorId
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '190'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:10:06 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          is_default:
                            type: boolean
                            example: false
                          unit_of_measure:
                            type: string
                            example: Anos Luz
                      id:
                        type: string
                        example: '11'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                      type:
                        type: string
                        example: units_of_measure
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        is_default: false
                        unit_of_measure: Anos Luz
                      id: '11'
                      relationships:
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                      type: units_of_measure
    delete:
      tags:
        - API's Auxiliares
        - Unidades de Medida
      summary: Remover Unidades de Medida
      description: Remover Unidades de Medida
      operationId: removerUnidadesDeMedida
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '11'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:04:27 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties: {}
              examples:
                Sucesso:
                  value:
                    meta: {}
    parameters:
      - name: unitsOfMeasureId
        in: path
        required: true
        schema:
          type: string
          example: '10'
        description: Id da unidade de medida
  /api/bank_accounts:
    get:
      tags:
        - API's Auxiliares
        - Contas Bancárias
      summary: Obter Todas as Contas Bancárias
      description: Obter Todas as Contas Bancárias
      operationId: obterTodasAsContasBancRias
      responses:
        '200':
          description: ''
    post:
      tags:
        - API's Auxiliares
        - Contas Bancárias
      summary: Criar Contas Bancárias de Utilizador
      description: Criar Contas Bancárias de Utilizador
      operationId: criarContasBancRiasDeUtilizador
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        account_type:
                          type: string
                          example: DO
                        card_number:
                          type: string
                          example: ''
                        consent_until:
                          nullable: true
                          example: null
                        description:
                          type: string
                          example: Descrição de Conta Bancária
                        entity_id:
                          type: number
                          example: 4
                        entity_type:
                          type: string
                          example: Supplier
                        iban:
                          type: string
                          example: PT50001049282327079673219
                        initial_balance:
                          nullable: true
                          example: null
                        is_connected:
                          type: boolean
                          example: false
                        name:
                          type: string
                          example: BANCO BPI, SA
                        nib:
                          type: string
                          example: '001049282327079673219'
                        only_one_payment:
                          nullable: true
                          example: null
                        sub_type:
                          type: string
                          example: ticket_account
                        swift:
                          type: string
                          example: BBPIPTPL
                    type:
                      type: string
                      example: bank_accounts
            examples:
              Criar Contas Bancárias de Fornecedor:
                value:
                  data:
                    attributes:
                      account_type: DO
                      card_number: ''
                      consent_until: null
                      description: Descrição de Conta Bancária
                      entity_id: 4
                      entity_type: Supplier
                      iban: PT50001049282327079673219
                      initial_balance: null
                      is_connected: false
                      name: BANCO BPI, SA
                      nib: '001049282327079673219'
                      only_one_payment: null
                      sub_type: ticket_account
                      swift: BBPIPTPL
                    type: bank_accounts
              Criar Contas Bancárias de Utilizador:
                value:
                  data:
                    attributes:
                      account_type: DO
                      card_number: ''
                      consent_until: null
                      description: Descrição de Conta Bancária de Utilizador
                      entity_id: 7
                      entity_type: User
                      iban: PT50001049282327079673219
                      initial_balance: null
                      is_connected: false
                      name: BANCO BPI, SA
                      nib: '001049282327079673219'
                      only_one_payment: null
                      sub_type: ticket_account
                      swift: BBPIPTPL
                    type: bank_accounts
      responses:
        '200':
          description: Sucesso / Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '454'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:17:58 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          account_type:
                            type: string
                            example: DO
                          card_number:
                            type: string
                            example: ''
                          consent_until:
                            nullable: true
                            example: null
                          description:
                            type: string
                            example: Descrição de Conta Bancária de Utilizador
                          entity_type:
                            type: string
                            example: User
                          iban:
                            type: string
                            example: PT50001049282327079673219
                          initial_balance:
                            nullable: true
                            example: null
                          is_connected:
                            type: boolean
                            example: false
                          name:
                            type: string
                            example: BANCO BPI, SA
                          nib:
                            type: string
                            example: '001049282327079673219'
                          only_one_payment:
                            nullable: true
                            example: null
                          sub_type:
                            type: string
                            example: ticket_account
                          swift:
                            type: string
                            example: BBPIPTPL
                      id:
                        type: string
                        example: '13'
                      relationships:
                        type: object
                        properties:
                          supplier:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          user:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: bank_accounts
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        account_type: DO
                        card_number: ''
                        consent_until: null
                        description: Descrição de Conta Bancária
                        entity_type: Supplier
                        iban: PT50001049282327079673219
                        initial_balance: null
                        is_connected: false
                        name: BANCO BPI, SA
                        nib: '001049282327079673219'
                        only_one_payment: null
                        sub_type: ticket_account
                        swift: BBPIPTPL
                      id: '7'
                      relationships:
                        supplier:
                          data: null
                        user:
                          data: null
                      type: bank_accounts
  /api/bank_accounts/{bankAccountId}:
    get:
      tags:
        - API's Auxiliares
        - Contas Bancárias
      summary: Obter Conta Bancária por Id
      description: Obter Conta Bancária por Id
      operationId: obterContaBancRiaPorId
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '467'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:12:22 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          account_type:
                            type: string
                            example: DO
                          card_number:
                            type: string
                            example: ''
                          consent_until:
                            nullable: true
                            example: null
                          description:
                            nullable: true
                            example: null
                          entity_type:
                            type: string
                            example: User
                          iban:
                            type: string
                            example: PT50001049282327079673218
                          initial_balance:
                            nullable: true
                            example: null
                          is_connected:
                            type: boolean
                            example: false
                          name:
                            type: string
                            example: BANCO BPI, SA
                          nib:
                            type: string
                            example: '001049282327079673218'
                          only_one_payment:
                            nullable: true
                            example: null
                          sub_type:
                            type: string
                            example: ticket_account
                          swift:
                            type: string
                            example: BBPIPTPL
                      id:
                        type: string
                        example: '2'
                      relationships:
                        type: object
                        properties:
                          supplier:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                          user:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000863'
                                  type:
                                    type: string
                                    example: current_company_users
                      type:
                        type: string
                        example: bank_accounts
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        account_type: DO
                        card_number: ''
                        consent_until: null
                        description: null
                        entity_type: User
                        iban: PT50001049282327079673218
                        initial_balance: null
                        is_connected: false
                        name: BANCO BPI, SA
                        nib: '001049282327079673218'
                        only_one_payment: null
                        sub_type: ticket_account
                        swift: BBPIPTPL
                      id: '2'
                      relationships:
                        supplier:
                          data: null
                        user:
                          data:
                            id: '800000863'
                            type: current_company_users
                      type: bank_accounts
    delete:
      tags:
        - API's Auxiliares
        - Contas Bancárias
      summary: Remover Contas Bancárias
      description: Remover Contas Bancárias
      operationId: removerContasBancRias
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '11'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:22:29 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties: {}
              examples:
                Sucesso:
                  value:
                    meta: {}
    parameters:
      - name: bankAccountId
        in: path
        required: true
        schema:
          type: string
          example: '5'
        description: Id da conta bancária
  /api/cash_accounts:
    get:
      tags:
        - API's Auxiliares
        - Contas de Caixa
      summary: Obter Todas as Contas de Caixa
      description: Obter Todas as Contas de Caixa
      operationId: obterTodasAsContasDeCaixa
      responses:
        '200':
          description: ''
    post:
      tags:
        - API's Auxiliares
        - Contas de Caixa
      summary: Criar Contas de Caixa
      description: Criar Contas de Caixa
      operationId: criarContasDeCaixa
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    attributes:
                      type: object
                      properties:
                        name:
                          type: string
                          example: Caixa Teste 2
                    type:
                      type: string
                      example: cash_accounts
            examples:
              Criar Contas de Caixa:
                value:
                  data:
                    attributes:
                      name: Caixa Teste 2
                    type: cash_accounts
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '161'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:23:42 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Caixa Teste 2
                      id:
                        type: string
                        example: '3'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                      type:
                        type: string
                        example: cash_accounts
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        name: Caixa Teste 2
                      id: '3'
                      relationships:
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                      type: cash_accounts
  /api/cash_accounts/{id}:
    get:
      tags:
        - API's Auxiliares
        - Contas de Caixa
      summary: Obter Contas de Caixa por ID
      description: Obter Contas de Caixa por ID
      operationId: obterContasDeCaixaPorId
      responses:
        '200':
          description: Obter Contas de Caixa por ID
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '161'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:23:02 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Caixa Teste 1
                      id:
                        type: string
                        example: '2'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                      type:
                        type: string
                        example: cash_accounts
              examples:
                Obter Contas de Caixa por ID:
                  value:
                    data:
                      attributes:
                        name: Caixa Teste 1
                      id: '2'
                      relationships:
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                      type: cash_accounts
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '2'
        description: TODO
  /api/taxes:
    get:
      tags:
        - API's Auxiliares
        - Taxas
      summary: Obter Todas as Taxas
      description: Obter Todas as Taxas
      operationId: obterTodasAsTaxas
      parameters:
        - name: filter[tax_country_region]
          in: query
          schema:
            type: string
            example: BE
        - name: filter[tax_code]
          in: query
          schema:
            type: string
            example: NOR
        - name: filter[tax_percentage]
          in: query
          schema:
            type: string
            example: '21'
      responses:
        '200':
          description: ' / Sucesso / Sucesso'
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '186'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:25:21 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content: {}
  /api/oss_taxes:
    get:
      tags:
        - API's Auxiliares
        - Taxas
      summary: Obter Todas as Taxas de OSS
      description: Obter Todas as Taxas de OSS
      operationId: obterTodasAsTaxasDeOss
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '4674'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:25:24 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        attributes:
                          type: object
                          properties:
                            code:
                              type: string
                              example: AT
                            country_name:
                              type: string
                              example: Áustria
                            int:
                              type: array
                              items:
                                type: string
                                example: 13#1
                              example:
                                - 13#1
                            nor:
                              type: array
                              items:
                                type: string
                                example: 20#1
                              example:
                                - 20#1
                            red:
                              type: array
                              items:
                                type: string
                                example: 10#1
                              example:
                                - 10#1
                            tax_country_region:
                              type: string
                              example: AT
                        id:
                          type: string
                          example: AT
                        type:
                          type: string
                          example: oss_taxes
                    example:
                      - attributes:
                          code: AT
                          country_name: Áustria
                          int:
                            - 13#1
                          nor:
                            - 20#1
                          red:
                            - 10#1
                          tax_country_region: AT
                        id: AT
                        type: oss_taxes
                      - attributes:
                          code: BE
                          country_name: Bélgica
                          int:
                            - 12#1
                          nor:
                            - 21#1
                          red:
                            - 6#1
                          tax_country_region: BE
                        id: BE
                        type: oss_taxes
                      - attributes:
                          code: BG
                          country_name: Bulgária
                          int:
                            - 9#1
                          nor:
                            - 20#1
                          red: []
                          tax_country_region: BG
                        id: BG
                        type: oss_taxes
                      - attributes:
                          code: CY
                          country_name: Chipre
                          int:
                            - 9#1
                          nor:
                            - 19#1
                          red:
                            - 5#1
                          tax_country_region: CY
                        id: CY
                        type: oss_taxes
                      - attributes:
                          code: CZ
                          country_name: República Checa
                          int:
                            - 15#1
                          nor:
                            - 21#1
                          red:
                            - 10#1
                          tax_country_region: CZ
                        id: CZ
                        type: oss_taxes
                      - attributes:
                          code: DE
                          country_name: Alemanha
                          int: []
                          nor:
                            - 19#1
                          red:
                            - 7#1
                          tax_country_region: DE
                        id: DE
                        type: oss_taxes
                      - attributes:
                          code: DK
                          country_name: Dinamarca
                          int: []
                          nor:
                            - 25#1
                          red: []
                          tax_country_region: DK
                        id: DK
                        type: oss_taxes
                      - attributes:
                          code: EE
                          country_name: Estónia
                          int: []
                          nor:
                            - 20#1
                          red:
                            - 9#1
                          tax_country_region: EE
                        id: EE
                        type: oss_taxes
                      - attributes:
                          code: EL
                          country_name: Grécia
                          int:
                            - 13#1
                          nor:
                            - 24#1
                          red:
                            - 6#1
                          tax_country_region: EL
                        id: EL
                        type: oss_taxes
                      - attributes:
                          code: ES
                          country_name: Espanha
                          int:
                            - 10#1
                          nor:
                            - 21#1
                          red:
                            - 4#1
                          tax_country_region: ES
                        id: ES
                        type: oss_taxes
                      - attributes:
                          code: FI
                          country_name: Finlândia
                          int:
                            - 14#1
                          nor:
                            - 24#1
                          red:
                            - 10#1
                          tax_country_region: FI
                        id: FI
                        type: oss_taxes
                      - attributes:
                          code: FR
                          country_name: França
                          int:
                            - 5.5#1
                            - 10#2
                          nor:
                            - 20#1
                          red:
                            - 2.1#1
                          tax_country_region: FR
                        id: FR
                        type: oss_taxes
                      - attributes:
                          code: HR
                          country_name: Croácia
                          int:
                            - 13#1
                          nor:
                            - 25#1
                          red:
                            - 5#1
                          tax_country_region: HR
                        id: HR
                        type: oss_taxes
                      - attributes:
                          code: HU
                          country_name: Hungria
                          int:
                            - 18#1
                          nor:
                            - 27#1
                          red:
                            - 5#1
                          tax_country_region: HU
                        id: HU
                        type: oss_taxes
                      - attributes:
                          code: IE
                          country_name: Irlanda
                          int:
                            - 9#1
                            - 13.5#2
                          nor:
                            - 23#1
                          red:
                            - 4.8#1
                          tax_country_region: IE
                        id: IE
                        type: oss_taxes
                      - attributes:
                          code: IT
                          country_name: Itália
                          int:
                            - 5#1
                            - 10#2
                          nor:
                            - 22#1
                          red:
                            - 4#1
                          tax_country_region: IT
                        id: IT
                        type: oss_taxes
                      - attributes:
                          code: LT
                          country_name: Lituânia
                          int:
                            - 9#1
                          nor:
                            - 21#1
                          red:
                            - 5#1
                          tax_country_region: LT
                        id: LT
                        type: oss_taxes
                      - attributes:
                          code: LU
                          country_name: Luxemburgo
                          int:
                            - 7#1
                            - 13#2
                          nor:
                            - 16#1
                          red:
                            - 3#1
                          tax_country_region: LU
                        id: LU
                        type: oss_taxes
                      - attributes:
                          code: LV
                          country_name: Letónia
                          int:
                            - 12#1
                          nor:
                            - 21#1
                          red:
                            - 5#1
                          tax_country_region: LV
                        id: LV
                        type: oss_taxes
                      - attributes:
                          code: MC
                          country_name: Mónaco
                          int:
                            - 5.5#1
                            - 10#2
                          nor:
                            - 20#1
                          red: []
                          tax_country_region: MC
                        id: MC
                        type: oss_taxes
                      - attributes:
                          code: MT
                          country_name: Malta
                          int:
                            - 7#1
                          nor:
                            - 18#1
                          red:
                            - 5#1
                          tax_country_region: MT
                        id: MT
                        type: oss_taxes
                      - attributes:
                          code: NL
                          country_name: Países Baixos
                          int: []
                          nor:
                            - 21#1
                          red:
                            - 9#1
                          tax_country_region: NL
                        id: NL
                        type: oss_taxes
                      - attributes:
                          code: PL
                          country_name: Polónia
                          int:
                            - 8#1
                          nor:
                            - 23#1
                          red:
                            - 5#1
                          tax_country_region: PL
                        id: PL
                        type: oss_taxes
                      - attributes:
                          code: PT
                          country_name: Portugal
                          int:
                            - 13#1
                          nor:
                            - 23#1
                          red:
                            - 6#1
                          tax_country_region: PT
                        id: PT
                        type: oss_taxes
                      - attributes:
                          code: PT-AC
                          country_name: Portugal - Açores
                          int:
                            - 9#1
                          nor:
                            - 16#1
                          red:
                            - 4#1
                          tax_country_region: PT-AC
                        id: PT-AC
                        type: oss_taxes
                      - attributes:
                          code: PT-MA
                          country_name: Portugal - Madeira
                          int:
                            - 12#1
                          nor:
                            - 22#1
                          red:
                            - 5#1
                          tax_country_region: PT-MA
                        id: PT-MA
                        type: oss_taxes
                      - attributes:
                          code: RO
                          country_name: Roménia
                          int:
                            - 9#1
                          nor:
                            - 19#1
                          red:
                            - 5#1
                          tax_country_region: RO
                        id: RO
                        type: oss_taxes
                      - attributes:
                          code: SE
                          country_name: Suécia
                          int:
                            - 12#1
                          nor:
                            - 25#1
                          red:
                            - 6#1
                          tax_country_region: SE
                        id: SE
                        type: oss_taxes
                      - attributes:
                          code: SI
                          country_name: Eslovénia
                          int:
                            - 9.5#1
                          nor:
                            - 22#1
                          red:
                            - 5#1
                          tax_country_region: SI
                        id: SI
                        type: oss_taxes
                      - attributes:
                          code: SK
                          country_name: Eslováquia
                          int:
                            - 10#1
                          nor:
                            - 20#1
                          red: []
                          tax_country_region: SK
                        id: SK
                        type: oss_taxes
              examples:
                Sucesso:
                  value:
                    data:
                      - attributes:
                          code: AT
                          country_name: Áustria
                          int:
                            - 13#1
                          nor:
                            - 20#1
                          red:
                            - 10#1
                          tax_country_region: AT
                        id: AT
                        type: oss_taxes
                      - attributes:
                          code: BE
                          country_name: Bélgica
                          int:
                            - 12#1
                          nor:
                            - 21#1
                          red:
                            - 6#1
                          tax_country_region: BE
                        id: BE
                        type: oss_taxes
                      - attributes:
                          code: BG
                          country_name: Bulgária
                          int:
                            - 9#1
                          nor:
                            - 20#1
                          red: []
                          tax_country_region: BG
                        id: BG
                        type: oss_taxes
                      - attributes:
                          code: CY
                          country_name: Chipre
                          int:
                            - 9#1
                          nor:
                            - 19#1
                          red:
                            - 5#1
                          tax_country_region: CY
                        id: CY
                        type: oss_taxes
                      - attributes:
                          code: CZ
                          country_name: República Checa
                          int:
                            - 15#1
                          nor:
                            - 21#1
                          red:
                            - 10#1
                          tax_country_region: CZ
                        id: CZ
                        type: oss_taxes
                      - attributes:
                          code: DE
                          country_name: Alemanha
                          int: []
                          nor:
                            - 19#1
                          red:
                            - 7#1
                          tax_country_region: DE
                        id: DE
                        type: oss_taxes
                      - attributes:
                          code: DK
                          country_name: Dinamarca
                          int: []
                          nor:
                            - 25#1
                          red: []
                          tax_country_region: DK
                        id: DK
                        type: oss_taxes
                      - attributes:
                          code: EE
                          country_name: Estónia
                          int: []
                          nor:
                            - 20#1
                          red:
                            - 9#1
                          tax_country_region: EE
                        id: EE
                        type: oss_taxes
                      - attributes:
                          code: EL
                          country_name: Grécia
                          int:
                            - 13#1
                          nor:
                            - 24#1
                          red:
                            - 6#1
                          tax_country_region: EL
                        id: EL
                        type: oss_taxes
                      - attributes:
                          code: ES
                          country_name: Espanha
                          int:
                            - 10#1
                          nor:
                            - 21#1
                          red:
                            - 4#1
                          tax_country_region: ES
                        id: ES
                        type: oss_taxes
                      - attributes:
                          code: FI
                          country_name: Finlândia
                          int:
                            - 14#1
                          nor:
                            - 24#1
                          red:
                            - 10#1
                          tax_country_region: FI
                        id: FI
                        type: oss_taxes
                      - attributes:
                          code: FR
                          country_name: França
                          int:
                            - 5.5#1
                            - 10#2
                          nor:
                            - 20#1
                          red:
                            - 2.1#1
                          tax_country_region: FR
                        id: FR
                        type: oss_taxes
                      - attributes:
                          code: HR
                          country_name: Croácia
                          int:
                            - 13#1
                          nor:
                            - 25#1
                          red:
                            - 5#1
                          tax_country_region: HR
                        id: HR
                        type: oss_taxes
                      - attributes:
                          code: HU
                          country_name: Hungria
                          int:
                            - 18#1
                          nor:
                            - 27#1
                          red:
                            - 5#1
                          tax_country_region: HU
                        id: HU
                        type: oss_taxes
                      - attributes:
                          code: IE
                          country_name: Irlanda
                          int:
                            - 9#1
                            - 13.5#2
                          nor:
                            - 23#1
                          red:
                            - 4.8#1
                          tax_country_region: IE
                        id: IE
                        type: oss_taxes
                      - attributes:
                          code: IT
                          country_name: Itália
                          int:
                            - 5#1
                            - 10#2
                          nor:
                            - 22#1
                          red:
                            - 4#1
                          tax_country_region: IT
                        id: IT
                        type: oss_taxes
                      - attributes:
                          code: LT
                          country_name: Lituânia
                          int:
                            - 9#1
                          nor:
                            - 21#1
                          red:
                            - 5#1
                          tax_country_region: LT
                        id: LT
                        type: oss_taxes
                      - attributes:
                          code: LU
                          country_name: Luxemburgo
                          int:
                            - 7#1
                            - 13#2
                          nor:
                            - 16#1
                          red:
                            - 3#1
                          tax_country_region: LU
                        id: LU
                        type: oss_taxes
                      - attributes:
                          code: LV
                          country_name: Letónia
                          int:
                            - 12#1
                          nor:
                            - 21#1
                          red:
                            - 5#1
                          tax_country_region: LV
                        id: LV
                        type: oss_taxes
                      - attributes:
                          code: MC
                          country_name: Mónaco
                          int:
                            - 5.5#1
                            - 10#2
                          nor:
                            - 20#1
                          red: []
                          tax_country_region: MC
                        id: MC
                        type: oss_taxes
                      - attributes:
                          code: MT
                          country_name: Malta
                          int:
                            - 7#1
                          nor:
                            - 18#1
                          red:
                            - 5#1
                          tax_country_region: MT
                        id: MT
                        type: oss_taxes
                      - attributes:
                          code: NL
                          country_name: Países Baixos
                          int: []
                          nor:
                            - 21#1
                          red:
                            - 9#1
                          tax_country_region: NL
                        id: NL
                        type: oss_taxes
                      - attributes:
                          code: PL
                          country_name: Polónia
                          int:
                            - 8#1
                          nor:
                            - 23#1
                          red:
                            - 5#1
                          tax_country_region: PL
                        id: PL
                        type: oss_taxes
                      - attributes:
                          code: PT
                          country_name: Portugal
                          int:
                            - 13#1
                          nor:
                            - 23#1
                          red:
                            - 6#1
                          tax_country_region: PT
                        id: PT
                        type: oss_taxes
                      - attributes:
                          code: PT-AC
                          country_name: Portugal - Açores
                          int:
                            - 9#1
                          nor:
                            - 16#1
                          red:
                            - 4#1
                          tax_country_region: PT-AC
                        id: PT-AC
                        type: oss_taxes
                      - attributes:
                          code: PT-MA
                          country_name: Portugal - Madeira
                          int:
                            - 12#1
                          nor:
                            - 22#1
                          red:
                            - 5#1
                          tax_country_region: PT-MA
                        id: PT-MA
                        type: oss_taxes
                      - attributes:
                          code: RO
                          country_name: Roménia
                          int:
                            - 9#1
                          nor:
                            - 19#1
                          red:
                            - 5#1
                          tax_country_region: RO
                        id: RO
                        type: oss_taxes
                      - attributes:
                          code: SE
                          country_name: Suécia
                          int:
                            - 12#1
                          nor:
                            - 25#1
                          red:
                            - 6#1
                          tax_country_region: SE
                        id: SE
                        type: oss_taxes
                      - attributes:
                          code: SI
                          country_name: Eslovénia
                          int:
                            - 9.5#1
                          nor:
                            - 22#1
                          red:
                            - 5#1
                          tax_country_region: SI
                        id: SI
                        type: oss_taxes
                      - attributes:
                          code: SK
                          country_name: Eslováquia
                          int:
                            - 10#1
                          nor:
                            - 20#1
                          red: []
                          tax_country_region: SK
                        id: SK
                        type: oss_taxes
  /api/currencies:
    get:
      tags:
        - API's Auxiliares
        - Unidade Monetária
      summary: Obter Todas as Unidades Monetárias
      description: Obter Todas as Unidades Monetárias
      operationId: obterTodasAsUnidadesMonetRias
      responses:
        '200':
          description: ''
  /api/currencies/{currencyId}:
    get:
      tags:
        - API's Auxiliares
        - Unidade Monetária
      summary: Obter Todas as Unidade Monetária por Id
      description: Obter Todas as Unidade Monetária por Id
      operationId: obterTodasAsUnidadeMonetRiaPorId
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '151'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:28:31 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          iso_code:
                            type: string
                            example: USD
                          symbol:
                            type: string
                            example: $
                      id:
                        type: string
                        example: '2'
                      relationships:
                        type: object
                        properties:
                          country:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '2'
                                  type:
                                    type: string
                                    example: countries
                      type:
                        type: string
                        example: currencies
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        iso_code: USD
                        symbol: $
                      id: '2'
                      relationships:
                        country:
                          data:
                            id: '2'
                            type: countries
                      type: currencies
    parameters:
      - name: currencyId
        in: path
        required: true
        schema:
          type: string
          example: '2'
        description: Id da unidade monetária
  /api/expense_categories:
    get:
      tags:
        - API's Auxiliares
        - Categorias de Despesa
      summary: Obter Todas as Categorias de Despesa
      description: Obter Todas as Categorias de Despesa
      operationId: obterTodasAsCategoriasDeDespesa
      responses:
        '200':
          description: ''
  /api/expense_categories/{id}:
    get:
      tags:
        - API's Auxiliares
        - Categorias de Despesa
      summary: Obter  Categorias de Despesa por Id
      description: Obter  Categorias de Despesa por Id
      operationId: obterCategoriasDeDespesaPorId
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '644'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:31:11 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          accounting_number:
                            type: string
                            example: '241'
                          accounting_suffix:
                            type: string
                            example: '241'
                          categories_count:
                            type: number
                            example: 0
                          company_id:
                            type: number
                            example: 800000046
                          created_at:
                            type: string
                            example: '2023-04-27 11:26:41'
                          enumerations_expense_category_grouping_id:
                            nullable: true
                            example: null
                          enumerations_profit_and_losses_category_id:
                            nullable: true
                            example: null
                          help:
                            nullable: true
                            example: null
                          is_deletable:
                            type: boolean
                            example: false
                          is_editable:
                            type: boolean
                            example: false
                          is_main:
                            type: boolean
                            example: true
                          is_ready:
                            nullable: true
                            example: null
                          name:
                            type: string
                            example: Impostos Sobre o Rendimento
                          parent_expense_category_id:
                            nullable: true
                            example: null
                          tax_code:
                            type: string
                            example: NOR
                          tax_deductibility:
                            type: number
                            example: 100
                          updated_at:
                            type: string
                            example: '2023-04-27 11:26:41'
                      id:
                        type: string
                        example: '2'
                      relationships:
                        type: object
                        properties:
                          company:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: '800000046'
                                  type:
                                    type: string
                                    example: current_company
                          parent_expense_category:
                            type: object
                            properties:
                              data:
                                nullable: true
                                example: null
                      type:
                        type: string
                        example: expense_categories
              examples:
                Sucesso:
                  value:
                    data:
                      attributes:
                        accounting_number: '241'
                        accounting_suffix: '241'
                        categories_count: 0
                        company_id: 800000046
                        created_at: '2023-04-27 11:26:41'
                        enumerations_expense_category_grouping_id: null
                        enumerations_profit_and_losses_category_id: null
                        help: null
                        is_deletable: false
                        is_editable: false
                        is_main: true
                        is_ready: null
                        name: Impostos Sobre o Rendimento
                        parent_expense_category_id: null
                        tax_code: NOR
                        tax_deductibility: 100
                        updated_at: '2023-04-27 11:26:41'
                      id: '2'
                      relationships:
                        company:
                          data:
                            id: '800000046'
                            type: current_company
                        parent_expense_category:
                          data: null
                      type: expense_categories
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: '2'
  /api/commercial_document_series:
    get:
      tags:
        - API's Auxiliares
        - Documentos de Série
      summary: Obter Documentos de Série com filtro
      description: Obter Documentos de Série com filtro
      operationId: obterDocumentosDeSRieComFiltro
      parameters:
        - name: filter[document_type]
          in: query
          schema:
            type: string
            example: FT
        - name: filter[prefix]
          in: query
          schema:
            type: string
            example: '2023'
        - name: filter[number]
          in: query
          schema:
            type: string
            example: '13'
      responses:
        '200':
          description: Sucesso
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
            Connection:
              schema:
                type: string
                example: close
            Content-Length:
              schema:
                type: string
                example: '960'
            Date:
              schema:
                type: string
                example: Tue, 05 Mar 2024 11:35:48 GMT
            Pragma:
              schema:
                type: string
                example: no-cache
            Server:
              schema:
                type: string
                example: nginx/1.22.1
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        attributes:
                          type: object
                          properties:
                            active:
                              type: boolean
                              example: true
                            activity_code:
                              nullable: true
                              example: null
                            address_id:
                              nullable: true
                              example: null
                            allow_mb_reference:
                              type: boolean
                              example: false
                            at_status:
                              type: string
                              example: active
                            at_status_date:
                              nullable: true
                              example: null
                            at_type:
                              type: string
                              example: normal
                            atcud_prefix:
                              type: string
                              example: THIS_IS_FAKE
                            bank_account_id:
                              nullable: true
                              example: null
                            broker_edi:
                              nullable: true
                              example: null
                            cashed_vat:
                              type: boolean
                              example: false
                            communication_date:
                              nullable: true
                              example: null
                            company_id:
                              type: number
                              example: 800000046
                            copies:
                              type: number
                              example: 1
                            created_at:
                              type: string
                              example: '2023-04-27 11:26:40.38374'
                            data:
                              type: object
                              properties: {}
                            description:
                              nullable: true
                              example: null
                            direct_debit:
                              type: boolean
                              example: false
                            document_series_id:
                              nullable: true
                              example: null
                            document_theme_id:
                              nullable: true
                              example: null
                            document_type:
                              type: string
                              example: FT
                            electronic_invoice:
                              type: boolean
                              example: false
                            external_registration:
                              type: boolean
                              example: false
                            hidden:
                              type: boolean
                              example: false
                            is_default:
                              type: boolean
                              example: false
                            is_edi:
                              type: boolean
                              example: false
                            manual_registration:
                              type: boolean
                              example: false
                            number:
                              type: number
                              example: 13
                            observations:
                              nullable: true
                              example: null
                            oss_country_id:
                              nullable: true
                              example: null
                            oss_tax_defaults:
                              type: array
                              items: {}
                              example: []
                            prefix:
                              type: string
                              example: '2023'
                            render_banks_data:
                              type: boolean
                              example: false
                            render_banks_data_fr:
                              type: boolean
                              example: false
                            updated_at:
                              type: string
                              example: '2024-03-04 16:51:35.941381'
                            vat_included_prices:
                              type: boolean
                              example: false
                        id:
                          type: string
                          example: '72'
                        relationships:
                          type: object
                          properties:
                            company:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: '800000046'
                                    type:
                                      type: string
                                      example: current_company
                        type:
                          type: string
                          example: commercial_document_series
                    example:
                      - attributes:
                          active: true
                          activity_code: null
                          address_id: null
                          allow_mb_reference: false
                          at_status: active
                          at_status_date: null
                          at_type: normal
                          atcud_prefix: THIS_IS_FAKE
                          bank_account_id: null
                          broker_edi: null
                          cashed_vat: false
                          communication_date: null
                          company_id: 800000046
                          copies: 1
                          created_at: '2023-04-27 11:26:40.38374'
                          data: {}
                          description: null
                          direct_debit: false
                          document_series_id: null
                          document_theme_id: null
                          document_type: FT
                          electronic_invoice: false
                          external_registration: false
                          hidden: false
                          is_default: false
                          is_edi: false
                          manual_registration: false
                          number: 13
                          observations: null
                          oss_country_id: null
                          oss_tax_defaults: []
                          prefix: '2023'
                          render_banks_data: false
                          render_banks_data_fr: false
                          updated_at: '2024-03-04 16:51:35.941381'
                          vat_included_prices: false
                        id: '72'
                        relationships:
                          company:
                            data:
                              id: '800000046'
                              type: current_company
                        type: commercial_document_series
              examples:
                Sucesso:
                  value:
                    data:
                      - attributes:
                          active: true
                          activity_code: null
                          address_id: null
                          allow_mb_reference: false
                          at_status: active
                          at_status_date: null
                          at_type: normal
                          atcud_prefix: THIS_IS_FAKE
                          bank_account_id: null
                          broker_edi: null
                          cashed_vat: false
                          communication_date: null
                          company_id: 800000046
                          copies: 1
                          created_at: '2023-04-27 11:26:40.38374'
                          data: {}
                          description: null
                          direct_debit: false
                          document_series_id: null
                          document_theme_id: null
                          document_type: FT
                          electronic_invoice: false
                          external_registration: false
                          hidden: false
                          is_default: false
                          is_edi: false
                          manual_registration: false
                          number: 13
                          observations: null
                          oss_country_id: null
                          oss_tax_defaults: []
                          prefix: '2023'
                          render_banks_data: false
                          render_banks_data_fr: false
                          updated_at: '2024-03-04 16:51:35.941381'
                          vat_included_prices: false
                        id: '72'
                        relationships:
                          company:
                            data:
                              id: '800000046'
                              type: current_company
                        type: commercial_document_series
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: '{{base_url_oauth}}/auth'
          tokenUrl: '{{base_url_oauth}}/token'
          scopes:
            commercial: commercial
security:
  - oauth2:
      - commercial
tags:
  - name: Empresa
  - name: Clientes, Moradas e Email
  - name: Clientes
  - name: Moradas
  - name: Email
  - name: Fornecedores, Moradas e Email
  - name: Fornecedores
  - name: Moradas1
  - name: Email1
  - name: Produtos e Serviços
  - name: Produtos
  - name: Serviços
  - name: Vendas
  - name: Documentos de Venda
  - name: Recibos de Venda
  - name: Descarregar PDF de Documentos de Venda
  - name: Comunicação de de Documentos à AT
  - name: Envio de Documentos por email
  - name: Envio de Recibos por email
  - name: Compras
  - name: Documentos de Compra
  - name: Pagamentos
  - name: Descarregar PDF de Documentos de Compra
  - name: Versões Anteriores
  - name: Vendas1
    description: Descontiuado
  - name: Documentos de Venda1
  - name: Recibos de Venda1
  - name: Compras1
    description: Descontiuado
  - name: Documentos de Compra1
  - name: Pagamentos1
  - name: API's Auxiliares
  - name: Contactos
  - name: Descritores de Taxa
  - name: Família de Item
  - name: Países
  - name: Unidades de Medida
  - name: Contas Bancárias
  - name: Contas de Caixa
  - name: Taxas
  - name: Unidade Monetária
  - name: Categorias de Despesa
  - name: Documentos de Série
