Get List Of Service
- cURL
- JavaScript
curl -X GET \
'https://apistg.ahamove.com/v1/order/service_types?token=<TOKEN_STG>&user_mobile=84xxxxxxxxx&lat=10.768451&lng=106.6943626' \
-H 'cache-control: no-cache'
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://apistg.ahamove.com/v1/order/service_types?token=<TOKEN_STG>&user_mobile=84xxxxxxxxx&lat=10.768451&lng=106.6943626", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
This API is used to get list of services that are available at the current location
HTTP Request
GET https://apistg.ahamove.com/v1/order/service_types
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
token | String | No | The user Token |
user_mobile | String | No | User mobile, starts with 84... |
lat | String | Yes | Latitude, Optional if city_id is provided |
lng | String | Yes | Longitude, Optional if city_id is provided |
city_id | String | No | City Id, Required if lat/lng is not provided |
Response
JSON response example:
[
{
_id: "SGN-TRICYCLE",
order: 2,
name: "Xe ba gac (1.8 x 1.3m)",
name_vi_vn: "Xe ba gac (1.8 x 1.3m)",
currency: "VND",
city_id: "SGN",
icon_url: "https://apistg.ahamove.com/images/tricycle.png",
parent_id: "",
distance_fee: "120000 if x <= 4 else 120000 + (x - 4) * 14000",
stop_fee: 10000,
# List of special requests
requests: [
{
enable: true,
name_vi_vn: "Boc xep",
name: "Boc xep",
icon_url: "https://apistg.ahamove.com/images/loading.png",
price: 65000,
service_id: "SGN-TRICYCLE",
_id: "SGN-TRICYCLE-BOCXEP",
type: "BOOLEAN",
order: 2,
description: "Boc xep tai cac diem xe co the dung do"
}
],
}
]
Status-Code: 200 OK
Errors
Code | Text | Description |
---|---|---|
500 | Internal Server Error | We had a problem with our server. Try again later. |
503 | Service Unavailable | We're temporarily offline for maintenance. Please try again later. |