Hủy đơn
Hủy bởi người dùng
- cURL
- JavaScript
curl -X GET \
'https://apistg.ahamove.com/v1/order/cancel?token=<TOKEN_STG>&order_id=22ZPGW7V&comment=Cannot+contact+the+driver' \
-H 'cache-control: no-cache'
var requestOptions = {
method: 'GET',
redirect: 'follow',
};
fetch(
'https://apistg.ahamove.com/v1/order/cancel?token=<TOKEN_STG>&order_id=22ZPGW7V&comment=Cannot+contact+the+driver',
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
- Kiểm tra callback trả về
{
"_id": "22ZPGW7V",
"accept_time": 1663835863.1100876,
"cancel_by_user": true,
"cancel_comment": "Cannot contact the driver",
"cancel_image_url": "",
"cancel_time": 1663835909.464646,
"city_id": "SGN",
"complete_time": 0,
"create_time": 1663835764.3251476,
"path": [...]
"payment_method": "CASH",
"pickup_time": 0,
"service_id": "SGN-BIKE"
"status": "CANCELLED",
"sub_status": "",
...
}