Skip to main content
Published: July 13 2011, 5:23:00 AMUpdated: November 28 2020, 9:54:38 PM

Use the EndFixedPriceItem call to end the specified fixed-price listing before the date and time at which it would normally end (per the listing duration). For e.g. you may need to use this call to pull down listing from the site if you discover that you are out of stock on that particular listing.

Here is a VB.NET EndFixedPriceItem sample for ending a listing. This sample has been written using the .NET SDK.

Below is the code. Corresponding SOAP request is attached with this article.

Imports eBay.Service.Call
Imports eBay.Service.Core.Sdk
Imports eBay.Service.Util
Imports eBay.Service.Core.Soap

Namespace Trading_Samples
     Public Class EndListing
          Private Sub EndFixedPriceItem()

               'create the context
               Dim context As 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

               Dim endFP As New EndFixedPriceItemCall(context)

               endFP.SKU = "4539"
               endFP.EndingReason = EndReasonCodeType.NotAvailable

               endFP.Execute()
               Console.WriteLine(endFP.ApiResponse.Ack + " Ended SKU " + endFP.SKU)

          End Sub

     End Class

End Namespace

How well did this answer your question?
Answers others found helpful