Driver Status Push
Point-to-point support: Mandatory
Update Date: 2024-03-26 Mandatory Online test(Sandbox)
Summary
- This interface is used to push driver status information. The prerequisite is that the driver information should be already given, otherwise an error message will be returned.
- If the Vendor does not receive the return message from Ctrip, the vendor should retry 3 times in 5 seconds. Vendor need to ask the driver to push the ACTUAL STATUS during the service, and Ctrip will verify the status of the driver.
API address
API address Format: {Domain}/{Channel}-{vendorId}/driver/inplace/2.0/{ctripPurchaseOrderID}/{timeStamp}/{sign}
Request Payload
PushDriverStatusRequest
| Parameter | Type | Required | Description | Example | Note |
|---|---|---|---|---|---|
| ctripPurchaseOrderID | Long | Y | Ctrip Purchase Order ID | 881823967638342968 | 18 digital |
| vendorOrderID | String | Y | Vendor's Order ID | Provide by Vendor | |
| vehicleStatus | Integer | Y | Driver Status | 1 | Driver Status List |
| waypoints | List<Waypoint> | N | Waypoint list | Up to 2; returned only for taxi orders with waypoints, omit if none |
Waypoint
| Parameter | Type | Required | Description | Example | Note |
|---|---|---|---|---|---|
| no | Integer | Y | Waypoint sequence | 1 | Starts from 0 in travel order, up to 2 |
| status | Integer | Y | Waypoint status | 0 | 0-Not arrived; 1-Arrived; 2-Departed |
| latitude | BigDecimal | N | Latitude | 31.194360 | 6 decimal places, pad with 0 if less |
| longitude | BigDecimal | N | Longitude | 121.320170 | 6 decimal places, pad with 0 if less |
| coordinate | String | N | Coordinate type | GCJ02 | GCJ02; WGS84 |
| time | String | N | Waypoint time | 2020-08-28 14:46 | Format yyyy-MM-dd HH:mm; arrival/leave time at the waypoint |
Response Payload
PushDriverStatusResponse
| Parameter | Type | Required | Description | Example | Note |
|---|---|---|---|---|---|
| msgCode | String | Y | Response Code | OK | Response Code |
| message | String | N | Response Detail | Success | Response Code |
Request Example
{
"waypoints": [
{
"no": 1,
"status": 0,
"latitude": 31.194360,
"longitude": 121.320170,
"coordinate": "GCJ02",
"time": "2020-08-28 14:46"
}
],
"ctripPurchaseOrderID": 881824212456774814,
"vendorOrderID": "1232423",
"vehicleStatus": 1
}
Response Example
{
"msgCode": "OK",
"message": "success",
}
Error Example
{
"msgCode": "ERROR_NO_ORDERID",
"message": "order not found"
}