Skip to main content
Published: August 10 2010, 11:36:00 PMUpdated: November 28 2020, 8:33:50 PM

ReviseInventoryStatus an efficient light-weight call that we recommend sellers use when they want to revise price and/or quantity of their fixed-price listing. The call allows you to revise these parameters for 4 items in a single request.

Here is a Java ReviseInventoryStatus sample. This sample has been written using the Java SDK v673

Below is the code.

/*  © 2010-2012 eBay Inc., All Rights Reserved */
/* Licensed under CDDL 1.0 - */

package com.ebay.sample;

import com.ebay.sdk.ApiContext;
import com.ebay.sdk.ApiCredential;
import com.ebay.sdk.ApiException;
import com.ebay.sdk.SdkException;
import com.ebay.soap.eBLBaseComponents.AmountType;
import com.ebay.soap.eBLBaseComponents.CurrencyCodeType;
import com.ebay.soap.eBLBaseComponents.InventoryStatusType;
import com.ebay.soap.eBLBaseComponents.SiteCodeType;

* Sample code for ReviseInventoryStatus API using eBay Java SDK.
* Steps for creating a successful ReviseInventoryStatus call.
* 1. Create API Context and set the right credentials.
* 2. Create one InventoryStatusType object for each SKU/Item to be updated.
* 3. Do the necessary changes to the InventoryStatusType object. For setting price, an AmountType object is needed.
* 4. Add all the InventoryStatusType objects to an InventoryStatusType array.
* 5. Set this array to the ReviseInventoryStatusCall object with setInventoryStatus().
* 6. Call the ReviseInventoryStatusCall#reviseInventoryStatus() method.
* The following code sample updates inventory (quantity, price or both) for four items belonging to a user.
public class ReviseInventoryStatusSample {

     public static void reviseInventoryStatus() {
          ApiContext apiContext = new ApiContext(); // Create a new APIContext Object
          // set Api Token to access eBay Api Server
          ApiCredential cred = apiContext.getApiCredential();
          apiContext.setApiServerUrl("");// Pointing to SandBox for testing
          // Enable logging of SOAP requests and responses. Recommended only for testing/debugging.
          apiContext.setSite(SiteCodeType.UK); // Set site to UK
          // Create a new ReviseInventoryStatusCall and initialize it with the APIContext
          ReviseInventoryStatusCall risCall = new ReviseInventoryStatusCall(

          // Revise quantity and price
          InventoryStatusType invStatus1 = new InventoryStatusType();

          AmountType newAmtForSKU1 = new AmountType();

          InventoryStatusType invStatus2 = new InventoryStatusType();

          AmountType newAmtForSKU2 = new AmountType();

          // Revise Price Only
          InventoryStatusType invStatus3 = new InventoryStatusType();

          AmountType newAmtForSKU3 = new AmountType();

          // Revise Quantity Only
          InventoryStatusType invStatus4 = new InventoryStatusType();

          // Add all the items to be revised, to an array.
          InventoryStatusType[] invStatuses = new InventoryStatusType[] {
                    invStatus1, invStatus2, invStatus3, invStatus4 };
          // Add exception handling - Most of these exceptions can be fatal.
          try {
               risCall.setInventoryStatus(invStatuses);// add the array to the main call
          } catch (ApiException e) {
          } catch (SdkException e) {
          } catch (Exception e) {


     public static void main(String[] args) {


The request XML is attached to this article. You can use the API test tool to execute the request in sandbox and see how it works.

How well did this answer your question?
Answers others found helpful