Consultar
A rota Consultar é utilizada sempre que for necessário consultar um evento do EFD-Reinf.
GET
https://api.tecnospeed.com.br/reinf/v2/evento/consultar
Headers
Nome
Descrição
Exemplo
Parâmetro token obtido na rota /auth , deve ser informado como um Bearer Token
Bearer xxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxx.xxxxx...
Id do evento
b66c2386-d77sd-d4ea-9999-ab18742a4ad7
CPF ou CNPJ do empregador
57695458000120 ou 42256836890
ambiente
Ambiente de envio do Evento
2
versaomanual
Versão atual do Reinf
2.1.02
Fluxo Otimizado para consulta do evento R-2099
1
Atenção! Recomendamos utilizar o parâmetro "consultatotalizador=1 " na requisição para uso do fluxo otimizado de consulta junto a SEFAZ do evento R-2099.
Observação : Clientes que utilizam o componente Reinf já utilizam esse fluxo.
Retorno
O retorno será um JSON com a mesma estrutura de campos do TX2 enviado.
Exemplo de retorno:
{
"message": "Evento retornado",
"data": {
"status_envio": {
"codigo": "0",
"mensagem": "SUCESSO"
},
"status_consulta": {
"codigo": "0",
"mensagem": "SUCESSO"
},
"ocorrencias": [],
"eventos": [
{
"status": {
"codigo": "0",
"mensagem": "SUCESSO"
},
"id": "ID1081871680000002018078509583100001",
"infoRecEv": {
"dhProcess": "2018-07-24T10:03:48.5158836-03:00",
"tpEv": "2020",
"idEv": "ID1081871680000002018072409583100001",
"hash": "tx8OFAl/NThziGVuGLJgh7pqZ220ctsXeTNnZn539EI="
},
"recibo": "14661-08-2020-1787-14661",
"R5001": {
"nrRecArqBase": "14661-08-2020-1787-14661",
"RPrest": {
"tpInscTomador": "1",
"nrInscTomador": "88065610000114",
"vlrTotalBaseRet": "100,00",
"vlrTotalRetPrinc": "11,00",
"vlrTotalRetAdic": "0,00",
"vlrTotalNRetPrinc": "0,00",
"vlrTotalNRetAdic": "0,00"
},
"ideContri": {
"tpInsc": "1",
"nrInsc": "08187168"
},
"ideEvento": {
"perApur": "2018-07"
}
}
}
],
"cnpj_sh": "86837822000147",
"id": "d8bc6dac-fcf6-4f45-ab3e-618f3213725f",
"xml": "<evento id=\"ID1081871680000002018074959583100001\"><Reinf xmlns=\"http://www.reinf.esocial.gov.br/schemas/evtPrestadorServicos/v1_03_02\"><evtServPrest id=\"ID1081871680000002018072409583100001\"><ideEvento><indRetif>1</indRetif><perApur>2018-07</perApur><tpAmb>2</tpAmb><procEmi>1</procEmi><verProc>1.0</verProc></ideEvento><ideContri><tpInsc>1</tpInsc><nrInsc>08187168</nrInsc></ideContri><infoServPrest><ideEstabPrest><tpInscEstabPrest>1</tpInscEstabPrest><nrInscEstabPrest>29062609000177</nrInscEstabPrest><ideTomador><tpInscTomador>1</tpInscTomador><nrInscTomador>88065610000114</nrInscTomador><indObra>0</indObra><vlrTotalBruto>100,00</vlrTotalBruto><vlrTotalBaseRet>100,00</vlrTotalBaseRet><vlrTotalRetPrinc>11,00</vlrTotalRetPrinc><nfs><serie>001</serie><numDocto>193456789121456</numDocto><dtEmissaoNF>2018-07-20</dtEmissaoNF><vlrBruto>100,00</vlrBruto><infoTpServ><tpServico>100000005</tpServico><vlrBaseRet>100,00</vlrBaseRet><vlrRetencao>11,00</vlrRetencao></infoTpServ></nfs></ideTomador></ideEstabPrest></infoServPrest></evtServPrest><Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"/><SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\"/><Reference URI=\"#ID1081871680000002018072409583100001\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/><Transform Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/><DigestValue>tx8OFAl/NThziGVuGLJgh7pqZ220ctsXeTNnZn539EI=</DigestValue></Reference></SignedInfo><SignatureValue>Ds8Z/1QjMFvWskANFRrysmUBf/WAthc9Q7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DgxODcxNjgwMDAxNjCgOAYFYEwBAwSgLxMtMTQxMDE5Nzg5OTA0OTMyNTkwNDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwoBcGBWBMAQMHoA4TDDAwMDAwMDAwMDAwMDANBgkqhkiG9w0BAQsFAAOCAgEARGADzr06vz0jDtcj6SETQUWv5WNnBqjf1paGAghO0dxDWdhh02KnQdg152BdyjBhb/3vMYjkqOiv8Sg6oVqqGHIxzD7mOj0ffLZPE4GHNvd5UgMecAkdnarPZ7QP/VmEcYstyaO/6hjrON1XWFZR/VnLJGijDl1PekYyRYJO8WUo6F++VEU8Vi1/ef0X5Y6kO5C20eI+o4hRQPDai13HvlHvrlpSZTUYpydqn07WYZ587qkNhRcggMRQ+QWPVTieW8YDpAPuKhrcwN3mphePVCnRlEyX2eG2IiBRCFl1cqVZ2RJSS0DCZMR1pZ8FZiRJH5M8FAmQPhAFXLX30BlRXtA+2MUGL+t56QNnRs+LJW5ViMo6DaNt/jL5mW92gHNB7CatixAcmop1OhN8t9/Krzv6x4JbpAJQ4e2zjWVpWoB8Nm6WrsC6RBUsBdELhWu5zRB2RTnrJpf5SiY6CcHyOV5haZVypQ0wjq0pIex9GpGWT2wapH+/orz+Jc2G42nJuxvvz1Sq7o6Ws2wILKWppZ0vzqTVQQYmWnNnrzu+Vmsp5QTE1eyI3ffaCmRHaBs9zXdSNkuzAfBcKzCH0J8iyfhkZ1EaGEfVe/fxPqK2QUMcuESdybMc3zwJ5K4CA0dyDB9hi8xkXzg/xhb+RkaEqQoyO6Y5EJYoKKWvxl2oXw8=</X509Certificate></X509Data></KeyInfo></Signature></Reinf></evento>",
"xml_retorno": "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><ReceberLoteEventosResponse xmlns=\"http://sped.fazenda.gov.br/\"><ReceberLoteEventosResult><Reinf xmlns=\"http://www.reinf.esocial.gov.br/schemas/retornoLoteEventos/v1_03_02\"><retornoLoteEventos id=\"IDA1C709DF4D16E62CB716CFDBD75F20AE\"><ideTransmissor><IdTransmissor>29062609000177</IdTransmissor></ideTransmissor><status><cdStatus>0</cdStatus><descRetorno>SUCESSO</descRetorno></status><retornoEventos><evento id=\"ID1081871680000002018072409583100001\"><Reinf xmlns=\"http://www.reinf.esocial.gov.br/schemas/evtTotal/v1_03_02\"><evtTotal id=\"ID-926834440\"><ideEvento><perApur>2018-07</perApur></ideEvento><ideContri><tpInsc>1</tpInsc><nrInsc>08187168</nrInsc></ideContri><ideRecRetorno><ideStatus><cdRetorno>0</cdRetorno><descRetorno>SUCESSO</descRetorno></ideStatus></ideRecRetorno><infoRecEv><dhProcess>2018-07-24T10:03:48.5158836-03:00</dhProcess><tpEv>2020</tpEv><idEv>ID1081871680000002018072409583100001</idEv><hash>tx8OFAl/NThziGVuGLJgh7pqZ220ctsXeTNnZn539EI=</hash></infoRecEv><infoTotal><nrRecArqBase>14661-08-2020-1807-14661</nrRecArqBase><RPrest><tpInscTomador>1</tpInscTomador><nrInscTomador>88065610000114</nrInscTomador><vlrTotalBaseRet>100,00</vlrTotalBaseRet><vlrTotalRetPrinc>11,00</vlrTotalRetPrinc><vlrTotalRetAdic>0,00</vlrTotalRetAdic><vlrTotalNRetPrinc>0,00</vlrTotalNRetPrinc><vlrTotalNRetAdic>0,00</vlrTotalNRetAdic></RPrest></infoTotal></evtTotal><Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"/><SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\"/><Reference URI=\"#ID-926834440\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/><Transform Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/><DigestValue>30oksDwo52/3xBxgwWEH6uRT1Dygn/b+dn6eOFjZq2c=</DigestValue></Reference></SignedInfo><SignatureValue>wGed2BVuzzycTQ68RJxQNKMxBc1ubZXiR3a62bBx3wzQ9wkt8Ctb2xRcZeI1pLu+rZ5bQVKNfDzgbrHlhla5Hemin6vDLhvLMiCL89jHWAvwtU9ZyovSK57vPXiSYXGhyRJMzC0qb3MKk8ApHd60+xDQfaSsFawjpf7MIucBrHj0yvEEDdRBjuzeWSfi0bMpUoj2FdJ6dnzIoRf3xsYKsno9v3yIEDii1fUda/xpvoOynqHu2kULtsWI1RXgkJX7YD3n8XWIXxoRvVw63BS/lOa+jeqhVuZ1O43lpV1X/wPwNBcSt6U6P+n13zIDuXzjIPnmGmeY4hqexvWw+yd/9Q==</SignatureValue><KeyInfo><X509Data><X509Certificate>MIIHcDCCBVigAwIBAgICTGkwDQYJKoZIhvcNAQELBQAwgY4xCzAJBgNVBAYTAkJSMRMwEQYDVQQKDApJQ1AtQnJhc2lsMTYwNAYDVQQLDC1TZWNyZXRhcmlhIGRhIFJlY2VpdGEgRmVkZXJhbCBkbyBCcmFzaWwgLSBSRkIxMjAwBgNVBAMMKUF1dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBkbyBTRVJQUk9SRkIgU1NMMB4XDTE3MDkyNzE3MjI1MloXDTE4MDkyNzE3MjI1MlowgboxCzAJBgNVBAYTAkJSMRMwEQYDVQQKDApJQ1AtQnJhc2lsMTYwNAYDVQQLDC1TZWNyZXRhcmlhIGRhIFJlY2VpdGEgRmVkZXJhbCBkbyBCcmFzaWwgLSBSRkIxETAPBgNVBAsMCEFSU0VSUFJPMRowGAYDVQQLDBFSRkIgZS1TZXJ2aWRvciBBMTEvMC0GA1UEAwwmcHJlcHJvZGVmZHJlaW5mLnJlY2VpdGEuZmF6ZW5kYS5nb3YuYnIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB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wBAwKgGQQXRURVQVJETyBZT1NISURBIFNBTE9NQU+gGQYFYEwBAwOgEAQOMzM2ODMxMTEwMDAxMDeBHWVkdWFyZG8ueW9zaGlkYUBzZXJwcm8uZ292LmJyMA4GA1UdDwEB/wQEAwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggIBAEA7eq1vHVjPuVdP5K/zlUlJCW7hwhn0kJDCU5ybiPQE9xW48Wx8ypz6sM9axbp9PfNMV1JkBqiDK30nNYF+xOgS+OJsNFZfdAwMgOQeZYemuTZgc6V3/QZbrhehZ447qAlZxvYaHD0fZhJuP8pMOu5gS1JOxQHHbAke/qJEVo1SQhUFttFs9daCeTlEF0xtj8wUvnKF0BF86Cc6+LI+ab0F8CVmph64uWaxLDvJ/h6LftxOcnz59z5+uIOdEQLMQWl0Qgxk+PUvhU/CacwP2B94ouQdfyaCLbSgAFck7nhgwowxX7JA3V4OlQRw7aAjt8Kikh/NjWYTfF/GZeEy90XCW8DbBmg4bSIdnaAds9Y6ne4CjO1fPILoDZRXBAzKrvBYyN6/GOd/u1nlMe3OvEPa8zpc565kxbUZZGFqPk5Tv4+11od7rJ+l/4KTj0ok0hRXnpEWQBsbSQ/YsFSOIOaID2uvyl/Q2C0YRbea+OrtmRgMqMAXWUn9TxMbAw2KgoV/V4/3Gv4QVZ/HRGPLidv9UVxf10n8imNwYrjo1focwIym254uUmyeRYcrCWh+UR0x3dwU5agb2uRNkoJ8aTGwpNNhlFdUDCwIulzi8EQRBIp1nuqEW7mQPOnH+PdKwAxd7ESfehnESjmrw0i55AZJF0rhn7CW8lxi2RXmjj9S</X509Certificate></X509Data></KeyInfo></Signature></Reinf></evento></retornoEventos></retornoLoteEventos></Reinf></ReceberLoteEventosResult></ReceberLoteEventosResponse></s:Body></s:Envelope>",
"json_retorno": [
{
"status": {
"codigo": "0",
"mensagem": "SUCESSO"
},
"id": "ID1081871680000002018072409583100001",
"infoRecEv": {
"dhProcess": "2018-07-24T10:03:48.5158836-03:00",
"tpEv": "2020",
"idEv": "ID1081871680000002018072409583100001",
"hash": "tx8OFAl/NThziGVuGLJgh7pqZ220ctsXeTNnZn539EI="
},
"recibo": "14661-08-2020-1787-14661",
"R5001": {
"nrRecArqBase": "14661-08-2020-1787-14661",
"RPrest": {
"tpInscTomador": "1",
"nrInscTomador": "88065610000114",
"vlrTotalBaseRet": "100,00",
"vlrTotalRetPrinc": "11,00",
"vlrTotalRetAdic": "0,00",
"vlrTotalNRetPrinc": "0,00",
"vlrTotalNRetAdic": "0,00"
},
"ideContri": {
"tpInsc": "1",
"nrInsc": "08187168"
},
"ideEvento": {
"perApur": "2018-07"
}
}
}
]
}
}
Exemplo de retorno com erro:
{
"error" : {
"message" : "Lote de eventos não encontrado."
}
Comentários
0 comentário
Por favor, entre para comentar.