Through the Sefaz WS Status Consult service, it’s possible to check the working status of Sefaz’s WS.
The NS API automatically controls the Sefaz’s WS status consult and carries out the SVC contingency issuance process if the normal authorizing Sefaz is not receiving requests and has enabled contingency issuance.
URL
Production: POST https://nfe.ns.eti.br/util/wssefazstatus
Input data
The input data of this method must be sent in the request body in JSON format.
Field | Description | Notes |
---|---|---|
X-AUTH-TOKEN | User access token | |
CNPJCont | Contributor's CNPJ | The contributor's CNPJ must be provided to identify the digital certificate that will be used in communication with Sefaz |
UF | Acronym of the state of the person to be consulted | |
tpAmb | Environment type | 1 - Production 2 - Homologation |
versao | NF-e project version | 4.00 |
Request example
Consult WS status request sending data via JSON
curl -X POST \
-H "Content-Type: application/json" \-d '{"X-AUTH-TOKEN": "YOUR_TOKEN", "CNPJCont": "11111111111111", "tpAmb": "2", "UF": 43, "versao": "4.00"}'\
https://nfe.ns.eti.br/util/wssefazstatus
Returned data
Field | Description | Data Type | Occurrence | Parent | Notes |
---|---|---|---|---|---|
status | Processing status code | Int | 1-1 | ||
motivo | Processing status literal description | String | 1-1 | ||
retStatusServico | Object containing the requested person data | Object | 0-1 | Only when status = 200 | |
cStat | Sefaz's WS situation code | Int | 1-1 | retStatusServico | |
xMotivo | Sefaz's WS situation literal description | String | 1-1 | retStatusServico |
Return exapmle
Successful return
{
"status": 200,
"motivo": "Consulta realizada com sucesso",
"retStatusServico": {
"cStat": 107,
"xMotivo": "Servico em Operacao"
}
}
Return code
Code | Description |
---|---|
200 | Consult carried out successfully |
-3 | Not possible to carry out the consult because of an error in the request. Check the return to identify the reason |