eBay Trading APIVersion 1031

GetCategories

Use this call to retrieve the latest category hierarchy for the eBay site specified in the CategorySiteID property. By default, this is the site to which you submit the request. You can retrieve all categories on the site, or you can use CategoryParent to retrieve one particular category and its subcategories. The returned category list is contained in the CategoryArray property.

Usage Details

eBay requires sellers to specify a category ID for most new listings and you can only add item listings in leaf categories. The GetCategories call can help you find the leaf categories on any eBay site.

For each category, the call returns the category name, its unique ID (within the site to which you sent the request), and meta-data that helps you determine where the category fits in the hierarchy. The call also identifies a few eBay features that are only supported in some categories. For example, some categories support immediate payment (AutoPay). For information about additional features that vary by category, use GetCategoryFeatures.

The API provides other calls that supplement GetCategories. For example, consider using GetSuggestedCategories to help the seller choose a category ID. In certain cases, it may be helpful to use GetCategoryMappings to update locally stored item data (although most applications can use the simpler CategoryMappingAllowed flag in AddItem for this purpose).

See Retrieving the Category Hierarchy for a Site for a detailed description of retrieving the category data for an eBay site.

Working with the Response

GetCategories returns the category data for the specified eBay site into a CategoryArrayType object in the CategoryArray property of the GetCategories response object. Within this array is one CategoryType object for each category retrieved.

  1. Traverse the category array to visit each of the category objects it contains.
  2. Inspect the properties of each CategoryType object to get the values for the category it represents.
  3. Remember that the value of ReservePriceAllowed (specifying whether the site allows listings with reserve prices) can be reversed by the CategoryType.ORPA field for an individual category.
  4. As applicable for the application, store the data (for example, to a table).

Best Practices

The following sections list several hints and suggestions for working with GetCategories.

Data Filters

There is no limit on the number of categories that can be returned using GetCategories. Unless otherwise specified by a filter, all of the categories for a particular site can be returned in one call.

Because category data can be quite voluminous, applications can reduce the volume of data retrieved by using the CategoryParent input property to target the specific categories used by the application. By specifying a category with CategoryParent, a call retrieves a subset of the total category hierarchy. Using this method, you can download the portions of the category hierarchy that you need. While several calls might be needed to gain all the category data required, the individual responses are more targeted.

You can use the LevelLimit property to limit the categories returned to just those up to the specified level in the category hierarchy.

Setting the ViewAllNodes property to false (the default) limits the categories returned; only leaf categories are returned, representing the categories in which you must list an item.

Optimizing Your Calls

Retrieving the full set of eBay categories can be time-consuming and the result sets can be quite large. It can be worthwhile to issue one GetCategories call to retrieve the data for the top-level categories (set LevelLimit to 1), then get the full hierarchy of the branches you are interested by specifying those categories as CategoryParent values in subsequent calls to GetCategories.

Use GetCategories to retrieve the category hierarchy only when necessary and retrieve category data only when a change in the category hierarchy version is indicated for the specified site (see "Checking the Category Hierarchy Version" in Maintaining Category Data for details on category versioning). Although checking the category version does not reduce the number of calls you make to GetCategories, you can optimize your calls by downloading category data only when needed.

Testing GetCategories

Use the following methods to test GetCategories:

Related Information

See Categories.

See also the reference documentation for these calls:



Input

See also Samples.

The box below lists all fields that could be included in the call request. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are (or soon will be) non-operational.

The XML prototype does not include requester credentials. This is a documentation limitation only (see Standard Requester Credentials for Making Calls).

<?xml version="1.0" encoding="utf-8"?>
<GetCategoriesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Input Fields -->
  <CategoryParent> string </CategoryParent>
  <!-- ... more CategoryParent values allowed here ... -->
  <CategorySiteID> string </CategorySiteID>
  <LevelLimit> int </LevelLimit>
  <ViewAllNodes> boolean </ViewAllNodes>
  <!-- Standard Input Fields -->
  <DetailLevel> DetailLevelCodeType </DetailLevel>
  <!-- ... more DetailLevel values allowed here ... -->
  <ErrorLanguage> string </ErrorLanguage>
  <MessageID> string </MessageID>
  <OutputSelector> string </OutputSelector>
  <!-- ... more OutputSelector values allowed here ... -->
  <Version> string </Version>
  <WarningLevel> WarningLevelCodeType </WarningLevel>
</GetCategoriesRequest>
Argument Type Occurrence Meaning
Call-specific Input Fields [Jump to standard fields]
CategoryParent string Optional,
repeatable: [0..*]
Specifies the ID of the highest-level category to return, along with its subcategories. If no parent category is specified, all categories are returned for the specified site. (Please do not pass a value of 0; zero (0) is an invalid value for CategoryParent.) To determine available category IDs, call GetCategories with no filters and use a DetailLevel value of ReturnAll. If you specify multiple parent categories, the hierarchy for each one is returned.
CategorySiteID string Optional This field is used if the user wants to retrieve category data for another eBay site (other than the one specified in the X-EBAY-API-SITEID request header).

If the user wishes to retrieve category data for the US eBay Motors site, the user must set the Site ID in the X-EBAY-API-SITEID request header to 0, and then set this field's value to 100.
Default: The site ID of the request.

See eBay Site IDs.

LevelLimit int Optional Specifies the maximum depth of the category hierarchy to retrieve, where the top-level categories (meta-categories) are at level 1. Retrieves all category nodes with a category level less than or equal to this value. If not specified, retrieves categories at all applicable levels. As with all calls, the actual data returned will vary depending on how you configure other fields in the request (including DetailLevel).
Default: 0.
ViewAllNodes boolean Optional This flag controls whether all eBay categories (that satisfy input filters) are returned, or only leaf categories (you can only list items in leaf categories) are returned. The default value is 'true', so if this field is omitted, all eBay categories will be returned. If you only want to retrieve leaf categories, include this flag and set it to 'false'. The actual data returned will vary depending on how you configure other fields in the request.
Default: false.
Standard Input Fields  
DetailLevel DetailLevelCodeType Optional,
repeatable: [0..*]
Detail levels are instructions that define standard subsets of data to return for particular data components (e.g., each Item, Transaction, or User) within the response payload. For example, a particular detail level might cause the response to include buyer-related data in every result (e.g., for every Item), but no seller-related data.

Specifying a detail level is like using a predefined attribute list in the SELECT clause of an SQL query. Use the DetailLevel element to specify the required detail level that the client application needs pertaining to the data components that are applicable to the request.

The DetailLevelCodeType defines the global list of available detail levels for all request types. Most request types support certain detail levels or none at all. If you pass a detail level that exists in the schema but that isn't valid for a particular request, eBay ignores it and processes the request without it.

For each request type, see the detail level tables in the Input/Output Reference to determine which detail levels are applicable and which elements are returned for each applicable detail level.

Note that DetailLevel is required input for GetMyMessages.

With GetSellerList and other calls that retrieve large data sets, please avoid using ReturnAll when possible. For example, if you use GetSellerList, use GranularityLevel instead, or use GetSellerEvents. If you do use 'ReturnAll' with GetSellerList, use a small Pagination.EntriesPerPage value and a narrow EndTimeFrom/EndTimeTo date range for better performance.

Applicable values:

ReturnAll
(in) Returns all available data. With GetSellerList and other calls that retrieve large data sets, please avoid using ReturnAll when possible. For example, if you use GetSellerList, use a GranularityLevel or use the GetSellerEvents call instead. If you use ReturnAll with GetSellerList, use a small EntriesPerPage value and a short EndTimeFrom/EndTimeTo range for better performance.

(Not all values in DetailLevelCodeType apply to this field.)
ErrorLanguage string Optional Use ErrorLanguage to return error strings for the call in a different language from the language commonly associated with the site that the requesting user is registered with. Specify the standard RFC 3066 language identification tag (e.g., en_US).

ID Country
en_AU Australia
de_AT Austria
nl_BE Belgium (Dutch)
fr_BE Belgium (French)
en_CA Canada
fr_CA Canada (French)
zh_CN China
fr_FR France
de_DE Germany
zh_HK Hong Kong
en_IN India
en_IE Ireland
it_IT Italy
nl_NL Netherlands
en_SG Singapore
es_ES Spain
de_CH Switzerland
en_GB United Kingdom
en_US United States

See Tags for the Identification of Languages.

MessageID string Optional Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
OutputSelector string Optional,
repeatable: [0..*]
You can use the OutputSelector field to restrict the data returned by a call. This field can make the call response easier to manage, especially when a large payload is returned. If you use the OutputSelector field, the output data will only include the fields you specified in the request. For example, if you are using GetItem and you only want to retrieve the URL of the View Item page (emitted in ViewItemURL field) and the item's Buy It Now price (emitted in BuyItNowPrice field), you would include two separate OutputSelector fields and set the value for each one as ViewItemURL and BuyItNowPrice as in the following example:

 ...
<OutputSelector>ViewItemURL</OutputSelector>
<OutputSelector>BuyItNowPrice</OutputSelector>

...

See Selecting Fields to Retrieve.

Version string Conditional The version number of the API code that you are programming against (e.g., 859). The version you specify for a call has these basic effects:
  • It indicates the version of the code lists and other data that eBay should use to process your request.
  • It indicates the schema version you are using.
You need to use a version that is greater than or equal to the lowest supported version.
For the SOAP API: If you are using the SOAP API, this field is required. Specify the version of the WSDL your application is using.

For the XML API: If you are using the XML API, this field has no effect. Instead, specify the version in the X-EBAY-API-COMPATIBILITY-LEVEL HTTP header. (If you specify Version in the body of an XML API request and it is different from the value in the HTTP header, eBay returns an informational warning that the value in the HTTP header was used instead.)

See:
    Routing the Request (Gateway URLs)
    eBay Schema Versioning Strategy
    Lowest Supported Version

WarningLevel WarningLevelCodeType Optional Controls whether or not to return warnings when the application passes unrecognized or deprecated elements in a request.

An unrecognized element is one that is not defined in any supported version of the schema. Schema element names are case-sensitive, so using WarningLevel can also help you remove any potential hidden bugs within your application due to incorrect case or spelling in field names before you put your application into the Production environment.

WarningLevel only validates elements; it doesn't validate XML attributes. It also doesn't control warnings related to user-entered strings or numbers, or warnings for logical errors.

We recommend that you only use this during development and debugging. Do not use this in requests performed in the Production environment.

Applicable values:

High
(in) The WarningLevel value is set to High if the user wishes to receive warnings when the application passes unrecognized or deprecated elements in an API call request. Setting the WarningLevel value to High is not recommended in a production environment. Instead, it should only be used during the development/debugging stage.
Low
(in) The WarningLevel value is set to Low if the user does not wish to receive warnings when the application passes unrecognized or deprecated elements in an API call request. This is the default value if WarningLevel is not specified in the call request.

See Warning Level.



Output

See also Samples.

The box below lists all fields that might be returned in the response. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are not returned (or soon will not be returned) or are not operational (or soon will be non-operational).

<?xml version="1.0" encoding="utf-8"?>
<GetCategoriesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Output Fields -->
  <CategoryArray> CategoryArrayType
    <Category> CategoryType
      <AutoPayEnabled> boolean </AutoPayEnabled>
      <B2BVATEnabled> boolean </B2BVATEnabled>
      <BestOfferEnabled> boolean </BestOfferEnabled>
      <CategoryID> string </CategoryID>
      <CategoryLevel> int </CategoryLevel>
      <CategoryName> string </CategoryName>
      <CategoryParentID> string </CategoryParentID>
      <!-- ... more CategoryParentID values allowed here ... -->
      <Expired> boolean </Expired>
      <LeafCategory> boolean </LeafCategory>
      <LSD> boolean </LSD>
      <ORPA> boolean </ORPA>
      <ORRA> boolean </ORRA>
      <Virtual> boolean </Virtual>
    </Category>
    <!-- ... more Category nodes allowed here ... -->
  </CategoryArray>
  <CategoryCount> int </CategoryCount>
  <CategoryVersion> string </CategoryVersion>
  <MinimumReservePrice> double </MinimumReservePrice>
  <ReduceReserveAllowed> boolean </ReduceReserveAllowed>
  <ReservePriceAllowed> boolean </ReservePriceAllowed>
  <UpdateTime> dateTime </UpdateTime>
  <!-- Standard Output Fields -->
  <Ack> AckCodeType </Ack>
  <Build> string </Build>
  <CorrelationID> string </CorrelationID>
  <Errors> ErrorType
    <ErrorClassification> ErrorClassificationCodeType </ErrorClassification>
    <ErrorCode> token </ErrorCode>
    <ErrorParameters ParamID="string"> ErrorParameterType
      <Value> string </Value>
    </ErrorParameters>
    <!-- ... more ErrorParameters nodes allowed here ... -->
    <LongMessage> string </LongMessage>
    <SeverityCode> SeverityCodeType </SeverityCode>
    <ShortMessage> string </ShortMessage>
  </Errors>
  <!-- ... more Errors nodes allowed here ... -->
  <HardExpirationWarning> string </HardExpirationWarning>
  <Timestamp> dateTime </Timestamp>
  <Version> string </Version>
</GetCategoriesResponse>
Return Value Type Occurrence Meaning
Call-specific Output Fields [Jump to standard fields]
CategoryArray CategoryArrayType Always List of the returned categories. The category array contains one CategoryType object for each returned category. Returns empty if no detail level is specified.

DetailLevel: ReturnAll.
CategoryArray.Category CategoryType Always,
repeatable: [1..*]
This container provides details about the eBay category identified in the CategoryID field. For GetCategories, this node is not returned when no DetailLevel value is specified.

DetailLevel: ReturnAll.
CategoryArray.Category
  .AutoPayEnabled
boolean Conditionally If this field is returned as true, the corresponding category supports immediate payment for listings. PayPal must be an accepted payment method for a listing for the seller to required immediate payment from the buyer. If this field is not present, the category does not immediate payment. This field is not returned when false.

DetailLevel: ReturnAll.

See Requiring Immediate Payment.

CategoryArray.Category
  .B2BVATEnabled
boolean Conditionally If this field is returned as true, the corresponding category supports business-to-business (B2B) VAT listings. If this field is not present, the category does not B2B VAT listings. This field is not returned when false. This feature is applicable to the eBay Germany (DE), Austria (AT), and Switzerland (CH) sites only.

DetailLevel: ReturnAll.

See Working with Business Features and VAT.

CategoryArray.Category
  .BestOfferEnabled
boolean Conditionally If this field is returned as true, the corresponding category supports Best Offers. If this field is not present, the category does not support Best Offers. This field is not returned when false.

DetailLevel: ReturnAll.
CategoryArray.Category
  .CategoryID
string Always This string value is the unique identifier of an eBay category. In GetItem and related calls, see the CategoryName field for the text name of the category. The parent category of this eBay category is only shown in GetCategories.

In an Add/Revise/Relist call, the PrimaryCategory.CategoryID is always required, and the SecondaryCategory.CategoryID is conditionally required if a Secondary Category is used.
Max length: 10.

DetailLevel: ReturnAll.
CategoryArray.Category
  .CategoryLevel
int Always This integer value indicates the level where the category fits in the eBay site's category hierarchy. For example, if this field has a value of 2, then the category is two levels below the root category in the eBay site's category hierarchy.

DetailLevel: ReturnAll.
CategoryArray.Category
  .CategoryName
string Always This string value is the display name of the eBay primary category, as it would appear on the eBay site. In GetItem, this will be a fully-qualified category name (e.g., Collectibles:Decorative Collectibles:Hummel, Goebel).
Max length: 50.

DetailLevel: ReturnAll.
CategoryArray.Category
  .CategoryParentID
string Always,
repeatable: [1..*]
This string value is the Category ID of the primary category's (indicated in the CategoryID field) parent category. The number of CategoryParentID values that are returned will depend on the LevelLimit value that is set (in GetCategories) and on how far up the primary category is in the eBay category hierarchy. CategoryParentID values are returned in correct sequence, starting from the root category and ending with the category that is the direct parent of the primary category specified in CategoryID. The CategoryID and CategoryParentID values will be the same if the LevelLimit value is set to 1.
Max length: 10.

DetailLevel: ReturnAll.
CategoryArray.Category.Expired boolean Always If this field is returned as true, the corresponding category is no longer a valid eBay category on the site, and items may not be listed in this category. This field is not returned when false.

DetailLevel: ReturnAll.
CategoryArray.Category
  .LeafCategory
boolean Always If this field is returned as true, the corresponding category is an eBay leaf category, a category in which items may be listed. This field is not returned when false.

DetailLevel: ReturnAll.
CategoryArray.Category.LSD boolean Always If this field is returned as true, the corresponding category does not support lot listings. A lot listing is a listing that features multiple related items that must be purchased by one buyer in one transaction. 'LSD' is an acronym for 'Lot Size Disabled'. 'Lot Size' refers to the LotSize field in the Add/Revise/Relisting calls that is conditionally required if the seller is creating a lot listing. The LSD field is not returned when false.

DetailLevel: ReturnAll.
CategoryArray.Category.ORPA boolean Always If this field is returned as true, the corresponding category is an exception to the eBay site's standard Reserve Price policy on auction listings. For example, if the site's default setting is to allow setting a Reserve Price, but ORPA is returned as true, this particular category does not support setting a Reserve Price. Or, if the site's default setting is not to allow setting a Reserve Price, but ORPA is returned as true, this particular category is the exception to that rule and does support setting a Reserve Price. If ORPA is true for the corresponding category, you can generally assume that the category's subcategories inherit the same setting. 'ORPA' is an acronym for 'Override Reserve Price Allowed'.

This field is not returned when false.

DetailLevel: ReturnAll.
CategoryArray.Category.ORRA boolean Conditionally If this field is returned as true, the corresponding category is an exception to the eBay site's standard Reduce Reserve Price (on active auction listing) policy. For example, if the site's default setting is to allow reducing a Reserve Price for the active auction listing, but ORRA is returned as true, this particular category does not support reducing a Reserve Price. Or, if the site's default setting is not to allow reducting a Reserve Price, but ORRA is returned as true, this particular category is the exception to that rule and does support reducing a Reserve Price. If ORRA is true for the corresponding category, you can generally assume that the category's subcategories inherit the same setting. 'ORRA' is an acronym for 'Override Reduce Reserve Allowed'.

This field is not returned when false.

DetailLevel: ReturnAll.
CategoryArray.Category.Virtual boolean Always If this field is returned as true, the corresponding category is an eBay virtual category, a category in which items may not be listed. This field is not returned when false.

DetailLevel: ReturnAll.
CategoryCount int Always Indicates the number of categories returned (i.e., the number of CategoryType objects in CategoryArray).

DetailLevel: ReturnAll.
CategoryVersion string Always Indicates the version of the category hierarchy on the specified eBay site.

DetailLevel: ReturnAll. Also returned if DetailLevel is not provided on input.
MinimumReservePrice double Always Indicates the lowest possible reserve price allowed for any item listed in any category on the site. You can use the fields returned by GetCategoryFeatures to determine if a different Minimum Reserve Price is defined for the category you want to use.

DetailLevel: ReturnAll. Also returned if DetailLevel is not provided on input.
ReduceReserveAllowed boolean Always If true, ReduceReserveAllowed indicates that all categories on the site allow the seller to reduce an item's reserve price. If false, this field is not returned in the response and all categories on the site do not normally allow sellers to reduce an item's reserve price. The Category.ORRA (override reduce reserve price) field can override (or toggle) the reserve price reduction setting for a given category. For example, if ReduceReserveAllowed is false and Category.ORRA is true, the category overrides the site setting and supports reducing reserve prices. If ReduceReserveAllowed is true and Category.ORRA is true, the category overrides the site setting and does does not support reducing reserve prices.

DetailLevel: ReturnAll. Also returned if DetailLevel is not provided on input.
ReservePriceAllowed boolean Always If true, ReservePriceAllowed indicates that all categories on the site allow the seller to specify a reserve price for an item. If false, this field is not returned in the response and all categories on the site do not normally allow sellers to specify reserve prices. The Category.ORPA (override reserve price allowed) field can override (or toggle) the reserve price allowed setting for a given category. For example, if ReservePriceAllowed is false and Category.ORPA is true, the category overrides the site setting and supports reserve prices. If ReservePriceAllowed is true and Category.ORPA is true, the category overrides the site setting and does does not support reserve prices.

DetailLevel: ReturnAll. Also returned if DetailLevel is not provided on input.
UpdateTime dateTime Always Indicates the last date and time that eBay modified the category hierarchy for the specified eBay site.

DetailLevel: ReturnAll. Also returned if DetailLevel is not provided on input.
Standard Output Fields  
Ack AckCodeType Always A token representing the application-level acknowledgement code that indicates the response status (e.g., success). The AckCodeType list specifies the possible values for the Ack field.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
Failure
(out) This value indicates that the call request processing failed.
Success
(out) This value indicates that the call request was processed successfully without any issues.
Warning
(out) This value indicates that the call request was successful, but processing was not without any issues. These issues can be checked in the Errors container, that will also be returned when one or more known issues occur with the call request.

(Not all values in AckCodeType apply to this field.)

Code so that your app gracefully handles any future changes to this list.
Build string Always This refers to the specific software build that eBay used when processing the request and generating the response. This includes the version number plus additional information. eBay Developer Support may request the build information when helping you resolve technical issues.
CorrelationID string Conditionally Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
Errors ErrorType Conditionally,
repeatable: [0..*]
A list of application-level errors (if any) that occurred when eBay processed the request.

See Error Handling.

Errors.ErrorClassification ErrorClassificationCodeType Conditionally API errors are divided between two classes: system errors and request errors.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
RequestError
(out) An error has occurred either as a result of a problem in the sending application or because the application's end-user has attempted to submit invalid data (or missing data). In these cases, do not retry the request. The problem must be corrected before the request can be made again. If the problem is due to something in the application (such as a missing required field), the application must be changed. If the problem is a result of end-user data, the application must alert the end-user to the problem and provide the means for the end-user to correct the data. Once the problem in the application or data is resolved, resend the request to eBay with the corrected data.
SystemError
(out) Indicates that an error has occurred on the eBay system side, such as a database or server down. An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.

Code so that your app gracefully handles any future changes to this list.
Errors.ErrorCode token Conditionally A unique code that identifies the particular error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. See the "Errors by Number" document.
Errors.ErrorParameters ErrorParameterType Conditionally,
repeatable: [0..*]
This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned.
Errors.ErrorParameters
  [ attribute ParamID ]
string Conditionally This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned.
Errors.ErrorParameters.Value string Conditionally This is the value of the request parameter noted in the ParamID attribute. So, if the ParamID value was ItemID, the value in this field would be the actual value of that ItemID.
Errors.LongMessage string Conditionally A more detailed description of the condition that raised the error.
Errors.SeverityCode SeverityCodeType Conditionally Indicates whether the error is a severe error (causing the request to fail) or an informational error (a warning) that should be communicated to the user.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
Error
(out) The request that triggered the error was not processed successfully. When a serious application-level error occurs, the error is returned instead of the business data.

If the source of the problem is within the application (such as a missing required element), change the application before you retry the request.
  • If the problem is due to end-user input data, please alert the end-user to the problem and provide the means for them to correct the data. Once the problem in the application or data is resolved, you can attempt to re-send the request to eBay.
  • If the source of the problem is on eBay's side, An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.


See the Compatible Application Check section of the eBay Features Guide for more information.
Warning
(out) The request was processed successfully, but something occurred that may affect your application or the user. For example, eBay may have changed a value the user sent in. In this case, eBay returns a normal, successful response and also returns the warning.

When a warning occurs, the error is returned in addition to the business data. In this case, you do not need to retry the request (as the original request was successful). However, depending on the cause or nature of the warning, you might need to contact either the end user or eBay to effect a long term solution to the problem to prevent it from reoccurring in the future.

Code so that your app gracefully handles any future changes to this list.
Errors.ShortMessage string Conditionally A brief description of the condition that raised the error.
HardExpirationWarning string Conditionally Expiration date of the user's authentication token. Only returned within the 7-day period prior to a token's expiration. To ensure that user authentication tokens are secure and to help avoid a user's token being compromised, tokens have a limited life span. A token is only valid for a period of time (set by eBay). After this amount of time has passed, the token expires and must be replaced with a new token.
Timestamp dateTime Always This value represents the date and time when eBay processed the request. The time zone of this value is GMT and the format is the ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). See the Time Values section in the eBay Features Guide for information about this time format and converting to and from the GMT time zone.

Note: GetCategories and other Trading API calls are designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, this time value reflects the time the cached response was created. Thus, this value is not necessarily when the request was processed. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, this time value does reflect when the request was processed.
Version string Always The version of the response payload schema. Indicates the version of the schema that eBay used to process the request. See the Standard Data for All Calls section in the eBay Features Guide for information on using the response version when troubleshooting CustomCode values that appear in the response.



Detail Controls


DetailLevel

The DetailLevel input field influences which call-specific fields may be returned. (All standard output fields are returned regardless of DetailLevel.)

The none column indicates the fields that are returned when you do not specify a DetailLevel.

YThe field is always returned.
(Y)The field is conditionally returned. See the field documentation for clarification of conditions.
-The field is not returned.

Output Field none ReturnAll
CategoryArray-Y
CategoryArray.Category-Y
CategoryArray.Category.AutoPayEnabled-(Y)
CategoryArray.Category.B2BVATEnabled-(Y)
CategoryArray.Category.BestOfferEnabled-(Y)
CategoryArray.Category.CategoryID-Y
CategoryArray.Category.CategoryLevel-Y
CategoryArray.Category.CategoryName-Y
CategoryArray.Category.CategoryParentID-Y
CategoryArray.Category.Expired-Y
CategoryArray.Category.LeafCategory-Y
CategoryArray.Category.LSD-Y
CategoryArray.Category.ORPA-Y
CategoryArray.Category.ORRA-(Y)
CategoryArray.Category.Virtual-Y
CategoryCount-Y
CategoryVersionYY
MinimumReservePriceYY
ReduceReserveAllowedYY
ReservePriceAllowedYY
UpdateTimeYY



Samples

New to making API calls? Please see Making a Call.

Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.

Available samples:

Sample: Basic Call

Retrieves the current category version.

Description

This basic sample has no input parameters and returns the current version of the category hierarchy in CategoryVersion. The XML sample uses the X-EBAY-API-SITEID header value to determine the target eBay site (in this case, X-EBAY-API-SITEID equals 0, indicating the US eBay site).

Use this simple call to get the latest version number of the category hierarchy. Compare the version number returned with the version of your stored category data to determine if your stored category data needs updating.

Input

XML format.

<?xml version="1.0" encoding="utf-8"?>
<GetCategoriesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>ABC...123</eBayAuthToken>
  </RequesterCredentials>
</GetCategoriesRequest> 

Output

XML format.
<GetCategoriesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2015-07-15T17:08:04.394Z</Timestamp>
  <Ack>Success</Ack>
  <Version>967</Version>
  <Build>e967__Bundled_9183565_R1</Build>
  <UpdateTime>2015-06-15T14:51:30.000Z</UpdateTime>
  <CategoryVersion>91</CategoryVersion>
  <ReservePriceAllowed>true</ReservePriceAllowed>
  <MinimumReservePrice>0.0</MinimumReservePrice>
</GetCategoriesResponse>

Back to list of samples

Sample: Complete Category Hierarchy

Retrieves a hierarchical list of all categories, with full details, for the specified eBay site.

Description

This sample retrieves all the details for the US eBay site (Site ID 0) category hierarchy. The full output for this call is well over 200,000 lines and it is possible for the call to time out. The sample output shown is an abbreviated version of the full output.

The recommended process for getting comprehensive category information is described in the Knowledge Base article Best practices for GetCategories API call. For more information about retrieving the category hierarchy, see Retrieving the Category Hierarchy for a Site in the eBay Features Guide.

Input

The critical input for this sample is DetailLevel with a value of ReturnAll. You can set CategorySiteID if you need to override the Site ID set in the XML headers.

XML format.

<?xml version="1.0" encoding="utf-8"?>
<GetCategoriesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>ABC...123</eBayAuthToken>
  </RequesterCredentials>
  <CategorySiteID>0</CategorySiteID>
  <DetailLevel>ReturnAll</DetailLevel>
</GetCategoriesRequest> 

Output

Each Category node in the response contains information needed to build a category tree. The data includes information reflecting the CategoryID, CategoryName, CategoryParentID, CategoryLevel, and LeafCategory status of each category.

XML format.
<GetCategoriesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2009-06-30T19:21:13.942Z</Timestamp>
  <Ack>Success</Ack>
  <Version>619</Version>
  <Build>e619__Bundled_9183565_R1</Build>
  <CategoryArray>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>20081</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Antiques</CategoryName>
      <CategoryParentID>20081</CategoryParentID>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>37903</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Antiquities</CategoryName>
      <CategoryParentID>20081</CategoryParentID>
    </Category>

    ...

    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <CategoryID>10162</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>ESPN</CategoryName>
      <CategoryParentID>10159</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <CategoryID>140151</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>SDC</CategoryName>
      <CategoryParentID>10159</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
  </CategoryArray>
  <CategoryCount>25805</CategoryCount>
  <UpdateTime>2009-06-15T14:51:30.000Z</UpdateTime>
  <CategoryVersion>91</CategoryVersion>
  <ReservePriceAllowed>true</ReservePriceAllowed>
  <MinimumReservePrice>0.0</MinimumReservePrice>
</GetCategoriesResponse>

Back to list of samples

Sample: Top-Level Category Tree

Retrieves a list of the top-level categories for the specified eBay site.

Description

Magical Bookseller wants to sell a copy of "Harry Potter and The Sorcerers Stone" on the US site (SiteID=0) and she wants to find the best category to list the item.

This sample retrieves a complete list of top-level categories. The response contains the category hierarchy version, the number of categories returned, as well as the settings for certain features (for example, BestOfferEnabled and AutoPayEnabled).

Input

The critical input fields for this sample are DetailLevel (set to ReturnAll) and LevelLimit (set to 1). This specifies that full details should be returned for only the top-level categories.

XML format.

<?xml version="1.0" encoding="utf-8"?>
<GetCategoriesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>ABC...123</eBayAuthToken>
  </RequesterCredentials>
  <CategorySiteID>0</CategorySiteID>
  <DetailLevel>ReturnAll</DetailLevel>
  <LevelLimit>1</LevelLimit>
</GetCategoriesRequest>

Output

In this sample, Magical Bookseller is interested in the category version number, as well as the number of the top-level category that best fits the item she is selling (267 for Books). Note that the output is abbreviated.

XML format.
<GetCategoriesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
   <Timestamp>2015-07-13T21:21:38.506Z</Timestamp>
   <Ack>Success</Ack>
   <Version>967</Version>
   <Build>e967__Bundled_9183565_R1</Build>
   <CategoryArray>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>20081</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Antiques</CategoryName>
         <CategoryParentID>20081</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>550</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Art</CategoryName>
         <CategoryParentID>550</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>2984</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Baby</CategoryName>
         <CategoryParentID>2984</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>267</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Books</CategoryName>
         <CategoryParentID>267</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>12576</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Business & Industrial</CategoryName>
         <CategoryParentID>12576</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>625</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Cameras & Photo</CategoryName>
         <CategoryParentID>625</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>15032</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Cell Phones & PDAs</CategoryName>
         <CategoryParentID>15032</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>11450</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Clothing, Shoes & Accessories</CategoryName>
         <CategoryParentID>11450</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>11116</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Coins & Paper Money</CategoryName>
         <CategoryParentID>11116</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>1</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Collectibles</CategoryName>
         <CategoryParentID>1</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>58058</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Computers & Networking</CategoryName>
         <CategoryParentID>58058</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>14339</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Crafts</CategoryName>
         <CategoryParentID>14339</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>237</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Dolls & Bears</CategoryName>
         <CategoryParentID>237</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>11232</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>DVDs & Movies</CategoryName>
         <CategoryParentID>11232</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>293</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Electronics</CategoryName>
         <CategoryParentID>293</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>45100</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Entertainment Memorabilia</CategoryName>
         <CategoryParentID>45100</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>31411</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Gift Certificates</CategoryName>
         <CategoryParentID>31411</CategoryParentID>
         <LeafCategory>true</LeafCategory>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>26395</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Health & Beauty</CategoryName>
         <CategoryParentID>26395</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>11700</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Home & Garden</CategoryName>
         <CategoryParentID>11700</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>281</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Jewelry & Watches</CategoryName>
         <CategoryParentID>281</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>11233</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Music</CategoryName>
         <CategoryParentID>11233</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>619</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Musical Instruments</CategoryName>
         <CategoryParentID>619</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>1281</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Pet Supplies</CategoryName>
         <CategoryParentID>1281</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>870</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Pottery & Glass</CategoryName>
         <CategoryParentID>870</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <CategoryID>10542</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Real Estate</CategoryName>
         <CategoryParentID>10542</CategoryParentID>
         <LSD>true</LSD>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>316</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Specialty Services</CategoryName>
         <CategoryParentID>316</CategoryParentID>
         <LSD>true</LSD>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>382</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Sporting Goods</CategoryName>
         <CategoryParentID>382</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>64482</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Sports Mem, Cards & Fan Shop</CategoryName>
         <CategoryParentID>64482</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>260</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Stamps</CategoryName>
         <CategoryParentID>260</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>1305</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Tickets</CategoryName>
         <CategoryParentID>1305</CategoryParentID>
         <LSD>true</LSD>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>220</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Toys & Hobbies</CategoryName>
         <CategoryParentID>220</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>3252</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Travel</CategoryName>
         <CategoryParentID>3252</CategoryParentID>
         <LSD>true</LSD>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>1249</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Video Games</CategoryName>
         <CategoryParentID>1249</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <AutoPayEnabled>true</AutoPayEnabled>
         <CategoryID>99</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Everything Else</CategoryName>
         <CategoryParentID>99</CategoryParentID>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <CategoryID>2038</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Live Auctions</CategoryName>
         <CategoryParentID>2038</CategoryParentID>
         <Expired>true</Expired>
         <LSD>true</LSD>
      </Category>
      <Category>
         <BestOfferEnabled>true</BestOfferEnabled>
         <CategoryID>10159</CategoryID>
         <CategoryLevel>1</CategoryLevel>
         <CategoryName>Partner</CategoryName>
         <CategoryParentID>10159</CategoryParentID>
      </Category>
   </CategoryArray>
   <CategoryCount>36</CategoryCount>
   <UpdateTime>2015-06-15T14:51:30.000Z</UpdateTime>
   <CategoryVersion>91</CategoryVersion>
   <ReservePriceAllowed>true</ReservePriceAllowed>
   <MinimumReservePrice>0.0</MinimumReservePrice>
</GetCategoriesResponse>

Back to list of samples

Sample: Details for a Specific Category

Retrieves the details on the specified category.

Description

Magical Bookseller is selling a Harry Potter book and is looking for the best category to list her book. She has found that the US Books category is number 267, and she wants to drill down into that category to find the best category match for her item. This sample retrieves details about the Books child categories (CategoryParent is set to 267).

Input

In this example, a top-level category value is input for CategoryParent, and the request specifies that only the first level of subcategories be returned (LevelLimit is set to 2). Here, DetailLevel is set to ReturnAll, indicating that the user wants to see all the available information for each returned category.

If Magical Bookseller needs to see the entire category tree for Books, she can omit the LevelLimit input parameter.

XML format.

<?xml version="1.0" encoding="utf-8"?>
<GetCategoriesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>ABC...123</eBayAuthToken>
  </RequesterCredentials>
  <CategoryParent>267</CategoryParent>
  <DetailLevel>ReturnAll</DetailLevel>
  <LevelLimit>2</LevelLimit>
</GetCategoriesRequest>

Output

The seller finds that there are 13 sub-categories to the US Books category and she sees that the Fiction Books sub-category is the best sub-category for her Harry Potter title (category number 377). She can also see that the Fiction Books category has no sub-categories of its own (the LeafCategory element is returned and set to true).

With this information, the seller will add her item to the US category number 377. The version of this category hierarchy is 91, as shown in the CategoryVersion field.

XML format.
<GetCategoriesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2009-07-15T17:52:23.899Z</Timestamp>
  <Ack>Success</Ack>
  <Version>619</Version>
  <Build>e619__Bundled_9183565_R1</Build>
  <CategoryArray>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>267</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Books</CategoryName>
      <CategoryParentID>267</CategoryParentID>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>45110</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Accessories</CategoryName>
      <CategoryParentID>267</CategoryParentID>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>29223</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Antiquarian & Collectible</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>29792</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Audiobooks</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>118254</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Catalogs</CategoryName>
      <CategoryParentID>267</CategoryParentID>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>279</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Children's Books</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>11104</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Cookbooks</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>377</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Fiction Books</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>280</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Magazine Back Issues</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>378</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Nonfiction Books</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>2228</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Textbooks, Education</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>29399</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Wholesale & Bulk Lots</CategoryName>
      <CategoryParentID>267</CategoryParentID>
    </Category>
    <Category>
      <BestOfferEnabled>true</BestOfferEnabled>
      <AutoPayEnabled>true</AutoPayEnabled>
      <CategoryID>268</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Other</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <LeafCategory>true</LeafCategory>
    </Category>
  </CategoryArray>
  <CategoryCount>13</CategoryCount>
  <UpdateTime>2009-06-15T14:51:30.000Z</UpdateTime>
  <CategoryVersion>91</CategoryVersion>
  <ReservePriceAllowed>true</ReservePriceAllowed>
  <MinimumReservePrice>0.0</MinimumReservePrice>
</GetCategoriesResponse>

Back to list of samples



Change History

Change Date Description
551
2008-02-07
  • CategoryArray.Category.AutoPayEnabled (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.B2BVATEnabled (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.BestOfferEnabled (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.Expired (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.IntlAutosFixedCat (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.LeafCategory (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.LSD (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.ORPA (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.ORRA (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.SellerGuaranteeEligible (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • CategoryArray.Category.Virtual (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • GetCategories.ReduceReserveAllowed (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
  • GetCategories.ReservePriceAllowed (modified): If this field is to be included in the response (e.g. per the DetailLevel specified in the request), only returned if true. Not returned if false or if not set by eBay.
499
2007-02-07
  • Currency, ReduceReserveInclusive, ReservePriceInclusive (modified): Deleted previously deprecated objects from the latest schema. Some of these objects are still supported with lower request versions. See Deprecated Objects.
1019
2017-06-09
  • CategoryType.CategoryName (modified): The maximum length of a single eBay category name has increased from 30 to 50 characters