Skip to main content

sgrRetornaCodigoCNPJCPFOpen

Returns the Opentech code of the CNPJ/CPF entered.

SoapAction

PARAMETERS

FieldTypeReq.Description
keyaccessstringYesKey returned by the sgrLogin method.
cdpasintegerYesPAS code, returned by the sgrListaPASUsuario method
cdclienteintegerYesCustomer code, returned by the sgrListaEmpresasPASUsuario method.
nrcnpjcpfstringYesCNPJ/CPF number.
typeintegerYesSearch type (1-Shipper, 2-Carrier, 3-Tracking company, 4-Recipient).

METHOD RETURN:

ReturnDataset: If the parameters are correct, the property will display:

FieldTypeDescription
CODIGOintegerCompany code
NAMEstringCompany name
NRCNPJCPFstringSearched CNPJ/CPF number

ReturnDescription: If there is an error when executing the method, the property will display:

ErrorDescription
CNPJ/CPF does not exist in our database, or not linked to the customerYou need to check that the code and CPF/CNPJ have been entered correctly. For type=1, search for the code in sgrListaEmbarcadores; for type=2 use sgrListaTransportadoras; for type=3 use sgrListaEmpresasRastreamento; and type=4, use sgrListaDestinatarios. If not found, contact your account manager.