Skip to main content
Published: January 12 2015, 1:30:00 PMUpdated: July 18 2022, 7:44:25 AM

How can I program defensively and avoid duplicate listings? 


All applications using AddItem, RelistItem family calls should use the Item.UUID parameter.

Duplicate item listings, caused by various operational problems, can lead to a customer support issues. The problem usually happens when no response is returned from the API, or when the calling application has some failure waiting for the response. The root cause can be because the API Call timed out on the API servers or because of operational problems at eBay or because of operational problems with the API application making the AddItem calls. In any case, eBay provides a defensive mechanism with the UUID parameter in the AddItem, RelistItem family of calls to reduce the occurrences of duplicate listings. It takes very little development effort to save potential production headaches.

Note: For AddItem, RelistItem calls, do not use InvocationID, DO use UUID. 

The UUID parameter is a unique identifier for the eBay Item Listing you are sending to eBay.  The UUID parameter is essentially a 32 character GUID (Globally Unique Identifier) with the dashes removed. GUIDs consist of hexadecimal characters only. Most algorithms for creating a GUID use some variation of an Ethernet card MAC address, IP address, system time in milliseconds, random numbers, and MD5 hashes.

Detailed Description

See the following suggestions for creating UUID values on various platforms.

  • .NET SDK:
    You can explicitly set the AddItemCall.AutoSetItemUUID property to true.
    Doing this will automatically fill out the Item.UUID property for you on the Item used in the AddItemCall.
    Or you can explicitly set the Item.UUID field to a value yourself.
    If you choose to set it youself, please use the .NET system library to generate the UUID value as noted in the Win32 Platforms section below.
  • Java SDK:
    You can use the method setAutoSetItemUUID as below:
  • .NET:
    Use the System library to generate the guid:

    Guid oGuid = Guid.NewGuid();
    String sGuid = oGuid.ToString();
    // remove dashes from GUID to convert to UUID
    String sUUID = sGuid.Replace("-",null);
  • PHP
    Use the following line of code in a PHP application (we recommend PHP 4 or later):
    $sUUID = md5(uniqid(rand(), true));
    For more details on using uniqid in PHP, please see the following URL:
    Here's a PHP library based on the Linux libuuid library:
  • Perl
    Here's a good resource for Perl extensions:
  • Java
    There are numerous pure (cross-platform) Java implementations for generating a GUID. Here is one such implementation:

You can also use SKU to avoid duplicate listings. For more information, please refer to

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