cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

 

 

 

Message 1 of 6
latest reply
5 REPLIES 5

How Can I add Product Variants and SKU, StockQuantity and Price with the SELL REST API

@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/createOrRe...

 

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 2 of 6
latest reply

How Can I add Product Variants and SKU, StockQuantity and Price with the SELL REST API

@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

 

 

Message 3 of 6
latest reply

How Can I add Product Variants and SKU, StockQuantity and Price with the SELL REST API

@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/bulkCreateOrRepl...

  • Seller-defined SKU for the product or for each group item.
  • Product Condition.
  • Product details, including any product GTIN, or Brand/MPN, a product description, a product title, product/item aspects, and links to images.  .
  • Quantity of the inventory item that is available for purchase
  • Package weight and dimensions.

 

The marketplace, quantity, and price are added in the "offer" process.

https://developer.ebay.com/api-docs/sell/inventory/resources/offer/methods/createOffer

  • Inventory location
  • Offer price
  • Available quantity
  • eBay listing category
  • Profiles to set payment, return, and fulfillment

 

Variation quantity and price can be revised using this method:

https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item/methods/bulkUpdatePriceQ...

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 4 of 6
latest reply

How Can I add Product Variants and SKU, StockQuantity and Price with the SELL REST API

what 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?

Message 5 of 6
latest reply

How Can I add Product Variants and SKU, StockQuantity and Price with the SELL REST API

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:

  1. The createOrReplaceInventoryItem call to create the inventory item record for each inventory item that will be part of the inventory item group. 
  2. The createOrReplaceInventoryItemGroup call to create the inventory item group and place its members in the group. 
  3. The createOffer call to set the listing details for product variation. 
  4. The publishOfferByInventoryItemGroup call to activate the offer on the eBay marketplace.

 

For detailed information, see the Inventory API Guide here: https://developer.ebay.com/api-docs/sell/static/inventory/inventory-item-to-offer.html 

Best Regards,
eBay Developer Support
Message 6 of 6
latest reply