POST/inventory_task
This method creates an inventory-related download task for a specified feed type with optional filter criteria. When using this method, specify the feedType.
This method returns the location response header containing the getInventoryTask call URI to retrieve the inventory task you just created. The URL includes the eBay-assigned task ID, which you can use to reference the inventory task.
To retrieve the status of the task, use the getInventoryTask method to retrieve a single task ID or the getInventoryTasks method to retrieve multiple task IDs.
Note: The scope depends on the feed type. An error message results when an unsupported scope or feed type is specified.
Presently, this method supports Active Inventory Report. The ActiveInventoryReport returns a report that contains price and quantity information for all of the active listings for a specific seller. A seller can use this information to maintain their inventory on eBay.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.
The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.
Header | Type | Description |
---|---|---|
Content-Type | string | This header indicates the format of the request body provided by the client. Its value should be set to application/json. For more information, refer to HTTP request headers. Occurrence: Required |
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.inventory
See OAuth access tokens for more information.
Request payload
Copy complete valid JSON to clipboardRequest fields
Input container/field | Type | Description |
---|---|---|
feedType | string | The feed type associated with the inventory task you are about to create. Presently, only one feed type is available:
Occurrence: Required |
filterCriteria | InventoryFilterCriteria | This container allows a seller to create an ActiveInventoryReport for a single listing format. Occurrence: Optional |
filterCriteria.listingFormat | ListingFormatEnum | The listing format for the ActiveInventoryReport being created. Supported types are:
Occurrence: Optional |
schemaVersion | string | The version number of the inventory task to use for the feedType. Occurrence: Required |
Output
HTTP response headers
See HTTP response headers for details.
Header | Meaning |
---|---|
Location | The location response header contains the URL to the inventory task. The URL includes the eBay-assigned task ID, which you can use to reference the task. |
Response payload
This call has no payload.
Response fields
This call has no field definitions.
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 |
---|---|
202 | Accepted |
400 | Bad Request |
403 | Forbidden |
409 | Conflict |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
160001 | API_FEED | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance. |
160002 | API_FEED | REQUEST | The authentication scope {scope} is incorrect for 'feed_type' {feedType}. Refer to documentation for details about the scopes. |
160017 | API_FEED | REQUEST | The 'feedType' is missing or invalid. |
160018 | API_FEED | REQUEST | The 'schemaVersion' is invalid. |
160019 | API_FEED | REQUEST | The 'filterCriteria' is invalid. {additionalInfo} |
160022 | API_FEED | REQUEST | You are not allowed to access this resource. Contact eBay Developer Technical Support for assistance. |
160024 | API_FEED | BUSINESS | You have reached the maximum number of feed tasks that can be queued or processed concurrently. Wait for current tasks to complete before adding tasks. For more information, see the documentation for this API. |
160025 | API_FEED | BUSINESS | You have exceeded the maximum number of records or tasks that can be created or processed in the period (hourly or daily). Wait until the present period ends before trying again. Please reference the API documentation for more information. |
160027 | API_FEED | REQUEST | The X-EBAY-C-MARKETPLACE-ID header is missing or invalid. |
160030 | API_FEED | REQUEST | This resource is not applicable for the feed type {feedTypeValue}. For more information, see the documentation for this API. |
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: Create an Inventory Task
This call creates an inventory-related task to download the LMS Active Inventory Report, which contains price and quantity information for all the active listings for a specific seller.
Input
The inputs are schemaVersion and feedType.
POSThttps://api.ebay.com/sell/feed/v1/inventory_task
Output
The output is an HTTP status. If the call is successful, the task ID is returned in the Location response header.