LmCast :: Stay tuned in

Every invoice in Brazil's economy runs on SOAP 1.2. We mapped it all

Recorded: Sept. 15, 2026, 4:08 a.m.

Original Summarized

GitHub - stoix-dev/sefaz-webservices-postman: Coleção Postman completa dos webservices da SEFAZ: NF-e, NFC-e, CT-e e MDF-e (SOAP 1.2, mTLS com e-CNPJ). Distribuição DFe testada em produção. · GitHub

Skip to content

Navigation MenuSign inAppearance settingsPlatformAI CODE CREATIONGitHub CopilotWrite better code with AIGitHub Copilot appDirect agents from issue to mergeMCP RegistryIntegrate external toolsDEVELOPER WORKFLOWSActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesCode QualityEnforce quality at mergeAPPLICATION SECURITYGitHub Advanced SecurityFind and fix vulnerabilitiesCode securitySecure your code as you buildSecret protectionStop leaks before they startEXPLOREWhy GitHubDocumentationBlogChangelogMarketplaceView all featuresSolutionsBY COMPANY SIZEEnterprisesSmall and medium teamsStartupsNonprofitsBY USE CASEApp ModernizationDevSecOpsDevOpsCI/CDView all use casesBY INDUSTRYHealthcareFinancial servicesManufacturingGovernmentView all industriesView all solutionsResourcesEXPLORE BY TOPICAISoftware DevelopmentDevOpsSecurityView all topicsEXPLORE BY TYPECustomer storiesEvents & webinarsEbooks & reportsBusiness insightsGitHub SkillsSUPPORT & SERVICESDocumentationCustomer supportCommunity forumTrust centerPartnersView all resourcesOpen SourceCOMMUNITYGitHub SponsorsFund open source developersPROGRAMSSecurity LabMaintainer CommunityGitHub StarsArchive ProgramREPOSITORIESTopicsTrendingCollectionsEnterpriseENTERPRISE SOLUTIONSEnterprise platformAI-powered developer platformAVAILABLE ADD-ONSGitHub Advanced SecurityEnterprise-grade security featuresCopilot for BusinessEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricingSearch/Sign inSign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

Uh oh!

There was an error while loading. Please reload this page.


stoix-dev

/

sefaz-webservices-postman

Public

Notifications
You must be signed in to change notification settings

Fork
0

Star
0

Code

Issues
0

Pull requests
0

Actions

Projects

Security and quality
0

Insights

Additional navigation options

Code

Issues

Pull requests

Actions

Projects

Security and quality

Insights

mainBranchesTagsGo to fileCodeOpen more actions menuLatest commit History1 Commit1 CommitFolders and filesNameNameLast commit messageLast commit datepostmanpostman  .gitignore.gitignore  LICENSELICENSE  README.mdREADME.md  build_collection.pybuild_collection.py  gen_inventario.pygen_inventario.py  inventario.jsoninventario.json  View all filesRepository files navigationREADMEMIT licenseMore itemsCatálogo de Webservices da SEFAZ (coleção Postman)
Coleção Postman completa e documentada dos webservices dos documentos fiscais
eletrônicos brasileiros: NF-e (55), NFC-e (65), CT-e (57) e MDF-e (58).
Arquivo: postman/SEFAZ-Webservices-Catalogo.postman_collection.json
(29 itens em 5 pastas: uma por modelo + referência de eventos.)
Por que existe
Integrar com a SEFAZ exige garimpar manuais (MOC NF-e/NFC-e 4.00, CT-e 4.00,
MDF-e 3.00b, NT 2015.002) e portais de autorizadores para descobrir URL,
envelope SOAP e peculiaridades de cada serviço. Esta coleção entrega isso
pronto: cada request com envelope SOAP 1.2 montado e variáveis {{}}.
Os dois serviços de distribuição DFe (CT-e e MDF-e) foram validados contra a
SEFAZ em produção em 12/09/2026 (cStat 137) e estão marcados com [OK testado].
Setup no Postman

Import > postman/SEFAZ-Webservices-Catalogo.postman_collection.json.
Certificado (Settings > Certificates > Add Certificate): adicione seu e-CNPJ A1
(.pfx + senha) por host. Para as distribuições:
www1.cte.fazenda.gov.br, mdfe.svrs.rs.gov.br, mdfe-homologacao.svrs.rs.gov.br.
Settings > General: desligue "SSL certificate verification" (as ACs da
ICP-Brasil não estão no trust store do Postman).
Em cada request, copie a URL (homolog ou prod, da descrição) para a variável
{{url}}, ajuste cnpj, cUF, tpAmb etc, e dispare.

Convenções

[cadeado] no nome: o XML de dados exige assinatura XMLDSig (autorização,
eventos, inutilização). O Postman não assina XML; para esses serviços use um
assinador ou código próprio. Consultas, status e distribuição não assinam.
[OK testado]: validado contra a SEFAZ (cStat 137).
Todos SOAP 1.2: o action viaja no Content-Type, não em header SOAPAction.

Diferenças que pegam (aprendidas no teste real)

CT-e distribuição (Ambiente Nacional): distDFeInt COM cUFAutor, wrapper
cteDistDFeInteresse > cteDadosMsg, sem cabecMsg.
MDF-e distribuição (SVRS): distDFeInt SEM cUFAutor (o cUF vai no
mdfeCabecMsg do header), mdfeDadosMsg direto no Body. Só tem distNSU e
consNSU (não tem consChNSU).
NF-e distribuição (AN): igual ao CT-e (com cUFAutor), versão 1.01.
CT-e 4.00: autorização é só síncrona (SincV4/OSV4/GTVeV4); lote assíncrono
e inutilização não existem no rol nacional.
MDF-e 3.00: autorização síncrona com área de dados em GZip+base64.
NFC-e: exige CSC + QR Code (infNFeSupl); sem SVC (contingência offline
tpEmis=9); UFs AM/GO/MS/MT/PR/RS/SP têm ambiente próprio.

Escopo e limites

URLs default do SVRS (atende a maioria das UFs) + Ambiente Nacional
para as distribuições. Não cobre as 27 UFs uma a uma; para autorizador próprio
(ex. NFC-e SP), trocar a URL na variável.
Eventos estão como pasta de referência (códigos de tpEvento); são enviados
pelo RecepcaoEvento do respectivo modelo.

Como é gerado
Fonte de verdade: gen_inventario.py gera inventario.json; build_collection.py
monta o .json do Postman. Para propor mudança, edite o gen_inventario.py,
rode os dois e abra um PR.
Repositórios irmãos

ciot-integradoras-postman: CIOT via ANTT (pefServices) e integradoras de pagamento de frete
antt-webservices-postman: webservices da ANTT (CIOT, RNTRC, dados abertos)

Sobre
Mantido pela Stoix. Licença MIT.
AboutColeção Postman completa dos webservices da SEFAZ: NF-e, NFC-e, CT-e e MDF-e (SOAP 1.2, mTLS com e-CNPJ). Distribuição DFe testada em produção.TopicsbrasilctedfefiscalmdfenfcenfepostmansefazResourcesReadmeMIT licenseActivityCustom propertiesStars0 starsWatchers0 watchingForks0 forksReport repositoryReleasesPackagesContributorsLanguages

Footer

© 2026 GitHub, Inc.

Footer navigation

Terms

Privacy

Security

Status

Community

Docs

Contact

Manage cookies

Do not share my personal information

You can’t perform that action at this time.

This repository provides a comprehensive and documented Postman collection designed to handle the web services for Brazilian fiscal documents, specifically NF-e, NFC-e, CT-e, and MDF-e, utilizing SOAP 1.2 and mutual TLS (mTLS) authenticated with the e-CNPJ. The primary objective of this collection is to streamline the integration process by eliminating the need for manual investigation of official manuals and authorization portals to discover necessary service URLs, SOAP envelopes, and service peculiarities; instead, it preassembles request structures, including correctly formatted SOAP 1.2 envelopes with dynamic variables. The distribution functions for DFe, specifically the CT-e and MDF-e, have been validated in a production environment with the SEFAZ on September 12, 2026, and are marked as tested.

Setting up the collection involves importing the JSON file and configuring a certificate for the e-CNPJ to be used for host authentication across the specified distribution endpoints. It is noted that for certain configurations within Postman, such as SSL certificate verification, must be disabled because the necessary ACs from the ICP-Brasil are not present in the Postman trust store. Throughout the workflow, specific conventions must be observed; for XML data requiring signature, such as authorization and event data, the Postman setup is insufficient, necessitating the use of external signing tools or custom code. Queries and status requests, however, do not require XML signing. Furthermore, the documentation specifies that in all SOAP 1.2 interactions, the action is carried within the Content-Type header rather than the SOAPAction header.

The collection details specific technical differences observed during testing between the various document distribution protocols. For example, the CT-e distribution (National Environment) involves a specific structure with cUFAutor, whereas the MDF-e distribution (SVRS) differs by placing the cUF in the header while the data resides in the body. The NF-e distribution mirrors that of the CT-e, while CT-e version 4.00 involves synchronous authorization with asynchronous lot processing. The MDF-e version 3.00 utilizes synchronous authorization with GZip+base64 encoding for the data area. The NFC-e mechanism requires specific elements like CSC and QR Codes, and accounts for regional variations across different User Facilities (UFs) such as AM, GO, MS, MT, PR, RS, and SP, each potentially having its own environment.

The generation of this Postman collection is managed through scripts, where gen_inventario.py generates the inventory file, and build_collection.py constructs the final Postman JSON structure. Any proposed modifications to the service parameters necessitate editing gen_inventario.py, running both scripts, and submitting a pull request for review. The collection focuses on standard default URLs and the National Environment for distributions; for specific services requiring authorization from a particular UF, such as a local NFC-e provider, the corresponding URL variable must be explicitly adjusted. Event codes are referenced separately in dedicated folders, serving as a reference for the events that are sent via the respective RecepcaoEvento modules. This repository is part of a broader system of related repositories focused on integration, including those managing ANTTwebservices and CIOT services.