5. Get Order Status API
This API provides the current status of the order.
Overview
After an order is submitted to Giaohangtietkiem's system, customers can check the status of their orders using the order code.
Request
Endpoint
GET /services/shipment/v2/{TRACKING_ORDER}
Headers
Token: {API_TOKEN}
X-Client-Source: {PARTNER_CODE}
Parameters
Parameter | Mandatory | Desc |
---|---|---|
TRACKING_ORDER | Yes | GHTK's reference ID or the Partner's reference ID (submitted with the order.id field in the "Submit an Order" API). |
Code
- HTTP
- CURL
- PHP
GET /services/shipment/v2/S1.A1.17373471 HTTP/1.1
Token: {API_TOKEN}
X-Client-Source: {PARTNER_CODE}
curl -X GET -H "Token: APITokenSample-ca441e70288cB0515F310742" \
-H "Token: {API_TOKEN}" \
-H "X-Client-Source: {PARTNER_CODE}" \
"https://services.giaohangtietkiem.vn/services/shipment/v2/{TRACKING_ORDER}"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://services.giaohangtietkiem.vn/services/shipment/v2/S1.A1.17373471",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_HTTPHEADER => array(
"Token: APITokenSample-ca441e70288cB0515F310742",
),
));
$response = curl_exec($curl);
curl_close($curl);
echo 'Response: ' . $response;
?>
Response
Response description
Parameter | Datatype | Mandatory (Y/N) | Description |
---|---|---|---|
label_id | String | Y | GHTK’s reference ID |
partner_id | String | Y | Partner’s reference ID |
status | Integer | Y | Status code (refer to table "Order Status Details" below for list of status code) |
status_text | String | N | Status description (in Vietnamese) |
created | String | Y | Created date of the package order Format: YY-MM-DD hh:mm:ss |
modified | String | Y | Last modified date of the package order Format: YY-MM-DD hh:mm:ss |
message | String | N | Notes of the package order (in Vietnamese) |
pick_date | String | N | Picking-up date of order |
deliver_date | String | N | Delivery date of order |
customer_fullname | String | Y | Customer’s fullname |
customer_tel | String | Y | Customer’s phone number |
address | String | Y | Detailed address to deliver the order |
storage_day | Integer | N | Number of days to store the order at GHTK’s warehouse before returning |
ship_money | Integer | Y | Shipping fee |
insurance | Integer | N | Insurance fee |
value | Integer | N | Declared monetary value of the order package. The insurance fee will be calculated based on this value. (in VND) |
weight | Integer | Y | Weight of the package (in gram) |
pick_money | Integer | Y | Cash amount needs to be collected at delivery (in VND) |
is_freeship | Integer | N | To indicate if this is a free shipping order or not. |
Successful request
{
"success": true,
"message": "",
"order": {
"label_id": "S1.A1.17373471",
"partner_id": "1234567",
"status": "1",
"status_text": "Chưa tiếp nhận",
"created": "2016-10-31 22:32:08",
"modified": "2016-10-31 22:32:08",
"message": "Không giao hàng 1 phần",
"pick_date": "2017-09-13",
"deliver_date": "2017-09-14",
"customer_fullname": "Vân Nguyễn",
"customer_tel": "0911222333",
"address": "123 nguyễn chí thanh Quận 1, TP Hồ Chí Minh",
"storage_day": "3",
"ship_money": "16500",
"insurance": "16500",
"value": "3000000",
"weight": "300",
"pick_money": 47000,
"is_freeship": "1"
}
}