Skip to main content
Published: July 31 2006, 2:59:00 PMUpdated: November 28 2020, 2:17:58 PM

How do I access response information, such as Errors (Warnings) from my AddItemCall in VB.NET when using the .NET SDK?

You can access information returned in the response of an AddItemCall in the following ways (in

1. For fees you can do the following:
  Dim fees As FeeTypeCollection = ApiCall.AddItem(item)
  Dim fee As FeeType
  For Each fee In fees
    If fee.Name = "ListingFee" Then
      strfees = fee.Fee.Value.ToString()
    End If

2. To access other data points returned by the call you can do the following:

For accessing the EndTime returned in the response of the AddItemCall:

For errors you will usually get them as an ApiException, but you can check for errors by using the following (<SeverityCode>Error</SeverityCode> will usually generate an exception, but <SeverityCode>Warning</SeverityCode> will not):
  Dim oError As ErrorType
  For Each oError In ApiCall.ApiResponse.Errors
    Dim longmessage As String
    longmessage = oError.LongMessage

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