Skip to content

API tạo đơn hàng

Nhập đơn hàng từ file CSV

API : /api/integration/order/import.json

Method: POST

Request Header

keyvalue
X-pawdo-access-tokenAPI KEY

Request body

keytype
order_namestring
namestring
quantityuint64
image_previewstring
designstring
emailstring
address1string
address2string
citystring
countrystring
full_namestring
phonestring
provincestring
zipstring
companystring
province_codestring
ioss_numstring
sku_codestring
propertiesstring
variant_idstring
variant_option1string
variant_option2string
variant_option3string
financial_statusstring
shipping_linestring
notestring
resourcestring

Example

json
{
    "note": "25/05/25 afternoon import",
    "data": [
        {
            "mockup_front": "https://example.com/images/sample-document.png",
            "mockup_back": "",
            "design_front": "https://example.com/images/sample-document.png",
            "design_back": "",
            "design_left": "",
            "design_right": "",
            "order_number": "ORDER-0012",
            "type": "T-Shirt",
            "title": "Limited Edition Graphic Tee",
            "sku": "TEE-001-BLK-M",
            "system_sku": "THS-L9",
            "option1": "M",
            "option2": "Black",
            "option3": "",
            "quantity": 2,
            "tag": "summer-collection",
            "name": "Alex",
            "address1": "1234 county",
            "address2": "",
            "option_ship": "standard",
            "city": "Lacona",
            "state": "New York",
            "province_code": "FL",
            "country": "United States",
            "country_code": "US",
            "phone": "",
            "email": "",
            "postal_code": "13083",
            "thank_card": "",
            "brand_kit_a5": "",
            "brand_kit_a5_clothes": "",
            "brand_kit_a6": ""
        },
        {
            "mockup_front": "https://example.com/images/sample-document.png",
            "mockup_back": "",
            "design_front": "https://example.com/images/sample-document.png",
            "design_back": "",
            "design_left": "",
            "design_right": "",
            "order_number": "ORDER-0012",
            "type": "T-Shirt",
            "title": "Limited Edition Graphic Tee",
            "sku": "TEE-002-XL",
            "system_sku": "WXN-XL",
            "option1": "M",
            "option2": "White",
            "option3": "",
            "quantity": 2,
            "tag": "summer-collection",
            "name": "Alex",
            "address1": "1234 county ",
            "address2": "",
            "option_ship": "standard",
            "city": "Lacona",
            "state": "New York",
            "province_code": "FL",
            "country": "United States",
            "country_code": "US",
            "phone": "",
            "email": "",
            "postal_code": "13083",
            "thank_card": "",
            "brand_kit_a5": "",
            "brand_kit_a5_clothes": "",
            "brand_kit_a6": ""
        }
    ]
}
  • Sau khi tạo đơn hàng thành công, người dùng vào giao diện Danh sách đơn hàng để kiểm tra thông tin
  • Hoặc sử dụng api dưới đây để lấy danh sách thông tin order

Tạo đơn hàng thủ công

API : /api/integration/orders.json

Method: POST

Request Header

keyvalue
X-pawdo-access-tokenAPI KEY

Request Body (JSON - raw)

  • Content-Type: application/json
keytyperequirednote
order_numberstringRequiredMã đơn hàng, phải unique
external_transaction_idstringOptionalID giao dịch từ hệ thống ngoài
skip_verify_addressbooleanOptionalBỏ qua bước verify địa chỉ
line_itemsarray objectRequiredDanh sách sản phẩm, tối đa 500 items
addressobjectRequiredThông tin địa chỉ giao hàng

Chi tiết field

address

keytyperequirednote
namestringRequiredTên người nhận
option_shipstringRequiredPhương thức vận chuyển: standard, express, fast, tiktok
label_shipurlConditionalNhãn giao hàng: Bắt buộc cho option tiktok
address1stringOptionalĐịa chỉ dòng 1
address2stringOptionalĐịa chỉ dòng 2
citystringOptionalThành phố
province_codestringOptionalMã bang / tỉnh
countrystringOptionalQuốc gia
country_codestringRequiredMã quốc gia (ISO)
postal_codestringOptionalMã bưu điện
emailstringOptionalEmail người nhận
phonestringOptionalSố điện thoại

line_items

keytyperequirednote
skustringOptionalSKU từ hệ thống ngoài
system_skustringOptionalSKU nội bộ hệ thống
quantitynumberRequiredmin > 0 và max < 1000
titlestringOptionalTên sản phẩm
notestringOptionalGhi chú
mockup1..mockup4urlOptionalURL hình mockup
design1..design4urlOptionalURL file thiết kế
option1..option3stringOptionalTùy chọn sản phẩm
external_line_item_idstringOptionalID line item từ hệ thống ngoài

Ràng buộc / Validation

keyrule
order_numberPhải unique, dùng như idempotency key
line_itemsTối đa 500 items
line_items[].quantitymin > 0 và max < 1000

Example (Request)

json
{
  "order_number": "#ORDER-056487",
  "external_transaction_id": "TS-9283023921",
  "skip_verify_address": true,
  "line_items": [
    {
      "sku": "QTR-XS2",
      "system_sku": "QTR-XS2",
      "quantity": 5,
      "title": "",
      "note": "",
      "mockup1": "https://example.com/mockup1.png",
      "mockup2": "",
      "mockup3": "",
      "mockup4": "",
      "design1": "https://example.com/design1.png",
      "design2": "",
      "design3": "",
      "design4": "",
      "option1": "",
      "option2": "",
      "option3": "",
      "external_line_item_id": "LI-1048273842"
    }
  ],
  "address": {
    "name": "John Doe",
    "option_ship": "standard",
    "label_ship": "",
    "address1": "123 Main Street",
    "address2": "Apartment 4B",
    "city": "Los Angeles",
    "province_code": "CA",
    "country": "United States",
    "country_code": "US",
    "postal_code": "90001",
    "email": "[email protected]",
    "phone": ""
  }
}

Example (Response thành công)

json
{
  "data": {
    "order_id": "d33e0745-e700-4d49-9fb1-01ac3e5135c3"
  },
  "message": "ok",
  "status": true
}

Nếu có bất kỳ vấn đề nào liên quan đến api đơn hàng, vui lòng liên hệ với bộ phận support của Pawdo qua Facebook để được hỗ trợ.