Home
Find the answer to your question
Use the ReviseFixedPriceItem call to change the properties of a currently active fixed-price listing.
Here is a C# ReviseFixedPriceItem sample for revising a multi-variation item (adding and deleting a variation). This sample has been written using the .NET SDK.
Below is the code. Corresponding SOAP request is attached with this article.
using eBay.Service.Call; using eBay.Service.Core.Sdk; using eBay.Service.Util; using eBay.Service.Core.Soap; namespace Trading_Samples { public class Revise { private void ReviseFixedPriceItem() { //create the context ApiContext context = new ApiContext(); //set the User token context.ApiCredential.eBayToken = "Your token"; //set the server url context.SoapApiServerUrl = "https://api.sandbox.ebay.com/wsapi"; //enable logging context.ApiLogManager = new ApiLogManager(); context.ApiLogManager.ApiLoggerList.Add(new FileLogger("log.txt", true, true, true)); context.ApiLogManager.EnableLogging = true; //set the version context.Version = "727"; context.Site = SiteCodeType.Australia; ReviseFixedPriceItemCall reviseFP = new ReviseFixedPriceItemCall(context); ItemType item = new ItemType(); item.SKU = "6618"; VariationTypeCollection VarCol = new VariationTypeCollection(); //Add a new Variation - Black M VariationType var1 = new VariationType(); var1.SKU = "1234"; var1.Quantity = 10; var1.StartPrice = new AmountType(); var1.StartPrice.currencyID = CurrencyCodeType.AUD; var1.StartPrice.Value = 35; var1.VariationSpecifics = new NameValueListTypeCollection(); NameValueListType Var1Spec1 = new NameValueListType(); StringCollection Var1Spec1Valuecoll = new StringCollection(); Var1Spec1.Name = "Colour"; Var1Spec1Valuecoll.Add("Black"); Var1Spec1.Value = Var1Spec1Valuecoll; var1.VariationSpecifics.Add(Var1Spec1); NameValueListType Var1Spec2 = new NameValueListType(); StringCollection Var1Spec2Valuecoll = new StringCollection(); Var1Spec2.Name = "Size"; Var1Spec2Valuecoll.Add("M"); Var1Spec2.Value = Var1Spec2Valuecoll; var1.VariationSpecifics.Add(Var1Spec2); VarCol.Add(var1); //Delete existing Variation Blue L VariationType var4 = new VariationType(); var4.Delete = true; //Variation is identified by its SKU var4.SKU = "7562"; VarCol.Add(var4); item.Variations = new VariationsType(); item.Variations.Variation = VarCol; reviseFP.Item = item; reviseFP.Execute(); Console.WriteLine(reviseFP.ApiResponse.Ack + " Revised SKU " + reviseFP.SKU); } } } |