How Can I add Product Variants and SKU, StockQuantity and Price with the SELL REST API
I have successfully created a product with eBay SELL RESTt API. But I did not find a way how to add Product Variants and corresponding variants SKU, StockQuantity and Price with the REST API. Can anyone please help me to do that.
Is it possible through sell rest API or I need to use trading API to achieve this?
Thanks
mdmohmah_0
Posted 2 years ago·Last reply 1 year ago
5 comments
developer_support@ebay
Hi @mdmohmah_0 @savvystylishstore,
The basic flow of using the Inventory API to publish a multiple-variation offer involves the use of the following four calls:
For detailed information, see the Inventory API Guide here: https://developer.ebay.com/api-docs/sell/static/inventory/inventory-item-to-offer.html
savvystylishstore
·1 year agowhat is the right order to create a product variant? I tried 2 different combinations, and both of them are not working.
Sequence 1:
- createorreplaceinventory -> sku1
- createorreplaceinventory -> sku2
- createoffer -> sku1
- createoffer -> sku2
- publishoffer -> sku1
- publishoffer -> sku2
- createinventoryitemgroup -> {sku1, sku2)
->publishinventoryitemgroup
Sequence 1:
- createorreplaceinventory -> sku1
- createorreplaceinventory -> sku2
- createoffer -> sku1
- createoffer -> sku2
- createinventoryitemgroup -> {sku1, sku2)
->publishinventoryitemgroup
Both the options are not working. Any ideas?
shipscript
·2 years ago@mdmohmah_0
Within the Inventory API, create an inventory item group of variations.
https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item_group/methods/createOrReplaceInventoryItemGroup
mdmohmah_0
OP2 years ago@shipscript
Thanks for your reply. I have seen this API before. In this API there is no way to add variant specific stock quantity and price.
Actually, I want to put variant-specific information. Please see the below example:
Product: T-shirt
SKU: T100
Size: SKU StockQuantity Quantity Price
Small T100-S 10 5 $30
Large T100-L 12 6 $40
Is there any REST API for this information to be created?
Thanks
shipscript
·2 years ago@mdmohmah_0
The variations can be added when grouping the original "inventory" items.
https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item/methods/bulkCreateOrReplaceInventoryItem
The marketplace, quantity, and price are added in the "offer" process.
https://developer.ebay.com/api-docs/sell/inventory/resources/offer/methods/createOffer
Variation quantity and price can be revised using this method:
https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item/methods/bulkUpdatePriceQuantity