Skip to main content

Create Order

Create order when paying for non-cash shipping

curl --request POST \
--url https://apistg.ahamove.com/v1/order/create \
--header 'Cache-Control: no-cache' \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data-urlencode 'service_id=SGN-BIKE' \
--data-urlencode 'payment_method=BALANCE' \
--data-urlencode 'order_time=0' \
--data-urlencode 'requests=[]' \
--data-urlencode 'path=[{"address":"7/28 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh","name":"Aha","mobile":"09xxxxxxxx"},{"address":"104 Trần Nhân Tôn, Phường 2, Quận 10, Hồ Chí Minh","name":"Nhan","mobile":"09xxxxxxxx"}]' \
--data-urlencode 'token=<TOKEN_STG>'
  • 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 --request POST \
--url https://apistg.ahamove.com/v1/order/create \
--header 'Cache-Control: no-cache' \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data-urlencode 'service_id=SGN-BIKE' \
--data-urlencode 'payment_method=BALANCE' \
--data-urlencode 'order_time=0' \
--data-urlencode 'requests=[{"_id":"SGN-BIKE-ROUND-TRIP","price":23000},{"_id":"SGN-BIKE-TIP","num":2,"price":5000}]' \
--data-urlencode 'path=[{"address":"7/28 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh","name":"Aha","mobile":"09xxxxxxxx"},{"address":"104 Trần Nhân Tôn, Phường 2, Quận 10, Hồ Chí Minh","name":"Nhan","mobile":"09xxxxxxxx","cod":50000}]' \
--data-urlencode 'token=<TOKEN_STG>'
  • 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 --request POST \
--url https://apistg.ahamove.com/v1/order/create \
--header 'Cache-Control: no-cache' \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data-urlencode 'service_id=SGN-BIKE' \
--data-urlencode 'payment_method=BALANCE' \
--data-urlencode 'order_time=0' \
--data-urlencode 'requests=[]' \
--data-urlencode 'need_optimize_route=True' \
--data-urlencode 'idle_until=1664249580' \
--data-urlencode 'path=[{"address":"7/28 Thành Thái, Phường 14, Quận 10, Hồ Chí Minh","name":"Aha","mobile":"0963708070"},{"address":"104 Trần Nhân Tôn, Phường 2, Quận 10, Hồ Chí Minh","name":"Nhan","mobile":"09xxxxxxxx","cod":70000},{"address":"402 Lê Văn Sỹ, Phường 14, Quận 3, Hồ Chí Minh", "name":"Tam","mobile":"09xxxxxxxx"}]' \
--data-urlencode 'token=<TOKEN_STG>'
  • 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đ