sgrTrocarMotoristaAE
Changing the driver of a Boarding Authorization.
PARAMETERS
Field | Type | Req. | Description |
---|---|---|---|
keyaccess | string | Yes | Key returned by the sgrLogin method. |
cdpas | integer | Yes | PAS code, returned by the sgrListaPASUsuario method |
cdclienteopentech | integer | Yes | Customer code, returned by the sgrListCompaniesPASUsers method. |
cdviagem | integer | Yes | Boarding authorization number. |
nrdocmotoristaatual | string | Yes | CPF number of the current driver on the boarding authorization. |
nrdocmotoristanovo | string | Yes | CPF number of the new driver on the boarding authorization. |
cdalvoopentech | 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. |
METHOD RETURN:
If the parameters are filled in correctly, the driver will be swapped and ReturnDataset will display:
Field | Type | Description |
---|---|---|
CDINSTRUCTION | integer | Code of the exchange request registered with Opentech |
ReturnDescription: If there is an error when executing the method, the property will display:
Error | Description |
---|---|
There was an error when changing the driver of the trip. | In this case, the method can return specific errors, as shown in Table 5: Errors when changing the driver of an AE trip. |