Nhảy tới nội dung

Ước tính phí đơn hàng

curl --request POST \
--url https://apistg.ahamove.com/v1/order/estimated_fee \
--header 'Cache-Control: no-cache' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'token=<TOKEN_STG>' \
--data-urlencode 'order_time=0' \
--data-urlencode '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":"Anh","mobile":"09xxxxxxxx","remarks":"call me"},{"lat":10.772594,"lng":106.69669,"address":"Chợ Bến Thành, Bến Thành, Quận 01, Hồ Chí Minh, Việt Nam","name":"Bao","mobie":"09xxxxxxxx"}]' \
--data-urlencode 'service_id=SGN-BIKE' \
--data-urlencode 'requests=[]''

API này dùng để ước tính phí đơn hàng (hỗ trợ cả 2 phương thức GET/POST)

HTTP Request

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

hoặc

GET https://apistg.ahamove.com/v1/order/estimated_fee

Parameters

Giống với API Tạo đơn

Response

JSON response example:

{
"distance": 4.68,
"duration": 1291,
"user_main_account": 32000,
"user_bonus_account": 0,
"currency": "VND",
"total_pay": 0,
"total_balance": 0,
"is_postpaid": true,
"is_child_account": false,
"online_pay": 0,
"payment_method": "CASH",
"requests": [],
"distance_fee": 32000,
"request_fee": 0,
"stop_fee": 0,
"vat_fee": 0,
"discount": 0,
"total_fee": 32000,
"cod_commission_fee": 0,
"premium_service_fee": 0,
"weight_fee": 0,
"surcharge": 1.1,
"partner_surcharge": 1.1,
"stoppoint_price": 0,
"special_request_price": 0,
"vat": 0,
"cod_commission_price": 0,
"distance_price": 32000,
"voucher_discount": 0,
"subtotal_price": 32000,
"total_price": 32000,
"surge_rate": 1.1
}

Status-Code: 200 OK

Trường thông tinMô tả
distanceKhoảng cách
durationThời gian đã ước tính
currencyĐơn vị tiền tệ
distance_feePhí khoảng cách (Sẽ được loại bỏ sau ngày December 1st, 2019)
request_feePhí yêu cầu (Sẽ được loại bỏ sau ngày December 1st, 2019)
stop_feePhí điểm dừng, áp dụng cho đơn hàng nhiều điểm giao (Sẽ được loại bỏ sau ngày December 1st, 2019)
vat_feeThuế VAT (Sẽ được loại bỏ sau ngày December 1st, 2019)
discountChiết khấu (Sẽ được loại bỏ sau ngày December 1st, 2019)
total_feeTổng phí (Sẽ được loại bỏ sau ngày December 1st, 2019)
surchargeMức giá phụ thu, chỉ được trả về nếu mức phụ phí > 1 (Sẽ được loại bỏ sau ngày December 1st, 2019)
distance_priceGiá khoảng cách, thay thế cho distance_fee
special_request_priceGiá các yêu cầu đặc biệt, thay thế cho request_fee
stoppoint_priceGiá điểm dừng, thay thế cho stop_fee
vatThuế VAT, thay thế cho vat_fee
voucher_discountChiết khấu, thay thế cho discount
subtotal_priceTổng giá, thay thế cho total_fee
total_priceGiá cuối cùng, bằng subtotal_price - voucher_discount
surge_rateĐôi khi, giá dịch vụ có thể tăng do nhu cầu tăng bất ngờ. Mức tỉ lệ này sẽ trả về nếu lớn hơn 1, thay thế cho surcharge
total_payTổng thanh toán bằng tiền mặt
online_paySố tiền mà người dùng thanh toán cho Ahamove thông qua bên thanh toán thứ 3 (Ví dụ như MOMO)

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

Giống với API Tạo đơn