API Integration/Merchant Airport Transfer API · v1
API Reference

Merchant Airport Transfer API

API Version v1 · Chinese / English. Integrate airport transfer quoting, booking, fulfilment, driver tracking, and webhook-driven status updates.

1

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.

LanguagePath PrefixDescription
Chinese/zh/partner/v1Human-readable names, messages, and errors returned in Chinese
English/en/partner/v1Human-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.
2

Common Parameters & Response Format

Common Request Headers

Except for the access-token endpoint and Webhook notifications, all APIs use the following headers.

Headers

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token returned by the access-token endpoint
Content-TypeStringPOST/PATCHapplication/jsonFixed value: application/json
X-Request-IdStringNo01K1E8ABZFY4T8M7X1V76K9Q3P16-64 letters, digits, -, or _; used for troubleshooting
Idempotency-KeyStringSee endpoint42d77d6d-1b22-4741-83a8-21b73fd6f8c1Required for quotes, orders, and cancellations; reuse for retries

Common Response Envelope

json
{
  "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.
Endpoints
3

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.

POST/en/partner/v1/oauth2/token
POST/zh/partner/v1/oauth2/token中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBasic BASE64(clientId:clientSecret)Encode clientId:clientSecret using standard Base64 over UTF-8 bytes
Content-TypeStringYesapplication/x-www-form-urlencodedFixed value
X-Request-IdStringNo01K1E8ABZFY4T8M7X1V76K9Q3PUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
grant_typeStringYesclient_credentialsFixed value
scopeStringYesquotes:write orders:read orders:write tracking:readSeparate multiple scopes with ASCII spaces

Request Example

json
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%3Aread

Response Parameters

FieldTypeRequiredExampleDescription
access_tokenString—eyJ...Send in Authorization: Bearer when calling business APIs
token_typeString—BearerFixed value: Bearer
expires_inInteger—900Remaining token lifetime in seconds
scopeString—quotes:write orders:readScopes actually granted by the server

Response Example

json
{
  "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.

4

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.

POST/en/partner/v1/quotes
POST/zh/partner/v1/quotes中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token requires the quotes:write scope
Content-TypeStringYesapplication/jsonFixed value
Idempotency-KeyStringYesquote-20260801-0001Reuse for retries of the same quote request
X-Request-IdStringNo01K1E7T22HBXBWQGHJ0B8FPQKVUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
serviceTypeStringYesAIRPORT_PICKUPAIRPORT_PICKUP for airport pickup; AIRPORT_DROPOFF for airport drop-off
airportIataCodeStringYesPVGThree-letter IATA code consisting of uppercase letters
serviceTimeDateTimeYes2026-08-01T14:30:00+08:00Planned pickup time for pickup; planned address pickup time for drop-off
timeZoneStringYesAsia/ShanghaiIANA time zone
addressStringYes88 Century Avenue, Pudong, ShanghaiDrop-off address for pickup or pickup address for drop-off; max 500 characters
coordinate.longitudeNumberYes121.527WGS84 longitude of the non-airport address, from -180 to 180
coordinate.latitudeNumberYes31.235WGS84 latitude, from -90 to 90
passengerCount.adultsIntegerYes2Range: 1-50
passengerCount.childrenIntegerYes1Range: 0-20
passengerCount.infantsIntegerYes0Range: 0-20
luggage.largeIntegerYes2Range: 0-50
luggage.carryOnIntegerYes1Range: 0-50
childSeatCountIntegerNo1Default: 0; range: 0-5
meetAndGreetBooleanNotruetrue requests a sign-board service; default: false

Request Example

json
{
  "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

FieldTypeRequiredExampleDescription
data.quoteIdString—quo_01K1E7W4M49G6F8V5D2TQX3C9NUnique ID of this quote; submit when creating the order
data.expiresAtDateTime—2026-07-30T13:15:00ZRequest a new quote after this time
data.offersArray—-Bookable vehicle and price options; empty array means no vehicle available
data.offers[].offerIdString—off_01K1E7X0N6H8B4R2A9P5M3C7QFSubmit when creating the order; must belong to the current quoteId
data.offers[].vehicleTypeCodeString—STANDARD_5Stable vehicle category code
data.offers[].vehicleTypeNameString—Standard 5-SeaterDisplay name in the selected language
data.offers[].maxPassengersInteger—4Maximum passengers allowed for the vehicle type
data.offers[].price.amountInteger—28800Smallest currency unit; example represents CNY 288.00
data.offers[].price.currencyString—CNYISO 4217 three-letter currency code
data.offers[].freeCancellationBeforeDateTime/Null—2026-07-31T14:30:00+08:00Free cancellation before this time; null when unavailable

Response Example

json
{
  "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"
      }
    ]
  }
}
5

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.

POST/en/partner/v1/orders
POST/zh/partner/v1/orders中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token requires the orders:write scope
Content-TypeStringYesapplication/jsonFixed value
Idempotency-KeyStringYesorder-PARTNER-20260730-000128Reuse for the same order submission and network retries
X-Request-IdStringNo01K1E91CQH4X6AZ0T8N2J7V5MPUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
partnerOrderIdStringYesPARTNER-20260730-000128Permanently unique for the current merchant; max 64 characters
quoteIdStringYesquo_01K1E7W4M49G6F8V5D2TQX3C9NReturned by the quote endpoint and not expired
offerIdStringYesoff_01K1E7X0N6H8B4R2A9P5M3C7QFMust belong to the submitted quoteId
passenger.nameStringYesZhang SanPrimary passenger name; max 100 characters
passenger.phoneStringYes+8613800138000E.164 format
passenger.emailStringNopassenger@example.comValid email address
flight.flightNumberStringRequired for pickupMU512Required for airport pickup; recommended for drop-off
flight.scheduledAtDateTimeRequired for pickup2026-08-01T13:55:00+08:00Scheduled arrival for pickup or departure for drop-off
flight.terminalStringNoT2Maximum 30 characters
signBoardTextStringConditionalZHANG SANRequired when meet-and-greet was selected; max 100 characters
remarkStringNoPassenger speaks English.Max 500 characters; must not contain passwords or card data

Request Example

json
{
  "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

FieldTypeRequiredExampleDescription
data.orderIdString—ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZRUnique order ID generated by HiTransfer
data.partnerOrderIdString—PARTNER-20260730-000128Order ID submitted by the merchant
data.orderStatusString—PENDING_CONFIRMATIONSee Order Status
data.versionInteger—1Used for optimistic concurrency control
data.serviceTypeString—AIRPORT_PICKUPAirport pickup or drop-off
data.airportIataCodeString—PVGAirport associated with the order
data.serviceTimeDateTime—2026-08-01T14:30:00+08:00Service time confirmed by the quote
data.price.amountInteger—28800Integer in the smallest currency unit
data.price.currencyString—CNYISO 4217 three-letter currency code
data.createdAtDateTime—2026-07-30T13:00:20ZTime when HiTransfer accepted the order

Response Example

json
{
  "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.

6

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.

GET/en/partner/v1/orders
GET/zh/partner/v1/orders中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token requires the orders:read scope
X-Request-IdStringNo01K1EA6WMT8C2P7Y4B0N3Q5RSHUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
partnerOrderIdStringNoPARTNER-20260730-000128Exact match
orderStatusStringNoCONFIRMEDSee Order Status
serviceTimeFromDateTimeNo2026-08-01T00:00:00+08:00Use together with serviceTimeTo
serviceTimeToDateTimeNo2026-08-02T00:00:00+08:00Must be later than start; max range 31 days
pageSizeIntegerNo20Default: 20; range: 1-100
pageTokenStringNoeyJvZmZzZXQiOjIwfQUse nextPageToken from the previous page

Request Example

http
GET /en/partner/v1/orders?partnerOrderId=PARTNER-20260730-000128&pageSize=20
Authorization: Bearer eyJ...
X-Request-Id: 01K1EA6WMT8C2P7Y4B0N3Q5RSH

Response Parameters

FieldTypeRequiredExampleDescription
data.ordersArray—-Order summaries matching the filters
data.orders[].orderIdString—ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZRUnique HiTransfer order ID
data.orders[].partnerOrderIdString—PARTNER-20260730-000128Merchant order ID
data.orders[].orderStatusString—CONFIRMEDSee Order Status
data.orders[].serviceTypeString—AIRPORT_PICKUPAirport pickup or drop-off
data.orders[].airportIataCodeString—PVGAirport associated with the order
data.orders[].serviceTimeDateTime—2026-08-01T14:30:00+08:00Planned service time
data.orders[].price.amountInteger—28800Smallest currency unit
data.pageSizeInteger—20Page size used for this request
data.hasMoreBoolean—falsetrue when another page is available
data.nextPageTokenString/Null—nullReturned when another page is available

Response Example

json
{
  "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
  }
}
7

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.

GET/en/partner/v1/orders/{orderId}
GET/zh/partner/v1/orders/{orderId}中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token requires the orders:read scope
X-Request-IdStringNo01K1EB4Q7Z9N3M6T2V8C5X0RPAUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
orderIdPathYesord_01K1E9H14A7Z6Q4YQGJ5F0F3ZRReturned by the create-order endpoint

Request Example

http
GET /en/partner/v1/orders/ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR
Authorization: Bearer eyJ...
X-Request-Id: 01K1EB4Q7Z9N3M6T2V8C5X0RPA

Response Parameters

FieldTypeRequiredExampleDescription
data.orderIdString—ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZRUnique HiTransfer order ID
data.partnerOrderIdString—PARTNER-20260730-000128Merchant order ID
data.orderStatusString—CONFIRMEDSee Order Status
data.versionInteger—3Used when updating or cancelling
data.serviceTypeString—AIRPORT_PICKUPAirport pickup or drop-off
data.timeZoneString—Asia/ShanghaiIANA time zone
data.coordinate.longitudeNumber/Null—121.527Longitude of the non-airport address
data.passenger.nameString—Zhang SanPrimary passenger name
data.passenger.phoneString—+8613800138000Primary passenger phone
data.flight.flightNumberString/Null—MU512null when not provided
data.driverAssignmentStatusString—ASSIGNEDNOT_ASSIGNED or ASSIGNED
data.price.amountInteger—28800Smallest currency unit
data.createdAtDateTime—2026-07-30T13:00:20ZOrder creation time
data.updatedAtDateTime—2026-07-30T13:02:10ZLast order update time

Response Example

json
{
  "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"
  }
}
8

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.

PATCH/en/partner/v1/orders/{orderId}
PATCH/zh/partner/v1/orders/{orderId}中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token requires the orders:write scope
Content-TypeStringYesapplication/jsonFixed value
If-MatchStringYes"order-3"Generated from version=3; prevents overwriting concurrent changes
X-Request-IdStringNo01K1ECQ5T8M2N7V4B9X0R6PHZAUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
orderIdPathYesord_01K1E9H14A7Z6Q4YQGJ5F0F3ZROrder to update
passenger.nameStringNoLi SiOnly submitted fields are updated
passenger.phoneStringNo+8613900139000E.164 format
passenger.emailString/NullNonew@example.comSend null to clear
flight.flightNumberStringNoMU514Maximum 16 characters
flight.scheduledAtDateTimeNo2026-08-01T14:25:00+08:00Must include a time zone
flight.terminalString/NullNoT1Send null to clear
signBoardTextString/NullNoLI SISend null to clear
remarkString/NullNoPassenger will call driver.Send null to clear

Request Example

json
{
  "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

FieldTypeRequiredExampleDescription
data.orderIdString—ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZRUpdated order
data.partnerOrderIdString—PARTNER-20260730-000128Merchant order ID
data.versionInteger—4Incremented after every successful update
data.orderStatusString—CONFIRMEDA merchant update does not directly change status
data.changedFieldsString[]—["passenger","flight","remark"]Top-level fields that actually changed
data.updatedAtDateTime—2026-07-30T13:20:00ZTime when the update completed

Response Example

json
{
  "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.

9

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.

POST/en/partner/v1/orders/{orderId}/cancellations
POST/zh/partner/v1/orders/{orderId}/cancellations中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token requires the orders:write scope
Content-TypeStringYesapplication/jsonFixed value
Idempotency-KeyStringYescancel-PARTNER-20260730-000128Reuse for retries of the same cancellation
If-MatchStringYes"order-4"Use the version from the most recent order query
X-Request-IdStringNo01K1EDM9R4T7N2X5C8V0B6QHPAUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
orderIdPathYesord_01K1E9H14A7Z6Q4YQGJ5F0F3ZROrder to cancel
reasonCodeStringYesPASSENGER_PLAN_CHANGEDSee Cancellation Reasons
reasonStringNoPassenger changed itinerary.Required when reasonCode=OTHER; max 500 characters
maxCancellationFee.amountIntegerYes0Smallest currency unit; not cancelled if actual fee exceeds
maxCancellationFee.currencyStringYesCNYMust match the order currency

Request Example

json
{
  "reasonCode": "PASSENGER_PLAN_CHANGED",
  "reason": "Passenger changed itinerary.",
  "maxCancellationFee": { "amount": 0, "currency": "CNY" }
}

Response Parameters

FieldTypeRequiredExampleDescription
data.cancellationIdString—can_01K1EDQ4M8X2T7B5N9V0R6CHPAUnique ID of this cancellation
data.orderIdString—ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZRCancelled order
data.orderStatusString—CANCELLEDAlways CANCELLED after success
data.cancellationFee.amountInteger—0Smallest currency unit
data.refundAmount.amountInteger—28800Smallest currency unit
data.cancelledAtDateTime—2026-07-30T13:30:00ZTime when the server completed the cancellation

Response Example

json
{
  "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.

10

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.

GET/en/partner/v1/orders/{orderId}/driver-assignment
GET/zh/partner/v1/orders/{orderId}/driver-assignment中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token requires the orders:read scope
X-Request-IdStringNo01K1EE6ZQ4T8N2C7V5B0R9XHPAUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
orderIdPathYesord_01K1E9H14A7Z6Q4YQGJ5F0F3ZROrder to query

Request Example

http
GET /en/partner/v1/orders/ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR/driver-assignment
Authorization: Bearer eyJ...
X-Request-Id: 01K1EE6ZQ4T8N2C7V5B0R9XHPA

Response Parameters

FieldTypeRequiredExampleDescription
data.assignmentStatusString—ASSIGNEDNOT_ASSIGNED or ASSIGNED
data.assignmentIdString/Null—asn_01K1EE8B8H9K2MC3HQ9RKHYJ3HChanges when the driver or vehicle changes
data.driver.nameString/Null—Mr. Wangnull when unassigned
data.driver.phoneString/Null—+8613812345678null when unassigned or outside visibility window
data.driver.ratingNumber/Null—4.9null when no rating available
data.driver.photoUrlString/Null—https://...Short-lived signed URL that may expire
data.vehicle.plateNumberString/Null—Shanghai A12345null when unassigned
data.vehicle.modelString/Null—Buick GL8Display name in the current language
data.vehicle.colorString/Null—Blacknull when unknown
data.assignedAtDateTime/Null—2026-08-01T05:30:00Znull when unassigned
data.visibilityExpiresAtDateTime—2026-08-02T02:00:00ZDriver contact details and photos not returned after this time

Response Example

json
{
  "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"
  }
}
11

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.

GET/en/partner/v1/orders/{orderId}/tracking/current
GET/zh/partner/v1/orders/{orderId}/tracking/current中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token requires the tracking:read scope
X-Request-IdStringNo01K1EF7M2T8N4V0C6B9R5XQHPAUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
orderIdPathYesord_01K1E9H14A7Z6Q4YQGJ5F0F3ZROrder whose current driver location is requested

Request Example

http
GET /en/partner/v1/orders/ord_01K1E9H14A7Z6Q4YQGJ5F0F3ZR/tracking/current
Authorization: Bearer eyJ...
X-Request-Id: 01K1EF7M2T8N4V0C6B9R5XQHPA

Response Parameters

FieldTypeRequiredExampleDescription
data.trackingStatusString—ACTIVENOT_AVAILABLE / ACTIVE / STALE / ENDED
data.point.pointIdString/Null—trk_01K1EF9Q4C7M2N8T5V0R6XHPAnull when no location is available
data.point.assignmentIdString/Null—asn_01K1EE8B8H9K2MC3HQ9RKHYJ3HDistinguishes points before/after a driver change
data.point.longitudeNumber/Null—121.6143WGS84 longitude
data.point.latitudeNumber/Null—31.1946WGS84 latitude
data.point.accuracyMetersNumber/Null—12.5Horizontal accuracy in metres
data.point.speedMetersPerSecondNumber/Null—8.2Metres per second
data.point.headingDegreesNumber/Null—92From 0 to 360 degrees
data.point.capturedAtDateTime/Null—2026-08-01T06:18:25ZTime when the driver's device captured the point
data.point.isStaleBoolean/Null—falsetrue means the point should not be presented as real-time

Response Example

json
{
  "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
    }
  }
}
12

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.

GET/en/partner/v1/orders/{orderId}/tracking/points
GET/zh/partner/v1/orders/{orderId}/tracking/points中文路径

System Parameters

FieldTypeRequiredExampleDescription
AuthorizationStringYesBearer eyJ...Token requires the tracking:read scope
X-Request-IdStringNo01K1EG2Q8T4N7V0C5B9R6XMHPAUsed for troubleshooting

Business Parameters

FieldTypeRequiredExampleDescription
orderIdPathYesord_01K1E9H14A7Z6Q4YQGJ5F0F3ZROrder whose tracking history is requested
startTimeDateTimeYes2026-08-01T06:00:00ZInclusive; must fall within the most recent 30 days
endTimeDateTimeYes2026-08-01T08:00:00ZExclusive; later than start and no more than 2 hours after
pageSizeIntegerNo500Default: 200; range: 1-1000
pageTokenStringNoeyJwb2ludElkIjoidHJrXyJ9Use nextPageToken from the previous page

Request Example

http
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: 01K1EG2Q8T4N7V0C5B9R6XMHPA

Response Parameters

FieldTypeRequiredExampleDescription
data.pointsArray—-Sorted by capturedAt from earliest to latest
data.points[].pointIdString—trk_01K1EF9Q4C7M2N8T5V0R6XHPAUnique tracking-point ID
data.points[].longitudeNumber—121.6143WGS84 longitude
data.points[].latitudeNumber—31.1946WGS84 latitude
data.points[].accuracyMetersNumber/Null—12.5Metres
data.points[].speedMetersPerSecondNumber/Null—8.2Metres per second
data.points[].headingDegreesNumber/Null—92From 0 to 360 degrees
data.points[].capturedAtDateTime—2026-08-01T06:18:25ZTime captured by the driver's device
data.pageSizeInteger—500Page size used for this request
data.hasMoreBoolean—falsetrue when another page is available
data.nextPageTokenString/Null—nullReturned when another page is available

Response Example

json
{
  "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.

13

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

FieldTypeRequiredExampleDescription
Webhook-IdStringYesmsg_01K1EJ58NAJT4YCE93T16N7P8DReused for retries of the same message
Webhook-TimestampStringYes1785562212Unix timestamp in seconds
Webhook-SignatureStringYesv1=BASE64_HMAC_SHA256HMAC-SHA256 signature
Content-TypeStringYesapplication/jsonFixed value

Webhook Payload

FieldTypeRequiredExampleDescription
eventIdStringYesevt_01K1EG47KY1Z8XKAF7E0NDT1FCGlobally unique; deduplicate by this value
eventTypeStringYesDRIVER_ASSIGNEDSee Webhook Event Types
eventVersionStringYes1.0Event payload schema version
occurredAtDateTimeYes2026-08-01T05:30:00ZTime when the business event occurred
data.orderIdStringYesord_01K1E9H14A7Z6Q4YQGJ5F0F3ZROrder that changed
data.orderStatusStringYesDRIVER_ASSIGNEDOrder status after the event
data.orderVersionIntegerYes5Ignore events whose version is lower than locally processed
data.assignmentIdString/NullNoasn_01K1EE8B8H9K2MC3HQ9RKHYJ3HReturned for driver-related events; null otherwise
json
{
  "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.
14

Statuses & Enumerations

Order Status

ValueMeaningTerminal
PENDING_CONFIRMATIONHiTransfer has received the order and is waiting to confirm acceptanceNo
CONFIRMEDHiTransfer has confirmed acceptanceNo
DRIVER_ASSIGNEDA driver and vehicle have been assignedNo
DRIVER_EN_ROUTEThe driver is travelling to the pickup pointNo
DRIVER_ARRIVEDThe driver has arrived at the pickup pointNo
PASSENGER_ON_BOARDThe passenger is on boardNo
COMPLETEDThe trip completed normallyYes
PASSENGER_NO_SHOWThe passenger did not appear at the agreed timeYes
CANCELLEDThe order was cancelledYes
REJECTEDHiTransfer could not accept the orderYes
UNKNOWNA new status not yet recognized by the caller-

Cancellation Reasons

ValueMeaning
PASSENGER_PLAN_CHANGEDPassenger itinerary changed
FLIGHT_CANCELLEDFlight cancelled
DUPLICATE_BOOKINGDuplicate booking
PRICE_ISSUECancellation due to a price or fee issue
OTHEROther reason; reason is required

Webhook Event Types

ValueTrigger
ORDER_CONFIRMEDOrder acceptance confirmed
ORDER_REJECTEDOrder could not be accepted
ORDER_UPDATEDOrder business information changed
ORDER_CANCELLEDOrder cancelled
DRIVER_ASSIGNEDDriver and vehicle assigned for the first time
DRIVER_CHANGEDDriver or vehicle changed
DRIVER_EN_ROUTEDriver travelling to the pickup point
DRIVER_ARRIVEDDriver arrived at the pickup point
PASSENGER_ON_BOARDPassenger boarded
TRIP_COMPLETEDTrip completed
PASSENGER_NO_SHOWPassenger did not appear

Use UNKNOWN as a fallback for unrecognized statuses. A newly introduced status must not cause deserialization to fail.

15

Error Codes

Error CodeHTTPMeaningRecommended Action
SUCCESS200/201Request succeededProcess data normally
INVALID_ARGUMENT400Invalid parameter formatCorrect the parameters using errors
INVALID_CREDENTIALS401Invalid clientId, clientSecret, or tokenCheck credentials or request a new token
TOKEN_EXPIRED401Token expiredObtain a new token and retry once
PERMISSION_DENIED403Missing endpoint or resource permissionCheck scopes and merchant account permissions
RESOURCE_NOT_FOUND404Order, quote, or offer does not existCheck the ID; do not retry repeatedly
DUPLICATE_PARTNER_ORDER_ID409Merchant order ID already existsQuery the original order; do not create another order
IDEMPOTENCY_CONFLICT409Same idempotency key used with different contentReuse the original payload or generate a new key
VERSION_CONFLICT409The order version in If-Match is staleQuery the order again before deciding the next action
QUOTE_EXPIRED422Quote expiredRequest a new quote
QUOTE_ALREADY_USED422Quote already used to create an orderQuery the created order
OFFER_NOT_AVAILABLE422Offer is unavailableRequest a new quote and select an available vehicle
NO_AVAILABLE_VEHICLE422No vehicle is available for the current conditionsAdjust time or passenger count, or contact HiTransfer
AIRPORT_NOT_SUPPORTED422The IATA code is valid but service is unavailableCheck the airport or contact HiTransfer
ORDER_NOT_MODIFIABLE409The current order state cannot be updatedQuery the latest order status
ORDER_NOT_CANCELLABLE409The current order state cannot be cancelledQuery the latest order status
ORDER_ALREADY_CANCELLED409The order is already cancelledUse the original cancellation result
CANCELLATION_FEE_CHANGED409The actual fee exceeds maxCancellationFeeShow the latest fee and obtain confirmation again
TRACKING_NOT_AVAILABLE403Tracking is not available for the current orderCheck order ownership and the tracking visibility window
TRACKING_TIME_RANGE_TOO_LARGE422A tracking query spans more than 2 hoursShorten the requested time range
TRACKING_DATA_EXPIRED410Requested tracking data is older than 30 daysThe data is no longer retained
RATE_LIMITED429Rate limit exceededBack off according to Retry-After
INTERNAL_ERROR500Internal HiTransfer errorRetry safely with the original idempotency key
SERVICE_UNAVAILABLE503Service temporarily unavailableRetry with exponential backoff and the original idempotency key
16

Merchant Integration Checklist

Complete integration in the following order:

  1. 1Obtain test-environment credentials and request a token.
  2. 2Implement both Chinese and English endpoint paths, the common response envelope, and error-code handling.
  3. 3Implement quoting and correctly handle no available vehicle, quote expiration, and smallest-currency-unit amounts.
  4. 4Create an order using quoteId, offerId, and an idempotency key.
  5. 5Implement order listing, order details, and order recovery after a submission timeout.
  6. 6Implement order updates, version conflicts, and cancellation.
  7. 7Handle unassigned drivers, assigned drivers, and driver changes.
  8. 8Implement current location, stale location, the 2-hour tracking-query limit, and the 30-day retention limit.
  9. 9Implement Webhook signature verification, duplicate events, out-of-order events, and timeout retries.
  10. 10Confirm that logs do not contain tokens, secrets, complete passenger contact details, or complete tracking data.
  11. 11Switch to production credentials only after integration testing has been accepted.

Ready to build?

Request test-environment credentials or talk to our integration team.