Gera uma nota fiscal, podendo ser vinculada a uma transação existente ou avulsa.
Changed onEsta 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:
-
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.
-
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
| Campo | Tipo | Descrição | Obrigatório |
|---|---|---|---|
| TransacaoId | GUID | Id da transação, caso a NF seja vinculada | Não |
| NfServicoId | GUID | Id do serviço da NF | Sim |
| NfeModel | Objeto | Modelo da NF com cliente, serviço e valores | Condicional* |
*Obrigatório apenas se TransacaoId não for informado (emissão avulsa).
Request
- Base URLhttps://pagamentos.meuk8.com.br/PagamentosAPI
- URLhttps://pagamentos.meuk8.com.br/PagamentosAPI/api/NotaFiscal
- AuthOAuth 2PasswordToken URL: /BknBankPagamentosAPI/token scopes: BknBankPagamentosAPI
Headers
Request body
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
Changes
- breaking
the
response's property type changed fromstringtoarrayfor status (media type: application/json) - breaking
the
response's property format changed fromuuidto no format for status (media type: application/json) - breaking
the
response's property format changed fromuuidto no format for status (media type: text/json) - breaking
the
response's property format changed fromuuidto no format for status (media type: application/xml) - breaking
the
response's property format changed fromuuidto 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
CREATEDenum value to theresponse property for the response status (media type: application/json) - warning
added the new
CREATEDenum value to theresponse property for the response status (media type: text/json) - warning
added the new
CREATEDenum value to theresponse property for the response status (media type: application/xml) - warning
added the new
CREATEDenum value to theresponse property for the response status (media type: text/xml) - warning
added the new
ERRORenum value to theresponse property for the response status (media type: application/json) - warning
added the new
ERRORenum value to theresponse property for the response status (media type: text/json) - warning
added the new
ERRORenum value to theresponse property for the response status (media type: application/xml) - warning
added the new
ERRORenum value to theresponse property for the response status (media type: text/xml) - info
api operation id
NotaFiscal_GerarNotaFiscalremoved and replaced withNotaFiscal_GerarNotaFiscal_GerarNotaFiscal_POST - info
the security scope
BknBankPagamentosAPIwas added to the endpoint's security schemeoauth2 - info
the security scope
BknBankCobrancasAPIwas removed from the endpoint's security schemeoauth2 - 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)
- breaking