Certain constructs, such as monetary amounts and units of measure, always require the same combination of elements in order to be semantically meaningful. For example, a monetary amount is typically modeled as a currency and a value. Various base components that use amounts include listing fee amounts and account balance amounts. eBay refers to common types that are used across multiple API calls as core components.

The following example illustrates a FeeType complex type which comprises the following fields:

  • name: a string describing the purpose of the fee
  • fee: this field uses the AmountType complex type for the monetary amount

Definition of a Type that Uses a Core Component (XML Schema)

<xs:complexType name="FeeType">
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<xs:element name="Fee" type="cc:AmountType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

The following example illustrates what the above data looks like in an actual XML response.

Data for a Type that Uses a Core Component (XML)

<Fees>
<Fee>
<Name>AuctionLengthFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>BoldFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
... more Fee nodes ...
<Fee>
<Name>SubtitleFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
</Fees>

Refer to Create item listings for information about working with these types when listing and retrieving items. Refer to API data types for information about other supported data types.