APIs MyEMS
  • Merchant Api v2.0
  • Changelog
  • Tiếng việt
    • Danh mục địa chính
      • Danh sách tỉnh/thành phố
      • Danh sách quận huyện
      • Danh sách phường/xã
    • Dịch vụ
      • Danh sách dịch vụ
      • Dịch vụ cộng thêm
    • Quản lý bưu gửi
      • Danh sách trạng thái bưu gửi
      • Danh sách bưu gửi
      • Chi tiết bưu gửi
      • Tạo bưu gửi
      • Tạo nhiều bưu gửi
      • Huỷ bưu gửi
    • Quản lý kho hàng
      • Danh sách kho hàng
      • Tạo kho hàng
      • Chi tiết kho hàng
      • Cập nhật kho hàng
    • Quản lý khách hàng
      • Danh sách khách hàng
      • Tạo khách hàng
      • Cập nhật thông tin
      • Xoá khách hàng
      • Thêm tag
      • Gỡ tag
    • Quản lý sản phẩm
      • Danh sách sản phẩm
      • Tạo sản phẩm
      • Cập nhật sản phẩm
    • Thông tin cửa hàng
    • Webhook
  • English
    • List locations
      • List provinces
      • List districts
      • List wards
    • Services
      • Main services
      • Additional services
    • Manage shipment
      • List shipment statuses
      • List shipments
      • Shipment detail
      • Create shipment
      • Create multiple shipments
      • Cancel shipment
    • Manage warehouse
      • List warehouses
      • Create warehouse
      • Warehouse detail
      • Update warehouse
    • Manage customers
      • List customers
      • Create customer
      • Update customer info
      • Delete customer
      • Attach tag to customer
      • Detach tag from customer
    • Manage product
      • List products
      • Create product
      • Update product
    • Merchant info
    • Webhook
Powered by GitBook
On this page
  1. English
  2. Manage shipment

Create shipment

/shipments

POST

Query Parameters

Name
Type
Description

merchant_token

string

Token is created in management system

Headers

Name
Type
Description

Accept

string

application/json

Content-Type

string

application/json

Request Body

Name
Type
Description

warehouse_code

string

Warehouse code

customer_code

string

Customer code (if any)

to_name

string

Recipient

to_phone

string

Recipient's phone number

to_province

string

Recipient's province code

to_district

string

Recipient's district code

to_ward

string

Recipient's ward code

to_address

string

Recipient's address

order_code

string

Order code

money_collect

string

Total money collect

description

string

Description

payment_config

boolean

Set 1 if recipient pays shipping fee Set 0 if sender pays shipping fee

service_type

string

Main services

addition_service

array

Additonal services (array additional services ex: ['COD', 'PTT',...])

can_check

boolean

Can check package or not

is_fragile

boolean

Fragile goods

is_related_product

boolean

Shipment inlcudes products at inventory

product_name

string

Product name (not required if order does not include related products)

total_amount

string

Total amount (not required if order does not include related products)

total_quantity

integer

Total quantity (not required if order does not included related products)

total_weight

integer

Total weight (not required if order does not include related products)

items

array

Array products (required if order includes related products)

items.*.product_sku

string

Related product SKU

items.*.quantity

integer

Related product quantity

{
    "code": "SM0000000001",
    "warehouse_code": "1",
    "order_code": "1",
    "state": "waitForPick",
    "ref_code": "SM0000000001",
    "product_name": "San pham A",
    "total_amount": "100000.00",
    "total_quantity": 10,
    "total_weight": 10,
    "money_collect": "100000.00",
    "total_fee": "0.00",
    "description": null,
    "can_check": 0,
    "is_fragile": 0,
    "service_type": 0,
    "addition_service": "",
    "payment_config": 1,
    "estimated_delivery_time": 0,
    "created_at": "2019-04-04T18:07:11.000000Z"
}

If is_related_product: true then some fields below are requied: items, items.*.product_sku, items.*.quantity.

If is_related_product: false then some fields below are required: product_name, total_amount, total_quantity, total_weight.

Sample data request

{
	"warehouse_code": "WH0000000009",
	"to_name": "Nguyen Van A",
	"to_phone": "01234567898",
	"to_province": "88",
	"to_district": "8843",
	"to_ward": "88435",
	"to_address": "address",
	"order_code": "ma_don_hang",
	"money_collect": 100000,
	"description": "description",
	"payment_config": 1,
	"service_type": "ECOD",
	"can_check": 1,
	"is_fragile":true,
	"is_related_product":false,
	"product_name":"sản phẩm 1",
	"total_amount":17,
	"total_quantity":19,
	"total_weight":19
}
{
  "warehouse_code": "WH0000000002",
  "to_name":"a",
  "to_phone":"0321461132",
  "to_province":"10",
  "to_district":"1100",
  "to_ward":"11170",
  "to_address":"sss",
  "order_code":"HD768876",
  "money_collect":400000,
  "description":"qq",
  "payment_config":1,
  "total_amount":400000,
  "service_type": "ECOD",
  "can_check": false, 
  "is_fragile": true,
  "is_related_product":true,
  "items":[{"product_sku":"SP000001","quantity":9}, 
          {"product_sku":"SP000002","quantity":1}],
  "product_name": "Sản phẩm 1",
  "total_quantity": 1,
  "total_weight": 500
}
PreviousShipment detailNextCreate multiple shipments

Last updated 5 years ago