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

KeyValue
Acceptapplication/json
AuthorizationBearer Access-Token

Parameters

FieldRequiredTypeDescription
sender_provinceYesStringProvince/City Name of Sender. For example: Thành phố Hồ Chí Minh.
sender_districtYesStringDistrict Name of Sender. For example: Huyện Bình Chánh.
receiver_provinceYesStringProvince/City Name of Receiver. For example: Thành phố Hà Nội.
receiver_districtYesStringDistrict Name of Receiver. For example: Quận Tây Hồ.
weightYesInteger- Weight of the Order. For example: 200.
- Unit gram.
valueNoInteger- 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

FieldTypeDescription
serviceString- The name of the service package. For example: Tốc Hành.
Possible values:
- Tốc Hành.
feeIntegerDelivery Fee. For example: 20000.
insuranceIntegerInsurance Fee. For example: 42000.
pickupObjectEstimated Pickup Time.
deliveryObjectEstimated 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

KeyValue
Acceptapplication/json
AuthorizationBearer Access-Token
Content-Typeapplication/json

Parameters

FieldRequiredTypeDescription
pickup_codeNoStringThe Warehouse/Pickup Point code of the sender. If this field has a non-empty value, it will be prioritized for pickup.
pickup_phoneYesStringThe 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_addressYesStringThe address of the pickup point. For example: 45 Nguyễn Chí Thanh.
pickup_provinceYesStringThe Province/City name of the sender. For example: Thành phố Hà Nội.
pickup_districtYesStringThe District name of the sender. For example: Quận Ba Đình.
pickup_communeYesStringThe Commune/Ward name of the sender. For example: Phường Ngọc Khánh.
pickup_nameNoStringThe name of the Warehouse/Pickup Point. For example: Kho Tân Bình.
pickup_contactNoStringThe name of the contact person. For example: Hoàng Mạnh Nam.
nameYesStringName of the receiver. For example: Trần Ngọc Nam.
phoneYesStringPhone number of the receiver.
addressYesStringAddress of the receiver. For example: 56 Trương Công Định.
provinceYesStringProvince/City of the receiver. For example: Thành phố Hồ Chí Minh.
districtYesStringDistrict of the receiver. For example: Quận Tân Bình.
communeYesStringCommune/Ward of the receiver. For example: Phường 14.
amountYesIntegerThe amount to be collected upon delivery. For example: 200000.
Unit Vietnamese Dong.
valueNoIntegerThe value of the order. For example: 4200000.
Used to calculate Insurance Fee.
Unit Vietnamese Dong.
weightYesIntegerThe weight of the order. For example: 200.
Unit gram.
socNoStringThe Sender's Order Code. For example: KR-180703-034.
noteNoStringAdditional note about the order from the Sender. For example: Hàng dễ vỡ, lưu ý dùm shop.
serviceYesStringService Package Code. For example: 1.
Possible values:
- Express Service: 1
configYesStringPermission 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
payerYesStringPayer of the fee. For example: 1.
Possible values:
- Sender: 1
- Receiver: 2
product_typeYesStringType of product format. For example: 1.
Possible values:
- String format: 1
- Array format: 2
productNoStringRequired when the value of product_type is 1. For example: Quần áo.
productsNoArrayRequired 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.
barterNoStringOption for exchange/pick up of goods. If this requirement exists, the order will be supported for exchange and return. For example: 1.
partnerNoStringSecret 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

FieldTypeDescription
codeStringSuperShip Order Code.
sortingStringSuperShip Sorting Code.
shortcodeStringSuperShip Short Order Code.
Use this code to display barcode, not the full order code in the `code` field.
socStringSender's Order Code.
phoneStringReceiver's Phone Number.
addressStringReceiver'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.
amountIntegerAmount to be collected.
valueIntegerValue of the order.
weightIntegerWeight of the order.
feeIntegerDelivery Fee.
statusStringStatus Code of the order.
status_nameStringStatus 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

FieldTypeDescription
keyStringCode of order status.
valueStringName 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

KeyValue
Acceptapplication/json
AuthorizationBearer Access-Token

Parameters

FieldRequiredTypeDescription
codeYesStringOrder Code. For example: SGNS983262NT.595050186.
typeNoStringOrder 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

FieldTypeDescription
codeStringSuperShip Order Code.
socStringSender Order Code.
statusStringOrder Status Code. For example: 12.
status_nameStringOrder Status Name. For example: Đã Giao Hàng Toàn Bộ.
receiverObjectInformation of Receiver.
amountIntegerAmount to be collected from Receiver.
valueIntegerActual Value of Order.
weightIntegerWeight of Order.
feeObjectFees of Order.
payerStringWho pays the fees.
configStringConfiguration for inspecting/trying goods.
journeysObjectInformation of Order journey.
notesObjectNotes from SuperShip.
created_atStringCreated Time of Order.
updated_atStringUpdated 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

KeyValue
Acceptapplication/json
AuthorizationBearer Access-Token
Content-Typeapplication/json

Parameters

FieldRequiredTypeDescription
codeYesArrayAn 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

FieldTypeDescription
tokenStringToken used for printing shipping labels.
For example: 6cf2ce20-80e9-11eb-8974-cd483a610abd.

Example

{
    "status": "Success",
    "results": {
        "token": "6cf2ce20-80e9-11eb-8974-cd483a610abd"
    }
}

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

FieldRequiredTypeDescription
tokenYesStringA token for printing an order label.
For example: 6cf2ce20-80e9-11eb-8974-cd483a610abd.
sizeYesStringThe 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

KeyValue
Acceptapplication/json
AuthorizationBearer Access-Token
Content-Typeapplication/json

Parameters

FieldRequiredTypeDescription
codeYesStringSuperShip 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

FieldTypeDescription
codeStringThe SuperShip order code.
socStringThe Sender's order code.
addressStringThe Receiver's address.
statusStringThe status code of the order.
status_nameStringThe 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",
    }
}
Last Updated: 5/6/2023, 4:28:03 PM