inventory API1.5.0

bulkUpdatePriceQuantity

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.

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.

The authorization header is the only required HTTP header for this call. See the HTTP request headers section for more information.

Input

Resource URI (production)

POST https://api.ebay.com/sell/inventory/v1/bulk_update_price_quantity

URI parameters

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

OAuth scope

This request requires a User access token with the following scope(s):

https://api.ebay.com/oauth/api_scope/sell.inventory

See Oauth access tokens for more information.

Input container/fieldTypeDescription
requestsarray of PriceQuantityThis 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.skustringThis 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.

If the seller wants to update the price and/or quantity of one or more offers, and also wants to update the total 'ship-to-home' quantity of the corresponding inventory item, the SKU value associated with the offerId value(s) must be the same as the corresponding sku value that is passed in, or an error will occur.

Max Length: 50

Occurrence: Conditional

requests.shipToLocationAvailabilityShipToLocationAvailabilityThis 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.quantityintegerThis 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 container is not immediately required, but 'ship-to-home' quantity must be set before an offer of the inventory item can be published.

If an existing inventory item is being updated, and the 'ship-to-home' quantity already exists for the inventory item record, this container should be included again, even if the value is not changing, or the available quantity data will be lost.

Occurrence: Conditional

requests.offersarray of OfferPriceQuantityThis 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.

This call is not designed to work with unpublished offers. For unpublished offers, the seller should use the updateOffer call to update the available quantity and/or price.

If the seller is also using the shipToLocationAvailability container and sku field to update the total 'ship-to-home' quantity of the inventory item, the SKU value associated with the corresponding offerId value(s) must be the same as the corresponding sku value that is passed in, or an error will occur.

A separate (OfferPriceQuantity) node is required for each offer being updated.

Occurrence: Conditional

requests.offers.offerIdstringThis 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.

The seller can run a getOffers call (passing in the correct SKU value as a query parameter) to retrieve offerId values for offers associated with the SKU.

Occurrence: Conditional

requests.offers.availableQuantityintegerThis 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.priceAmountThis 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.valuestringA 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.offers.price.currencystringA three-digit string value respresenting the type of currency being used. Both the value and currency fields are required/always returned when expressing prices. See the CurrencyCodeEnum type for the full list of currencies and their corresponding three-digit string values.

Occurrence: Conditional

Output

HTTP response headers

Output container/fieldTypeDescription
responsesarray of PriceQuantityResponseThis 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.statusCodeintegerThe 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 200 will appear in this field. For a partially successful call, a value of 207 will appear in this field. A value of 204 will appear in this field if the response payload has no content.

Occurrence: Always

responses.skustringThis 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.

Max Length: 50

Occurrence: Always

responses.offerIdstringThe 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.errorsarray of ErrorDetailV3This container 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.errorIdintegerA 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.domainstringThe name of the domain in which the error or warning occurred.

Occurrence: Conditional

responses.errors.subdomainstringThe name of the subdomain in which the error or warning occurred.

Occurrence: Conditional

responses.errors.categorystringThis string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors.

Occurrence: Conditional

responses.errors.messagestringA description of the condition that caused the error or warning.

Occurrence: Conditional

responses.errors.parametersarray of ErrorParameterV3Various 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.valuestringThis is the actual value that was passed in for the element specified in the name field.

Occurrence: Conditional

responses.errors.parameters.namestringThis is the name of input field that caused an issue with the call request.

Occurrence: Conditional

responses.errors.longMessagestringA 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.inputRefIdsarray of stringAn 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.outputRefIdsarray of stringAn 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.warningsarray of ErrorDetailV3This container 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.errorIdintegerA 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.domainstringThe name of the domain in which the error or warning occurred.

Occurrence: Conditional

responses.warnings.subdomainstringThe name of the subdomain in which the error or warning occurred.

Occurrence: Conditional

responses.warnings.categorystringThis string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors.

Occurrence: Conditional

responses.warnings.messagestringA description of the condition that caused the error or warning.

Occurrence: Conditional

responses.warnings.parametersarray of ErrorParameterV3Various 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.valuestringThis is the actual value that was passed in for the element specified in the name field.

Occurrence: Conditional

responses.warnings.parameters.namestringThis is the name of input field that caused an issue with the call request.

Occurrence: Conditional

responses.warnings.longMessagestringA 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.inputRefIdsarray of stringAn 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.outputRefIdsarray of stringAn 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

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.

StatusMeaning
200Success
207Multi-Status
400Bad Request
500Internal Server Error

Error codes

CodeDomainCategoryMeaning
25001API_INVENTORYAPPLICATIONA system error has occurred. {additionalInfo}
25709API_INVENTORYREQUESTInvalid value for {fieldName}. {additionalInfo}

Samples

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

Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current 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 GP-Cam-01 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 GP-Cam-02.
POST
https://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.