4. Services API
4.1 Predict Shipping Time
4.1.1 API Get Predict Pick Time
URL:
Params:
Field name | Mandatory | datatype | Description |
---|---|---|---|
pick_province | required | String | Province to pick up the order. E.g: Hà Nội |
pick_district | required | String | District to pick up the order. E.g: Cầu Giấy |
pick_ward | optional | String | Ward to pick up the order. E.g: Mai Dịch |
pick_street | optional | String | Street to pick up the order. E.g: Nguyễn Chí Thanh |
pick_hamlet | optional | String | Hamlet to pick the order. If it is non-information, please fill “Khác”. |
pick_tel | optional | String | Phone number of the contact person to pick up the order. |
customer_province | optional | String | Province to deliver the order. |
customer_district | optional | String | District to deliver the order. |
customer_ward | optional | String | Ward to deliver the order. |
customer_street | optional | String | Street to deliver the order. |
customer_hamlet | optional | String | Hamlet to deliver the order. |
date | optional | String | If you want to fake current time. |
service_type | optional | String | Service Type (express/xfast_now/xfast_link_point) |
Note
If you want choose xfast service, please send full address of customer (customer_province, customer_district, customer_ward…)
curl
curl --location 'https://services-staging.ghtklab.com/services/shipment/pick-time?pick_province=H%C3%A0%20N%E1%BB%99i&pick_district=Hai%20b%C3%A0%20tr%C6%B0ng&pick_ward=thanh%20nh%C3%A0n&pick_street=null&customer_province=H%C3%A0%20N%E1%BB%99i&customer_district=Hai%20B%C3%A0%20Tr%C6%B0ng&customer_ward=thanh%20nh%C3%A0n&service_type=xfast_now' \
--header 'Token: {API_TOKEN}'
--header 'X-Client-Source: {PARTNER_CODE}'
Response Successfully:
{
"success": true,
"message": "Thành công.",
"data": {
"express": {
"pick_up": [
{
"name": "Chiều 21/02",
"date": "2023-02-21",
"work_shift": 2,
"time": [
{
"id": 7,
"text": "7h-8h"
},
{
"id": 107,
"text": "7h30-8h30"
},
{
"id": 8,
"text": "8h-9h"
},
{
"id": 108,
"text": "8h30-9h30"
},
{
"id": 9,
"text": "9h-10h"
},
{
"id": 109,
"text": "9h30-10h30"
}
]
},
{
"name": "Tối 21/02",
"date": "2023-02-21",
"work_shift": 3,
"time": [
{
"id": 13,
"text": "13h-14h"
},
{
"id": 113,
"text": "13h30-14h30"
},
{
"id": 14,
"text": "14h-15h"
},
{
"id": 114,
"text": "14h30-15h30"
},
{
"id": 15,
"text": "15h-16h"
},
{
"id": 115,
"text": "15h30-16h30"
},
{
"id": 16,
"text": "16h-17h"
}
]
},
{
"name": "Sáng 22/02",
"date": "2023-02-22",
"work_shift": 1,
"time": [
{
"id": 19,
"text": "19h-20h"
},
{
"id": 119,
"text": "19h30-20h30"
},
{
"id": 20,
"text": "20h-21h"
},
{
"id": 120,
"text": "20h30-21h30"
},
{
"id": 21,
"text": "21h-22h"
}
]
}
],
"delay_area": false,
"message": "Thành công"
},
"xfast_now": {
"pick_up": [
{
"booking_id": 12321,
"expired_at": "2022-05-28 18:46:43",
"distance": 12.46,
"xteam": {
"date_to_delay_pick": "2022-05-28 19:06:43",
"date_to_delay_deliver": [
"2022-05-28 21:36:43",
"2022-05-28 21:46:43",
"2022-05-28 21:56:43"
]
}
}
],
"message": "Thành công"
},
"xfast_link_point": {
"pick_up": [
{
"name": "Sáng 21/02",
"date": "2023-02-21",
"work_shift": 1,
"time": [
{
"id": 7,
"text": "7h-8h"
},
{
"id": 107,
"text": "7h30-8h30"
},
{
"id": 8,
"text": "8h-9h"
},
{
"id": 108,
"text": "8h30-9h30"
},
{
"id": 9,
"text": "9h-10h"
},
{
"id": 109,
"text": "9h30-10h30"
}
]
},
{
"name": "Chiều 21/02",
"date": "2023-02-21",
"work_shift": 2,
"time": [
{
"id": 1330,
"text": "13h-13h30"
},
{
"id": 1400,
"text": "14h-14h30"
}
]
}
],
"message": "Thành công"
}
},
"log_id": "j463f47f8b1881b"
}
Failed Response
Response Detail
Field | Desc |
---|---|
express, xfast_now, xfast_link_point | Name of service |
date | Booking the picking-up date of the order. |
work_shift | To indicate the order will be picked up at which time. “3” is in the evening. “2” is in the afternoon and “1” is in the morning. |
time | List available pick-up time frames |
time.*.id | ID represents the time frame specified by GHTK. Please pass id which is choosed by user to field “pick_time_slot” of create order ‘s api |
time.*.text | Text represents time frame details |
Xfast now response
Field | Desc |
---|---|
booking_id | Booking’s id - Using when call api create order. |
expired_at | Booking’s expired time. After expired time, booking id is became invalid. You need to recall to get new booking id |
distance | Distance from pick address to deliver address (Unit : km) |
xteam.date_to_delay_pick | Estimated pick up time |
xteam.date_to_delay_deliver | Estimated deliver up time |
Error Response
System Error Or Unexpected Error
If an error occurs or the expected pick-up time for each type of order cannot be obtained
{
"success": true,
"data": {
"express": {
"message": "Dịch vụ không khả dụng",
"pick_up": null
},
"xfast_now": {
"message": "Dịch vụ không khả dụng",
"pick_up": null
},
"xfast_link_point": {
"message": "Dịch vụ không khả dụng",
"pick_up": null
}
}
}
4.1.2 API Get Predict Deliver Time
Path & Method:
Params:
Field name | Mandatory | datatype | Description |
---|---|---|---|
pick_province | required | String | Province to pick up the order. E.g: Hà Nội |
pick_district | required | String | District to pick up the order. E.g: Cầu Giấy |
pick_ward | optional | String | Ward to pick up the order. E.g: Mai Dịch |
pick_street | optional | String | Street to pick up the order. E.g: Nguyễn Chí Thanh |
pick_hamlet | optional | String | Hamlet to pick the order. If it is non-information, please fill “Khác”. |
pick_date | required | String | Booking the picking-up date of the order. |
pick_work_shift | required | Number | To indicate the order will be picked up at which time. “3” is in the evening. “2” is in the afternoon and “1” is in the morning. |
customer_province | required | String | Province to deliver the order. |
customer_district | required | String | District to deliver the order. |
customer_ward | optional | String | Ward to deliver the order. |
customer_street | optional | String | Street to deliver the order. |
customer_hamlet | optional | String | Hamlet to deliver the order. |
service_type | optional | String | express/xfast_link_point (If service_type None -> get default : express) |
pick_time_slot | optional | Int | (Required If service_type is xfast_link_point) ID of Pick Time |
pick_tel | optional | String | (Required If service_type is xfast_link_point) Pick Tel |
Curl
curl --location 'https://services-staging.ghtklab.com/services/shipment/deliver-time?pick_province=H%C3%A0%20N%E1%BB%99i&pick_district=Th%E1%BA%A1ch%20Th%E1%BA%A5t&pick_ward=%C4%90%E1%BB%93ng%20Tr%C3%BAc&pick_street=null&pick_hamlet=%C4%90%E1%BB%93ng%20Kho&pick_date=2023-02-02&pick_work_shift=1&customer_province=H%E1%BB%93%20Ch%C3%AD%20Minh&customer_district=Qu%E1%BA%ADn%201&customer_ward=B%E1%BA%BFn%20Ngh%C3%A9&customer_street=null&customer_hamlet=Yoco%20Building' \
--header 'Token: {{API_TOKEN}}'
--header 'X-Client-Source: {{PARTNER_CODE}}'
Response Success
{
"success": true,
"data": {
"road": {
"deliver": [
{
"date": "2023-02-22",
"work_shift": 1,
"name": "Sáng ngày 22/02",
"time": [
{
"id": 9,
"text": "9h-10h"
},
{
"id": 109,
"text": "9h30-10h30"
},
{
"id": 10,
"text": "10h-11h"
},
{
"id": 110,
"text": "10h30-11h30"
},
{
"id": 11,
"text": "11h-12h"
},
{
"id": 111,
"text": "11h30-12h30"
},
{
"id": 12,
"text": "12h-13h"
},
{
"id": 112,
"text": "12h30-13h30"
}
]
},
{
"date": "2023-02-22",
"work_shift": 2,
"name": "Chiều ngày 22/02",
"time": [
{
"id": 15,
"text": "15h-16h"
},
{
"id": 115,
"text": "15h30-16h30"
},
{
"id": 16,
"text": "16h-17h"
},
{
"id": 116,
"text": "16h30-17h30"
},
{
"id": 17,
"text": "17h-18h"
},
{
"id": 117,
"text": "17h30-18h30"
}
]
},
{
"date": "2023-02-22",
"work_shift": 3,
"name": "Tối ngày 22/02",
"time": [
{
"id": 120,
"text": "20h30-21h30"
},
{
"id": 21,
"text": "21h-22h"
}
]
}
]
},
"fly": {
"deliver": [
{
"date": "2023-02-22",
"work_shift": 1,
"name": "Sáng ngày 22/02",
"time": [
{
"id": -1,
"text": "Tất cả"
},
{
"id": 7,
"text": "7h-8h"
},
{
"id": 107,
"text": "7h30-8h30"
},
{
"id": 8,
"text": "8h-9h"
},
{
"id": 108,
"text": "8h30-9h30"
},
{
"id": 9,
"text": "9h-10h"
},
{
"id": 109,
"text": "9h30-10h30"
},
{
"id": 10,
"text": "10h-11h"
},
{
"id": 110,
"text": "10h30-11h30"
},
{
"id": 11,
"text": "11h-12h"
},
{
"id": 111,
"text": "11h30-12h30"
},
{
"id": 12,
"text": "12h-13h"
},
{
"id": 112,
"text": "12h30-13h30"
}
]
},
{
"date": "2023-02-21 00:00:00",
"work_shift": 3,
"name": "Tối ngày 21/02",
"time": [
{
"id": -1,
"text": "Tất cả"
},
{
"id": 19,
"text": "19h-20h"
},
{
"id": 119,
"text": "19h30-20h30"
},
{
"id": 20,
"text": "20h-21h"
},
{
"id": 120,
"text": "20h30-21h30"
},
{
"id": 21,
"text": "21h-22h"
}
]
},
{
"date": "2023-02-22",
"work_shift": 2,
"name": "Chiều ngày 22/02",
"time": [
{
"id": -1,
"text": "Tất cả"
},
{
"id": 13,
"text": "13h-14h"
},
{
"id": 113,
"text": "13h30-14h30"
},
{
"id": 14,
"text": "14h-15h"
},
{
"id": 114,
"text": "14h30-15h30"
},
{
"id": 15,
"text": "15h-16h"
},
{
"id": 115,
"text": "15h30-16h30"
},
{
"id": 16,
"text": "16h-17h"
},
{
"id": 116,
"text": "16h30-17h30"
},
{
"id": 17,
"text": "17h-18h"
},
{
"id": 117,
"text": "17h30-18h30"
},
{
"id": 18,
"text": "18h-19h"
},
{
"id": 118,
"text": "18h30-19h30"
}
]
}
]
}
},
"log_id": "5y63f48a7c5137a"
}
Response Fail
Response Detail
Field | Desc |
---|---|
date | Booking the delivering date of the order. |
work_shift | To indicate the order will be delivered at which time. “3” is in the evening. “2” is in the afternoon and “1” is in the morning. |
time | List available deliver time frames |
4.2 Api get sorting code (Deliver cart)
PATH
Sample request
curl --location '{OPEN_API}/services/shipment/sorting-code' \
--header 'Token: {API_TOKEN}' \
--header 'X-Client-Source: {PARTNER_CODE}' \
--header 'Content-Type: application/json' \
--data '{
"pick_address":"số nhà 12",
"pick_province":"Hà Nội",
"pick_district":"Ba Đình",
"pick_ward": "Cống vị",
"pick_street":"",
"pick_hamlet":"Nguyễn văn ngọc",
"pick_tel":"0903203955",
"customer_address":"số nhà 12",
"customer_province":"Hà Nội",
"customer_district":"Thạch Thất",
"customer_ward": "Đồng Trúc",
"customer_street":"",
"customer_hamlet":"Đồng Kho",
"customer_tel":"0903203956",
"transport":"road",
"package_type":"express"
}'
Input parameters:
Parameter | Datatype | Mandatory (Y)/(N) | Description |
---|---|---|---|
pick_address | String | Y | Địa chỉ chi tiết điểm lấy hàng hóa. Ví dụ: nhà số 5, tổ 3, ngách 11, ngõ 45 |
pick_province | String | Y | Tên tỉnh/thành phố nơi lấy hàng hóa |
pick_district | String | Y | Tên quận/huyện nơi lấy hàng hóa |
pick_ward | String | N |
Tên phường/xã của người lấy hàng hóa |
pick_street | String | N | Tên đường/phố nơi lấy hàng hóa |
pick_hamlet | String | N | Tên ddcc4 nơi lấy hàng hóa |
pick_tel | String | N | SĐT liên lạc lấy hàng hóa |
customer_address | String | Y | Địa chỉ chi tiết của người nhận hàng, ví dụ: Chung cư CT1, ngõ 58, đường Trần Bình |
customer_province | String | Y | Tên tỉnh/thành phố của người nhận hàng hóa |
customer_district | String | Y | Tên quận/huyện của người nhận hàng hóa |
customer_ward | String | N |
Tên phường/xã của người nhận hàng hóa |
customer_street | String | N | Tên đường/phố của người nhận hàng hóa |
customer_hamlet | String | N | Tên ddc4 nơi của người nhận hàng hóa (không có có thể gửi lên khác) |
customer_tel | String | N | SĐT liên hệ nhận hàng |
transport | String | N | Phương thức vận chuyển (road/fly) |
package_type | String | N | Default express - gửi lên bbs nếu muốn lấy sorting code đơn bbs |
Response sample:
4.3. API to get the list of level 4 addresses
API to get the list of level 4 addresses (hamlets/villages/subdivisions) within a street/ward/commune. For some addresses, this information is mandatory and must be included in the order submission API.
Endpoint
Headers
- Token:
{API_TOKEN}
- X-Client-Source:
{PARTNER_CODE}
- Content-Type:
application/json
Sample Request
<?php
$data = array(
"province" => "Hà nội",
"district" => "Quận Ba Đình",
"ward_street" => "Đội Cấn",
"address" => "",
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://services.giaohangtietkiem.vn/services/address/getAddressLevel4?" . http_build_query($data),
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;
?>
Parameters
Parameter | Mandatory | Desc |
---|---|---|
address | no | String - A detailed address for which to retrieve a list of level 4 addresses, for example: đường Đội Cấn, Ba Đình, Hà Nội |
province | yes | String - The name of the province/city for which to retrieve the list of level 4 addresses. |
district | yes | String - The name of the district/ward for which to retrieve the list of level 4 addresses |
ward_street | yes | String - The name of the street/ward for which to retrieve the list of level 4 addresses. |
:::warning
Note: In cases where address
has a valid value, the province, district, etc., information of the pickup point will be retrieved based on this address code. The fields province
, district
, and ward_street
are not required to be sent.
:::
Response
{
"success": true,
"data": [
"IIG - 75 Giang Văn Minh",
"Vinapaco Building - 142 Đội Cấn",
"THCS Thống Nhất",
"Ngõ 47 Đội Cấn",
"Ngõ 46 Đội Cấn"
]
}
4.4. Check Xfast service
Request sample:
GET /services/shipment/x-team?customer_district%3DQu%E1%BA%ADn+Ba+%C4%90%C3%ACnh%26customer_province%3DH%C3%A0+N%E1%BB%99i%26customer_ward%3DPh%C6%B0%E1%BB%9Dng+%C4%90%E1%BB%99i+C%E1%BA%A5n%26customer_first_address%3D12+TT%26pick_province%3DH%C3%A0+N%E1%BB%99i%26pick_district%3DQu%E1%BA%ADn+Ba+%C4%90%C3%ACnh%26pick_ward%3DPh%C6%B0%E1%BB%9Dng+C%E1%BB%91ng+V%E1%BB%8B HTTP/1.1
Token:{API_TOKEN}
X-Client-Source: {PARTNER_CODE}
Query parameters:
Parameter | Datatype | Mandatory (Y)/(N) | Description |
---|---|---|---|
pick_province | String | Y | Province to pick up the order. |
pick_district | String | Y | District to pick up the order. |
pick_ward | String | N | Ward to pick up the order. |
pick_street | String | N | Street to pick up the order. (Must have 1 in 2 params: pick_street and pick_ward) |
customer_province | String | Y | Province to deliver the order. |
customer_district | String | Y | District to deliver the order. |
customer_ward | String | N | Ward to deliver the order. |
customer_street | String | N | Street to deliver the order (Must have 1 in 2 params: customer_street and customer_ward) |
customer_first_address | String | Y | Detailed address to deliver the order |
custormer_hamlet | String | N | Hamlet to deliver the order. |
Response sample:
Successful response:
{
"success": true,
"data": {
"2": {
"pick": "Lấy trước 8h30",
"session_val": "2",
"deliver": "Giao trước 10h30"
},
"5": {
"pick": "Lấy trước 10h30",
"session_val": "5",
"deliver": "Giao trước 12h30"
},
"8": {
"pick": "Lấy trước 13h30",
"session_val": "8",
"deliver": "Giao trước 15h30"
},
"11": {
"pick": "Lấy trước 15h30",
"session_val": "11",
"deliver": "Giao trước 17h30"
}
}
}
4.5 Api get list of pick addresses
The API returns a list of pickup addresses that have been configured in the system through GHTK’s Customer Platform.
Endpoint
Headers
- Token:
{API_TOKEN}
- X-Client-Source:
{PARTNER_CODE}
- Content-Type:
application/json
Sample Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "{OPEN_API}/services/shipment/list_pick_add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
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
{
"success": true,
"message": "",
"data": [
{
"pick_address_id": "88256",
"address": "Số nhà 105, ngõ 13 Lĩnh Nam, Phường Mai Động, Quận Hoàng Mai, Tp. Hà Nội, Lĩnh Nam, Hà Nội",
"pick_tel": "0987654321",
"pick_name": "Store 1"
},
{
"pick_address_id": "88260",
"address": "1312, Phường 1, Quận Bình Thạnh, TP Hồ Chí Minh",
"pick_tel": "0987654321",
"pick_name": "Store 2"
}
]
}
4.6. Get product information list
The API returns a list of products (and their corresponding IDs) that match the search query.
The product ID will need to be included in the order submission API for certain specific workflows.
Request
<?php
$data = array(
"term" => "laptop",
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "{OPEN_API}/services/kho-hang/thong-tin-san-pham?" . http_build_query($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_HTTPHEADER => array(
"Token: {API_TOKEN}",
),
));
$response = curl_exec($curl);
curl_close($curl);
echo 'Response: ' . $response;
?>
Parameter:
Parameter | Datatype | Mandatory | Description |
---|---|---|---|
Term | String | Y | Product name which needs to get information |
Response:
Case 1: Product has been posted to GHTK system before
{
"success": true,
"data": [
{
"full_name": "Laptop Asus",
"product_code": "23304A3MHLMVMXX625",
"weigh": 2,
"cost": 8000000
},
{
"full_name": "Laptop Dell",
"product_code": "23304A3MHLMVMXX888",
"weigh": 2.5,
"cost": 12000000
}
]
}
Case 2: Product has not been posted to GHTK system
Warning
In this case, submit order API needs to include product_code: “”then GHTK will create a new product code.
4.7 Api get tracking uuid
PATH
Sample request
curl --location --globoff '{OPEN_API}/services/shipment/tracking-uuid?pkg_order=17373471' \
--header 'Token: {API_TOKEN}' \
--header 'X-Client-Source: {PARTNER_CODE}' \
--header 'Content-Type: application/json'
Input parameters:
Parameter | Datatype | Mandatory (Y)/(N) | Description |
---|---|---|---|
pkg_order | Number | Y | Mã đơn hàng |
Response sample:
{
"success": true,
"data": {
"pkg_order": 17373471,
"uuid": "9e6b28d8-2154-43c7-88c3-7b0150f51f36",
"tracking_url": "https://tracking-package.ghtklab.com/9e6b28d8-2154-43c7-88c3-7b0150f51f36"
}
}
4.8 Api get print label info by package order
PATH
Header
- Token:
{API_TOKEN}
- X-Client-Source:
{PARTNER_CODE}
- Content-Type:
application/json
Request Parameter
Parameter | Datatype | Mandatory (Y)/(N) | Description |
---|---|---|---|
pkg_order | Long | Y | package order id |
Sample Request
curl --location --globoff '{OPEN_API}/open/api/v1/package/print-label-info?pkg_order=17373471' \
--header 'Token: {API_TOKEN}' \
--header 'X-Client-Source: {PARTNER_CODE}' \
--header 'Content-Type: application/json'
Response Success
{
"success": true,
"data": {
"sorting_code": "SGP50-X14",
"codes": [
{
"id": 1,
"qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAAB1CAYAAAB08X6BAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAABBaVRYdENyZWF0aW9uIFRpbWUAAAAAAFRo4bupIG7Eg20sIDMxIFRow6FuZyAxMCBOxINtIDIwMjQgMTQ6MjA6MzIgKzA3dlZ0XgAACexJREFUeJztnV1IFN8bx78z+66uL6tlixY/tEySIJXKyiwT6aYXr4q6KMgKrOiF0IIICaILCaLopigKxIveQ0i6qKtALDNIzTLJkiXfWt/SVdfdmfld9P/9CZkzszuz67rH84G9es55zrP71Zlz5jzzHK6pqUkCg0o4SZKYuJTCRzoARvhg4lIME5dimLgUw8SlGKNaA0EQ0NvbC1EU5yIeWTiOw5IlS2A2m4Pu63K5iLFbrVakpqYG7Mvr9aK/vz/oGEKJ0WiE0+kEzwfwfymp4HK5pMTERAlAxD42m0169+6dWqiyJCUlEf2WlJQE5auxsTGivwMAKT09XRoZGQkoXnZZphgmLsUwcSmGiUsxTFyKYeJSjOo6V43ly5fj6tWriI+P1+WnpqYGL1++DKrP+Pg4qqqq0NnZSWzz4MEDGI3yXzMhISGo8dQoLS3FuXPnAluDKnDo0CH8+PFDdzy6xbXb7SgsLERycrIuP/fv3w+6j8/nQ3NzM1paWohtnjx5gqSkJB2RBU5qaiq2bNlC/GMKlLi4uJDEwy7LFMPEpRgmLsXovufK0dHRgVu3bhHtJSUl2LVrVziGnnfU19fj9evXsjae53H48GHk5OSEZeywiNvd3Y0bN24Q7WazecGI29TURPwtDAYDtm3bFl3iRgtutxtNTU1E+8qVK7FixYo5jCi0LGhxW1tbUVZWRrRfunQJFy5cmMOIQsuCFhf4k4xAIpIJCqGAzZYpholLMUxcignLPbe0tBSDg4NEe0xMTDiGnZdcuHABZ86cIdpDvXnxN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ikQjZ7XZqbm6mcDhMb7zxhrjm6tWr9MADD5Df7yebzUZOp5NisRj99NNP0hyvvfYaBQIBstls5HK56J577qHp6WkRL5VKdPLkSfL5fCLPwMAAzc7Oimuq1So99dRTIo/b7aZDhw7R0tISERGdPXt2x2f+5JNPbrjepVKJTpw4QdFolO69915aWFgQscXFRUqn07Rv3z6anZ2l2dlZOn78OLW1tZHVaiW3200jIyNULpdvOA/7//kbHUAXiFfGwQUAAAAASUVORK5CYII="
},
{
"id": 2,
"qr": "",
"barcode": ""
}
],
"tags": [
{
"tag_id": 2,
"icon": "https://cache.giaohangtietkiem.vn/d/19a3f4247ab42a641282c9db134ab12b.png"
},
{
"tag_id": 4,
"icon": "https://cache.giaohangtietkiem.vn/d/19a3f4247ab42a641282c9db134ab12b.png"
}
],
"total_box": 3,
"weight": 1.2,
"pkg_order": "17373471",
"alias": "S1123",
"transfer_station": "Đan Phượng | HNP117"
},
"message": "Lấy thông tin đơn hàng thành công",
"code": 200
}
Response Detail
Parameter | Datatype | Description |
---|---|---|
sorting_code | String | Code for delivery path |
codes | Array | List of QR codes and barcodes for the packages in the order |
code.id | Integer | Numerical order of the package, in case the order has more than one package |
code.qr | Base64 | Package’s QR code |
code.barcode | Base64 | Package’s Barcode |
tag.id | Integer | Id of tag |
tag.icon | String | Link to the icon image of the tag |
total_box | Integer | Total boxes |
weight | Double | Weight |
pkg_order | Long | Package order |
alias | String | Package alias |
transfer_station | String | transfer station |
Response Fail
4.9 Api get parse address
PATH
Header
- Token:
{API_TOKEN}
- X-Client-Source:
{PARTNER_CODE}
- Content-Type:
application/json
Request Parameter
Parameter | Datatype | Mandatory (Y)/(N) | Description |
---|---|---|---|
address | String | Y | address |
Sample Request
curl --location --globoff '{OPEN_API}/open/api/v1/address/parse-address?address=thuy+h%C3%A0+th%C3%A1i+thuy+thai+binh' \
--header 'Token: {API_TOKEN}' \
--header 'X-Client-Source: {PARTNER_CODE}' \
--header 'Content-Type: application/json'
Response Success
{
"success": true,
"message": "Get parse address success!",
"data": {
"hamlet": {
"name": "Đường Thụy hà",
"type": 5,
"id": 731098
},
"district": {
"id": 1975,
"name": "Huyện Thái Thụy",
"type": 7
},
"province": {
"id": 863,
"name": "Thái Bình",
"type": 0
},
"ward": {
"id": 16820,
"name": "Thị trấn Diêm Điền",
"type": 1
}
}
}
Response Fail