📦Tạo đơn hàng Ship bởi người bán

Áp dụng cho những đơn hàng bạn muốn chúng tôi mua shipping label và xử vận chuyển giúp bạn

Hiện tại chúng tôi hỗ trợ USPS và Fedex, hãy liên hệ nếu cần bạn sử dụng thêm các nhà vận chuyển khác

CURL EXAMPLE:

curl --location '{api_base_endpoint}/api/vendor/order' \
--header 'X-Access-Key: Your Key Pairs' \
--data '___View below___'

POST /api/vendor/order

Headers

Name
Value
X-Access-Key

Your key pairs

Body

Name
Type
Required
Description

print_only

false

Đánh dấu đơn là ship by seller

seller_order_id

number

Mã đơn người bán, phải là duy nhất nếu có giá trị

shipping

Object

ShippingSchema

items

Array of Object

ItemsSchema[]


ShippingSchema

Name
Type
Required
Description

first_name

string

Tên người nhận

last_name

string

Họ người nhận

email

string

Email người nhận

phone

string

SĐT người nhận

address_1

string

Địa chỉ nhận hàng 1

address_2

string

Địa chỉ 2

zip_code

string

Zip /postal CODE

city

string

state

string

Bang, vui lòng gửi theo kí hiệu hoặc đầy đủ tên bang Ví dụ: TX hoặc Texas

shipping_service

string

Dịch vụ giao hàng

usps_ground_advantage
usps_priority_mail
fedex_2day
fedex_standard_overnight

Mặc định:

usps_ground_advantage

ItemsSchema

Name
Type
Required
Description

product_code

string

code của sản phẩm. Lấy từ API danh sách sản phẩm

classification_id

string

id của phân loại. Lấy từ API danh sách sản phẩm

quantity

number

Số lượng

designs

Array of Object

{
  side: "Front" | "Back" 
        | "Right" | "Left"
        | "Mockup",
  design_url: string[]
}[]

Thiết kế, xem ví dụ bên dưới để hình dung dễ hơn design_url : Array of string, số lượng design theo số lượng slot của khung in

printOption

String, one of

"ANY" | "DTG"

Giá trị mặc định: ANY - Nếu là ANY chúng tôi sẽ xem hình ảnh thiết kế và chọn công nghệ in phù hợp nhất. - Nếu là DTG , item sẽ được in với máy in DTG

Tip: Khi gửi dữ liệu design

  • Bạn có thể sử dụng API upload file bên dưới của chúng tôi để tải lên design của bạn, Lưu ý: file sẽ bị xoá sau 7 ngày nếu không có đơn nào được tạo với dữ liệu đó

 "items": [
        {
            "product_code": "Hoodie",
            "classification_id": "669b18a78547a69ba81df2b5",
            "quantity": 2,
            "designs": [
                {
                    "side": "Front",
                    "design_url": [
                        {
                            "design_url": "https://your-domain.com/design1-bada.png",
                        }
                    ]
                },
                {
                    "side": "Mockup",
                    "design_url": [
                        {
                            "design_url": "https://your-domain.com/design2-bada.png",
                        }
                    ]
                }
            ],
            "printOption": "DTG"
        }
    ]

CURL example:

curl --location '{api_base_endpoint}/api/vendor/order' \
--header 'X-Access-Key: 66a497103eeab9793be47a1a:f8wmD7UwF4tGYC4hO1NPVYeUGAfTmmYRZ6aM' \
--header 'Content-Type: application/json' \
--data-raw '{
    "print_only": false,
    "seller_order_id": "Tiktok_999127747128223",
    "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "[email protected]",
        "phone": "01234123412123",
        "address_1": "127 Keith Ave",
        "city": "Rockingham",
        "zip_code": "28379",
        "state": "NC",
        "shipping_service": "usps_priority_mail"
    },
    "items": [
        {
            "product_code": "Hoodie",
            "classification_id": "669b18a78547a69ba81df2b5",
            "quantity": 2,
            "designs": [
                {
                    "side": "Front",
                    "design_url": [
                        {
                            "design_url": "https://rapid-design.rapidprinttee.com/compressed_1Typ9nEEvgbAaJ2N_lglqw6RzJRICT3Fx_sLF1-bada"
                        }
                    ]
                },
                {
                    "side": "Mockup",
                    "design_url": [
                        {
                            "design_url": "https://rapid-design.rapidprinttee.com/compressed_1Typ9nEEvgbAaJ2N_lglqw6RzJRICT3Fx_sLF1-bada"
                        }
                    ]
                }
            ]
        }
    ]
}'

Response

{
    "code": 0,
    "message": "Create Order success",
    "data": {
        "createdAt": 1755248323933,
        "total": 19.75,
        "orderId": "689ef6c336dbeca027455df9",
        "order_code": "FFEUW_461",
        "has_paid": true
    }
}

Last updated