Nhảy tới nội dung

Ước tính phí đơn hàng với nhiều loại dịch vụ cùng lúc

curl -X POST \
https://apistg.ahamove.com/v2/order/estimated_fee \
-H 'Content-Type: application/json' \
-d '{"token":"5d4bcb47ed4f1f0b3b5e9b20","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", "short_address":"Quận 10", "name":"nmbmb", "remarks":"call me"}, {"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"}], "services":[{"_id":"SGN-BIKE","requests":[{"_id":"SGN-BIKE-ROUND-TRIP","price":18400}]}, {"_id": "SGN-TRICYCLE"}], "payment_method": "CASH"}'

Hệ thống trả về phí đã ước tính cho quãng đường có cùng điểm lấy hàng và điểm giao hàng với nhiều loại dịch vụ

HTTP Request

POST https://apistg.ahamove.com/v2/order/estimated_fee

Response

Success response example:

Status-Code: 200 OK

[
{
"distance": 11.72,
"duration": 3220,
"requests": [],
"user_main_account": 0,
"user_bonus_account": 0,
"currency": "VND",
"total_pay": 80000,
"total_balance": 0,
"is_postpaid": false,
"is_child_account": false,
"online_pay": 0,
"payment_method": "CASH",
"distance_fee": 75000,
"request_fee": 0,
"stop_fee": 5000,
"vat_fee": 0,
"discount": 0,
"total_fee": 80000,
"surcharge": 1.21,
"stoppoint_price": 5000,
"special_request_price": 0,
"vat": 0,
"distance_price": 75000,
"voucher_discount": 0,
"subtotal_price": 80000,
"total_price": 80000,
"surge_rate": 1.21,
"_id": "SGN-BIKE"
},
{
"distance": 11.72,
"duration": 3220,
"requests": [],
"user_main_account": 0,
"user_bonus_account": 0,
"currency": "VND",
"total_pay": 307000,
"total_balance": 0,
"is_postpaid": false,
"is_child_account": false,
"online_pay": 0,
"payment_method": "CASH",
"distance_fee": 297000,
"request_fee": 0,
"stop_fee": 10000,
"vat_fee": 0,
"discount": 0,
"total_fee": 307000,
"stoppoint_price": 10000,
"special_request_price": 0,
"vat": 0,
"distance_price": 297000,
"voucher_discount": 0,
"subtotal_price": 307000,
"total_price": 307000,
"_id": "SGN-TRICYCLE"
}
]

Các lỗi thường gặp

Trả về danh sách chi tiết các lỗi với status_code, mô tả bởi mỗi loại service_id

Error response example:

Status-Code: 200 OK

[
{
"_id": "SGN-TRICYCLE-NOT-EXIST",
"title": "Service not found",
"description": "Service SGN-TRICYCLE-NOT-EXIST not found"
},
{
"distance": 11.72,
"duration": 3220,
"user_main_account": 0,
"user_bonus_account": 0,
"currency": "VND",
"total_pay": 80000,
"total_balance": 0,
"is_postpaid": false,
"is_child_account": false,
"online_pay": 0,
"payment_method": "CASH",
"requests": [],
"distance_fee": 75000,
"request_fee": 0,
"stop_fee": 5000,
"vat_fee": 0,
"discount": 0,
"total_fee": 80000,
"surcharge": 1.21,
"stoppoint_price": 5000,
"special_request_price": 0,
"vat": 0,
"distance_price": 75000,
"voucher_discount": 0,
"subtotal_price": 80000,
"total_price": 80000,
"surge_rate": 1.21,
"_id": "SGN-BIKE"
}
]