GoGoVan API documentation - SG
Getting a quote
Request:
curl -X GET \
-H 'GoGoVan-API-Key: 3af4ba76-3767-4963-9680-327bb6d391d1' \
-H 'GoGoVan-User-Language: en-US' \
-F 'order[name]=John' \
-F 'order[phone_number]=61577364' \
-F 'order[pickup_time]=2016-01-20T18:00:00H' \
-F 'order[service_type]=delivery' \
-F 'order[vehicle]=motorcycle' \
-F 'order[title_prefix]=Corporate Order' \
-F 'order[extra_requirements][express_service]=true' \
-F 'order[extra_requirements][remark]=Please confirm the following 3 items' \
-F 'order[locations]=[[1.333948, 103.840142,"Toa Payoh, Singapore"],[1.353945, 103.843884,"5G Jalan Berjaya, Singapore"]]' \
'https://stag-sg.gogovan.tech/api/v0/orders/price.json'
GoGoVan-User-Language
can be en-US
zh-TW
zh-CN
Response:
{
"base" : 10,
"total" : 35,
"breakdown" : {
"fee" : {
"title" : "Fee",
"value" : 30
},
"extra_charge_for_express":{
"title":"Express service",
"value":3
},
"multi_point_concession":{
"title":"Promotional Discount",
"value":-3
},
},
}
}
Final price
base
+ extra_charges
- multi_point_concession
--------------------------------------------------------------------------------------
Requesting for a van
Request:
curl -X POST \
-H 'GoGoVan-API-Key: 3af4ba76-3767-4963-9680-327bb6d391d1' \
-H 'GoGoVan-User-Language: en-US' \
-F 'order[name]=John' \
-F 'order[phone_number]=61577364' \
-F 'order[pickup_time]=2016-02-20T18:00:00H' \
-F 'order[service_type]=delivery' \
-F 'order[vehicle]=motorcycle' \
-F 'order[title_prefix]=Corporate Order' \
-F 'order[bonus]=20' \
-F 'order[extra_requirements][express_service]=true' \
-F 'order[extra_requirements][remark]=Please confirm the following 3 items' \
-F 'order[locations]=[[1.333948, 103.840142,"Toa Payoh, Singapore"],[1.353945, 103.843884,"5G Jalan Berjaya, Singapore"]]' \
'https://stag-sg.gogovan.tech/api/v0/orders.json'
Response:
{ "id": 4361 }
--------------------------------------------------------------------------------------
Canceling a request
curl -v -X POST \
-H 'GoGoVan-API-Key: 3af4ba76-3767-4963-9680-327bb6d391d1' \
-H 'GoGoVan-User-Language: en-US' \
'https://stag-sg.gogovan.tech/api/v0/orders/4361/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: 3af4ba76-3767-4963-9680-327bb6d391d1' \
-H 'GoGoVan-User-Language: en-US' \
'https://stag-sg.gogovan.tech/api/v0/orders/4361.json'
Response of "cancelled"(No driver assigned yet):
{
"id":4361,
"status":"cancelled",
"name":"John",
"phone_number":"61577364",
"price":50.0
}
Response of "Cancelled"(assigned a driver already):
{
"id":4361,
"status":"cancelled",
"name":"John",
"phone_number":"61577364",
"price":50.0,
"driver":{
"id":42,
"phone_number":"61577364",
"name":"alex",
"license_plate":"ss6666"
"location":"22.31283,114.221005"}
}
}
Response of "pending":
{
"id":4361,
"status":"pending",
"name":"John",
"phone_number":"61577364",
"price":50.0
}
Response of "active":
{
"id":4361,
"status":"active",
"name":"John",
"phone_number":"61577364",
"price":50.0,
"driver":{
"id":95,
"phone_number":"61575555",
"name":"Alex",
"license_plate":"ss6666"
"location":"22.31283,114.221005"}
}
Response of "completed":
{
"id":4361,
"status":"completed",
"name":"John",
"phone_number":"61577364",
"price":50.0,
"driver":{
"id":95,
"phone_number":"61575555",
"name":"Alex",
"license_plate":"ss6666"
"location":"22.31283,114.221005"}
}
--------------------------------------------------------------------------------------
Order status
Pending - The order is not picked up by any driver yet assigned - 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 > 1 hour Express Delivery order[extra_requirements][express_service]=true order[bonus]=20 < Vehicle > order[vehicle]=motorcycle order[vehicle]=sedan order[vehicle]=van order[vehicle]=lorry10 order[vehicle]=lorry14 order[vehicle]=lorry24--------------------------------------------------------------------------------------
API List
Getting a quote = https://stag-sg.gogovan.tech/api/v0/orders/price.json Request for a van = https://stag-sg.gogovan.tech/api/v0/orders.json Cancelling a request = https://stag-sg.gogovan.tech/api/v0/orders/{order_id}/cancel.json Checking status = https://stag-sg.gogovan.tech/api/v0/orders/{order_id}.json