When you make a call, you send a request message to eBay and eBay returns a response message. The message types enable your application to execute common tasks that a seller would perform on eBay, such as listing items.
All message types derive from these abstract base request and response types:
- AbstractRequestType: This is the base type for requests.
- AbstractResponseType: This is the base type for responses.
The abstract base types define fields that are standard for all calls, but not all fields in these types are used by all calls. Examples of the fields in these base types include:
- All call requests let you specify general instructions related to the data you are sending in or the data you want eBay to return.
-
Use this to control the amount of data returned. Refer to Filter results for additional information.
-
Use this to specify the language you want errors returned in. Refer to Customize error handling for an application for additional information.
-
Use this to specify the version of the schema you are using. Refer to Specify the schema version for additional information.
-
Use this to control whether to retrieve warnings if you pass in unrecognized fields. Refer to Customize error handling for an application for additional information.
- All call responses also include standard information.
-
Use this information to determine the version of the schema and the specific software build that eBay used when processing the request and generating the response. Developer Support may request the build information when helping to resolve technical issues. Refer to Specify the schema version for additional information.
-
For any request, one or more errors or warnings may be returned. Refer to Error Handling for additional information about working with errors.
-
Ack (Acknowledgement)
All responses return a standard acknowledgement element that indicates the success, failure, or partial failure of a call.
-
All responses return the official eBay time stamp in UTC/GMT. The time stamp indicates the time when eBay processed the request; it does not necessarily indicate the current eBay official eBay time. In particular, calls such as GetCategories can return a cached response, so the time stamp may not be current.
Refer to Time values for additional information about time stamps and how eBay handles these values.
-
All call requests support a MessageID element, and all responses support a CorrelationID element. If a MessageID is included in a request (up to 64 characters), it should be unique across the eBay site. The same value will be returned in the CorrelationID field of the response. This may be useful for tracking that a response is returned for every request and to match particular responses to specific requests.
Refer to Message IDs for additional information.
The base request and response types for each call (e.g., AddItemRequestType and AddItemResponseType for an AddItem call,) are derived from the abstract request/response types. Base request and response types define context-specific business data that is applicable for the particular call. For example
- AddItemRequestType specifies that it takes an
Item
object in the request payload - AddItemResponseType specifies that it returns multiple fields, including the newly created ItemID and Fees fields.
The naming convention used for base request and response type names is the name of the call followed by Request
or Response
. For example:
callnameRequest
callnameResponse
Note: In the ebaysvc.wsdl
file, which is used in the SOAP API, the message elements define the request and response messages and the data types to use in the body of those messages. The message names are the same as the data type element names (e.g., AddItemRequest
).
In the portType
clause, the name of the service definition interface (i.e., the interface used to access operations,) is derived from eBayAPIInterface
. This interface specifies each logical operation (e.g., AddItem,) and indicates that it is bidirectional (i.e., request-response).