Skip to main content
Version: 3.0.0

Update Order Information

Allows partners to update order information after creation

Conditions for updating order information:

  • Allowed statuses for updates: IDLE, ASSIGNING, ACCEPTED
  • Fields allowed for updates within the path:
ParameterUpdate LimitAllowed ServicesAllowed PathAllowed Payment Methods
nameUnlimitedAhamove and OnWheel services (VNM-PARTNER-XXX)Pickup and delivery points in pathBALANCE, CASH, CASH_BY_RECIPIENT
mobileUnlimitedAhamove and OnWheel servicesPickup and delivery points in pathBALANCE, CASH, CASH_BY_RECIPIENT
remarksUnlimitedAhamove and OnWheel servicesPickup and delivery points in pathBALANCE, CASH, CASH_BY_RECIPIENT
codOnce per pathOnWheel serviceDelivery points in pathBALANCE, CASH
addressOnce per pathOnWheel serviceDelivery points in pathBALANCE, CASH
curl --location --request PATCH 'https://partner-apistg.ahamove.com/v3/orders/<order_id>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"path_index": 1,
"name": "Anh",
"mobile": "09xxxxxxxx",
"remarks": "Cổng đón khách A",
"cod": 220000,
"address_info": {
"lat": 10.798026,
"lng": 106.696369,
"address": "Bệnh Viện Quận Bình Thạnh, 132 Lê Văn Duyệt, Phường 1, Quận Bình Thạnh, Thành phố Hồ Chí Minh, Việt Nam"
}
}'

HTTP Request

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

Headers

ParameterValueRequiredDescription
AuthorizationBearer <token>YesToken of the order creator

Body

{
"path_index": 1,
"name": "Anh",
"mobile": "09xxxxxxxx",
"remarks": "Cổng đón khách A",
"cod": 220000,
"address_info": {
"lat": 10.798026,
"lng": 106.696369,
"address": "Bệnh Viện Quận Bình Thạnh, 132 Lê Văn Duyệt, Phường 1, Quận Bình Thạnh, Thành phố Hồ Chí Minh, Việt Nam"
}
}

Parameters

ParameterTypeRequiredDescription
path_indexIntYesIndex of the path to update (path_index = 0 for the pickup point, with the maximum value being the last delivery point)
nameStringNoName field in each path
mobileStringNoMobile field in each path
remarksStringNoRemarks field in each path
codIntNoCOD value for each delivery point
address_infoObjectNoAddress information for delivery points

Model của address_info

Cập nhật từ path[x], x > 0

ParameterTypeYêu cầuMô tả
addressStringĐịa chỉ giao hàng đúng định dạng
latFloatKhôngVĩ độ của điểm giao (Không bắt buộc nhưng đề xuất Đối tác nên sử dụng)
lngFloatKhôngKinh độ của điểm giao (Không bắt buộc nhưng đề xuất Đối tác nên sử dụng)

Model of address_info

Update from path[x], x > 0

ParameterTypeRequiredDescription
addressStringYesFormatted delivery address
latFloatNoLatitude of the delivery point (optional but recommended)
lngFloatNoLongitude of the delivery point (optional but recommended)

Response

JSON response example:

{}

Status-Code: 200 OK

Errors

ErrorTextDescription
400BAD_REQUESTBad request
400MISSING_REQUIRED_INFOMissing required fields
400INVALID_DATAData in request body is invalid
401NOT_AUTHORIZEDInvalid token
403SUPPLIER_NOT_ENOUGH_MONEY_FOR_CHANGE_ADDRESSUnable to change address due to insufficient balance for deduction in the driver's account
403STOP_POINT_EDITEDStop point information already changed
403ORDER_STATUS_NOT_ALLOWEDOrder status does not allow information changes
403CHANGE_ADDRESS_NOT_ALLOWEDAddress change not allowed
404ORDER_NOT_FOUNDOrder not found
406NOT_ALLOW_ORDER_WITH_PROMO_CODEOrder updates not allowed with applied promo code
406NOT_ALLOW_CHANGE_PICKUP_ADDRESSPickup address changes not allowed
406INVALID_PAYMENT_METHODOrder payment method does not support information changes
500INTERNAL_SERVER_ERRORWe had a problem with our server. Try again later
503SERVICE_UNAVAILABLEWe're temporarily offline for maintenance. Please try again later