Shopping API863

GetCategoryInfo

This call retrieves high-level category information, relevant for a buy-side application. You can use this call to get details about a category and its children. The category version and the time of the last category hierarchy update is also returned with the call.

This call always returns category information for the specified category ID, and will return all categories at one level below the specified category if IncludeSelector is used in the call request.

Usage Details

If you only want information on the specified category, you may choose not to use IncludeSelector. Another case where you might choose not to use IncludeSelector in this call is when you want to get the category version and the date and time of the last update so that you can figure out when to update your locally-stored category hierarchy data.

If the version hasn't changed since the last time you retrieved the category data, then your app doesn't have to take the time (or use up your API call limit) to retrieve all the category data again. So, if you check the version about once a day, you can figure out when you need to update your locally stored category info.

By using IncludeSelector, you can use this call to build a category browser like the ones you see on the eBay website. You can call GetCategoryInfo multiple times to build a full or partial category hierarchy. Use a category ID of -1 (the root category ID) on the first call to get all the level 1 categories, then use a level 1 category ID on the second call to get all the level 2 children of the specified category ID, and so forth.

You can continue drilling down this way to get all the categories (or just drill down one node of interest to get, say, all Sporting Goods categories).

If you are dealing with the same categories all the time, or lots of different categories, you can save yourself from making a lot of calls (and using up your API call limit) by storing the category data locally and then looking up the category information in your local data store instead of making this call.



Back to top

GetCategoryInfo Input

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 Samples.

<?xml version="1.0" encoding="utf-8"?>
<GetCategoryInfoRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Input Fields -->
  <CategoryID> string </CategoryID>
  <IncludeSelector> string </IncludeSelector>
  <!-- Standard Input Fields -->
  <MessageID> string </MessageID>
</GetCategoryInfoRequest>
Argument Type Occurrence Meaning
Call-specific Input Fields [Jump to standard fields]
CategoryID string Required Use an ID of -1 to retrieve the root category and the top-level (level 1) meta categories. You can determine other CategoryIDs from the response from this call, or from a specific item (retrieved from another call like GetSingleItem), or from the eBay website.
Max length: 19 (Note: The eBay database specifies 38. Currently, Category ID's are usually 9 to 12 digits).
IncludeSelector string Optional Defines standard subsets of fields to return within the response. If you don't specify this field, the call returns a default set of fields. If you specify this field, the additional fields (child categories) you retrieve can affect the call's response time (decrease performance). Applicable values:

•   ChildCategories

Include the first level of child categories for the specified parent.

See:
    Detail Controls
    GetCategoryInfo Samples

Standard Input Fields  
MessageID string Optional If you pass a value in MessageID in a request, we'll return the same value in CorrelationID in the response. If you're making a lot of calls, you can use this for tracking that a response is returned for every request and to match particular responses to particular requests. (In this case, specify a different value for each request.) You can specify any value that is useful to you.



Back to top

GetCategoryInfo Output

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 Samples.

<?xml version="1.0" encoding="utf-8"?>
<GetCategoryInfoResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Output Fields -->
  <CategoryArray> CategoryArrayType
    <Category> CategoryType
      <CategoryID> string </CategoryID>
      <CategoryIDPath> string </CategoryIDPath>
      <CategoryLevel> int </CategoryLevel>
      <CategoryName> string </CategoryName>
      <CategoryNamePath> string </CategoryNamePath>
      <CategoryParentID> string </CategoryParentID>
      <LeafCategory> boolean </LeafCategory>
    </Category>
    <!-- ... more Category nodes allowed here ... -->
  </CategoryArray>
  <CategoryCount> int </CategoryCount>
  <CategoryVersion> string </CategoryVersion>
  <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 ... -->
  <Timestamp> dateTime </Timestamp>
  <Version> string </Version>
</GetCategoryInfoResponse>
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.

IncludeSelector: none (not controlled by IncludeSelector)
CategoryArray.Category CategoryType Always,
repeatable: [1..*]
Contains details about a category.

IncludeSelector: none (not controlled by IncludeSelector)
CategoryArray.Category
  .CategoryID
string Always The numeric ID of a category on eBay.

Use an ID of -1 to retrieve the root category and the top-level (level 1) meta categories. You can determine other CategoryIDs from the response from this call, or from a specific item (retrieved from another call like GetSingleItem), or from the eBay website.

IncludeSelector: none (not controlled by IncludeSelector)
CategoryArray.Category
  .CategoryIDPath
string Always The fully qualified category ID (e.g., 11700:20625:20635 for Home & Garden:Kitchen:Tools & Gadgets).

IncludeSelector: none (not controlled by IncludeSelector)
CategoryArray.Category
  .CategoryLevel
int Always The level where the category fits in the site's category hierarchy. For example, if this field has a value of 2, then the category is 2 levels below the root category.

Note that the value of CategoryLevel will always be 1 level below the level of the requested category. To retrieve a category's children, pass its CategoryID back into the request.


IncludeSelector: none (not controlled by IncludeSelector)
CategoryArray.Category
  .CategoryName
string Always Display name of the category as it would appear on the eBay Web site.

IncludeSelector: none (not controlled by IncludeSelector)
CategoryArray.Category
  .CategoryNamePath
string Always The fully qualified category display name as it would appear on the eBay site (e.g., Home & Garden:Kitchen:Tools & Gadgets).

IncludeSelector: none (not controlled by IncludeSelector)
CategoryArray.Category
  .CategoryParentID
string Always Category ID identifying a category that is an ancestor of the category indicated in CategoryID.

IncludeSelector: none (not controlled by IncludeSelector)
CategoryArray.Category
  .LeafCategory
boolean Always If true, indicates that the category indicated in CategoryID is a leaf category, in which items may be listed (if the category is not also expired or virtual).

IncludeSelector: none (not controlled by IncludeSelector)
CategoryCount int Always Indicates the number of categories returned (i.e., the number of CategoryType objects in CategoryArray).

IncludeSelector: none (not controlled by IncludeSelector)
CategoryVersion string Always Indicates the version of the category hierarchy on the specified eBay site.

IncludeSelector: none (not controlled by IncludeSelector)
UpdateTime dateTime Always Indicates the last date and time that eBay modified the category hierarchy for the specified eBay site.

IncludeSelector: none (not controlled by IncludeSelector)
Standard Output Fields  
Ack AckCodeType Always Indicates whether the call was successfully processed by eBay.

Applicable values:

•   CustomCode

(out) Reserved for internal or future use.

•   Failure

(out) Request processing failed

•   Success

(out) Request processing succeeded

•   Warning

(out) Request processing completed with warning information being included in the response message


(Not all values in AckCodeType apply to this field.)
Build string Always This refers to the particular 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 If you pass a value in MessageID in a request, we will return the same value in CorrelationID in the response. You can use this for tracking that a response is returned for every request and to match particular responses to particular requests. Only returned if MessageID was used.
Errors ErrorType Conditionally,
repeatable: [0..*]
A list of application-level errors or warnings (if any) that were raised when eBay processed the request.

Application-level errors occur due to problems with business-level data on the client side or on the eBay server side. For example, an error would occur if the request contains an invalid combination of fields, or it is missing a required field, or the value of the field is not recognized. An error could also occur if eBay encountered a problem in our internal business logic while processing the request.

Only returned if there were warnings or errors.
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.


See Errors by Number.

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 Errors by Number.

Errors.ErrorParameters ErrorParameterType Conditionally,
repeatable: [0..*]
Some warning and error messages return one or more variables that contain contextual information about the error. This is often the field or value that triggered the error. You can usually predict where these will occur by looking at the "replaceable_value" indicators in our Errors by Number page.

See Errors by Number.

Errors.ErrorParameters
  [ attribute ParamID ]
string Conditionally The index of the parameter in the error.
Errors.ErrorParameters.Value string Conditionally The value of the variable.
Errors.LongMessage string Conditionally A more detailed description of the condition that raised the error.

See Errors by Number.

Errors.SeverityCode SeverityCodeType Conditionally Indicates whether the error caused the request to fail.

If the request fails and the source of the problem is within the application (such as a missing required element), please 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, you 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.

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.

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.

•   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.


See:
    Errors by Number
    Checklist for Going Live for more information see the eBay Features Guide.

Errors.ShortMessage string Conditionally A brief description of the condition that raised the error.

See Errors by Number.

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 "dateTime" type for information about this time format and converting to and from the GMT time zone.
Version string Always The release version that eBay used to process the request.

Note: This is usually the latest release version, as specified in the release notes. (eBay releases the API to international sites about a week after we release it to the US site.)

If a field in the response returns the token "CustomCode", it usually means that the field is a code type (a token or enumeration), and that in your request URL (or HTTP header) you specified a version that is older than the version in which the token was added to the call.

See Schema Versioning Strategy.



Back to top

GetCategoryInfo Detail Controls


IncludeSelector

The IncludeSelector input field gives you control over which call-specific output fields may be returned from your queries. IncludeSelector accepts a set of preset values, each of which permits the return of a different set of fields. (All standard output fields are returned regardless of IncludeSelector.)



Back to top

GetCategoryInfo Samples

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

Note: Some data in these samples might no longer be active. If necessary, you can substitute current data in your requests.

Available samples:

Sample: Basic Call

Retrieve high-level category information for a specified category.

Input

In this example, a CategoryID is specified, and high-level category information is returned, including the CategoryLevel, the CategoryName, and the CategoryParentID. The CategoryNamePath and the CategoryIDPath are also returned to show the category name and category ID hierarchies, respectively (these values are useful in assembling a navigable bread crumb). A true value for the LeafCategory field indicates that the specified category is a leaf category (a category in which an item may be listed). You can determine other CategoryID values from responses pertaining to a specific item (retrieved from another call like findItemsAdvanced (Finding API) or GetSingleItem), or from the eBay website.

If you are unfamiliar with the ID for a specific category, you can use the Trading API to optain a list of CategoryID values for a specific site.

URL format (HTTP GET). See also the non-wrapped version of this URL. For results in a format other than XML, 
specify a different value for responseencoding.
http://open.api.ebay.com/Shopping?
   callname=GetCategoryInfo&
   appid=YourAppID&
   version=677&
   siteid=0&
   CategoryID=279

   Here is the same input in XML format (HTTP POST). Note that this does not include standard values.

XML format (HTTP POST). Also available is the .txt version of this XML.

<?xml version="1.0" encoding="utf-8"?>
<GetCategoryInfoRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <CategoryID>279</CategoryID>
</GetCategoryInfoRequest>

Output

This example shows the default output that you can obtain using this call.

XML format. Also available is the .txt version of this XML.

<?xml version="1.0" encoding="UTF-8"?>
<GetCategoryInfoResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2010-07-20T01:19:28.101Z</Timestamp>
  <Ack>Success</Ack>
  <Build>E677_CORE_BUNDLED_11578566_R1</Build>
  <Version>677</Version>
  <CategoryArray>
    <Category>
      <CategoryID>279</CategoryID>
      <CategoryLevel>2</CategoryLevel>
      <CategoryName>Children & Young Adults</CategoryName>
      <CategoryParentID>267</CategoryParentID>
      <CategoryNamePath>Books:Children & Young Adults</CategoryNamePath>
      <CategoryIDPath>267:279</CategoryIDPath>
      <LeafCategory>true</LeafCategory>
    </Category>
  </CategoryArray>
  <CategoryCount>1</CategoryCount>
  <UpdateTime>2010-06-14T01:56:46.000Z</UpdateTime>
  <CategoryVersion>95</CategoryVersion>
</GetCategoryInfoResponse>

Back to list of samples

Sample: Retrieve high-level category information for the specified category and children.

Retrieves high-level category information for the specified category and all of its children one level down.

Input

By using a CategoryID of -1, and including the ChildCategories IncludeSelector, this sample shows the top- level (Level 1) categories for the eBay US site. To build a complete or partial local category hierarchy, the developer should systematically iterate through each non- leaf category (LeafCategory = false), using the category ID of each non-leaf category and including the ChildCategories IncludeSelector for each successive call.

URL format (HTTP GET). See also the non-wrapped version of this URL. For results in a format other than XML, 
specify a different value for responseencoding.
http://open.api.ebay.com/Shopping?
   callname=GetCategoryInfo&
   appid=YourAppID&
   version=675&
   siteid=0&
   CategoryID=-1&
   IncludeSelector=ChildCategories

   Here is the same input in XML format (HTTP POST). Note that this does not include standard values.

XML format (HTTP POST). Also available is the .txt version of this XML.

<?xml version="1.0" encoding="utf-8"?>
<GetCategoryInfoRequest xmlns="urn:ebay:apis:eBLBaseComponents">
   <CategoryID>-1</CategoryID>
   <IncludeSelector>ChildCategories</IncludeSelector>
</GetCategoryInfoRequest>

Output

This example shows the default output that you can obtain using this call.

XML format. Also available is the .txt version of this XML.

<?xml version="1.0" encoding="UTF-8"?>
<GetCategoryInfoResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2010-07-20T01:27:48.273Z</Timestamp>
  <Ack>Success</Ack>
  <Build>E675_CORE_BUNDLED_11481347_R1</Build>
  <Version>675</Version>
  <CategoryArray>
    <Category>
      <CategoryID>-1</CategoryID>
      <CategoryLevel>0</CategoryLevel>
      <CategoryName>Root</CategoryName>
      <CategoryParentID>0</CategoryParentID>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>20081</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Antiques</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Antiques</CategoryNamePath>
      <CategoryIDPath>20081</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>550</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Art</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Art</CategoryNamePath>
      <CategoryIDPath>550</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>2984</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Baby</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Baby</CategoryNamePath>
      <CategoryIDPath>2984</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>267</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Books</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Books</CategoryNamePath>
      <CategoryIDPath>267</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>12576</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Business & Industrial</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Business & Industrial</CategoryNamePath>
      <CategoryIDPath>12576</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>625</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Cameras & Photo</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Cameras & Photo</CategoryNamePath>
      <CategoryIDPath>625</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>15032</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Cell Phones & PDAs</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Cell Phones & PDAs</CategoryNamePath>
      <CategoryIDPath>15032</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>11450</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Clothing, Shoes & Accessories</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Clothing, Shoes & Accessories</CategoryNamePath>
      <CategoryIDPath>11450</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>11116</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Coins & Paper Money</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Coins & Paper Money</CategoryNamePath>
      <CategoryIDPath>11116</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>1</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Collectibles</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Collectibles</CategoryNamePath>
      <CategoryIDPath>1</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>58058</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Computers & Networking</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Computers & Networking</CategoryNamePath>
      <CategoryIDPath>58058</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>14339</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Crafts</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Crafts</CategoryNamePath>
      <CategoryIDPath>14339</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>237</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Dolls & Bears</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Dolls & Bears</CategoryNamePath>
      <CategoryIDPath>237</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>11232</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>DVDs & Movies</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>DVDs & Movies</CategoryNamePath>
      <CategoryIDPath>11232</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>293</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Electronics</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Electronics</CategoryNamePath>
      <CategoryIDPath>293</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>45100</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Entertainment Memorabilia</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Entertainment Memorabilia</CategoryNamePath>
      <CategoryIDPath>45100</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>31411</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Gift Certificates</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Gift Certificates</CategoryNamePath>
      <CategoryIDPath>31411</CategoryIDPath>
      <LeafCategory>true</LeafCategory>
    </Category>
    <Category>
      <CategoryID>26395</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Health & Beauty</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Health & Beauty</CategoryNamePath>
      <CategoryIDPath>26395</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>11700</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Home & Garden</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Home & Garden</CategoryNamePath>
      <CategoryIDPath>11700</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>281</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Jewelry & Watches</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Jewelry & Watches</CategoryNamePath>
      <CategoryIDPath>281</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>11233</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Music</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Music</CategoryNamePath>
      <CategoryIDPath>11233</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>619</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Musical Instruments</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Musical Instruments</CategoryNamePath>
      <CategoryIDPath>619</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>1281</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Pet Supplies</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Pet Supplies</CategoryNamePath>
      <CategoryIDPath>1281</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>870</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Pottery & Glass</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Pottery & Glass</CategoryNamePath>
      <CategoryIDPath>870</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>10542</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Real Estate</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Real Estate</CategoryNamePath>
      <CategoryIDPath>10542</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>316</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Specialty Services</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Specialty Services</CategoryNamePath>
      <CategoryIDPath>316</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>382</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Sporting Goods</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Sporting Goods</CategoryNamePath>
      <CategoryIDPath>382</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>64482</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Sports Mem, Cards & Fan Shop</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Sports Mem, Cards & Fan Shop</CategoryNamePath>
      <CategoryIDPath>64482</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>260</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Stamps</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Stamps</CategoryNamePath>
      <CategoryIDPath>260</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>1305</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Tickets</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Tickets</CategoryNamePath>
      <CategoryIDPath>1305</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>220</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Toys & Hobbies</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Toys & Hobbies</CategoryNamePath>
      <CategoryIDPath>220</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>3252</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Travel</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Travel</CategoryNamePath>
      <CategoryIDPath>3252</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>1249</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Video Games</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Video Games</CategoryNamePath>
      <CategoryIDPath>1249</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>99</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Everything Else</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Everything Else</CategoryNamePath>
      <CategoryIDPath>99</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>2038</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Live Auctions</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Live Auctions</CategoryNamePath>
      <CategoryIDPath>2038</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
    <Category>
      <CategoryID>10159</CategoryID>
      <CategoryLevel>1</CategoryLevel>
      <CategoryName>Partner</CategoryName>
      <CategoryParentID>-1</CategoryParentID>
      <CategoryNamePath>Partner</CategoryNamePath>
      <CategoryIDPath>10159</CategoryIDPath>
      <LeafCategory>false</LeafCategory>
    </Category>
  </CategoryArray>
  <CategoryCount>37</CategoryCount>
  <UpdateTime>2010-06-14T01:56:46.000Z</UpdateTime>
  <CategoryVersion>95</CategoryVersion>
</GetCategoryInfoResponse>

Back to list of samples

Sample: Retrieve CategoryVersion and UpdateTime.

Retrieves the current category version and the date and time of the last category hierarchy update.

Input

This sample is useful for developers who maintain a local version of all or part of the eBay category structure, and only want to make sure that they are using the latest category version. The only call-specific input field you need to specify in the input is CategoryID. The root category (-1) is used, since it is not subject to change.

URL format (HTTP GET). See also the non-wrapped version of this URL. For results in a format other than XML, 
specify a different value for responseencoding.
http://open.api.ebay.com/Shopping?
   callname=GetCategoryInfo&
   appid=YourAppID&
   version=677&
   siteid=0&
   CategoryID=-1

   Here is the same input in XML format (HTTP POST). Note that this does not include standard values.

XML format (HTTP POST). Also available is the .txt version of this XML.

<?xml version="1.0" encoding="utf-8"?>
<GetCategoryInfoRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <CategoryID>-1</CategoryID>
</GetCategoryInfoRequest>

Output

This example shows the default output that you can obtain using this call.

XML format. Also available is the .txt version of this XML.

<?xml version="1.0" encoding="UTF-8"?>
<GetCategoryInfoResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2010-07-20T01:30:59.045Z</Timestamp>
  <Ack>Success</Ack>
  <Build>E677_CORE_BUNDLED_11578566_R1</Build>
  <Version>677</Version>
  <CategoryArray>
    <Category>
      <CategoryID>-1</CategoryID>
      <CategoryLevel>0</CategoryLevel>
      <CategoryName>Root</CategoryName>
      <CategoryParentID>0</CategoryParentID>
      <LeafCategory>false</LeafCategory>
    </Category>
  </CategoryArray>
  <CategoryCount>1</CategoryCount>
  <UpdateTime>2010-06-14T01:56:46.000Z</UpdateTime>
  <CategoryVersion>95</CategoryVersion>
</GetCategoryInfoResponse>

Back to list of samples



Back to top

GetCategoryInfo Change History

Version Description
679
2010-07-21
  • (doc change) Added two new call samples and revised the existing call sample. The three call samples address three different use cases.
535
2007-10-17
  • (doc change) Added more detailed usage information, revised sample, and updated Include Selector information in CategoryType.
533
2007-10-03
  • (added) New call

Back to top

User-Contributed Notes

 

Copyright © 2006–2014 eBay, Inc. All rights reserved. This documentation and the API may only be used in accordance with the eBay Developers Program and API License Agreement.