文档中心 > Miravia Open Platform

Update Product Values

更新时间:2023/06/06 访问次数:680

How to update product values

1. Check product information

One optional but recommended step before doing the update, you can first check how the product is listed in Miravia. To do that you can do a GET call to the endpoint /product/item/get using the sellerSku defined in the listing or the item id created by Miravia.

Request

curl --location -g --request GET 'https://api.miravia.com/rest/product/item/get?app_key={{app_key}}&sign_method=sha256&access_token={{access_token}}&timestamp={{timestamp}}&sign={{sign}}&seller_sku={{seller_sku}}'

Response

{
    "data": {
        "trialProduct": false,
        "created_time": "1680253278000",
        "updated_time": "1680509101000",
        "images": [
            "image_url"
        ],
        "item_id": 1356128814666825,
        "primary_category": 62270209,
        "attributes": {
            "brand": "Brand_Name",
            "description": "Product_Description",
            "name": "Product_title",
            "source": "asc",
            "delivery_option_store_pick_up": "1"
        },
        "skus": [
            {
                "Status": "active",
                "quantity": 28,
                "Images": [
                    "image_url"
                ],
                "SellerSku": "seller_SKU",
                "Color_Map": "Green",
                "color_family": "Light Green",
                "ShopSku": "Shop_SKU",
                "Url": "product_url",
                "multiWarehouseInventories": [
                    {
                        "quantity": 28,
                        "warehouseCode": "dropshipping"
                    }
                ],
                "package_width": "1",
                "package_height": "1",
                "package_length": "1",
                "package_weight": "0.5",
                "size": "38",
                "special_price": 2.49,
                "price": 6.99,
                "channelInventories": [],                
                "SkuId": 20106912952
            },
            {
                ...
            }
        ],
        "variation": {
            "Variation1": {
                "name": "color_family",
                "label": "color family",
                "hasImage": true,
                "customize": false,
                "options": [
                    "Light Green",
                    "Emerald Green"
                ]
            },
            "Variation2": {
                "name": "size",
                "label": "size",
                "hasImage": false,
                "customize": false,
                "options": [
                    "38"
                ]
            }
        },
        "status": "Active"
    },
    "code": "0",
    "request_id": "21038fb816805091058492170"
}

2. Modify the SPU values

Now that you have the product that is listed and its values, you can update The SPU values using the endpoint /product/update using the Item_id or sku_id.

Request

curl --location --request POST 'https://api.miravia.com/rest/product/update' \
--header 'Content-Type: application/json' \
--form 'app_key="{{app_key}}"' \
--form 'access_token="{{access_token}}"' \
--form 'sign_method="sha256"' \
--form 'sign="{{sign}}"' \
--form 'timestamp="{{timestamp}}"' \
--form 'payload="{
    "Request": {
        "Product": {
            "ItemId": "1356128814666825",
            "Images": {
                "Image": [
                    "image_url",
                    "image_2_url",
                    "image_3_url"
                ]
            },
            "Attributes": {
                "name": "Product title",
                "description": "Product Description",
                "video": "Product_video",
                "brand": "Brand",
                "delivery_option_express": "No",
                "delivery_option_standard": "Yes",
                "delivery_option_sof": "No"
            }
        },
        "Skus": {
            "Sku": [
                {
                    "quantity": "28",
                    "SellerSku": "Seller_SKU",
                    "color_family": "yellow",
                    "ean_code": "EAN_CODE",
                    "special_price": 2.49,
                    "price": 6.0,
                    "package_length": 1,
                    "package_weight": 0.5,
                    "package_width": 1,
                    "package_height": 1,
                    "Images": {
                        "Image": [
                            "sku_image_url",
                            "sku_image_2_url",
                            "sku_image_3_url"
                        ]
                    }
                }
            ]
        }
    }
}"'

FAQ

关于此文档暂时还没有FAQ
返回
顶部