Get List Of Special Request
The availability of special requests may vary depending on the specific service being used and the location of the delivery
How to get list of special request?
- Step 1: Call API Get List of Service
- cURL
- JavaScript
curl -X GET \
'https://apistg.ahamove.com/v1/order/service_types?token=<TOKEN_STG>&user_mobile=84xxxxxxxxx&city_id=SGN' \
-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&city_id=SGN", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
- Step 2: Check field
requests
in response and see list of speical requests available in each service
Type of special requests
Type | Group ID |
---|---|
TIER | BULKY |
BOOLEAN | D2D, FRAGILE, SMS |
PER_UNIT | TIP |
COD_INSURANCE | INSURANCE |
COMMISSION_DISTANCE_PERCENTAGE | TRIP |
Sample params when create order with request type groups
TIER
To use this type, you need to check the tier_list
in requests to see the commodity standards of the bulky levels
Size conversion and bulky level
Type | Dimension | Weight | Fee |
---|---|---|---|
TIER_2 | 60x50x60 | 40kg | 10.000 VND |
TIER_3 | 70x60x70 | 60kg | 20.000 VND |
TIER_4 | 90x70x90 | 80kg | 40.000 VND |
# Parameters
{
"order_time": 0,
"path": [
{
"lat": 10.7692105,
"lng": 106.6637935,
"address": "725 Hẻm số 7 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh, Việt Nam",
"name": "nmbmb",
"mobile":"84xxxxxxxxx"
},
{
"lat": 10.7828887,
"lng": 106.704898,
"address": "Miss Ao Dai Building, 21 Nguyễn Trung Ngạn, Bến Nghé, Quận 1, Hồ Chí Minh, Vietnam",
"name": "Bao",
"mobile":"84xxxxxxxxx",
"cod": 570000
}
],
"service_id": "SGN-BIKE",
"requests": [
{
"_id": "SGN-BIKE-BULKY",
"tier_code": "TIER_2"
}
],
"remarks": "Call me when arrived",
"payment_method": "CASH",
}
BOOLEAN
, COMMISSION_DISTANCE_PERCENTAGE
This type of request simply adds an _id
field to each request
# Parameters
{
"order_time": 0,
"path": [
{
"lat": 10.7692105,
"lng": 106.6637935,
"address": "725 Hẻm số 7 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh, Việt Nam",
"name": "nmbmb",
"mobile":"84xxxxxxxxx"
},
{
"lat": 10.7828887,
"lng": 106.704898,
"address": "Miss Ao Dai Building, 21 Nguyễn Trung Ngạn, Bến Nghé, Quận 1, Hồ Chí Minh, Vietnam",
"name": "Bao",
"mobile":"84xxxxxxxxx",
"cod": 570000
}
],
"service_id": "SGN-BIKE",
"requests": [
{
"_id": "SGN-BIKE-D2D"
},
{
"_id": "SGN-BIKE-ROUND-TRIP"
}
],
"remarks": "Call me when arrived",
"payment_method": "CASH",
}
PER_UNIT
With this type of request, need to add a num
field to each request to specify the number of requests to be added
# Parameters
{
"order_time": 0,
"path": [
{
"lat": 10.7692105,
"lng": 106.6637935,
"address": "725 Hẻm số 7 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh, Việt Nam",
"name": "nmbmb",
"mobile":"84xxxxxxxxx"
},
{
"lat": 10.7828887,
"lng": 106.704898,
"address": "Miss Ao Dai Building, 21 Nguyễn Trung Ngạn, Bến Nghé, Quận 1, Hồ Chí Minh, Vietnam",
"name": "Bao",
"mobile":"84xxxxxxxxx",
"cod": 570000
}
],
"service_id": "SGN-BIKE",
"requests": [
{
"_id": "SGN-BIKE-TIP",
"num": 2
}
],
"remarks": "Call me when arrived",
"payment_method": "CASH",
}
COD_INSURANCE
- If
order.cod
> 0 => use fieldpath[i].cod
value for Insurance
# Parameters
{
"order_time": 0,
"path": [
{
"lat": 10.7692105,
"lng": 106.6637935,
"address": "725 Hẻm số 7 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh, Việt Nam",
"name": "nmbmb",
"mobile":"84xxxxxxxxx"
},
{
"lat": 10.7828887,
"lng": 106.704898,
"address": "Miss Ao Dai Building, 21 Nguyễn Trung Ngạn, Bến Nghé, Quận 1, Hồ Chí Minh, Vietnam",
"name": "Bao",
"mobile":"84xxxxxxxxx",
"cod": 3200000
}
],
"service_id": "SGN-BIKE",
"requests": [
{
"_id": "SGN-BIKE-INSURANCE"
}
],
"payment_method": "CASH",
"items": [
{
"_id": "TN",
"num": 1,
"name": "Tai nghe Blutooth",
"price": 3200000
}
]
}
- If
order.cod
= 0 => must have fieldpath[i].item_value
for Insurance
# Parameters
{
"order_time": 0,
"path": [
{
"lat": 10.7692105,
"lng": 106.6637935,
"address": "725 Hẻm số 7 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh, Việt Nam",
"name": "nmbmb",
"mobile":"84xxxxxxxxx"
},
{
"lat": 10.7828887,
"lng": 106.704898,
"address": "Miss Ao Dai Building, 21 Nguyễn Trung Ngạn, Bến Nghé, Quận 1, Hồ Chí Minh, Vietnam",
"name": "Bao",
"mobile":"84xxxxxxxxx",
"cod": 0,
"item_value":3200000
}
],
"service_id": "SGN-BIKE",
"requests": [
{
"_id": "SGN-BIKE-INSURANCE"
}
],
"payment_method": "CASH",
"items": [
{
"_id": "TN",
"num": 1,
"name": "Tai nghe Blutooth",
"price": 3200000
}
]
}