GET/access
The getAccess method retrieves the access rules specific to the application; for example, the feed types to which the application has permissions. An application may be constrained to certain marketplaces, and to specific L1 categories within those marketplaces. You can use this information to apply filters to the getFiles method when obtaining details on accessible downloadable files.
Restrictions
For a list of supported sites and other restrictions, see API Restrictions.Input
Resource URI
This method is not supported in Sandbox environment.
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 client credentials 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/buy.item.feed
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 |
---|---|---|
accesses | array of Access | The response payload will contain a list of every feed type the application can access. The marketplaces and L1 categories to which the application is constrained within each feed are also returned. If no marketplaces are listed for a particular feed type, the application has access to all marketplaces. L1 categories are constrained according to marketplace. If a marketplace is listed with no L1 categories, the application has access to all categories in that marketplace. See Sample 1: getAccess Request below. Occurrence: Always |
accesses.constraints | array of FeedTypeConstraint | This array shows the eBay marketplace and eBay L1 categories that the corresponding feed type applies to. If there are no marketplaceId constraints, the application has access to all marketplaces. If there are no categoryId constraints, then the application has access to all categories within the given marketplace. Occurrence: Always |
accesses.constraints.categoryIds | array of string | An array of the eBay categories the application can access in a feed. See the Taxonomy API for details about obtaining a list eBay L1 categories. The category is expressed as the category's categoryId, not its categoryName; e.g., Occurrence: Conditional |
accesses.constraints.marketplaceId | MarketplaceIdEnum | This enum value indicates an eBay marketplace for which the application can access feed files for the corresponding feed type Occurrence: Conditional |
accesses.feedType | string | The identifier of the feed type that the application has access to. 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 |
204 | No Content |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
13006 | API_FEED | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay developer support for assistance. |
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: getAccess Request
This call returns an array of constraints on the callling application, defining the marketplaces and categories it can access. This method does not require a request payload or any URI parameters.
Input
The URI requires no additional input.
GEThttps://api.ebay.com/buy/feed/v1/access
Output
The output shows that the application has access to 3 feed types: CURATED_ITEM_FEED, TEST_FEED, and GENERIC FEED.
The CURATED_ITEM_FEED is limited to 2 markets: the French market, where it is further limited to categories 1249, 625, and 11232; and the US market, where it is further limited to categories 11700, 888, and 26395.
The TEST_FEED has unlimited access to all categories within the French marketplace and access to categories 11700, 888, and 26395 in the US marketplace.
The GENERIC_FEED has access to all categories within all marketplaces.