sgrRetornaCodigoCNPJCPFOpen
Returns the Opentech code of the CNPJ/CPF entered.
PARAMETERS
| Field | Type | Req. | Description |
|---|---|---|---|
| keyaccess | string | Yes | Key returned by the sgrLogin method. |
| cdpas | integer | Yes | PAS code, returned by the sgrListaPASUsuario method |
| cdcliente | integer | Yes | Customer code, returned by the sgrListaEmpresasPASUsuario method. |
| nrcnpjcpf | string | Yes | CNPJ/CPF number. |
| type | integer | Yes | Search type (1-Shipper, 2-Carrier, 3-Tracking company, 4-Recipient). |
METHOD RETURN:
ReturnDataset: If the parameters are correct, the property will display:
| Field | Type | Description |
|---|---|---|
| CODIGO | integer | Company code |
| NAME | string | Company name |
| NRCNPJCPF | string | Searched CNPJ/CPF number |
ReturnDescription: If there is an error when executing the method, the property will display:
| Error | Description |
|---|---|
| CNPJ/CPF does not exist in our database, or not linked to the customer | You 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. |