文档中心 > Miravia Open Platform

2.2 Update Product

更新时间:2023/10/05 访问次数:531

2. Update Product

API Documentation

3.1.1 Business flow

Once that you have your catalog listed in Miravia’s platform, now you have understand how to manage the updates of the items at SPU level and SKU level.

Let’s remember the structure of our products:


image

This means that you can do the following actions to update products:

  • Modify any value for an SPU
  • Modify any value for an SKU
  • We have an specific endpoint in order to update prices and stocks
  • You can also activate, deactivate or delete any of the skus that are listed in the platform


3.1.2 Update price and stock

API Documentation

In order to update the stock of the items listed in Miravia we have an specific endpoint in order to manage the changes. There is a minor to update the stock between using only one warehouse or multi warehouses. In this guide, we are going to explain how to update the stock with only one warehouse.

To update the stock, you need to indicate the Seller SKU that you used to list the product in Miravia.

there are two key API endpoints: UpdatePriceQuantity and UpdateSellableQuantity. These endpoints are used to update inventory-related information for products, Sellable quantity takes in consideration total stock (sellable stock + occupied stock)


1. UpdatePriceQuantity

API Documentation

Use this API to update the total inventory of the corresponding warehouse for an product.

Request Example

Single-warehouse format (used by single-warehouse sellers, only updates dropshipping warehouse).


"Request": {
    "Product": {
        "Skus": {
            "Sku": [
                {
                    "ItemId": 1356551392370121,
                    "SellerSku": "74099",
                    "Quantity": "14",
                    "Price": "14.34",
                    "SalePrice": "14.34"
                }
            ]
        }
    }
}
}

Note

  1. Since this document is used to introduce inventory management, all other optional fields are omitted.
  2. Supports batch update of total inventory of dropshipping warehouse for different sku's under different products in one request.
  3. The updated inventory quantity must be greater than or equal to the inventory locked by the withhold + occupy + campaign (channelInventories), otherwise an error will be reported.
  4. A maximum of 50 SKUs can be added per request, adding more SKUs will result in a timeout error.
  5. Each seller can only call the inventory API 50 times per second, more than 50 may cause the request to fail due to traffic limitation.
  6. Quantity cannot be negative


Multi-warehouse format (used by multi-warehouse sellers, can update dropshipping and multi-warehouse warehouses at the same time).

<Request>
  <Product>
    <Skus>
      <Sku>
        <ItemId>234234234</ItemId>
        <SkuId>234</SkuId>
        <SellerSku>Apple-SG-Glod-64G</SellerSku>
        <MultiWarehouseInventories>
          <MultiWarehouseInventory>
            <WarehouseCode>Dropshipping</WarehouseCode>
            <Quantity>20</Quantity>
          </MultiWarehouseInventory>
          <MultiWarehouseInventory>
            <WarehouseCode>warehouseTest2</WarehouseCode>
            <Quantity>30</Quantity>
          </MultiWarehouseInventory> 
        </MultiWarehouseInventories> 
      </Sku>
    </Skus>
  </Product>
</Request>


Note

  1. Since this document is used to introduce inventory management, all other optional fields are omitted.
  2. Single-warehouse sellers should not use the multi-warehouse format, otherwise an error may be reported.
  3. The updated inventory quantity must be greater than or equal to the inventory locked by the withhold + occupy + campaign (channelInventories), otherwise an error will be reported.
  4. A maximum of 50 SKUs can be added per request, adding more SKUs will result in a timeout error.
  5. Each seller can only call the inventory API 50 times per second, more than 50 may cause the request to fail due to traffic limitation.
  6. Quantity cannot be negative.



2. UpdateSellableQuantity

API Documentation

Use this API to update product information and product sellable inventory in the dropshipping warehouse.


Request Example

Single-warehouse format (used by single-warehouse sellers, only updates dropshipping warehouse).

<Request>
    <Product>
        <Skus>
            <Sku>
                <ItemId>234234234</ItemId>
                <SkuId>234</SkuId>
                <SellerSku>Apple-SG-Glod-64G</SellerSku>
                <SellableQuantity>20</SellableQuantity>
            </Sku>
        </Skus>
    </Product>
</Request>

Note

  1. Supports batch update of total inventory of dropshipping warehouse for different sku's under different products in one request.
  2. The updated sellable inventory quantity must be greater than or equal to the inventory locked by the campaign (channelInventories), otherwise an error will be reported.
  3. A maximum of 50 SKUs can be added per request, adding more SKUs will result in a timeout error.
  4. Each seller can only call the inventory API 50 times per second, more than 50 may cause the request to fail due to traffic limitation.
  5. Quantity cannot be negative.

Multi-warehouse format (used by multi-warehouse sellers, can update dropshipping and multi-warehouse warehouses at the same time).


<Request>
    <Product>
        <Skus>
            <Sku>
                <ItemId>234234234</ItemId>
                <SkuId>234</SkuId>
                <SellerSku>Apple-SG-Glod-64G</SellerSku>
                <MultiWarehouseInventories>
                    <MultiWarehouseInventory>
                        <WarehouseCode>warehouseTest1</WarehouseCode>
                        <SellableQuantity>20</SellableQuantity>
                    </MultiWarehouseInventory>
                    <MultiWarehouseInventory>
                        <WarehouseCode>warehouseTest2</WarehouseCode>
                        <SellableQuantity>30</SellableQuantity>
                    </MultiWarehouseInventory>
                </MultiWarehouseInventories>
            </Sku>
        </Skus>
    </Product>
</Request>


Note

  1. Single-warehouse sellers should not use the multi-warehouse format, otherwise an error may be reported.
  2. The updated sellable inventory quantity must be greater than or equal to the inventory locked by the campaign (channelInventories), otherwise an error will be reported.


Errors

/product/price_quantity/update

501

Can not edit product of locking

Cannot edit the same product concurrently, and the update cannot be performed at this time. Please try again later

Can not edit product of someone else

Unable to update the product without ownership. Please ensure that you have the proper ownership rights for the product you want to update.

INV_DB_ERROR

System internal error, please submit a ticket via : https://open.miravia.com/apps/home/contact_us?spm=a1zq7z.27027606.droot_normal_ticket_system.droot_normal_raise_ticket.1a287c73TKV1CC Miravia tech team will work on this within 24 hours

SalePrice Format

Please ensure that the Seller SKU format is correct. Use a dot instead of a comma for the decimal part. For example, use [100000.53] instead of [100.000,53].

F_DOMAIN_PRICE_00_01_003, The price of this product or sku can not be zero.,serverIP:33.3.149.139(IC_F_DOMAIN_PRICE_00_01_003)

The price of this product or SKU cannot be zero. Please enter a valid price for the product or SKU that is greater than zero and try again.

INV_NEGATIVE_SELLABLE, The Stock cant be updated as the minimum guarantee stock of promotion or unshiped orders is 1sku : 2069401133388337

The Stock cant be updated as the minimum guarantee stock of promotion or unshiped orders

F_IC_DOMAIN_PRICE_007, promotion price must less than origin price,serverIP:33.3.149.139(IC_F_IC_DOMAIN_PRICE_007)

Error updating price. We have detected that the price you entered is higher than the promotion price. Please adjust the promotion price to a higher value or the regular price to a lower value.

  1. A maximum of 50 SKUs can be added per request, adding more SKUs will result in a timeout error.
  2. Each seller can only call the inventory API 50 times per second, more than 50 may cause the request to fail due to traffic limitation.
  3. Quantity cannot be negative.


3.1.3 Update product information

1. Description

This tutorial guides you to update the existing products, include the product attributes and sku atrributes.

2. The flow of API calls:

2.1 Get SellerSku of your existing products by GetProduct API

2.2 Update products by UpdateProduct API

2.1 Get SellerSKU of existing product

You can use GetProduct to retrieve the SellerSKU which is the key of your product on Miravia.

2.2 Update Product

With SellerSKU of the product, you can use UpdateProduct to update all the attributes of products and skus, also include price and stock.

Case : Change image/name/brand of spu and quantity/special price/variant's option of sku, or any other arributes you need to update.

Comparison of updated information shows as below:

Before update


image.png

image.png


Updated payload


{
    "Request": {
        "Product": {
            "ItemId": "1355872200363472",
            "Images": {
                "Image": ["https://fb-es.mrvcdn.com/kf/Ea5bf84ef84eb4084869817b111c1397bM.jpg",
          "https://fb-es.mrvcdn.com/kf/Ed72d9****************3df.jpg", 
          "https://fb-es.mrvcdn.com/kf/Ed72d9****************3df.jpg", 
          "https://fb-es.mrvcdn.com/kf/Ed72d9****************3df.jpg",
          "https://fb-es.mrvcdn.com/kf/Ed72d9****************3df.jpg", 
          "https://fb-es.mrvcdn.com/kf/Ed72d9****************3df.jpg", 
          "https://fb-es.mrvcdn.com/kf/Ed72d9****************3df.jpg", 
          "https://fb-es.mrvcdn.com/kf/Ed72d9****************3df.jpg"]
            },
            "Attributes": {
                "name": "JiaTestProduct03-update",
                "description": "normal",
                "brand": "Kiabi",
                "clothing_material": "Cashmere",
                "Shoe_Heel_Type": "ffff",
                "Fabric_Care_Instructions": "Dry Clean Only",
                "Made_in": "China",
                "Shoes_Type": "Basic",
                "short_description": "richText",
                "Hazmat": "None",
                "delivery_option_express": "No",
                "delivery_option_standard": "No",
                "delivery_option_sof": "Yes"
            },

            "Skus": {
                "Sku": [{
                    "SellerSku": "JiaTestProduct03-02",
                    "quantity": 40,
                    "size": "2XL",
                    "color_family": "Red",
                    "price": 15
                    "special_price": 120,
                    "ean_code": "456",
                    "package_weight": 1,
                    "package_length": 1,
                    "package_width": 1,
                    "package_height": 1,
                    "package_content": "text",
                    "Images": {
                        "Image": ["https://fb-es.mrvcdn.com/kf/Ea5bf84ef84eb4084869817b111c1397bM.jpg"]
                    }
                }]
            }
        }
    }
}

3. Notice when updating

  1. SellerSku is the key of your product on Miravia, which can't be updated, but you can add a new sku in your existing product.
  2. Please ensure the updated brand has submitted an application and obtained authorization.
  3. The maxmium number of spu and sku images is 8.
3.1.4 Add new Sku into existing product

1. Description

This tutorial guides you to add a new sku in the existing product on Miravia.

2. The flow of API calls:

  • Get SellerSku of your existing product by GetProduct API
  • Add one or more than one skus in the existing product by UpdateProduct API

2.1 Get SellerSKU of existing product

You can use GetProduct to retrieve the SellerSKU which is the key of your product on Miravia.

2.2 Add sku

With SellerSKU of the product, you can use UpdateProduct to add one or more than one skus in the existing product on Miravia.

Case:Add one sku into item which id"1355872200363472" by the AssociatedSku "JiaTestProduct03-02"


Payload example


{
    "Request": {
        "Product": {
            "item_id": 1355872200363472,
            "AssociatedSku": "JiaTestProduct03-02",
            "Attributes": "",
            "Skus": {
                "Sku": [{
                    "SellerSku": "JiaTestProduct03-03",
                    "quantity": 20,
                    "size": "XL",
                    "color_family": "Yellow",
                    "price": 150,
                    "special_price": 100,
                    "ean_code": "201212140102",
                    "package_weight": 1,
                    "package_length": 1,
                    "package_width": 1,
                    "package_height": 1,
                    "package_content": "text",
                    "Images": {
                        "Image": ["https://fb-es.mrvcdn.com/kf/Ea5bf84ef84eb4084869817b111c1397bM.jpg"]
                    }
                }]
            }
        }
    }
}

3. Notice when add a new sku

image


1. "AssociatedSku" is mandatory when adding a new sku, fill in an existing SellerSku which belong to the product where you want to add a new sku.2. "SellerSku" and "ean_code" cannot be duplicated with existing sku.

3.1.5 DEMO

CASE1

No declaration of Variation + new SKU + no SKU picture (except for products containing custom sales attributes);

If you want to add a seller SKU to an existing product, you can refer to the example below;

AssociatedSku: One of the seller SKUs in the target product.


For Example:


If you want to add a C sku to product B, then the value of AssociatedSKU should be filled with A, and A is the seller SKU of product B.

{
    "Request": {
        "Product": {
            "ItemId": "2378974109",
            "AssociatedSku": "chase test 8",
            "Attributes":"",
            "Skus": {
                "Sku": [
                    {
                        "SellerSku": "chase test 888",
                        "quantity": "3",
                        "price": "35",
                        "saleProp":{
                                        "color_family": "test"
                                        },
                        "package_height": "10",
                        "package_length": "10",
                        "package_width": "10",
                        "package_weight": "0.5",
                        "package_content": "laptop bag"
                    }
                ]
            }
        }
    }
}

CASE2

No declaration of Variation + modification of standard sales attribute value + no SKU picture


{
    "Request": {
        "Product": {
            "ItemId": "2378974109",
            "Attributes": "",
            "Skus": {
                "Sku": [
                    {
                        "SellerSku": "chase test 888",
                        "quantity": "3",
                        "price": "35",
                        "saleProp":{
                                        "color_family": "green"
                                        },
                        "package_height": "10",
                        "package_length": "10",
                        "package_width": "10",
                        "package_weight": "0.5",
                        "package_content": "laptop bag"
                    }
                ]
            }
        }
    }
}

CASE3

Declare Variation + Add custom sales attributes + No SKU image


{
    "Request": {
        "Product": {
            "ItemId": "2378974109",
            "Attributes": "",
            "variation": {
                "variation1": {
                    "name": "color_family",
                    "hasImage": false,
                    "customize": false,
                    "options": {
                        "option": ["red"]
                    }
                },
                "variation2": {
                    "name": "customProp1",
                    "hasImage": false,
                    "customize": true,
                    "options": {
                        "option": ["customOption1"]
                    }
                }
            },
            "Skus": {
                "Sku": [
                    {
                        "SellerSku": "2375082215-1655963945400-0",
                        "quantity": "3",
                        "price": "35",
                        "saleProp":{
                                        "customProp1": "customOption1",
                          "color_family": "red"
                                        },
                        "package_height": "10",
                        "package_length": "10",
                        "package_width": "10",
                        "package_weight": "0.5",
                        "package_content": "laptop bag"
                    }
                ]
            }
        }
    }
}

FAQ

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