📦Tạo đơn hàng Ship theo Label của bạn

Áp dụng cho những đơn bạn đã có shipping Label và Shipping Code

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 | Value
Required
Description

print_only

true

Chỉ định đơn này ship theo label

seller_order_id

number | string

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ố điện thoại người nhận

tracking_code

string

Shipping tracking code

label_url

string

Url tới shipping label của bạn Ví dụ: https://rapid-labels.rapidprinttee.com/146-6446cfd8.pdf

use_url

true

Trường này cần để là true, để hệ thống sẽ tải về shipping label theo label_url bên trên , file của bạn cần được public để hệ thống tải về

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": true,
    "seller_order_id": "Tiktok_999127747128223",
    "shipping": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "[email protected]",
        "phone": "01234123412123",
        "express_shipping": true,
        "tracking_code":"9999991999124",
        "use_url": false,
        "label_url": "https://rapid-labels.rapidprinttee.com/HRN_00000325_Label-124a"
    },
    "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