GoGoVan API documentation - HK
Getting a quote
Request:
curl -X GET \
-H 'GoGoVan-API-Key: aaaeef61-3dce-43f8-b461-66a9aa45bf9e' \
-H 'GoGoVan-User-Language: en-US' \
-F 'order[name]=Din' \
-F 'order[phone_number]=98765432' \
-F 'order[pickup_time]=2016-01-30T18:00:00H' \
-F 'order[vehicle]=van' \
-F 'order[extra_requirements][remark]=dintest' \
-F 'order[locations]=[[22.312516,114.217874,"Seaview Center, 139 Hoi Bun Road, Hong Kong"],[22.282224,114.129262,"Kennedy Town, Hong Kong"]]' \
-F 'order[extra_requirements][need_english]=true' \
'https://stag-hk.gogovan.tech/api/v0/orders/price.json'
GoGoVan-User-Language
can be en-US
zh-TW
zh-CN
Response:
{
"breakdown" : {
"fee" : {
"title" : "車費",
"value" : 130
},
"speak_english" : {
"title" : "講英文",
"value" : 5
},
}
"base" : 130
}
-------------------------------------------------------------------------------------
Requesting for a van
Request:
curl -X POST \
-H 'GoGoVan-API-Key: aaaeef61-3dce-43f8-b461-66a9aa45bf9e' \
-H 'GoGoVan-User-Language: en-US' \
-F 'order[name]=Din' \
-F 'order[phone_number]=98765432' \
-F 'order[pickup_time]=2016-01-30T18:00:00H' \
-F 'order[vehicle]=van' \
-F 'order[extra_requirements][remark]=dintest' \
-F 'order[locations]=[[22.312516,114.217874,"Seaview Center, 139 Hoi Bun Road, Hong Kong"],[22.282224,114.129262,"Kennedy Town, Hong Kong"]]' \
-F 'order[extra_requirements][need_pet]=true' \
'https://stag-hk.gogovan.tech/api/v0/orders.json'
Response:
{ "id": 1018406 }
--------------------------------------------------------------------------------------
Canceling a request
curl -v -X POST \
-H 'GoGoVan-API-Key: aaaeef61-3dce-43f8-b461-66a9aa45bf9e' \
-H 'GoGoVan-User-Language: en-US' \
'https://stag-hk.gogovan.tech/api/v0/orders/1018406/cancel.json'
The response will be just HTTP 200 OK with no response body.
--------------------------------------------------------------------------------------Checking status
Request:
curl -v -X GET \
-H 'GoGoVan-API-Key: aaaeef61-3dce-43f8-b461-66a9aa45bf9e' \
-H 'GoGoVan-User-Language: en-US' \
'https://stag-hk.gogovan.tech/api/v0/orders/1018406.json'
Response of "cancelled"(No driver assigned yet):
{
"id" : 1018406,
"status" : "cancelled",
"name" : "Din",
"phone_number" : "98765432",
"price":140
}
Response of "Cancelled"(assigned a driver already):
{
"id":1018406,
"status":"cancelled",
"name":"Din",
"phone_number":"98765432",
"price":140.0,
"driver":{
"id":908,
"phone_number":"98745632",
"name":"So",
"license_plate":"HK"
"location":"22.3135379,114.2214031"}
}
}
Response of "pending":
{
"id":1018406,
"status":"pending",
"name":"Din",
"phone_number":"98765432",
"price":140.0
}
Response of "active":
{
"id":1018406,
"status":"active",
"name":"Din",
"phone_number":"98765432",
"price":140.0,
"driver":{
"id":908,
"phone_number":"98745632",
"name":"So",
"license_plate":"HK"
"location":"22.3135379,114.2214031"}
}
Response of "completed":
{
"id":1018406,
"status":"completed",
"name":"Din",
"phone_number":"98765432",
"price":140.0,
"driver":{
"id":908,
"phone_number":"98745632",
"name":"So",
"license_plate":"HK"
"location":"22.3135379,114.2214031"}
}
---------------------------------------------------------------------------------------
Order status
Pending - The order is not picked up by any driver yet Active - A driver has been assigned to the order completed - The order has been marked "completed" by the driver canelled - The order has been marked "cancelled" by the driver
Mandatory fields
GoGoVan-API-Key GoGoVan-User-Language order[name] order[phone_number] order[pickup_time] order[vehicle] order[locations] API URL
Possible parameters
< Extra-requirements > need_pet order[extra_requirements][need_pet]=true|false need_cart order[extra_requirements][need_cart]=true|false cart_count order[extra_requirements][cart_count]=1..3 need_over_6ft order[extra_requirements][need_over_6ft]=true|false remove_net order[extra_requirements][remove_net]=half|full need_carry order[extra_requirements][need_carry]=true|false need_waste order[extra_requirements][need_waste]=true|false passenger_count order[extra_requirements][passenger_count]=0..5 need_english order[extra_requirements][need_english]=true|false remark order[extra_requirements][remark]=dintest < Vehicle > order[vehicle]=van order[vehicle]=mudou order[vehicle]=mudou9
API List
Getting a quote = https://stag-hk.gogovan.tech/api/v0/orders/price.json Request for a van = https://stag-hk.gogovan.tech/api/v0/orders.json' Cancelling a request = https://stag-hk.gogovan.tech/api/v0/orders/{order_id}/cancel.json Checking status = https://stag-hk.gogovan.tech/api/v0/orders/{order_id}.json