Professional Documents
Culture Documents
Web-Service Lookup - SPC Brasil
Web-Service Lookup - SPC Brasil
The purpose of this document is to introduce Web-Service available to consult to SPC Brazil's products. The purpose of this document is not to describe its technology and specifications related to the access to
Web-Services.
For any further details, as data types, may be found directly from the file named as "WSDL", available in the addresses bel ow:
Contents
1 Acess
2 Authentication
3 Operation "listarProdutos"
4 Operation "detalharProduto"
5 Inputs with returned occurences
6 Operation "consultar"
7 Replicated entities
7.1 Comments:
8 Latest changes
Access
Production
Type-approval:
Training:
WSDL:
Authentication
The service authentication follows the http basic standard way (check the file "Forma padrão de autenticação dos web -services da aplicação Java").
Operation "listarProdutos"
Description: Returns all products available to consult.
Usage rules:
1. If there is no product available to the operator, the operation does not return any data.
Return: A list about available products to the operator, containing the following attributes:
Nome Descrição
codigo Product code.
nome Product name.
A list of parameters needed to make a lookup on a product. Each parameter has two attributes: "required", which indicates if the parameter will be
parametro
mandatory when making a consult to a product, and "name" describes the parameter.
insumo-opcional A list of optional inputs which can be requested when making a lookup on a product. These inputs will only be returned on the query if requested by the operator.
insumo-retorno Inputs configurated on product.
Exceções:
Operation "detalharProduto"
Description: It returns the details about a specific product, if available to consult for the operator. This operation is similiar to “listarProdutos”; however, is used in a specific product.
Usage Rules:
Entry Parameters:
Nome Descrição
codigo-produto Product code to be inserted. All available products for a query may be obtained through the "listarProdutos" operation
Retorno: Data product requested, if available to the operator. The attributes returned to the product are the same set on "Listar Produtos" operation.
Exceptions:
Operation "lookup"
Descrição: It makes a lookup on a determined product.
Usage rules:
The product code to be consulted must always be sent. The needs/requirements about the others parameters depends on sett ings from the consulted product; the operations “listar produtos” and “detalharProduto”
they can be used to find which parameters are necessary/required for an determined consult to a determined product.
In order to the query of the product can be successfully completed, the operator from the entity/associate needs to have access to the product. The operator profile handled also needs permission to access on consult
to the determined product.
The returned data on consult may vary according to the product consulted; therefore, all the elements should be treated, for the result of the consult is variable, according to the consulted product. The elements set
in a product appear on a return of a consult, even if does not exist the information to the document consulted; In these cases, the amount of the referred input is shown as 0 (zero). The optional inputs appear on the
return only if they are requested in the entry parameters previously.
The parameter uses CMC7 who configures the way to notify the bank checks for consult, if it was given (is used-CMC7= True), There are three gaps which represent CMC7 that must be provided; the obligatoriness
of the data to be inserted depends on settings of the product, therefore, each set of parameters (CMC7 or bank/account/agency/initial number check) are validated all-in-one set, thus, if the bank info was given, for
example, will be needed to provide all others parameters as (account/agency/initial number check). In the list with detailed bank checks, all data of every bank check will also be valited as set.
Some information introduce a summary item, the block below presents the total amount of register/info, value and date of the latest occurrence. For more details check on wdsl document.
Exemplo (spc):
Some entities might force the entry of bank check data through CMC7; In these cases, an error will occur as soon as the consu lt be executed and will inform the initial bank check data (see errors table)
Details such as, for example, types of data, they won't be mentioned at this document, they can be obtained at wsdl document (see above how to obtain it)
Sample Request:
Sample Reply:
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Vary: Accept-Encoding
Date: Mon, 25 Feb 2013 16:09:00 GMT
Connection: close
Content-Type: text/xml; charset=utf-8
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:resultado data="2013-02-25T13:09:01.881-03:00" restricao="true" xmlns:ns2="http://webservice.consulta.spcjava.spcbrasil.org/">
<protocolo digito="7" numero="100007153"/>
<operador nome="OPERADOR" codigo="111555"/>
<consumidor>
<consumidor-pessoa-juridica razao-social="BANCO DO BRASIL SA" numero-NIRE-NIRC="53300000638" nome-comercial="DIRECAO GERAL" data-fundacao="1966-08-01T00:00:00-03:00">
<cnpj numero="00000000000191"/>
<situacao-cnpj data-situacao="2013-02-23T18:00:00-03:00" descricao-situacao="ATIVA"/>
<endereco cep="70073901" bairro="ASA SUL" complemento="QUADRAQUADRA 01 BLOCO G" numero=" " logradouro="ST BANCARIO SUL S/N">
<cidade nome="BRASILIA">
<estado sigla-uf="DF"/>
</cidade>
</endereco>
<natureza-juridica codigo="2038" descricao="S.A CAP. ABERTO - CONTR.ACIONARIO ESTATAL "/>
<atividade-economica-principal codigo="6422100" descricao="BANCOS MÚLTIPLOS, COM CARTEIRA COMERCIAL"/>
<atividade-economica-secundaria codigo="6499999" descricao="OUTRAS ATIVIDADES DE SERVIÇOS FINANCEIROS NÃO ESPECIFICADAS ANTERIORMENTE"/>
</consumidor-pessoa-juridica>
</consumidor>
<grafia-pj>
<detalhe-grafia-pj razao-social="B DO BRASIL SA"/>
</grafia-pj>
<endereco-cep-consultado/>
<ultimo-telefone-informado>
<detalhe-ultimo-telefone-informado quantidade-consulta="1" data-ultima-consulta="2008-03-20T00:00:00-03:00"
data-primeira-consulta="2008-03-20T00:00:00-03:00">
<telefone numero="32806253" numero-ddd="31"/>
</detalhe-ultimo-telefone-informado>
</ultimo-telefone-informado>
<ultimo-endereco-informado>
<detalhe-ultimo-endereco-informado>
<endereco cep="69055250" bairro="PQ 10 DE NOVEMBRO" complemento="A" numero="87"
logradouro="RUA 07 (CJ. CASTELO BRANCO), 87 - A - PQ 10 DE NO">
<cidade nome="MANAUS">
<estado sigla-uf="AM"/>
</cidade>
</endereco>
</detalhe-ultimo-endereco-informado>
<detalhe-ultimo-endereco-informado>
<endereco cep="66050100" bairro="UMARIZAL" complemento="EM FRENTE AO LIDER TOP" numero=" "
logradouro="TV DOM PEDRO I, 01083">
<cidade nome="BELEM">
<estado sigla-uf="PA"/>
</cidade>
</endereco>
</detalhe-ultimo-endereco-informado>
</ultimo-endereco-informado>
<spc>
<resumo valor-ultima-ocorrencia="1677.11" data-ultima-ocorrencia="2013-02-21T00:00:00-03:00" quantidade-total="42"/>
<detalhe-spc valor="1677.11" comprador-fiador-avalista="COMPRADOR" contrato="60511217" nome-entidade="CDL - RECIFE / PE"
data-vencimento="2013-01-12T00:00:00-02:00" data-inclusao="2013-02-21T00:00:00-03:00" codigo-entidade="1101" nome-associado="COMPESA">
<cidade-associado nome="RECIFE">
<estado sigla-uf="PE"/>
</cidade-associado>
<telefone-associado numero="34129563" numero-ddd="81"/>
</detalhe-spc>
<detalhe-spc valor="38.58" comprador-fiador-avalista="COMPRADOR" contrato="60511209" nome-entidade="CDL - RECIFE / PE"
data-vencimento="2013-01-12T00:00:00-02:00" data-inclusao="2013-02-21T00:00:00-03:00" codigo-entidade="1101" nome-associado="COMPESA">
<cidade-associado nome="RECIFE">
<estado sigla-uf="PE"/>
</cidade-associado>
<telefone-associado numero="34129563" numero-ddd="81"/>
</detalhe-spc>
<detalhe-spc valor="787.36" comprador-fiador-avalista="COMPRADOR" contrato="0000500002441892" nome-entidade="SAO PAULO / SP"
data-vencimento="2011-04-27T00:00:00-03:00" data-inclusao="2011-05-25T00:00:00-03:00" nome-associado="LIGHT S.E.S.A"/>
</spc>
<credito-concedido>
<resumo valor-total="127" data-ultima-ocorrencia="2013-02-01T00:00:00-02:00" quantidade-total="1"/>
<detalhe-credito-concedido valor="127" quantidade-credito="2" mes-vencimento="2" ano-vencimento="2013"/>
</credito-concedido>
<consulta-realizada quantidade-dias-consultados="90">
<resumo data-ultima-ocorrencia="2013-02-25T00:00:00-03:00" quantidade-total="85"/>
<detalhe-consulta-realizada nome-entidade-origem="CDL - BELO HORIZONTE / MG" data-consulta="2013-02-25T09:47:47-03:00" nome-associado="TRANSFACIL">
<origem-associado nome="BELO HORIZONTE">
<estado sigla-uf="MG"/>
</origem-associado>
</detalhe-consulta-realizada>
<detalhe-consulta-realizada nome-entidade-origem="CDL - JI-PARANA / RO" data-consulta="2013-02-22T13:11:44-03:00" nome-associado="AGRO RODEIO">
<origem-associado nome="JI-PARANA">
<estado sigla-uf="RO"/>
</origem-associado>
</detalhe-consulta-realizada>
<detalhe-consulta-realizada nome-entidade-origem="CDL - GOIANIA / GO" data-consulta="2013-02-22T12:12:26-03:00" nome-associado="CATRAL">
<origem-associado nome="GOIANIA">
<estado sigla-uf="GO"/>
</origem-associado>
</detalhe-consulta-realizada>
</consulta-realizada>
<capital-social/>
<antecessora/>
<atividade-empresa>
<detalhe-atividade-empresa>
<ramo-atividade codigo="6422100" descricao="BANCOS MÚLTIPLOS, COM CARTEIRA COMERCIAL"/>
<atividades-economicas-secundarias codigo="6499999" descricao="OUTRAS ATIVIDADES DE SERVIÇOS FINANCEIROS NÃO ESPECIFICADAS ANTERIORMENTE"/>
</detalhe-atividade-empresa>
</atividade-empresa>
</ns2:resultado>
</S:Body>
</S:Envelope
Entry parameters:
Name: Description
codigo-produto The product code to be consulted. All available products for consult can be found through the Operation "ListarProdutos".
Indicates if the data of initial bank check to be consulted will be given through CMC7 (uses-CMC7 = True) or through bank/account/agency/check number data
utiliza-CMC7
(uses-CMC7 = False)
banco-cheque-inicial The number of initial bank check to be consulted; has to be given only if (uses-CMC7 = False)
agencia-cheque-inicial The agency bank check number to be consulted (without the digit); has to be given only if (uses-CMC7 = false)
conta-corrente-cheque-inicial Checking account number of the initial check to be consulted (without the digit); has to be given only if (uses-CMC7 = false)
digito-conta-corrente-cheque-inicial Digit of checking account number of the initial check to be consulted (without the digit); has to be given only if (uses -CMC7 = false)
numero-cheque-inicial The initial number of bank check to be consulted; has to be given only if (uses-CMC7 = false)
digito-cheque-inicial The checking account digit of the initial check to be consulted; has to be given only if (uses-CMC7 = false)
cmc71-cheque-inicial The first part of CMC7 of the initial check to be consulted; has to be given only if (uses-CMC7 = false)
cmc72-cheque-inicial The second part of CMC7 of the initial check to be consulted; has to be given only if (uses-CMC7 = false)
cmc73-cheque-inicial The third part of CMC7 of the initial check to be consulted; has to be given only if (uses-CMC7 = false)
cheque-detalhado Bank checks to be consulted; the amount of detailed bank checks need to be equal to the same amount of bank checks inserted on previously parameter.
Optional Input Code you may add to consult. Optional Inputs depend on product configuration to be consulted, and may be found on “ListarProdutos” and
codigo-insumo-opcional
“detalharProduto” operations.
All the information marked * return when are consulted "2 Bureaux" products
restricao Indicates whether consultation returned represent credit restiction from the consumer consulted.
cpf;
nome;
data-nascimento;
nome-pai;
nome-mae;
sexo;
estado-civil;
numero-titulo-eleitor;
email;
numero-rg;
estado-rg;
signo;
situacao-cpf;
idade;
consumido endereco;
telefone-residencial;
telefone-celular;
telefone-comercial;
fax.
cnpj;
nome-comercial;
razao-social;
data-fundacao;
inscricao-estadual;
valor-capital-social;
numero-NIRE-NIRC;
razao-social-anterior;
situacao-cnpj;
situacao-inscricao-estadual;
natureza-juridica;
atividade-economica-principal;
endereco;
telefone;
fax;
atividade-economica-secundaria.
grafia-pj Forms of razão social writings consulted (if documents provided on filter are CNPJ).They will only be shown if exist more than a way of writings.
socio All shareholders informations related to company consulted. (if documents provided on filter are CNPJ).
administrador All administrators informations related to company consulted. (if documents provided on filter are CNPJ).
cheque-final: all information about final bank check, if dealing with a group of bank checks.
cheque-lojista
nome-associado: name of the associate responsible for inclusion record;
cheque-final: all information about final bank check, if dealing with a group of countermand bank checks.
Recording of stopped check does not match to the document previously consulted.
0 - Internal Error.
16 - Initial bank check provided -- it must inform if uses CMC7 or data check bank.
20 - Invalid Bank.
21 - Invalid Agency.
29 - Amount of detailed bank checks does not match to amount of bank checks provided.
33 - The number of detailed check has been provided more than once.
50 - The external base is not working at the time; please try again (only for products which access exclusively external information)
51 - The information on external base are not available (only for products which access exclusively external information)
52 - Acess is restricted only for migrated entities (When an operator from replicated entity trys to consult via web-service lookup for migrated entities).
53 - It should be provided entity code, replicated associate and document consultant. (for web-service of replicated entities, when any information is not provided)
54 - Replicated associate provided is not registered (There is no register for the code provided via parameter of the replicated associate at SPC Brasil )
56 - Document consultant provided does not match to register data of the associate (only for web-service of replicated entities.)
Replicated Entities
Replicated entities should provide additional data for associate identify and consultant entity. Therefore, There are differences on service requisition utilized for this type of ent ity (check the URL's above and its WDSL's
documents)
documento-consultante: The number of CPF or CNPJ from the consultant associate. SPC
tipo-pessoa-consultante: Type of person related to the provided document in the previous field; must be legal entity or individual.
codigo-entidade-origem: Entity code which are running a consult. It must be the same entity code given previously in the replication process.
codigo-associado-origem: Associate code which are running a consult. It must be the same entity code given previously in the replication process.
Comments:
All data provided will be Os dados enviados will be cross-checked with associate register, replicated to SPC Brasil. It will be executed the following validations:
The associate code provided should correspond to an associate from entity provided.
The number of the document consultant should have the number of the document consultant registered for the associate, via rep lication process.
Entidades replicadas não conseguirão utilizar o web-service destinado à entidades migradas, e vice-versa.
Latest changes
attributes added: telefone-associado and codigo-entidade for spc and cheque-lojista, and tipo-cliente-score for spc-score-3-meses and spc-score-12-meses;
february/2012 limite-credito-sugerido input is now available.
Inclusion of specific attributes were made for consults of entities not migrated.