sgrTrocarMotorista
Changing the driver of a Boarding Authorization
PARÂMETROS
| Campo | Tipo | Requerido? | Descrição |
|---|---|---|---|
| chaveacesso | string | Sim | Chave retornada pelo método sgrLogin. |
| cdpas | inteiro | Sim | |
| PAS code, returned by the sgrListaPASUsuario method | |||
| cdcliente | integer | Yes | Customer code, returned by the sgrListaEmpresasUsuario method. |
| cdviagem | integer | No * | Boarding authorization number. * It is mandatory to enter the number of the AE or schedule. |
| cdpaisorigemmotatual | integer | Yes | Code of the current driver's country of origin, returned by the sgrListaPais method. |
| nrdocmotoristaatual | string | Yes | CPF number of the current driver of the boarding authorization. |
| cdpaisorigemmotnovo | integer | Yes | Country code of the new horse, returned by the sgrListaPais method. |
| nrdocmotoristanovo | string | Yes | CPF number of the new driver on the boarding authorization. |
| cdal alvo | Integer | No | Opentech target code, returned by the sgrListaAlvosClienteInstrucao method. This field, when filled with a valid target code, indicates that the exchange will not be made immediately, only when the vehicle arrives at the target. Send -1 when not using. |
| nrprogramacao | string | No * | Number of the schedule, so that the system searches for the trip generated from the schedule. * It is mandatory to enter the AE or schedule number. |
**METHOD RETURN
If the parameters are filled in correctly, the driver will be changed and ReturnDataset will display:
| Field | Type | Description |
|---|---|---|
| CDINSTRUCTION | integer | Request code |
ReturnDescription: If there is an error when executing the method, the property will display:
| Error | Description |
|---|---|
| There was an error changing the driver of the trip. Try again | This error may be caused by an incorrect parameter, the field to be corrected will be indicated in the returnDataset property. You should then check the parameters and run the method again. The error may also have been caused by a timeout or dropped connection. In this case, you should send the parameters, along with the issue time and customer code, to the following e-mail address: [email protected] so that the error can be validated. |
| There was an error when changing the driver for the trip. Check | In this case, the method can also return the details listed in Table 5: Errors when changing the driver of an AE. |