4. Order Status Retrieval API
This API is used to retrieve the current status of a GHTK order code.
Description
After the order has been sent to Giaohangtietkiem’s system, customers can check the order status using the order code.
Request
Hyperlink
GET /services/shipment/v2/{TRACKING_ORDER}
Headers
Token: {API_TOKEN}
X-Client-Source: {PARTNER_CODE}
Parameters
| Parameter | Required | Description |
|---|---|---|
| TRACKING_ORDER | yes | The GHTK order code or the Partner's order code is passed through the order.id field in the order creation 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
The system will return the result in JSON format. The returned data is described as follows:
| Parameter | Description |
|---|---|
| label_id | String - GHTK’s order label code |
| partner_id | String - Partner's order code |
| status | String - Order status code. Refer the order status code table |
| status_text | String - Order status |
| created | String - Order creation time, format: YY-MM-DD hh:mm:ss |
| modified | String - Last modified time of the order, format: YY-MM-DD hh:mm:ss |
| message | String - Order notes |
| pick_date | String - Scheduled pickup date (if available); if the order has already been picked up, this is the actual pickup date |
| deliver_date | String - Scheduled delivery date (if available); if the order has already been delivered, this is the actual delivery date |
| customer_fullname | String - Recipient’s full name |
| customer_tel | String - Recipient’s phone number |
| address | String - Recipient’s address |
| storage_day | Integer - Number of days the order is stored at the GHTK warehouse before being returned |
| ship_money | Integer - Shipping fee |
| insurance | Integer - Insurance fee |
| value | Integer - Insurance Value - the basis for compensation to the sender in case of loss or damage |
| weight | Integer - Order weight in grams |
| pick_money | Integer - COD amount |
| is_freeship | Integer - Freeship for the recipient |
| ext_fees | Array Object - List of additional fees. See details in the table below |
Details of each element in ext_fees:
| Parameter | Description |
|---|---|
| type | String - Fee type. See the list of values in the table below |
| title | String - Display name of the fee |
| amount | Integer - Fee amount |
List of additional fee types:
| type | title |
|---|---|
| food_fee | Additional fee for produce/dry food orders |
| fragile_fee | Additional fee for fragile orders |
| reinforced_fee | Additional fee for reinforced packaging orders |
| fullbox_fee | Additional fee for full-box orders |
| try_on_fee | Try-on fee |
| document_fee | Document/mail fee |
| short_exp_fee | Fuel surcharge |
| xfast_fee | Xfast fee |
| bbs_return_fee | BBS return fee |
| bbs_loading_1_low_fee | Ground floor loading fee (leg 1) |
| bbs_loading_1_high_fee | Upper floor loading fee (leg 1) |
| bbs_loading_2_low_fee | Ground floor loading fee (leg 2) |
| bbs_supporter_fee | BBS loading support fee |
| bbs_waiting_fee | Waiting fee per delivery point |
| deliver_to_door_fee | Door-to-door delivery fee |
| plant_fee | Additional fee for plant orders |
| otp_verification_fee | OTP delivery confirmation fee |
| check_pickup_fee | Pre-pickup inspection fee |
| co_check_fee | Try-on/co-inspection fee |
| change_return_add_fee | Return address change fee |
| re_delivery_fee | Re-delivery fee |
| change_address_fee | Delivery address change fee |
| gam_solution_fee | Fee from the Gam Solution service |
Success
{
"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",
"ext_fees": [
{
"type": "fragile_fee",
"title": "Phụ phí dễ vỡ",
"amount": 5000
}
]
}
}