GET/store/categories
This method is used to retrieve the category hierarchy for an eBay user's store.
Note: Three levels of store categories are supported.
Input
Resource URI
This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com
root URI with api.sandbox.ebay.com
URI parameters
This method has no URI parameters.
HTTP request headers
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.
OAuth scope
This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):
https://api.ebay.com/oauth/api_scope/sell.stores
See OAuth access tokens for more information.
Request payload
This call has no payload.
Request fields
This call has no field definitions.
Output
HTTP response headers
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
storeCategories | array of StoreCategoryType | An array of top-level categories defined for the eBay store. A childrenCategories array is used for second and third-level categories, if defined for the store. Occurrence: Always |
storeCategories.categoryId | string | Unique identifier of an eBay Store's custom category. eBay auto-generates this identifier when a seller establishes a custom store category. This category ID should not be confused with an eBay category ID. Occurrence: Always |
storeCategories.categoryName | string | The seller-specified name of the custom category. Occurrence: Always |
storeCategories.childrenCategories | array of StoreCategoryType | This array is returned to show second and third-level store categories. eBay Stores support up to three category levels. Occurrence: Conditional |
storeCategories.childrenCategories.categoryId | string | Unique identifier of an eBay Store's custom category. eBay auto-generates this identifier when a seller establishes a custom store category. This category ID should not be confused with an eBay category ID. Occurrence: Always |
storeCategories.childrenCategories.categoryName | string | The seller-specified name of the custom category. Occurrence: Always |
storeCategories.childrenCategories.childrenCategories | array of StoreCategoryType | This array is returned to show second and third-level store categories. eBay Stores support up to three category levels. Occurrence: Conditional |
storeCategories.childrenCategories.childrenCategories.categoryId | string | Unique identifier of an eBay Store's custom category. eBay auto-generates this identifier when a seller establishes a custom store category. This category ID should not be confused with an eBay category ID. Occurrence: Always |
storeCategories.childrenCategories.childrenCategories.categoryName | string | The seller-specified name of the custom category. Occurrence: Always |
storeCategories.childrenCategories.childrenCategories.childrenCategories | array of StoreCategoryType | This array is returned to show second and third-level store categories. eBay Stores support up to three category levels. Occurrence: Conditional |
storeCategories.childrenCategories.childrenCategories.level | integer | The level indicates the category level of the category tree. Occurrence: Always |
storeCategories.childrenCategories.childrenCategories.order | integer | The order in which the custom store category appears in the list of store categories when the eBay store is visited. Occurrence: Always |
storeCategories.childrenCategories.level | integer | The level indicates the category level of the category tree. Occurrence: Always |
storeCategories.childrenCategories.order | integer | The order in which the custom store category appears in the list of store categories when the eBay store is visited. Occurrence: Always |
storeCategories.level | integer | The level indicates the category level of the category tree. Occurrence: Always |
storeCategories.order | integer | The order in which the custom store category appears in the list of store categories when the eBay store is visited. Occurrence: Always |
HTTP status codes
This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.
Status | Meaning |
---|---|
200 | OK |
400 | Bad Request |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
225000 | API_STORES | APPLICATION | Internal server error encountered. If this problem persists, contact the eBay Developers Program for support. |
225002 | API_STORES | REQUEST | User must have an active store subscription. |
Warnings
This call has no warnings.
Samples
New to making API calls? Please see Making a Call.
Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.
Sample 1: Get information about an eBay Store Category hierarchy
The seller can retrieve information about an eBay Store Category hierarchy.
Input
This call does not use request payload.
GEThttps://api.ebay.com/sell/stores/v1/store/categories
Output
If the call is successful, eBay returns an HTTP status code of 200 OK and information about the eBay Store Category hierarchy.