POST/bulk_update_price_quantity
This call is used by the seller to update the total ship-to-home quantity of one inventory item, and/or to update the price and/or quantity of one or more offers associated with one inventory item. Up to 25 offers associated with an inventory item may be updated with one bulkUpdatePriceQuantity call. Only one SKU (one product) can be updated per call.
Note: Each listing can be revised up to 250 times in one calendar day. If this revision threshold is reached, the seller will be blocked from revising the item until the next calendar day.
Note: In addition to the authorization
header, which is required for all Inventory API calls, this call also requires the Content-Type
header. See the HTTP request headers for more information.
The getOffers call can be used to retrieve all offers associated with a SKU. The seller will just pass in the correct SKU value through the sku query parameter. To update an offer, the offerId value is required, and this value is returned in the getOffers call response. It is also useful to know which offers are unpublished and which ones are published. To get this status, look for the status value in the getOffers call response. Offers in the published state are live eBay listings, and these listings will be revised with a successful bulkUpdatePriceQuantity call.
An issue will occur if duplicate offerId values are passed through the same offers container, or if one or more of the specified offers are associated with different products/SKUs.
Note: For multiple-variation listings, it is recommended that the bulkUpdatePriceQuantity call be used to update price and quantity information for each SKU within that multiple-variation listing instead of using createOrReplaceInventoryItem calls to update the price and quantity for each SKU. Just remember that only one SKU (one product variation) can be updated per call.
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 |
---|---|---|
requests | array of PriceQuantity | This container is used by the seller to update the total 'ship-to-home' quantity of one or more inventory items (up to 25) and/or to update the price and/or quantity of one or more specific published offers. Occurrence: Required |
requests.offers | array of OfferPriceQuantity | This container is needed if the seller is updating the price and/or quantity of one or more published offers, and a successful call will actually update the active eBay listing with the revised price and/or available quantity. Occurrence: Conditional |
requests.offers.availableQuantity | integer | This field is used if the seller wants to modify the current quantity of the inventory item that will be available for purchase in the offer (identified by the corresponding offerId value). Either the availableQuantity field or the price container is required, but not necessarily both. Occurrence: Conditional |
requests.offers.offerId | string | This field is the unique identifier of the offer. If an offers container is used to update one or more offers associated to a specific inventory item, the offerId value is required in order to identify the offer to update with a modified price and/or quantity. Occurrence: Conditional |
requests.offers.price | Amount | This container is used if the seller wants to modify the current price of the inventory item. The dollar value set here will be the new price of the inventory item in the offer (identified by the corresponding offerId value). Either the availableQuantity field or the price container is required, but not necessarily both. Occurrence: Conditional |
requests.offers.price.currency | string | A three-digit string value representing the type of currency being used. Both the value and currency fields are required/always returned when expressing prices. Occurrence: Conditional |
requests.offers.price.value | string | A string representation of a dollar value expressed in the currency specified in the currency field. Both the value and currency fields are required/always returned when expressing prices. Occurrence: Conditional |
requests.shipToLocationAvailability | ShipToLocationAvailability | This container is needed if the seller is updating the total 'ship-to-home' quantity for the corresponding inventory item (specified in the sku field). A successful call will update the inventory item record associated with the sku value. Occurrence: Conditional |
requests.shipToLocationAvailability.availabilityDistributions | array of AvailabilityDistribution | This container is used to set the available quantity of the inventory item at one or more warehouse locations. Occurrence: Optional |
requests.shipToLocationAvailability.availabilityDistributions.fulfillmentTime | TimeDuration | This container is used to indicate the expected fulfillment time if the inventory item is shipped from the warehouse location identified in the corresponding merchantLocationKey field. The fulfillment time is the estimated number of business days after purchase that the buyer can expect the item to be delivered. Occurrence: Optional |
requests.shipToLocationAvailability.availabilityDistributions.fulfillmentTime.unit | TimeDurationUnitEnum | This enumeration value indicates the time unit used to specify the fulfillment time, such as Occurrence: Conditional |
requests.shipToLocationAvailability.availabilityDistributions.fulfillmentTime.value | integer | The integer value in this field, along with the time unit in the unit field, will indicate the fulfillment time. Occurrence: Conditional |
requests.shipToLocationAvailability.availabilityDistributions.merchantLocationKey | string | The unique identifier of an inventory location where quantity is available for the inventory item. This field is conditionally required to identify the inventory location that has quantity of the inventory item. Occurrence: Conditional |
requests.shipToLocationAvailability.availabilityDistributions.quantity | integer | The integer value passed into this field indicates the quantity of the inventory item that is available at this inventory location. This field is conditionally required. Occurrence: Conditional |
requests.shipToLocationAvailability.quantity | integer | This container is used to set the total 'ship-to-home' quantity of the inventory item that will be available for purchase through one or more published offers. This field is not immediately required, but 'ship-to-home' quantity must be set before an offer of the inventory item can be published. Occurrence: Conditional |
requests.sku | string | This is the seller-defined SKU value of the inventory item whose total 'ship-to-home' quantity will be updated. This field is only required when the seller is updating the total quantity of an inventory item using the shipToLocationAvailability container. If the seller is updating the price and/or quantity of one or more specific offers, one or more offerId values are used instead, and the sku value is not needed. Occurrence: Conditional |
Output
HTTP response headers
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
responses | array of PriceQuantityResponse | This container will return an HTTP status code, offer ID, and SKU value for each offer/inventory item being updated, as well as an errors and/or warnings container if any errors or warnings are triggered while trying to update those offers/inventory items. Occurrence: Always |
responses.errors | array of ErrorDetailV3 | This array will be returned if there were one or more errors associated with the update to the offer or inventory item record. Occurrence: Conditional |
responses.errors.category | string | This string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors. Occurrence: Conditional |
responses.errors.domain | string | The name of the domain in which the error or warning occurred. Occurrence: Conditional |
responses.errors.errorId | integer | A unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. Occurrence: Conditional |
responses.errors.inputRefIds | array of string | An array of one or more reference IDs which identify the specific request element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
responses.errors.longMessage | string | A detailed description of the condition that caused the error or warning, and information on what to do to correct the problem. Occurrence: Conditional |
responses.errors.message | string | A description of the condition that caused the error or warning. Occurrence: Conditional |
responses.errors.outputRefIds | array of string | An array of one or more reference IDs which identify the specific response element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
responses.errors.parameters | array of ErrorParameterV3 | Various warning and error messages return one or more variables that contain contextual information about the error or waring. This is often the field or value that triggered the error or warning. Occurrence: Conditional |
responses.errors.parameters.name | string | This type contains the name and value of an input parameter that contributed to a specific error or warning condition. Occurrence: Conditional |
responses.errors.parameters.value | string | This is the actual value that was passed in for the element specified in the name field. Occurrence: Conditional |
responses.errors.subdomain | string | The name of the subdomain in which the error or warning occurred. Occurrence: Conditional |
responses.offerId | string | The unique identifier of the offer that was updated. This field will not be returned in situations where the seller is only updating the total 'ship-to-home' quantity of an inventory item record. Occurrence: Conditional |
responses.sku | string | This is the seller-defined SKU value of the product. This field is returned whether the seller attempted to update an offer with the SKU value or just attempted to update the total 'ship-to-home' quantity of an inventory item record. Occurrence: Always |
responses.statusCode | integer | The value returned in this container will indicate the status of the attempt to update the price and/or quantity of the offer (specified in the corresponding offerId field) or the attempt to update the total 'ship-to-home' quantity of an inventory item (specified in the corresponding sku field). For a completely successful update of an offer or inventory item record, a value of Occurrence: Always |
responses.warnings | array of ErrorDetailV3 | This array will be returned if there were one or more warnings associated with the update to the offer or inventory item record. Occurrence: Conditional |
responses.warnings.category | string | This string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors. Occurrence: Conditional |
responses.warnings.domain | string | The name of the domain in which the error or warning occurred. Occurrence: Conditional |
responses.warnings.errorId | integer | A unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. Occurrence: Conditional |
responses.warnings.inputRefIds | array of string | An array of one or more reference IDs which identify the specific request element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
responses.warnings.longMessage | string | A detailed description of the condition that caused the error or warning, and information on what to do to correct the problem. Occurrence: Conditional |
responses.warnings.message | string | A description of the condition that caused the error or warning. Occurrence: Conditional |
responses.warnings.outputRefIds | array of string | An array of one or more reference IDs which identify the specific response element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
responses.warnings.parameters | array of ErrorParameterV3 | Various warning and error messages return one or more variables that contain contextual information about the error or waring. This is often the field or value that triggered the error or warning. Occurrence: Conditional |
responses.warnings.parameters.name | string | This type contains the name and value of an input parameter that contributed to a specific error or warning condition. Occurrence: Conditional |
responses.warnings.parameters.value | string | This is the actual value that was passed in for the element specified in the name field. Occurrence: Conditional |
responses.warnings.subdomain | string | The name of the subdomain in which the error or warning occurred. Occurrence: Conditional |
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 | Success |
207 | Multi-Status |
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 |
---|---|---|---|
25001 | API_INVENTORY | APPLICATION | A system error has occurred. {additionalInfo} |
25002 | API_INVENTORY | REQUEST | Any User error. {additionalInfo} |
25709 | API_INVENTORY | REQUEST | Invalid value for {fieldName}. {additionalInfo} |
25759 | API_INVENTORY | REQUEST | shipToLocationAvailability quantity value should be greater than or equal to auction allocation. Please provide valid quantity or unpublish auction offers of the sku. |
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: Updating Price and Quantity
This call will update the total quantity for one or more SKUs, and the price and/or quantity for one or more offers associated with those SKUs.
Input
This call will update four separate offers related to two distinct SKUs. The total ship-to-home quantity for the G********1
product is specified in the shipToLocationAvailability container. The price and quantity for two separate offers associated with this SKU are updated. Notice that the currency types are USD
and GBP
, indicating that one offer is on the eBay US site and the other offer is on the eBay UK site. Similar actions are made for the product identified as G********2
.
POSThttps://api.ebay.com/sell/inventory/v1/bulk_update_price_quantity
Output
A statusCode field is returned for each offer to indicate if the offer was successfully updated. A statusCode value of 200
indicates that the offers were successfully updated. Notice that all four offers were successfully updated and there were no error or warnings for any of the updates.