sgrIncluirTransportadora
Inclusion of carriers in the customer register.
PARAMETERS
| Field | Type | Required? | Description |
|---|---|---|---|
| accesskey | string | Yes | Key returned by the sgrLogin method. |
| cdPas | integer | Yes | PAS code, returned by the sgrListaPASUsuario method |
| cdcliente | integer | Yes | Client code, returned by the sgrListaEmpresasPASUsuario method. |
| dsNome | string | Yes | Carrier's corporate name. |
| nrCGCCPF | string | Yes | Carrier's CPF/CNPJ. |
| cdPaisOrigem | int | Yes | Code of the country of origin of the CPF/CNPJ. |
| dsNomeFantasia | string | Yes | Carrier's trade name. |
| nrInscEst | string | Yes | Carrier's state registration. |
| dsRua | string | Yes | Carrier's street name. |
| nrRua | string | Yes | Carrier's address number. |
| dsBairro | string | Yes | Carrier's neighborhood. |
| nrCEP | string | Yes | Carrier's zip code. |
| cdCid | int | Yes | City code. |
| cdCidIBGE | int | Yes | IBGE city code. |
| nrddd1 | string | Yes | Carrier's area code. |
| nrFone1 | string | Yes | Carrier's phone number. |
| dsEmail | string | Yes | Carrier's email. |
METHOD RETURN:
If the parameters are filled in correctly, the carrier's data will be saved. and the ReturnDescription property will display the message: Carrier entered successfully.
If there is an error when executing the method, the ReturnDescription property will display:
| Error | Description |
|---|---|
| The CPF/CNPJ entered is invalid. | You must provide a valid CPF or CNPJ (CPF with 11 characters and CNPJ with 14 characters). |
| Carrier already registered | The carrier provided is already registered and linked to the customer. |
| Mandatory fields | The listed parameters were not filled in. |