GetEstimatesForIntentForTMS
POST/v1/tms/rides/estimates¶ Description
Fetches ride estimates for TMS partner users. This is a request/response-mapping wrapper for TMS callers and shares the same underlying estimate logic as GetEstimatesForIntent.
¶ Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| tms_user_code | string | TMS user’s ID | Y |
| tms_user_hash | string | TMS user’s stable hash | Y |
| pick_up_point | EstimatePoint | Pick-up location | Y |
| drop_off_point | EstimatePoint | Drop-off location | Y |
| user_location | Point | User’s real-time location If user doesn’t grant location permission, this will be empty | N |
| service_type | int | Service type (1=REAL_TIME, 2=RESERVATION) | Y |
| departure_time | int | Expected departure time in Unix milliseconds For real-time ride-hailing, this can be omitted (current time is assumed) For reservation, this is required | N |
| user_source | string | Source of the user request (e.g., miniprogram platform identifier) | N |
¶ Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| code | int | Response code (0 = success, non-zero = error) Using Int32Value to ensure 0 is serialized in JSON (proto3 omits default values) | Y |
| message | string | Response message (error description for failures, can be omitted for success) | N |
| data | GetEstimatesForIntentForTMSResponseData | Response data, populated only on success (code = 0) | N |
¶ Errors
| HTTP status | Code | Message |
|---|---|---|
| 422 | ERROR_CODE_VALIDATION_FAILED | Requester field is required but was not found in the request payload |
| 422 | ERROR_CODE_INVALID_LOCATION_SPEC | Location spec is not valid, for example an origin/destination/via has neither a place id nor a point, or origin and destination resolve to the same point |
| 422 | ERROR_CODE_INVALID_REQUESTED_TIME_SPEC | Requested time spec is not valid |
| 422 | ERROR_CODE_OUTSIDE_SERVICE_AREA | Pickup or one of the destinations is outside the service area |
| 422 | ERROR_CODE_REGION_NOT_ACCESSIBLE | Requested region is not accessible |
| 422 | ERROR_CODE_PARTICIPANT_BANNED | One of the participant(s) is banned |