Skip to main content
Version: 3.0.0

Cancel Order

Cancel an order created through the Ahamove Order ID or the Tracking Number

Can cancel an order which has one of statuses below

  • IDLE, ASSIGNING, ACCEPTED, CONFIRMING, PAYING
  • comment parameters have been standardized by Ahamove at Cancel Reason. Partners only need to use the reasons for User, the comment corresponding to the En or Vi column when Partners needs to cancel the order

Cancel Order By Ahamove Order ID​

curl --location --request DELETE 'https://partner-apistg.ahamove.com/v3/orders/<order_id>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"comment": "Khách hàng muốn hủy đơn"
}'

HTTP Request​

DELETE https://partner-apistg.ahamove.com/v3/orders/<order_id>

Headers​

ParameterValueRequiredDescription
Content-Typeapplication/jsonYes
AuthorizationBearer <token>YesToken of the order creator

Query Parameters​

ParameterTypeRequiredDescription
order_idStringYesOrder ID of the order to cancel
commentStringYesReason for cancellation (Required in ACCEPTED status)

Cancel Order By Order Tracking number​

For 1-N orders (1 pickup point - N delivery points), when the Partner cancels the order using the tracking number of the delivery point, the Order ID containing the delivery points will also be canceled.

curl --location --request DELETE 'https://partner-apistg.ahamove.com/v3/orders/tracks' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"tracking_number": "HD00001",
"comment": "Khách hàng muốn hủy đơn"
}'

HTTP Request​

DELETE https://partner-apistg.ahamove.com/v3/orders/tracks

Headers​

ParameterValueRequiredDescription
Content-Typeapplication/jsonYes
AuthorizationBearer <token>YesToken of the order creator

Query Parameters​

ParameterTypeRequiredDescription
tracking_numberStringYesTracking number (in path[x]) of the order to cancel
commentStringYesReason for cancellation (Required in ACCEPTED status)

Response​

JSON response example:

{}

Status-Code: 200 OK

Errors​

CodeTextDescription
401NOT_AUTHORIZEDNo permission to cancel the order
404ORDER_NOT_FOUNDOrder ID not found
406INVALID_ORDER_STATUSInvalid order status for cancellation
500INTERNAL_SERVER_ERRORWe had a problem with our server. Try again later
503SERVICE_UNAVAILABLEWe're temporarily offline for maintenance. Please try again later