Lỗi Create Product qua API

QuestionsCategory: ProductLỗi Create Product qua API
Khoa Nguyen Hoang asked 3 years ago

Mình tạo request tạo sản phẩm với body như sau: 

{
    "category_id": 12554,
    "name": "Mắt Kính Lmao",
    "description": "Products SEO stands for Search Engine Optimization, which allows SEO APIs to better search for products or shopping malls in search engines.
As a e,beded Resource of the product, the Products SEO API can set search engine optimization of the target product ",
    "market_price": 1000000,
    "attributes": {
        "brand_country": "Việt Nam",
        "origin": "Việt Nam",
        "require_expiry_date": 0,
        "price": "100000000",
        "is_warranty_applied": "0",
        "brand": "Đồ Thờ Việt"
    },
    "option_attributes": [],
    "variants": [
        {
            "sku": "P000000L000A",
            "price": "1000000",
            "inventory_type": "drop_ship",
            "quantity": 10,
            "supplier": 201811
        }
    ],
    "image": "https://cdn-0863.cafe24img.com/yasuo/web/product/big/20210619/fed915f592a1c5052f704200dba14edc.jpeg",
    "images": [
        "https://cdn-0863.cafe24img.com/yasuo/web/product/big/20210619/fed915f592a1c5052f704200dba14edc.jpeg"
    ],
    "certificate_files": [
        {
            "type": "category",
            "url": "http://uset.edu.vn/templates/pictures/content/giay-cong-bo.jpg",
            "document_id": 1,
            "name": "Giấy xác nhận công bố phù hợp quy định an toàn thực phẩm – Cục An toàn thực phẩm cấp / Sở Y tế"
        },
        {
            "type": "brand",
            "url": "http://uset.edu.vn/templates/pictures/content/Ve-sinh-an-toan-thuc-pham_cn.jpg",
            "name": "Certificate files of brand"
        }
    ]
}

Và đây là response mình nhận được

{
    "errors": [
        "Some unexpected error occurred, please try again later"
    ],
    "meta": {
        "id": "2074389358",
        "source": "meepo"
    }
}

Mong bạn hỗ trợ cho mình. Xin chân thành cảm ơn :D!

2 Answers
Best Answer
son.pham1-tiki Staff answered 3 years ago

seller này đăng ký mô hình vận hành là instock, nên trong payload tạo request cũng cần sửa lại inventory_type: instock bạn nhé.