Home > API General, Auction, Delinquency > SWS UpdateAuction Method

SWS UpdateAuction Method


Updates the information regarding the specified auction.

Parameters

Name Data Type Required
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.
AuctionID Long Required
Description The ID number assigned to the auction at the time it was created.
AuctionDateTime DateTime Optional
Description The date and time schedule to which you wish to change the auction. If only a portion of this is included will default to either today’s date or 12:00am. For example, if you set the date to 06/20/2017 but do not enter a time, the auction will be scheduled for 06/20/17 at 12:00am.
AuctioneerName String Optional
Description The name of the auctioneer who will be running the auction.
AuctionNotes String Optional
Description Any additional information regarding the auction.
AuctionStatus AuctionStatusValues Optional
Description The status to which you wish to update the auction.
Available values:

  • SCHEDULED
  • COMPLETED
  • CANCELLED

Returned Parameters

Name Data Type
AuctionID Long
Description The auctions ID number that was updated.
SITE_ID Long
Description The site’s ID number.
AUCTION_DATE DateTime
Description The date and time for which the auction is currently scheduled.
AUCTIONEER_NAME String
Description The name of the person who will be running the auction.
NOTES String
Description Any additional information regarding the auction.
STATUS Integer
Description The numeric value of the auction status.
Available values:

  • 1 – SCHEDULED
  • 2 – COMPLETED
  • 3 – CANCELLED
CREATED_BY Long
Description The user’s ID that created the auction.
UPDATED_BY Long
Description The user’s ID that last updated the auction.
AUCTION_TIME String
Description The time during the day that the auction will occur.

Example

As with every method we need to pass in credentials. We do this with the LookupUser request object.

We will assume you have a web reference, let us name it SWS, in your Visual Studio project. At this point we need to define our objects.  We will need the standard service object, an UpdateAuction request object, and an UpdateAuction response object. We can define and create those like this:

' Create a request and response objects
 Dim objService As New SWS.WSSoapClient
 Dim objReq As New SWS.UpdateAuction_Request
 Dim objRes As New SWS.UpdateAuction_Response

Here is a sample code of the request object (including optional parameters):

' UpdateAuction Request
 With objReq
 .SiteID = 1000000001
 .AuctionID = 1000000000
 .AuctionDateTime = 2011-05-14T00:00:00.000-06:00
 .AuctioneerName = James Sweet
 .AuctionStatus = SCHEDULED
 End With

Finally we can call the method and pass across the login object and the request object to retrieve our requested information. It’s a good idea to do this in a Try Catch block.

Try
 ' Call the method that will load the response object
 objRes = objService.UpdateAuction(objLogin, objReq)
 Catch ex As Exception
 MessageBox.Show(ex.Message)
 End Try

Note that if something goes wrong the service will respond with an exception. You will want to capture the message in the exception so it can be debugged.

For a full list of methods see SWS Methods.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s