Merchant Airport Transfer API
API Version v1 · Chinese / English. Integrate airport transfer quoting, booking, fulfilment, driver tracking, and webhook-driven status updates.
Integration Conventions
Chinese and English Endpoint Paths
Every API is available through both Chinese and English relative paths. The selected language affects display text only — it does not change field names, order IDs, status values, error codes, amounts, timestamps, airport IATA codes, or coordinates.
| Language | Path Prefix | Description |
|---|---|---|
| Chinese | /zh/partner/v1 | Human-readable names, messages, and errors returned in Chinese |
| English | /en/partner/v1 | Human-readable names, messages, and errors returned in English |
Data Format
- All APIs must be called over HTTPS. Minimum supported TLS version is 1.2.
- Except for the token endpoint, requests and responses use application/json; charset=utf-8. JSON field names use camelCase.
- Status and enumeration values use UPPER_SNAKE_CASE. Timestamps use RFC 3339 with a time-zone offset (e.g. 2026-08-01T14:30:00+08:00).
- Service time also includes an IANA time zone (e.g. Asia/Shanghai). Airports are identified only by three-letter IATA codes (e.g. PVG).
- Phone numbers use E.164 format (e.g. +8613800138000). Coordinates use WGS84 ordered as longitude, then latitude.
- Monetary amounts are integers in the smallest currency unit. CNY 288.00 is returned as 28800 with currency CNY.
Common Parameters & Response Format
Common Request Headers
Except for the access-token endpoint and Webhook notifications, all APIs use the following headers.
Headers
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token returned by the access-token endpoint |
| Content-Type | String | POST/PATCH | application/json | Fixed value: application/json |
| X-Request-Id | String | No | 01K1E8ABZFY4T8M7X1V76K9Q3P | 16-64 letters, digits, -, or _; used for troubleshooting |
| Idempotency-Key | String | See endpoint | 42d77d6d-1b22-4741-83a8-21b73fd6f8c1 | Required for quotes, orders, and cancellations; reuse for retries |
Common Response Envelope
{
"code": "SUCCESS",
"message": "success",
"requestId": "01K1E8ABZFY4T8M7X1V76K9Q3P",
"data": {}
}Merchant isolation & sensitive data
- HiTransfer identifies the merchant from the verified token and does not accept a partnerId parameter.
- A resource not owned by the current merchant returns 404 RESOURCE_NOT_FOUND, without revealing whether it exists.
- Driver contact, vehicle, and location data are returned only during the order's allowed service window.
- Error responses must not expose database details, file paths, or stack traces.
- Neither party may log tokens, secrets, complete passenger contact, or complete tracking data.
Get Access Token
The merchant backend obtains an access token using the OAuth 2.0 Client Credentials flow. HiTransfer issues separate clientId and clientSecret values for test and production environments. These credentials must never be embedded in a browser, mobile app, or mini program.
/en/partner/v1/oauth2/token/zh/partner/v1/oauth2/token中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Basic BASE64(clientId:clientSecret) | Encode clientId:clientSecret using standard Base64 over UTF-8 bytes |
| Content-Type | String | Yes | application/x-www-form-urlencoded | Fixed value |
| X-Request-Id | String | No | 01K1E8ABZFY4T8M7X1V76K9Q3P | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| grant_type | String | Yes | client_credentials | Fixed value |
| scope | String | Yes | quotes:write orders:read orders:write tracking:read | Separate multiple scopes with ASCII spaces |
Request Example
POST /en/partner/v1/oauth2/token
Authorization: Basic BASE64(clientId:clientSecret)
Content-Type: application/x-www-form-urlencoded
X-Request-Id: 01K1E8ABZFY4T8M7X1V76K9Q3P
grant_type=client_credentials&scope=quotes%3Awrite%20orders%3Aread%20orders%3Awrite%20tracking%3AreadResponse Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | — | eyJ... | Send in Authorization: Bearer when calling business APIs |
| token_type | String | — | Bearer | Fixed value: Bearer |
| expires_in | Integer | — | 900 | Remaining token lifetime in seconds |
| scope | String | — | quotes:write orders:read | Scopes actually granted by the server |
Response Example
{
"access_token": "eyJhbGciOi...",
"token_type": "Bearer",
"expires_in": 900,
"scope": "quotes:write orders:read orders:write tracking:read"
}Reuse an unexpired token and refresh it 60 seconds before expiration. Do not request a new token for every business request.
Get Airport Transfer Quote
Returns bookable vehicle types and prices based on the airport IATA code, transfer type, service time, non-airport address, passenger count, and luggage count. A quote is valid for 15 minutes by default.
/en/partner/v1/quotes/zh/partner/v1/quotes中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token requires the quotes:write scope |
| Content-Type | String | Yes | application/json | Fixed value |
| Idempotency-Key | String | Yes | quote-20260801-0001 | Reuse for retries of the same quote request |
| X-Request-Id | String | No | 01K1E7T22HBXBWQGHJ0B8FPQKV | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| serviceType | String | Yes | AIRPORT_PICKUP | AIRPORT_PICKUP for airport pickup; AIRPORT_DROPOFF for airport drop-off |
| airportIataCode | String | Yes | PVG | Three-letter IATA code consisting of uppercase letters |
| serviceTime | DateTime | Yes | 2026-08-01T14:30:00+08:00 | Planned pickup time for pickup; planned address pickup time for drop-off |
| timeZone | String | Yes | Asia/Shanghai | IANA time zone |
| address | String | Yes | 88 Century Avenue, Pudong, Shanghai | Drop-off address for pickup or pickup address for drop-off; max 500 characters |
| coordinate.longitude | Number | Yes | 121.527 | WGS84 longitude of the non-airport address, from -180 to 180 |
| coordinate.latitude | Number | Yes | 31.235 | WGS84 latitude, from -90 to 90 |
| passengerCount.adults | Integer | Yes | 2 | Range: 1-50 |
| passengerCount.children | Integer | Yes | 1 | Range: 0-20 |
| passengerCount.infants | Integer | Yes | 0 | Range: 0-20 |
| luggage.large | Integer | Yes | 2 | Range: 0-50 |
| luggage.carryOn | Integer | Yes | 1 | Range: 0-50 |
| childSeatCount | Integer | No | 1 | Default: 0; range: 0-5 |
| meetAndGreet | Boolean | No | true | true requests a sign-board service; default: false |
Request Example
{
"serviceType": "AIRPORT_PICKUP",
"airportIataCode": "PVG",
"serviceTime": "2026-08-01T14:30:00+08:00",
"timeZone": "Asia/Shanghai",
"address": "88 Century Avenue, Pudong New Area, Shanghai",
"coordinate": { "longitude": 121.527, "latitude": 31.235 },
"passengerCount": { "adults": 2, "children": 1, "infants": 0 },
"luggage": { "large": 2, "carryOn": 1 },
"childSeatCount": 1,
"meetAndGreet": true
}Response Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| data.quoteId | String | — | quo_01K1E7W4M49G6F8V5D2TQX3C9N | Unique ID of this quote; submit when creating the order |
| data.expiresAt | DateTime | — | 2026-07-30T13:15:00Z | Request a new quote after this time |
| data.offers | Array | — | - | Bookable vehicle and price options; empty array means no vehicle available |
| data.offers[].offerId | String | — | off_01K1E7X0N6H8B4R2A9P5M3C7QF | Submit when creating the order; must belong to the current quoteId |
| data.offers[].vehicleTypeCode | String | — | STANDARD_5 | Stable vehicle category code |
| data.offers[].vehicleTypeName | String | — | Standard 5-Seater | Display name in the selected language |
| data.offers[].maxPassengers | Integer | — | 4 | Maximum passengers allowed for the vehicle type |
| data.offers[].price.amount | Integer | — | 28800 | Smallest currency unit; example represents CNY 288.00 |
| data.offers[].price.currency | String | — | CNY | ISO 4217 three-letter currency code |
| data.offers[].freeCancellationBefore | DateTime/Null | — | 2026-07-31T14:30:00+08:00 | Free cancellation before this time; null when unavailable |
Response Example
{
"code": "SUCCESS",
"message": "Quote created successfully",
"requestId": "01K1E7T22HBXBWQGHJ0B8FPQKV",
"data": {
"quoteId": "quo_01K1E7W4M49G6F8V5D2TQX3C9N",
"expiresAt": "2026-07-30T13:15:00Z",
"offers": [
{
"offerId": "off_01K1E7X0N6H8B4R2A9P5M3C7QF",
"vehicleTypeCode": "STANDARD_5",
"vehicleTypeName": "Standard 5-Seater",
"maxPassengers": 4,
"maxLargeLuggage": 2,
"maxCarryOnLuggage": 2,
"price": { "amount": 28800, "currency": "CNY" },
"freeCancellationBefore": "2026-07-31T14:30:00+08:00"
}
]
}
}Create Airport Transfer Order
Creates an order using the quoteId and offerId returned by the quote endpoint. The merchant does not submit a price and does not resubmit airport details, address, passenger counts, or luggage counts.
/en/partner/v1/orders/zh/partner/v1/orders中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token requires the orders:write scope |
| Content-Type | String | Yes | application/json | Fixed value |
| Idempotency-Key | String | Yes | order-PARTNER-20260730-000128 | Reuse for the same order submission and network retries |
| X-Request-Id | String | No | 01K1E91CQH4X6AZ0T8N2J7V5MP | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| partnerOrderId | String | Yes | PARTNER-20260730-000128 | Permanently unique for the current merchant; max 64 characters |
| quoteId | String | Yes | quo_01K1E7W4M49G6F8V5D2TQX3C9N | Returned by the quote endpoint and not expired |
| offerId | String | Yes | off_01K1E7X0N6H8B4R2A9P5M3C7QF | Must belong to the submitted quoteId |
| passenger.name | String | Yes | Zhang San | Primary passenger name; max 100 characters |
| passenger.phone | String | Yes | +8613800138000 | E.164 format |
| passenger.email | String | No | passenger@example.com | Valid email address |
| flight.flightNumber | String | Required for pickup | MU512 | Required for airport pickup; recommended for drop-off |
| flight.scheduledAt | DateTime | Required for pickup | 2026-08-01T13:55:00+08:00 | Scheduled arrival for pickup or departure for drop-off |
| flight.terminal | String | No | T2 | Maximum 30 characters |
| signBoardText | String | Conditional | ZHANG SAN | Required when meet-and-greet was selected; max 100 characters |
| remark | String | No | Passenger speaks English. | Max 500 characters; must not contain passwords or card data |
Request Example
{
"partnerOrderId": "PARTNER-20260730-000128",
"quoteId": "quo_01K1E7W4M49G6F8V5D2TQX3C9N",
"offerId": "off_01K1E7X0N6H8B4R2A9P5M3C7QF",
"passenger": {
"name": "Zhang San",
"phone": "+8613800138000",
"email": "passenger@example.com"
},
"flight": {
"flightNumber": "MU512",
"scheduledAt": "2026-08-01T13:55:00+08:00",
"terminal": "T2"
},
"signBoardText": "ZHANG SAN",
"remark": "Passenger speaks English."
}Response Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| data.orderId | String | — | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Unique order ID generated by HiTransfer |
| data.partnerOrderId | String | — | PARTNER-20260730-000128 | Order ID submitted by the merchant |
| data.orderStatus | String | — | PENDING_CONFIRMATION | See Order Status |
| data.version | Integer | — | 1 | Used for optimistic concurrency control |
| data.serviceType | String | — | AIRPORT_PICKUP | Airport pickup or drop-off |
| data.airportIataCode | String | — | PVG | Airport associated with the order |
| data.serviceTime | DateTime | — | 2026-08-01T14:30:00+08:00 | Service time confirmed by the quote |
| data.price.amount | Integer | — | 28800 | Integer in the smallest currency unit |
| data.price.currency | String | — | CNY | ISO 4217 three-letter currency code |
| data.createdAt | DateTime | — | 2026-07-30T13:00:20Z | Time when HiTransfer accepted the order |
Response Example
{
"code": "SUCCESS",
"message": "Order created successfully",
"requestId": "01K1E91CQH4X6AZ0T8N2J7V5MP",
"data": {
"orderId": "ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR",
"partnerOrderId": "PARTNER-20260730-000128",
"orderStatus": "PENDING_CONFIRMATION",
"version": 1,
"serviceType": "AIRPORT_PICKUP",
"airportIataCode": "PVG",
"serviceTime": "2026-08-01T14:30:00+08:00",
"address": "88 Century Avenue, Pudong New Area, Shanghai",
"vehicleTypeCode": "STANDARD_5",
"vehicleTypeName": "Standard 5-Seater",
"price": { "amount": 28800, "currency": "CNY" },
"createdAt": "2026-07-30T13:00:20Z"
}
}If the caller times out while waiting for the response, retry with the original Idempotency-Key. Never create a new idempotency key to submit the same order again.
List Orders
Lists the current merchant's orders by merchant order ID, order status, or service time. Use this endpoint for reconciliation, order-list display, and recovery after an order-submission timeout.
/en/partner/v1/orders/zh/partner/v1/orders中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token requires the orders:read scope |
| X-Request-Id | String | No | 01K1EA6WMT8C2P7Y4B0N3Q5RSH | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| partnerOrderId | String | No | PARTNER-20260730-000128 | Exact match |
| orderStatus | String | No | CONFIRMED | See Order Status |
| serviceTimeFrom | DateTime | No | 2026-08-01T00:00:00+08:00 | Use together with serviceTimeTo |
| serviceTimeTo | DateTime | No | 2026-08-02T00:00:00+08:00 | Must be later than start; max range 31 days |
| pageSize | Integer | No | 20 | Default: 20; range: 1-100 |
| pageToken | String | No | eyJvZmZzZXQiOjIwfQ | Use nextPageToken from the previous page |
Request Example
GET /en/partner/v1/orders?partnerOrderId=PARTNER-20260730-000128&pageSize=20
Authorization: Bearer eyJ...
X-Request-Id: 01K1EA6WMT8C2P7Y4B0N3Q5RSHResponse Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| data.orders | Array | — | - | Order summaries matching the filters |
| data.orders[].orderId | String | — | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Unique HiTransfer order ID |
| data.orders[].partnerOrderId | String | — | PARTNER-20260730-000128 | Merchant order ID |
| data.orders[].orderStatus | String | — | CONFIRMED | See Order Status |
| data.orders[].serviceType | String | — | AIRPORT_PICKUP | Airport pickup or drop-off |
| data.orders[].airportIataCode | String | — | PVG | Airport associated with the order |
| data.orders[].serviceTime | DateTime | — | 2026-08-01T14:30:00+08:00 | Planned service time |
| data.orders[].price.amount | Integer | — | 28800 | Smallest currency unit |
| data.pageSize | Integer | — | 20 | Page size used for this request |
| data.hasMore | Boolean | — | false | true when another page is available |
| data.nextPageToken | String/Null | — | null | Returned when another page is available |
Response Example
{
"code": "SUCCESS",
"message": "Query successful",
"requestId": "01K1EA6WMT8C2P7Y4B0N3Q5RSH",
"data": {
"orders": [
{
"orderId": "ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR",
"partnerOrderId": "PARTNER-20260730-000128",
"orderStatus": "CONFIRMED",
"serviceType": "AIRPORT_PICKUP",
"airportIataCode": "PVG",
"serviceTime": "2026-08-01T14:30:00+08:00",
"vehicleTypeName": "Standard 5-Seater",
"price": { "amount": 28800, "currency": "CNY" }
}
],
"pageSize": 20,
"hasMore": false,
"nextPageToken": null
}
}Get Order Details
Returns complete order information by HiTransfer order ID. Treat this endpoint as the authoritative source for order status, price, passenger information, and service details. A successful response also includes ETag: "order-{version}". Send this value unchanged in If-Match when updating or cancelling.
/en/partner/v1/orders/{orderId}/zh/partner/v1/orders/{orderId}中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token requires the orders:read scope |
| X-Request-Id | String | No | 01K1EB4Q7Z9N3M6T2V8C5X0RPA | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| orderId | Path | Yes | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Returned by the create-order endpoint |
Request Example
GET /en/partner/v1/orders/ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR
Authorization: Bearer eyJ...
X-Request-Id: 01K1EB4Q7Z9N3M6T2V8C5X0RPAResponse Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| data.orderId | String | — | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Unique HiTransfer order ID |
| data.partnerOrderId | String | — | PARTNER-20260730-000128 | Merchant order ID |
| data.orderStatus | String | — | CONFIRMED | See Order Status |
| data.version | Integer | — | 3 | Used when updating or cancelling |
| data.serviceType | String | — | AIRPORT_PICKUP | Airport pickup or drop-off |
| data.timeZone | String | — | Asia/Shanghai | IANA time zone |
| data.coordinate.longitude | Number/Null | — | 121.527 | Longitude of the non-airport address |
| data.passenger.name | String | — | Zhang San | Primary passenger name |
| data.passenger.phone | String | — | +8613800138000 | Primary passenger phone |
| data.flight.flightNumber | String/Null | — | MU512 | null when not provided |
| data.driverAssignmentStatus | String | — | ASSIGNED | NOT_ASSIGNED or ASSIGNED |
| data.price.amount | Integer | — | 28800 | Smallest currency unit |
| data.createdAt | DateTime | — | 2026-07-30T13:00:20Z | Order creation time |
| data.updatedAt | DateTime | — | 2026-07-30T13:02:10Z | Last order update time |
Response Example
{
"code": "SUCCESS",
"message": "Query successful",
"requestId": "01K1EB4Q7Z9N3M6T2V8C5X0RPA",
"data": {
"orderId": "ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR",
"partnerOrderId": "PARTNER-20260730-000128",
"orderStatus": "CONFIRMED",
"version": 3,
"serviceType": "AIRPORT_PICKUP",
"airportIataCode": "PVG",
"serviceTime": "2026-08-01T14:30:00+08:00",
"timeZone": "Asia/Shanghai",
"address": "88 Century Avenue, Pudong New Area, Shanghai",
"coordinate": { "longitude": 121.527, "latitude": 31.235 },
"passengerCount": { "adults": 2, "children": 1, "infants": 0 },
"luggage": { "large": 2, "carryOn": 1 },
"passenger": {
"name": "Zhang San",
"phone": "+8613800138000",
"email": "passenger@example.com"
},
"flight": {
"flightNumber": "MU512",
"scheduledAt": "2026-08-01T13:55:00+08:00",
"terminal": "T2"
},
"vehicleTypeCode": "STANDARD_5",
"vehicleTypeName": "Standard 5-Seater",
"price": { "amount": 28800, "currency": "CNY" },
"driverAssignmentStatus": "ASSIGNED",
"remark": "Passenger speaks English.",
"createdAt": "2026-07-30T13:00:20Z",
"updatedAt": "2026-07-30T13:02:10Z"
}
}Update Order
Updates order information that does not affect price. The airport, non-airport address, service time, vehicle type, passenger counts, luggage counts, and price cannot be updated directly. To change any of these values, request a new quote and, subject to business rules, cancel the original order before creating a new one.
/en/partner/v1/orders/{orderId}/zh/partner/v1/orders/{orderId}中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token requires the orders:write scope |
| Content-Type | String | Yes | application/json | Fixed value |
| If-Match | String | Yes | "order-3" | Generated from version=3; prevents overwriting concurrent changes |
| X-Request-Id | String | No | 01K1ECQ5T8M2N7V4B9X0R6PHZA | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| orderId | Path | Yes | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Order to update |
| passenger.name | String | No | Li Si | Only submitted fields are updated |
| passenger.phone | String | No | +8613900139000 | E.164 format |
| passenger.email | String/Null | No | new@example.com | Send null to clear |
| flight.flightNumber | String | No | MU514 | Maximum 16 characters |
| flight.scheduledAt | DateTime | No | 2026-08-01T14:25:00+08:00 | Must include a time zone |
| flight.terminal | String/Null | No | T1 | Send null to clear |
| signBoardText | String/Null | No | LI SI | Send null to clear |
| remark | String/Null | No | Passenger will call driver. | Send null to clear |
Request Example
{
"passenger": { "name": "Li Si", "phone": "+8613900139000" },
"flight": {
"flightNumber": "MU514",
"scheduledAt": "2026-08-01T14:25:00+08:00",
"terminal": "T1"
},
"remark": "Passenger will call driver."
}Response Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| data.orderId | String | — | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Updated order |
| data.partnerOrderId | String | — | PARTNER-20260730-000128 | Merchant order ID |
| data.version | Integer | — | 4 | Incremented after every successful update |
| data.orderStatus | String | — | CONFIRMED | A merchant update does not directly change status |
| data.changedFields | String[] | — | ["passenger","flight","remark"] | Top-level fields that actually changed |
| data.updatedAt | DateTime | — | 2026-07-30T13:20:00Z | Time when the update completed |
Response Example
{
"code": "SUCCESS",
"message": "Order updated successfully",
"requestId": "01K1ECQ5T8M2N7V4B9X0R6PHZA",
"data": {
"orderId": "ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR",
"partnerOrderId": "PARTNER-20260730-000128",
"orderStatus": "CONFIRMED",
"version": 4,
"changedFields": ["passenger", "flight", "remark"],
"updatedAt": "2026-07-30T13:20:00Z"
}
}An order cannot be updated after it reaches DRIVER_EN_ROUTE, DRIVER_ARRIVED, PASSENGER_ON_BOARD, or a terminal status. The API returns 409 ORDER_NOT_MODIFIABLE.
Cancel Order
Cancels an order that has not reached a terminal state. The operation applies the cancellation atomically and returns the final cancellation fee and refund amount.
/en/partner/v1/orders/{orderId}/cancellations/zh/partner/v1/orders/{orderId}/cancellations中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token requires the orders:write scope |
| Content-Type | String | Yes | application/json | Fixed value |
| Idempotency-Key | String | Yes | cancel-PARTNER-20260730-000128 | Reuse for retries of the same cancellation |
| If-Match | String | Yes | "order-4" | Use the version from the most recent order query |
| X-Request-Id | String | No | 01K1EDM9R4T7N2X5C8V0B6QHPA | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| orderId | Path | Yes | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Order to cancel |
| reasonCode | String | Yes | PASSENGER_PLAN_CHANGED | See Cancellation Reasons |
| reason | String | No | Passenger changed itinerary. | Required when reasonCode=OTHER; max 500 characters |
| maxCancellationFee.amount | Integer | Yes | 0 | Smallest currency unit; not cancelled if actual fee exceeds |
| maxCancellationFee.currency | String | Yes | CNY | Must match the order currency |
Request Example
{
"reasonCode": "PASSENGER_PLAN_CHANGED",
"reason": "Passenger changed itinerary.",
"maxCancellationFee": { "amount": 0, "currency": "CNY" }
}Response Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| data.cancellationId | String | — | can_01K1EDQ4M8X2T7B5N9V0R6CHPA | Unique ID of this cancellation |
| data.orderId | String | — | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Cancelled order |
| data.orderStatus | String | — | CANCELLED | Always CANCELLED after success |
| data.cancellationFee.amount | Integer | — | 0 | Smallest currency unit |
| data.refundAmount.amount | Integer | — | 28800 | Smallest currency unit |
| data.cancelledAt | DateTime | — | 2026-07-30T13:30:00Z | Time when the server completed the cancellation |
Response Example
{
"code": "SUCCESS",
"message": "Order cancelled successfully",
"requestId": "01K1EDM9R4T7N2X5C8V0B6QHPA",
"data": {
"cancellationId": "can_01K1EDQ4M8X2T7B5N9V0R6CHPA",
"orderId": "ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR",
"orderStatus": "CANCELLED",
"reasonCode": "PASSENGER_PLAN_CHANGED",
"cancellationFee": { "amount": 0, "currency": "CNY" },
"refundAmount": { "amount": 28800, "currency": "CNY" },
"cancelledAt": "2026-07-30T13:30:00Z"
}
}If the actual cancellation fee exceeds maxCancellationFee, the order is not cancelled and the API returns code CANCELLATION_FEE_CHANGED with the current fee. Retrying an already cancelled order with the same idempotency key returns the original result.
Get Driver and Vehicle
Returns the driver and vehicle currently assigned to the order. If a driver has not yet been assigned, the request still succeeds with assignmentStatus=NOT_ASSIGNED and null driver and vehicle fields.
/en/partner/v1/orders/{orderId}/driver-assignment/zh/partner/v1/orders/{orderId}/driver-assignment中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token requires the orders:read scope |
| X-Request-Id | String | No | 01K1EE6ZQ4T8N2C7V5B0R9XHPA | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| orderId | Path | Yes | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Order to query |
Request Example
GET /en/partner/v1/orders/ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR/driver-assignment
Authorization: Bearer eyJ...
X-Request-Id: 01K1EE6ZQ4T8N2C7V5B0R9XHPAResponse Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| data.assignmentStatus | String | — | ASSIGNED | NOT_ASSIGNED or ASSIGNED |
| data.assignmentId | String/Null | — | asn_01K1EE8B8H9K2MC3HQ9RKHYJ3H | Changes when the driver or vehicle changes |
| data.driver.name | String/Null | — | Mr. Wang | null when unassigned |
| data.driver.phone | String/Null | — | +8613812345678 | null when unassigned or outside visibility window |
| data.driver.rating | Number/Null | — | 4.9 | null when no rating available |
| data.driver.photoUrl | String/Null | — | https://... | Short-lived signed URL that may expire |
| data.vehicle.plateNumber | String/Null | — | Shanghai A12345 | null when unassigned |
| data.vehicle.model | String/Null | — | Buick GL8 | Display name in the current language |
| data.vehicle.color | String/Null | — | Black | null when unknown |
| data.assignedAt | DateTime/Null | — | 2026-08-01T05:30:00Z | null when unassigned |
| data.visibilityExpiresAt | DateTime | — | 2026-08-02T02:00:00Z | Driver contact details and photos not returned after this time |
Response Example
{
"code": "SUCCESS",
"message": "Query successful",
"requestId": "01K1EE6ZQ4T8N2C7V5B0R9XHPA",
"data": {
"assignmentStatus": "ASSIGNED",
"assignmentId": "asn_01K1EE8B8H9K2MC3HQ9RKHYJ3H",
"driver": {
"name": "Mr. Wang",
"phone": "+8613812345678",
"rating": 4.9,
"photoUrl": "https://example.com/signed/driver-photo"
},
"vehicle": {
"plateNumber": "Shanghai A12345",
"model": "Buick GL8",
"color": "Black",
"seats": 7,
"photoUrl": "https://example.com/signed/vehicle-photo"
},
"assignedAt": "2026-08-01T05:30:00Z",
"visibilityExpiresAt": "2026-08-02T02:00:00Z"
}
}Get Current Driver Location
Returns the driver's latest location for the current order. If the driver has not started uploading locations, the latest point is stale, or the tracking window has ended, the request still succeeds and trackingStatus explains the condition.
/en/partner/v1/orders/{orderId}/tracking/current/zh/partner/v1/orders/{orderId}/tracking/current中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token requires the tracking:read scope |
| X-Request-Id | String | No | 01K1EF7M2T8N4V0C6B9R5XQHPA | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| orderId | Path | Yes | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Order whose current driver location is requested |
Request Example
GET /en/partner/v1/orders/ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR/tracking/current
Authorization: Bearer eyJ...
X-Request-Id: 01K1EF7M2T8N4V0C6B9R5XQHPAResponse Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| data.trackingStatus | String | — | ACTIVE | NOT_AVAILABLE / ACTIVE / STALE / ENDED |
| data.point.pointId | String/Null | — | trk_01K1EF9Q4C7M2N8T5V0R6XHPA | null when no location is available |
| data.point.assignmentId | String/Null | — | asn_01K1EE8B8H9K2MC3HQ9RKHYJ3H | Distinguishes points before/after a driver change |
| data.point.longitude | Number/Null | — | 121.6143 | WGS84 longitude |
| data.point.latitude | Number/Null | — | 31.1946 | WGS84 latitude |
| data.point.accuracyMeters | Number/Null | — | 12.5 | Horizontal accuracy in metres |
| data.point.speedMetersPerSecond | Number/Null | — | 8.2 | Metres per second |
| data.point.headingDegrees | Number/Null | — | 92 | From 0 to 360 degrees |
| data.point.capturedAt | DateTime/Null | — | 2026-08-01T06:18:25Z | Time when the driver's device captured the point |
| data.point.isStale | Boolean/Null | — | false | true means the point should not be presented as real-time |
Response Example
{
"code": "SUCCESS",
"message": "Query successful",
"requestId": "01K1EF7M2T8N4V0C6B9R5XQHPA",
"data": {
"trackingStatus": "ACTIVE",
"point": {
"pointId": "trk_01K1EF9Q4C7M2N8T5V0R6XHPA",
"assignmentId": "asn_01K1EE8B8H9K2MC3HQ9RKHYJ3H",
"longitude": 121.6143,
"latitude": 31.1946,
"accuracyMeters": 12.5,
"speedMetersPerSecond": 8.2,
"headingDegrees": 92,
"capturedAt": "2026-08-01T06:18:25Z",
"receivedAt": "2026-08-01T06:18:27Z",
"isStale": false
}
}
}Get Driver Location History
Returns driver tracking points for an order within a requested time range. A single query may span no more than 2 hours. Tracking data is retained for the most recent 30 days only.
/en/partner/v1/orders/{orderId}/tracking/points/zh/partner/v1/orders/{orderId}/tracking/points中文路径System Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Authorization | String | Yes | Bearer eyJ... | Token requires the tracking:read scope |
| X-Request-Id | String | No | 01K1EG2Q8T4N7V0C5B9R6XMHPA | Used for troubleshooting |
Business Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| orderId | Path | Yes | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Order whose tracking history is requested |
| startTime | DateTime | Yes | 2026-08-01T06:00:00Z | Inclusive; must fall within the most recent 30 days |
| endTime | DateTime | Yes | 2026-08-01T08:00:00Z | Exclusive; later than start and no more than 2 hours after |
| pageSize | Integer | No | 500 | Default: 200; range: 1-1000 |
| pageToken | String | No | eyJwb2ludElkIjoidHJrXyJ9 | Use nextPageToken from the previous page |
Request Example
GET /en/partner/v1/orders/ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR/tracking/points?startTime=2026-08-01T06%3A00%3A00Z&endTime=2026-08-01T08%3A00%3A00Z
Authorization: Bearer eyJ...
X-Request-Id: 01K1EG2Q8T4N7V0C5B9R6XMHPAResponse Parameters
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| data.points | Array | — | - | Sorted by capturedAt from earliest to latest |
| data.points[].pointId | String | — | trk_01K1EF9Q4C7M2N8T5V0R6XHPA | Unique tracking-point ID |
| data.points[].longitude | Number | — | 121.6143 | WGS84 longitude |
| data.points[].latitude | Number | — | 31.1946 | WGS84 latitude |
| data.points[].accuracyMeters | Number/Null | — | 12.5 | Metres |
| data.points[].speedMetersPerSecond | Number/Null | — | 8.2 | Metres per second |
| data.points[].headingDegrees | Number/Null | — | 92 | From 0 to 360 degrees |
| data.points[].capturedAt | DateTime | — | 2026-08-01T06:18:25Z | Time captured by the driver's device |
| data.pageSize | Integer | — | 500 | Page size used for this request |
| data.hasMore | Boolean | — | false | true when another page is available |
| data.nextPageToken | String/Null | — | null | Returned when another page is available |
Response Example
{
"code": "SUCCESS",
"message": "Query successful",
"requestId": "01K1EG2Q8T4N7V0C5B9R6XMHPA",
"data": {
"points": [
{
"pointId": "trk_01K1EF9Q4C7M2N8T5V0R6XHPA",
"assignmentId": "asn_01K1EE8B8H9K2MC3HQ9RKHYJ3H",
"longitude": 121.6143,
"latitude": 31.1946,
"accuracyMeters": 12.5,
"speedMetersPerSecond": 8.2,
"headingDegrees": 92,
"capturedAt": "2026-08-01T06:18:25Z",
"receivedAt": "2026-08-01T06:18:27Z"
}
],
"pageSize": 500,
"hasMore": false,
"nextPageToken": null
}
}A range longer than 2 hours returns 422 TRACKING_TIME_RANGE_TOO_LARGE. A start time older than the most recent 30 days returns 410 TRACKING_DATA_EXPIRED.
Order Status Webhook
HiTransfer sends notifications to the merchant's configured HTTPS endpoint when an order is confirmed, its status changes, a driver is assigned, or the driver changes. The Webhook URL and signing secret are configured during integration. The merchant must continue to treat the Get Order Details endpoint as authoritative.
The Webhook URL must use a publicly reachable HTTPS domain. It must not use localhost, private network addresses, link-local addresses, cloud metadata addresses, or credentials embedded in the URL. HiTransfer does not follow HTTP redirects during delivery.
Webhook Headers
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| Webhook-Id | String | Yes | msg_01K1EJ58NAJT4YCE93T16N7P8D | Reused for retries of the same message |
| Webhook-Timestamp | String | Yes | 1785562212 | Unix timestamp in seconds |
| Webhook-Signature | String | Yes | v1=BASE64_HMAC_SHA256 | HMAC-SHA256 signature |
| Content-Type | String | Yes | application/json | Fixed value |
Webhook Payload
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| eventId | String | Yes | evt_01K1EG47KY1Z8XKAF7E0NDT1FC | Globally unique; deduplicate by this value |
| eventType | String | Yes | DRIVER_ASSIGNED | See Webhook Event Types |
| eventVersion | String | Yes | 1.0 | Event payload schema version |
| occurredAt | DateTime | Yes | 2026-08-01T05:30:00Z | Time when the business event occurred |
| data.orderId | String | Yes | ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR | Order that changed |
| data.orderStatus | String | Yes | DRIVER_ASSIGNED | Order status after the event |
| data.orderVersion | Integer | Yes | 5 | Ignore events whose version is lower than locally processed |
| data.assignmentId | String/Null | No | asn_01K1EE8B8H9K2MC3HQ9RKHYJ3H | Returned for driver-related events; null otherwise |
{
"eventId": "evt_01K1EG47KY1Z8XKAF7E0NDT1FC",
"eventType": "DRIVER_ASSIGNED",
"eventVersion": "1.0",
"occurredAt": "2026-08-01T05:30:00Z",
"data": {
"orderId": "ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR",
"partnerOrderId": "PARTNER-20260730-000128",
"orderStatus": "DRIVER_ASSIGNED",
"orderVersion": 5,
"assignmentId": "asn_01K1EE8B8H9K2MC3HQ9RKHYJ3H"
}
}Signature verification
Input: Webhook-Timestamp + "." + raw HTTP body bytes. Algorithm: Base64(HMAC-SHA256(webhookSecret, input)).
- Verify the signature against the raw body without reserializing first.
- Compare signatures using a constant-time function. Reject if timestamp differs from current time by more than 5 minutes.
- Deduplicate by eventId. Persist the event before returning 200.
- Use orderVersion to ignore stale events; do not depend on delivery order.
- If 200 is not returned within 3 seconds, HiTransfer retries with exponential backoff for up to 24 hours. Delivery is at-least-once.
Statuses & Enumerations
Order Status
| Value | Meaning | Terminal |
|---|---|---|
| PENDING_CONFIRMATION | HiTransfer has received the order and is waiting to confirm acceptance | No |
| CONFIRMED | HiTransfer has confirmed acceptance | No |
| DRIVER_ASSIGNED | A driver and vehicle have been assigned | No |
| DRIVER_EN_ROUTE | The driver is travelling to the pickup point | No |
| DRIVER_ARRIVED | The driver has arrived at the pickup point | No |
| PASSENGER_ON_BOARD | The passenger is on board | No |
| COMPLETED | The trip completed normally | Yes |
| PASSENGER_NO_SHOW | The passenger did not appear at the agreed time | Yes |
| CANCELLED | The order was cancelled | Yes |
| REJECTED | HiTransfer could not accept the order | Yes |
| UNKNOWN | A new status not yet recognized by the caller | - |
Cancellation Reasons
| Value | Meaning |
|---|---|
| PASSENGER_PLAN_CHANGED | Passenger itinerary changed |
| FLIGHT_CANCELLED | Flight cancelled |
| DUPLICATE_BOOKING | Duplicate booking |
| PRICE_ISSUE | Cancellation due to a price or fee issue |
| OTHER | Other reason; reason is required |
Webhook Event Types
| Value | Trigger |
|---|---|
| ORDER_CONFIRMED | Order acceptance confirmed |
| ORDER_REJECTED | Order could not be accepted |
| ORDER_UPDATED | Order business information changed |
| ORDER_CANCELLED | Order cancelled |
| DRIVER_ASSIGNED | Driver and vehicle assigned for the first time |
| DRIVER_CHANGED | Driver or vehicle changed |
| DRIVER_EN_ROUTE | Driver travelling to the pickup point |
| DRIVER_ARRIVED | Driver arrived at the pickup point |
| PASSENGER_ON_BOARD | Passenger boarded |
| TRIP_COMPLETED | Trip completed |
| PASSENGER_NO_SHOW | Passenger did not appear |
Use UNKNOWN as a fallback for unrecognized statuses. A newly introduced status must not cause deserialization to fail.
Error Codes
| Error Code | HTTP | Meaning | Recommended Action |
|---|---|---|---|
| SUCCESS | 200/201 | Request succeeded | Process data normally |
| INVALID_ARGUMENT | 400 | Invalid parameter format | Correct the parameters using errors |
| INVALID_CREDENTIALS | 401 | Invalid clientId, clientSecret, or token | Check credentials or request a new token |
| TOKEN_EXPIRED | 401 | Token expired | Obtain a new token and retry once |
| PERMISSION_DENIED | 403 | Missing endpoint or resource permission | Check scopes and merchant account permissions |
| RESOURCE_NOT_FOUND | 404 | Order, quote, or offer does not exist | Check the ID; do not retry repeatedly |
| DUPLICATE_PARTNER_ORDER_ID | 409 | Merchant order ID already exists | Query the original order; do not create another order |
| IDEMPOTENCY_CONFLICT | 409 | Same idempotency key used with different content | Reuse the original payload or generate a new key |
| VERSION_CONFLICT | 409 | The order version in If-Match is stale | Query the order again before deciding the next action |
| QUOTE_EXPIRED | 422 | Quote expired | Request a new quote |
| QUOTE_ALREADY_USED | 422 | Quote already used to create an order | Query the created order |
| OFFER_NOT_AVAILABLE | 422 | Offer is unavailable | Request a new quote and select an available vehicle |
| NO_AVAILABLE_VEHICLE | 422 | No vehicle is available for the current conditions | Adjust time or passenger count, or contact HiTransfer |
| AIRPORT_NOT_SUPPORTED | 422 | The IATA code is valid but service is unavailable | Check the airport or contact HiTransfer |
| ORDER_NOT_MODIFIABLE | 409 | The current order state cannot be updated | Query the latest order status |
| ORDER_NOT_CANCELLABLE | 409 | The current order state cannot be cancelled | Query the latest order status |
| ORDER_ALREADY_CANCELLED | 409 | The order is already cancelled | Use the original cancellation result |
| CANCELLATION_FEE_CHANGED | 409 | The actual fee exceeds maxCancellationFee | Show the latest fee and obtain confirmation again |
| TRACKING_NOT_AVAILABLE | 403 | Tracking is not available for the current order | Check order ownership and the tracking visibility window |
| TRACKING_TIME_RANGE_TOO_LARGE | 422 | A tracking query spans more than 2 hours | Shorten the requested time range |
| TRACKING_DATA_EXPIRED | 410 | Requested tracking data is older than 30 days | The data is no longer retained |
| RATE_LIMITED | 429 | Rate limit exceeded | Back off according to Retry-After |
| INTERNAL_ERROR | 500 | Internal HiTransfer error | Retry safely with the original idempotency key |
| SERVICE_UNAVAILABLE | 503 | Service temporarily unavailable | Retry with exponential backoff and the original idempotency key |
Merchant Integration Checklist
Complete integration in the following order:
- 1Obtain test-environment credentials and request a token.
- 2Implement both Chinese and English endpoint paths, the common response envelope, and error-code handling.
- 3Implement quoting and correctly handle no available vehicle, quote expiration, and smallest-currency-unit amounts.
- 4Create an order using quoteId, offerId, and an idempotency key.
- 5Implement order listing, order details, and order recovery after a submission timeout.
- 6Implement order updates, version conflicts, and cancellation.
- 7Handle unassigned drivers, assigned drivers, and driver changes.
- 8Implement current location, stale location, the 2-hour tracking-query limit, and the 30-day retention limit.
- 9Implement Webhook signature verification, duplicate events, out-of-order events, and timeout retries.
- 10Confirm that logs do not contain tokens, secrets, complete passenger contact details, or complete tracking data.
- 11Switch to production credentials only after integration testing has been accepted.
Ready to build?
Request test-environment credentials or talk to our integration team.
