NotaFiscal

Gera uma nota fiscal, podendo ser vinculada a uma transação existente ou avulsa.

Changed on

Esta API permite que empresas automatizem o processo de emissão de notas fiscais, otimizando o fluxo de trabalho e garantindo a conformidade fiscal.

Existem dois cenários para emissão:

  1. Nota fiscal vinculada a uma transação existente:

    • Informe TransacaoId e NfServicoId.
    • A API processará a transação existente e retornará o número da nota fiscal gerada.
  2. Nota fiscal avulsa (não vinculada a transação):

    • Informe apenas NfServicoId e um modelo de nota fiscal (NfeModel) com os dados do cliente, serviço e valores.
    • A API processará os dados do modelo e retornará o número da nota fiscal gerada.

Requisição

CampoTipoDescriçãoObrigatório
TransacaoIdGUIDId da transação, caso a NF seja vinculadaNão
NfServicoIdGUIDId do serviço da NFSim
NfeModelObjetoModelo da NF com cliente, serviço e valoresCondicional*

*Obrigatório apenas se TransacaoId não for informado (emissão avulsa).

post/api/NotaFiscal

Request

  • Base URL
    https://pagamentos.meuk8.com.br/PagamentosAPI
  • URL
    https://pagamentos.meuk8.com.br/PagamentosAPI/api/NotaFiscal
  • Auth
    OAuth 2
    Password
    Token URL: /BknBankPagamentosAPI/token scopes: BknBankPagamentosAPI

Headers

Aeskeystring required

Request body

transacaoIdstring uuid
nfServicoIdstring uuid

Example request

{
  "exemploVinculado": {
    "transacaoId": "5a21c7b9-a7d7-4378-a482-ab82a61e76d5",
    "nfServicoId": "61a7b1aa-1606-40aa-9c6b-6964608be5ea"
  },
  "exemploAvulso": {
    "nfServicoId": "69c2b0d0-b948-401d-938a-1008ee8d8270",
    "nfeModel": {
      "idExterno": "NF-123456",
      "ambienteEmissao": "producao",
      "enviarPorEmail": true,
      "cliente": {
        "tipoPessoa": "J",
        "nome": "Empresa Exemplo LTDA",
        "email": "financeiro@empresaexemplo.com",
        "cpfCnpj": "12345678000199",
        "inscricaoMunicipal": "12345",
        "inscricaoEstadual": "987654321",
        "telefone": "(11) 98765-4321",
        "endereco": {
          "pais": "Brasil",
          "uf": "SP",
          "cidade": "São Paulo",
          "logradouro": "Av. Paulista",
          "numero": "1000",
          "complemento": "10º andar",
          "bairro": "Bela Vista",
          "cep": "01310000"
        }
      },
      "servico": {
        "descricao": "Prestação de serviços de consultoria",
        "issRetidoFonte": false,
        "iss": 0,
        "valorCofins": 10,
        "valorCsll": 3.5,
        "valorInss": 0,
        "valorIr": 0,
        "valorPis": 2.5
      },
      "valorTotal": 150.75,
      "observacoes": "Nota fiscal avulsa emitida via API."
    }
  }
}

Response

NF gerada com sucesso

Retorno'CREATED' | 'ERROR'
DetalhesErrostring[]
NfeIdstring

Changes

    • breaking

      the response's property type changed from string to array for status (media type: application/json)

    • breaking

      the response's property format changed from uuid to no format for status (media type: application/json)

    • breaking

      the response's property format changed from uuid to no format for status (media type: text/json)

    • breaking

      the response's property format changed from uuid to no format for status (media type: application/xml)

    • breaking

      the response's property format changed from uuid to no format for status (media type: text/xml)

    • warning

      removed the request property (media type: application/json)

    • warning

      removed the request property (media type: text/json)

    • warning

      removed the request property (media type: application/xml)

    • warning

      removed the request property (media type: text/xml)

    • warning

      removed the request property (media type: application/x-www-form-urlencoded)

    • warning

      removed the optional property from the response with the status (media type: application/json)

    • warning

      removed the optional property from the response with the status (media type: text/json)

    • warning

      removed the optional property from the response with the status (media type: application/xml)

    • warning

      removed the optional property from the response with the status (media type: text/xml)

    • warning

      removed the optional property from the response with the status (media type: application/json)

    • warning

      removed the optional property from the response with the status (media type: text/json)

    • warning

      removed the optional property from the response with the status (media type: application/xml)

    • warning

      removed the optional property from the response with the status (media type: text/xml)

    • warning

      removed the optional property from the response with the status (media type: application/json)

    • warning

      removed the optional property from the response with the status (media type: text/json)

    • warning

      removed the optional property from the response with the status (media type: application/xml)

    • warning

      removed the optional property from the response with the status (media type: text/xml)

    • warning

      added the new CREATED enum value to the response property for the response status (media type: application/json)

    • warning

      added the new CREATED enum value to the response property for the response status (media type: text/json)

    • warning

      added the new CREATED enum value to the response property for the response status (media type: application/xml)

    • warning

      added the new CREATED enum value to the response property for the response status (media type: text/xml)

    • warning

      added the new ERROR enum value to the response property for the response status (media type: application/json)

    • warning

      added the new ERROR enum value to the response property for the response status (media type: text/json)

    • warning

      added the new ERROR enum value to the response property for the response status (media type: application/xml)

    • warning

      added the new ERROR enum value to the response property for the response status (media type: text/xml)

    • info

      api operation id NotaFiscal_GerarNotaFiscal removed and replaced with NotaFiscal_GerarNotaFiscal_GerarNotaFiscal_POST

    • info

      the security scope BknBankPagamentosAPI was added to the endpoint's security scheme oauth2

    • info

      the security scope BknBankCobrancasAPI was removed from the endpoint's security scheme oauth2

    • info

      added the new optional request property // (media type: application/json)

    • info

      added the new optional request property // (media type: text/json)

    • info

      added the new optional request property // (media type: application/xml)

    • info

      added the new optional request property // (media type: text/xml)

    • info

      added the new optional request property // (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property // (media type: application/json)

    • info

      added the new optional request property // (media type: text/json)

    • info

      added the new optional request property // (media type: application/xml)

    • info

      added the new optional request property // (media type: text/xml)

    • info

      added the new optional request property // (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: text/json)

    • info

      added the new optional request property (media type: application/xml)

    • info

      added the new optional request property (media type: text/xml)

    • info

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/json)

    • info

      added the optional property to the response with the status (media type: application/xml)

    • info

      added the optional property to the response with the status (media type: text/xml)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/json)

    • info

      added the optional property to the response with the status (media type: application/xml)

    • info

      added the optional property to the response with the status (media type: text/xml)