Orders
This Order API allow developers to retrieve shipping rates, create a new order, retrieve order information, obtain order status lists, and generate shipping labels.
Calculate Shipping Fee
This API allows you to calculate the shipping fee of an order in advance.
Endpoint
get/v1/partner/orders/price
Request
Headers
Key | Value |
---|---|
Accept | application/json |
Authorization | Bearer Access-Token |
Parameters
Field | Required | Type | Description |
---|---|---|---|
sender_province | Yes | String | Province/City Name of Sender. For example: Thành phố Hồ Chí Minh. |
sender_district | Yes | String | District Name of Sender. For example: Huyện Bình Chánh. |
receiver_province | Yes | String | Province/City Name of Receiver. For example: Thành phố Hà Nội. |
receiver_district | Yes | String | District Name of Receiver. For example: Quận Tây Hồ. |
weight | Yes | Integer | - Weight of the Order. For example: 200. - Unit gram. |
value | No | Integer | - Value of the Order. For example: 4200000. - Used to calculate Insurance Fee. - Unit Vietnamese Dong. |
Example
curl --request GET \
--url 'https://api.mysupership.vn/v1/partner/orders/price?sender_province=Hồ Chí Minh&sender_district=Bình Chánh&receiver_province=Hà Nội&receiver_district=Tây Hồ&weight=200&value=12000000' \
--header 'Accept: application/json'
--header 'Authorization: Bearer <Access-Token>' \
Response
Returned Result
Field | Type | Description |
---|---|---|
service | String | - The name of the service package. For example: Tốc Hành. Possible values: - Tốc Hành. |
fee | Integer | Delivery Fee. For example: 20000. |
insurance | Integer | Insurance Fee. For example: 42000. |
pickup | Object | Estimated Pickup Time. |
delivery | Object | Estimated Delivery Time. |
Example
{
"status": "Success",
"results": [
{
"service": "Tốc Hành",
"fee": 35000,
"insurance": 120000,
"pickup": {
"name": "Chiều nay - 03/07/2018"
},
"delivery": {
"name": "Sáng mốt - 05/07/2018"
}
}
]
}
Create Order
Create Order API allows you to create a new order.
Endpoint
post/v1/partner/orders/add
Request
Headers
Key | Value |
---|---|
Accept | application/json |
Authorization | Bearer Access-Token |
Content-Type | application/json |
Parameters
Field | Required | Type | Description |
---|---|---|---|
pickup_code | No | String | The Warehouse/Pickup Point code of the sender. If this field has a non-empty value, it will be prioritized for pickup. |
pickup_phone | Yes | String | The phone number of the pickup point. SuperShip's sMan will contact this number when picking up, delivering, or returning the shipment. For example: 0989999999. Lưu ý: Required only if the `pickup_code` field is empty/not filled/has no value. The fields starting with 'pickup' below are similar. |
pickup_address | Yes | String | The address of the pickup point. For example: 45 Nguyễn Chí Thanh. |
pickup_province | Yes | String | The Province/City name of the sender. For example: Thành phố Hà Nội. |
pickup_district | Yes | String | The District name of the sender. For example: Quận Ba Đình. |
pickup_commune | Yes | String | The Commune/Ward name of the sender. For example: Phường Ngọc Khánh. |
pickup_name | No | String | The name of the Warehouse/Pickup Point. For example: Kho Tân Bình. |
pickup_contact | No | String | The name of the contact person. For example: Hoàng Mạnh Nam. |
name | Yes | String | Name of the receiver. For example: Trần Ngọc Nam. |
phone | Yes | String | Phone number of the receiver. |
address | Yes | String | Address of the receiver. For example: 56 Trương Công Định. |
province | Yes | String | Province/City of the receiver. For example: Thành phố Hồ Chí Minh. |
district | Yes | String | District of the receiver. For example: Quận Tân Bình. |
commune | Yes | String | Commune/Ward of the receiver. For example: Phường 14. |
amount | Yes | Integer | The amount to be collected upon delivery. For example: 200000. Unit Vietnamese Dong. |
value | No | Integer | The value of the order. For example: 4200000. Used to calculate Insurance Fee. Unit Vietnamese Dong. |
weight | Yes | Integer | The weight of the order. For example: 200. Unit gram. |
soc | No | String | The Sender's Order Code. For example: KR-180703-034. |
note | No | String | Additional note about the order from the Sender. For example: Hàng dễ vỡ, lưu ý dùm shop. |
service | Yes | String | Service Package Code. For example: 1. Possible values: - Express Service: 1 |
config | Yes | String | Permission for the Receiver to view/try the product. For example: 1. Possible values: - Allow viewing but not trying: 1 - Allow trying: 2 - Not allow viewing: 3 |
payer | Yes | String | Payer of the fee. For example: 1. Possible values: - Sender: 1 - Receiver: 2 |
product_type | Yes | String | Type of product format. For example: 1. Possible values: - String format: 1 - Array format: 2 |
product | No | String | Required when the value of product_type is 1. For example: Quần áo. |
products | No | Array | Required when the value of product_type is 2.Parameters: - sku : Product code. For example: P899234.- name : Product name. For example: Áo khoác P4.- price : Product price. For example: 200000.- weight : Product weight. For example: 200.- quantity : Product quantity. For example: 1. |
barter | No | String | Option for exchange/pick up of goods. If this requirement exists, the order will be supported for exchange and return. For example: 1. |
partner | No | String | Secret Code. For major E-commerce partners with SuperShip. |
Example
curl --request POST \
--url https://api.mysupership.vn/v1/partner/orders/add \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <Access-Token>' \
--header 'Content-Type: application/json' \
--data '{
"pickup_phone": "0989999999",
"pickup_address": "45 Nguyễn Chí Thanh",
"pickup_commune": "Phường Ngọc Khánh",
"pickup_district": "Quận Ba Đình",
"pickup_province": "Thành phố Hà Nội",
"name": "Trương Thế Ngọc",
"phone": "0945900350",
"email": null,
"address": "35 Trương Định",
"province": "Thành phố Hồ Chí Minh",
"district": "Quận 3",
"commune": "Phường 6",
"amount": "220000",
"value": null,
"weight": "200",
"payer": "1",
"service": "1",
"config": "1",
"soc": "KAN7453535",
"note": "Giao giờ hành chính",
"product_type": "2",
"products": [
{
"sku": "P899234",
"name": "Tên Sản Phẩm 1",
"price": 200000,
"weight": 200,
"quantity": 1
},
{
"sku": "P899789",
"name": "Tên Sản Phẩm 2",
"price": 250000,
"weight": 300,
"quantity": 2
}
]
}'
Response
Returned Result
Field | Type | Description |
---|---|---|
code | String | SuperShip Order Code. |
sorting | String | SuperShip Sorting Code. |
shortcode | String | SuperShip Short Order Code. Use this code to display barcode, not the full order code in the `code` field. |
soc | String | Sender's Order Code. |
phone | String | Receiver's Phone Number. |
address | String | Receiver's Address. For example: 47 Huỳnh Văn Bánh, Phường 5, Quận Phú Nhuận, Thành phố Hồ Chí Minh. |
amount | Integer | Amount to be collected. |
value | Integer | Value of the order. |
weight | Integer | Weight of the order. |
fee | Integer | Delivery Fee. |
status | String | Status Code of the order. |
status_name | String | Status Name of the order. |
Example
{
"status": "Success",
"message": "",
"results": {
"code": "BPCS983262NM.810000026",
"sorting": "LUC3-J5",
"shortcode": "810000026",
"soc": "PO8542245763",
"phone": "0987654321",
"amount": 160000,
"collection": 160000,
"value": 1600000,
"weight": 200,
"fee": 22000,
"insurance": 8000,
"status": "2",
"status_name": "Chờ Lấy Hàng"
}
}
Order Status
This API allows you to retrieve information on the list of order statuses currently available at SuperShip.
Endpoint
get/v1/partner/orders/status
Request
Example
curl --request GET \
--url 'https://api.mysupership.vn/v1/partner/orders/status'
Response
Returned Result
Field | Type | Description |
---|---|---|
key | String | Code of order status. |
value | String | Name of order status. |
Example
{
"status": "Success",
"message": "Lấy Danh Sách Trạng Thái thành công.",
"results": [
{
"key": "1",
"value": "Chờ Duyệt"
},
{
"key": "2",
"value": "Chờ Lấy Hàng"
},
{
"key": "3",
"value": "Đang Lấy Hàng"
},
{
"key": "4",
"value": "Đã Lấy Hàng"
},
{
"key": "5",
"value": "Hoãn Lấy Hàng"
},
{
"key": "6",
"value": "Không Lấy Được"
},
{
"key": "7",
"value": "Đang Nhập Kho"
},
{
"key": "8",
"value": "Đã Nhập Kho"
},
{
"key": "9",
"value": "Đang Chuyển Kho Giao"
},
{
"key": "10",
"value": "Đã Chuyển Kho Giao"
},
{
"key": "11",
"value": "Đang Giao Hàng"
},
{
"key": "12",
"value": "Đã Giao Hàng Toàn Bộ"
},
{
"key": "13",
"value": "Đã Giao Hàng Một Phần"
},
{
"key": "14",
"value": "Hoãn Giao Hàng"
},
{
"key": "15",
"value": "Không Giao Được"
},
{
"key": "16",
"value": "Đã Đối Soát Giao Hàng"
},
{
"key": "17",
"value": "Đã Đối Soát Trả Hàng"
},
{
"key": "18",
"value": "Đang Chuyển Kho Trả"
},
{
"key": "19",
"value": "Đã Chuyển Kho Trả"
},
{
"key": "20",
"value": "Đang Trả Hàng"
},
{
"key": "21",
"value": "Đã Trả Hàng"
},
{
"key": "22",
"value": "Hoãn Trả Hàng"
},
{
"key": "0",
"value": "Huỷ"
},
{
"key": "23",
"value": "Đang Vận Chuyển"
},
{
"key": "24",
"value": "Xác Nhận Hoàn"
},
{
"key": "25",
"value": "Hàng Thất Lạc"
},
{
"key": "26",
"value": "Không Trả Được"
},
{
"key": "27",
"value": "Đã Bồi Hoàn"
}
]
}
Get Order Information
This API allows you to retrieve detailed information about an Order.
Endpoint
get/v1/partner/orders/info
Request
Headers
Key | Value |
---|---|
Accept | application/json |
Authorization | Bearer Access-Token |
Parameters
Field | Required | Type | Description |
---|---|---|---|
code | Yes | String | Order Code. For example: SGNS983262NT.595050186. |
type | No | String | Order Code Type. Default value: 1. Possible values: - SuperShip Order Code: 1 - Sender Order Code: 2. |
Example
curl --request GET \
--url 'https://api.mysupership.vn/v1/partner/orders/info?code=SGNS983262NT.595050186&type=1' \
--header 'Accept: application/json'
--header 'Authorization: Bearer <Access-Token>' \
Response
Returned Result
Field | Type | Description |
---|---|---|
code | String | SuperShip Order Code. |
soc | String | Sender Order Code. |
status | String | Order Status Code. For example: 12. |
status_name | String | Order Status Name. For example: Đã Giao Hàng Toàn Bộ. |
receiver | Object | Information of Receiver. |
amount | Integer | Amount to be collected from Receiver. |
value | Integer | Actual Value of Order. |
weight | Integer | Weight of Order. |
fee | Object | Fees of Order. |
payer | String | Who pays the fees. |
config | String | Configuration for inspecting/trying goods. |
journeys | Object | Information of Order journey. |
notes | Object | Notes from SuperShip. |
created_at | String | Created Time of Order. |
updated_at | String | Updated Time of Order. |
Example
{
"status": "Success",
"results": {
"code": "SGNS983262NT.595050186",
"soc": "2102040725580332",
"status": "0",
"status_name": "Huỷ",
"receiver": {
"name": "Chị Định (Đk)",
"phone": "098****294",
"address": "187/9 Mai Xuân Thưởng",
"formatted_address": "187/9 Mai Xuân Thưởng, Phường 14, Quận 6, Thành phố Hồ Chí Minh"
},
"fee": {
"shipment": 16000,
"insurance": 0,
"return": 0,
"barter": 0,
"address": 0
},
"payer": "Người Gửi",
"amount": 418000,
"value": 418000,
"weight": 300,
"config": "Không Cho Xem Hàng",
"journeys": [
{
"time": "2021-02-04T07:25:19+07:00",
"status": "Chờ Duyệt",
"province": "Thành phố Hồ Chí Minh",
"district": "Quận Tân Bình",
"note": "Tạo Đơn hàng"
},
{
"time": "2021-02-04T07:25:19+07:00",
"status": "Chờ Lấy Hàng",
"province": "Thành phố Hồ Chí Minh",
"district": "Quận Tân Bình",
"note": "Duyệt Đơn hàng"
},
{
"time": "2021-02-04T08:41:17+07:00",
"status": "Huỷ",
"province": "Thành phố Hồ Chí Minh",
"district": "Quận Tân Bình",
"note": "Hủy Đơn hàng"
}
],
"notes": [
{
"created_at": "2021-02-04T07:25:19+07:00",
"type": "5",
"note": "Trường Phường/Xã có thể chưa được chính xác."
}
],
"calllogs": [],
"last_sman": null,
"created_at": "2021-02-04T07:25:19+07:00",
"updated_at": "2021-02-04T08:41:17+07:00"
}
}
Create Print Token
This API allows you to retrieve a token for printing shipping labels.
Endpoint
post/v1/partner/orders/token
Request
Headers
Key | Value |
---|---|
Accept | application/json |
Authorization | Bearer Access-Token |
Content-Type | application/json |
Parameters
Field | Required | Type | Description |
---|---|---|---|
code | Yes | Array | An array containing a list of SuperShip Order Codes. |
Example
curl --location --request POST 'https://api.mysupership.vn/v1/partner/orders/token' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <Access-Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": [
"SGNS983262NT.593593647",
"TGGS983262NM.613593645"
]
}'
Response
Returned Result
Field | Type | Description |
---|---|---|
token | String | Token used for printing shipping labels. For example: 6cf2ce20-80e9-11eb-8974-cd483a610abd. |
Example
{
"status": "Success",
"results": {
"token": "6cf2ce20-80e9-11eb-8974-cd483a610abd"
}
}
Print Shipping Label
This API allows you to print the Shipping Labels of one or many Orders directly on the browser.
Endpoint
get/v1/partner/orders/label
Request
Parameters
Field | Required | Type | Description |
---|---|---|---|
token | Yes | String | A token for printing an order label. For example: 6cf2ce20-80e9-11eb-8974-cd483a610abd. |
size | Yes | String | The size of the label to be printed. Possible values: - Khổ giấy A5: A5 - K46 paper size: K46 - T2 paper size: T2 - K50 paper size: K50 - K75 paper size: K75 - K80 paper size: K80 |
Example
curl --request GET \
--url 'https://api.mysupership.vn/v1/partner/orders/label?token=6cf2ce20-80e9-11eb-8974-cd483a610abd&size=A5'
Response
Example
Cancel Order
This API allows you to cancel an Order.
Endpoint
post/v1/partner/orders/cancel
Request
Headers
Key | Value |
---|---|
Accept | application/json |
Authorization | Bearer Access-Token |
Content-Type | application/json |
Parameters
Field | Required | Type | Description |
---|---|---|---|
code | Yes | String | SuperShip Order Code. For example: SGNS983262NT.595050186. |
Example
curl --request POST \
--url https://api.mysupership.vn/v1/partner/orders/cancel \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <Access-Token>' \
--header 'Content-Type: application/json' \
--data '{
"code": "SGNS983262NT.595050186"
}'
Response
Returned Result
Field | Type | Description |
---|---|---|
code | String | The SuperShip order code. |
soc | String | The Sender's order code. |
address | String | The Receiver's address. |
status | String | The status code of the order. |
status_name | String | The status name of the order. |
Example
{
"status": "Success",
"results": {
"code": "SGNS983262NT.595050186",
"soc": "2102040725580332",
"address": "187/9 Mai Xuân Thưởng, Phường 14, Quận 6, Thành phố Hồ Chí Minh",
"status": "0",
"status_name": "Hủy",
}
}