Web Service Gera Guias GNRE
Click
here
for a complete list of operations.
BuscaGuiaPDF
Busca Guia(s) específica(s) através do CNPJ do emitente e do número do recibo (que pode ser mais de um), independente do status da guia. Lista de códigos de retorno: 0 = Sucesso | 1 = Não autorizado, Verifique o CNPJ, Usuário e Token. | 2 = Lote processado com pendências. | 3 = Erro ao transmitir o lote de guias. | 4 = Falha ao buscar guias. | 5 = Falha ao gerar o PDF. | 6 = Lote contém guia(s) de outro CNPJ não processado.Test
The test form is not available with struct, array or byref parameter types. Please use a SOAP 1.1 or 1.2 compliant client program for testing of your web service.
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /webgnre/geraguiagnre.wso HTTP/1.1
Host: guiasgnre.com.br
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<BuscaGuiaPDF xmlns="http://guiasgnre/webgnre">
<sEmpresa>string</sEmpresa>
<sUsuario>string</sUsuario>
<sChaveApi>string</sChaveApi>
<Lote>
<retorno>int</retorno>
<msg_retorno>string</msg_retorno>
<lote>int</lote>
<recibos>
<tReciboNota>
<emitente>string</emitente>
<num_nota_fiscal>int</num_nota_fiscal>
<modelo>string</modelo>
<serie>string</serie>
<emissao_nf>string</emissao_nf>
<receita>string</receita>
<status>string</status>
<recibo>string</recibo>
<data_recibo>string</data_recibo>
</tReciboNota>
<tReciboNota>
<emitente>string</emitente>
<num_nota_fiscal>int</num_nota_fiscal>
<modelo>string</modelo>
<serie>string</serie>
<emissao_nf>string</emissao_nf>
<receita>string</receita>
<status>string</status>
<recibo>string</recibo>
<data_recibo>string</data_recibo>
</tReciboNota>
</recibos>
</Lote>
</BuscaGuiaPDF>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<BuscaGuiaPDFResponse xmlns="http://guiasgnre/webgnre">
<BuscaGuiaPDFResult>
<retorno>int</retorno>
<msg_retorno>string</msg_retorno>
<lote>int</lote>
<pdf_guias>
<tPdfGuias>
<pdf>
<unsignedByte>unsignedByte</unsignedByte>
<unsignedByte>unsignedByte</unsignedByte>
</pdf>
<nome>string</nome>
</tPdfGuias>
<tPdfGuias>
<pdf>
<unsignedByte>unsignedByte</unsignedByte>
<unsignedByte>unsignedByte</unsignedByte>
</pdf>
<nome>string</nome>
</tPdfGuias>
</pdf_guias>
</BuscaGuiaPDFResult>
</BuscaGuiaPDFResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /webgnre/geraguiagnre.wso HTTP/1.1
Host: guiasgnre.com.br
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<BuscaGuiaPDF xmlns="http://guiasgnre/webgnre">
<sEmpresa>string</sEmpresa>
<sUsuario>string</sUsuario>
<sChaveApi>string</sChaveApi>
<Lote>
<retorno>int</retorno>
<msg_retorno>string</msg_retorno>
<lote>int</lote>
<recibos>
<tReciboNota>
<emitente>string</emitente>
<num_nota_fiscal>int</num_nota_fiscal>
<modelo>string</modelo>
<serie>string</serie>
<emissao_nf>string</emissao_nf>
<receita>string</receita>
<status>string</status>
<recibo>string</recibo>
<data_recibo>string</data_recibo>
</tReciboNota>
<tReciboNota>
<emitente>string</emitente>
<num_nota_fiscal>int</num_nota_fiscal>
<modelo>string</modelo>
<serie>string</serie>
<emissao_nf>string</emissao_nf>
<receita>string</receita>
<status>string</status>
<recibo>string</recibo>
<data_recibo>string</data_recibo>
</tReciboNota>
</recibos>
</Lote>
</BuscaGuiaPDF>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<BuscaGuiaPDFResponse xmlns="http://guiasgnre/webgnre">
<BuscaGuiaPDFResult>
<retorno>int</retorno>
<msg_retorno>string</msg_retorno>
<lote>int</lote>
<pdf_guias>
<tPdfGuias>
<pdf>
<unsignedByte>unsignedByte</unsignedByte>
<unsignedByte>unsignedByte</unsignedByte>
</pdf>
<nome>string</nome>
</tPdfGuias>
<tPdfGuias>
<pdf>
<unsignedByte>unsignedByte</unsignedByte>
<unsignedByte>unsignedByte</unsignedByte>
</pdf>
<nome>string</nome>
</tPdfGuias>
</pdf_guias>
</BuscaGuiaPDFResult>
</BuscaGuiaPDFResponse>
</soap12:Body>
</soap12:Envelope>
JSON
The following is a sample JSON request and response. The placeholders shown need to be replaced with actual values.
POST /webgnre/geraguiagnre.wso HTTP/1.1
Host: guiasgnre.com.br
Content-Type: application/json; charset=utf-8
Content-Length: length
{
"sEmpresa":
string
"sUsuario":
string
"sChaveApi":
string
"Lote":
{
"retorno":
int
"msg_retorno":
string
"lote":
int
"recibos":
[
{
"emitente":
string
"num_nota_fiscal":
int
"modelo":
string
"serie":
string
"emissao_nf":
string
"receita":
string
"status":
string
"recibo":
string
"data_recibo":
string
},
{
"emitente":
string
"num_nota_fiscal":
int
"modelo":
string
"serie":
string
"emissao_nf":
string
"receita":
string
"status":
string
"recibo":
string
"data_recibo":
string
}
]
}
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: length
{
"retorno":
int
"msg_retorno":
string
"lote":
int
"pdf_guias":
[
{
"pdf":
[
unsignedByte,
unsignedByte
]
"nome":
string
},
{
"pdf":
[
unsignedByte,
unsignedByte
]
"nome":
string
}
]
}