Skip to main content
Version: 3.0.0

Create Order

Sample test case of create order

Create order when paying for non-cash shipping

curl --location 'https://partner-apistg.ahamove.com/v3/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"order_time": 0,
"path": [
{
"lat": 10.76975346,
"lng": 106.6636615,
"address": "7/28 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh",
"name": "Aha",
"mobile": "84944309348"
},
{
"lat": 10.76487455,
"lng": 106.6744510,
"address": "104 Trần Nhân Tôn, Phường 2, Quận 10, Hồ Chí Minh",
"name": "Nhan",
"mobile": "0912345678"
}
],
"service_id": "SGN-BIKE",
"requests": [],
"payment_method": "BALANCE",
"items": [
{
"_id": "TG",
"num": 1,
"name": "Tủ gỗ nhỏ",
"price": 450000
},
{
"_id": "GDB",
"num": 2,
"name": "Gương để bàn",
"price": 120000
}
]
}'
  • Check order status on partner portal

22JKP8Y3

The order information will be shown in the partner portal for the partner to check order status and order history

If you hover the mouse pointer over the icon ct.jpg , you can check the status of callback to your webhook URL

image.png

  • Driver App

image.jpeg image.jpeg

Driver do not collect any fee from Sender/Seller or Receiver

  • The sample callback via webhook
{
"_id": "22JKP8Y3",
"accept_time": 0,
"city_id": "SGN",
"complete_time": 0,
"create_time": 1664248324.2389245,
"path": [
{
"address": "7/28 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh",
"cod": 0,
"por_info": "",
"mobile": "09xxxxxxxx",
"status": "",
"complete_time": 0,
"fail_time": 0,
"return_time": 0,
"pod_info": "",
"fail_comment": "",
"name": "Aha"
},
{
"address": "104 Trần Nhân Tôn, Phường 2, Quận 10, Hồ Chí Minh",
"cod": 0,
"por_info": "",
"mobile": "09xxxxxxxx",
"status": "",
"complete_time": 0,
"fail_time": 0,
"return_time": 0,
"pod_info": "",
"fail_comment": "",
"name": "Nhan"
}
],
"payment_method": "BALANCE",
"pickup_time": 0,
"service_id": "SGN-BIKE",
"status": "ASSIGNING",
"sub_status": "",
...
}

Create order when paying for shipping in CASH

  • Paid by Seller/Sender

Field payment_method in parameters will be changed into payment_method=CASH

image.jpegimage.jpeg

Driver collects Seller/Sender 28.000đ

  • Paid by Recipient

Field payment_method in parameters will be changed into payment_method=CASH_BY_RECIPIENT

image.jpegimage.jpeg

Driver collects Receiver 28.000đ

Create order with promo code

  • Field promo_code is required in parameters as promo_code=AHAKM
  • Ahamove launchs some coupon code in Staging environment:
    • AHAKM (FLAT): Discount value is 10.000đ on shipping fee
    • AHAKM20 (PERCENTAGE ): Discount 20% on shipping fee and max discount is 15.000đ
    • AHAKM1 (SAME PRICE): Discount value is 5.000đ for all the order

image.png

The total fees is 28.000đ but only 18.000đ left after applying promo code AHAKM

Create order with COD (advance)

Field cod is required in path[x], x>0

image.jpegimage.jpeg

Driver advances to Sender/Seller 50.000đ and collects Receiver 50.000đ

Create order with special requests

Partners can get list of special requests of each type of service in API Get List Of Service and apply when creating order

curl --location 'https://partner-apistg.ahamove.com/v3/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"order_time": 0,
"path": [
{
"lat": 10.76975346,
"lng": 106.6636615,
"address": "7/28 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh",
"short_address": "Thành Thái, Quận 10",
"name": "Lan",
"mobile": "84944309348",
"remarks": "Đến nơi lấy hàng đọc mã đơn để nhận hàng"
},
{
"lat": 10.76487455,
"lng": 106.6744510,
"address": "104 Trần Nhân Tôn, Phường 2, Quận 10, Hồ Chí Minh",
"name": "Nhanh",
"mobile": "0912345678",
"cod": 50000,
}
],
"service_id": "SGN-BIKE",
"requests": [
{
"_id": "SGN-BIKE-TIP",
"num": 1
},
{
"_id": "SGN-BIKE-ROUND-TRIP"
}
],
"payment_method": "BALANCE",
"items": [
{
"_id": "TG",
"num": 1,
"name": "Tủ gỗ nhỏ",
"price": 450000
},
{
"_id": "GDB",
"num": 2,
"name": "Gương để bàn",
"price": 120000
}
]
}'
  • Check order status on partner portal

image.png

The total fee will include shipping fee and request fee

  • Driver App

image.jpeg

The special requests will be displayed on screen when the Driver accepts order

Create scheduled order with multiple drop-off points

curl --location 'https://partner-apistg.ahamove.com/v3/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"order_time": 0,
"idle_until": 1664249580,
"path": [
{
"lat": 10.76975346,
"lng": 106.6636615,
"address": "7/28 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh",
"short_address": "Thành Thái, Quận 10",
"name": "Lan",
"mobile": "84944309348",
"remarks": "Đến nơi lấy hàng đọc mã đơn để nhận hàng"
},
{
"lat": 10.76487455,
"lng": 106.6744510,
"address": "104 Trần Nhân Tôn, Phường 2, Quận 10, Hồ Chí Minh",
"name": "Nhanh",
"mobile": "0912345678",
"cod": 70000,
},
{
"address": "402 Lê Văn Sỹ, Phường 14, Quận 3, Hồ Chí Minh",
"name": "Tam",
"mobile": "0986754321"
}
],
"service_id": "SGN-BIKE",
"requests": [],
"payment_method": "BALANCE",
"need_optimize_route": True,
"items": [
{
"_id": "TG",
"num": 1,
"name": "Tủ gỗ nhỏ",
"price": 450000
},
{
"_id": "GDB",
"num": 2,
"name": "Gương để bàn",
"price": 120000
}
]
}'
  • Check the order status

image.jpeg

The total fee = Shipping fee + Stop fee

  • Driver App

image.jpegimage.jpegimage.jpeg

Driver advances to Seller/Sender 70.000đ and collects Receiver at drop-off 1 70.000đ