SDK
Download

Generate and Download API SDKs for eBay

Select the API and Version below, then press the Download Button to receive your zipped SDK.
Please note that the default data converter within the Service Proxy for all APIs has been changed from ISO-8859-1 to UTF-8 as of the SDK releases for Trading (1039), Shopping (1027). You can use an alternative data converter.

Changelog

18 Dec 2023 (php >=5.5.0): Add missing properties to type classes. Some of these properties will end (EOL) for various responses as early as January 31, 2024.
17 Mar 2023: Enable TLS 1.2 for Shopping API Authentication
  • You will need this code change:
  • - $session->setTokenMode(Session::OAUTH_TOKENMODE_ENABLED);
  • + $session->setAuthType(Session::AUTHTYPE_OAUTH)";

26 Jan 2022 (php >=5.5.0): Avoiding a curl warning on failed requests.
24 July 2021 (php >=5.5.0): The Data converter applies body encoding by default.
19 May 2021 (php >=5.5.0): Special handling for the Trading API Type "UploadSiteHostedPictures".
13 May 2021 (php >=5.5.0): Unknown types will not cause errors anymore. We have only known the problem on the playground.
22 Feb 2021 (php >=5.5.0): Deprecated method fixed: "EbatNs_SimpleType::getTypeAttribute". See also the non-deprecated method "listTagAttributes".
19 Feb 2021 (php >=5.5.0): Deprecated methods removed: "EbatNs_SimpleType::get/setTypeAttribute". Use "list/assignTagAttributes" instead.
22 Jan 2021 (php >=5.5.0): The autoload file was missing in some packages. Solved.

Latest Version (php >=5.5.0)

Select an eBay API:
  • Trading
  • Shopping
  • Finding
  • Merchandising
  • Product
  • ProductMetadata
  • ResolutionCaseMgmt (Alpha)
  • BulkDataExchange (Beta)
  • FileTransfer (Beta)
  • Feedback
  • BusinessPoliciesMgmt
  • ReturnManagement (Beta)
Select an API Version:

    Major changes in this version are:

    • more strict property and method visibility
    • does not allow magic property declaration
    • declares wsdl type literal extensions according to its type in php
    • setters and getters are consistently named (setCurrency vs. setcurrency)

    Current Version (php <=5.4.2)

    Select an eBay API:
    • Trading
    • Shopping
    • Finding
    • Merchandising
    • Product
    • ProductMetadata
    • ResolutionCaseMgmt (Alpha)
    • BulkDataExchange (Beta)
    • FileTransfer (Beta)
    • Feedback
    • BusinessPoliciesMgmt
    • ReturnManagement (Beta)
    Select an API Version:

      Legacy Version without namespaces (php <=5.4.2)

      Select an eBay API:
      • Trading
      • Shopping
      • Finding
      • Merchandising
      • Product
      • ProductMetadata
      • ResolutionCaseMgmt (Alpha)
      • BulkDataExchange (Beta)
      • FileTransfer (Beta)
      • Feedback
      • BusinessPoliciesMgmt
      • ReturnManagement (Beta)
      • RelatedItemsMgmt
      Select an API Version:

        Data Converter

        Sometimes you want to change values - passed to the request or received by getters.
        The Data Converter does that!

        Example for the latest SDK versions

        // If you wish to handle your strings ISO encoded:
        // use InTradeSys\eBay\trading\EbatNs_DataConverterIso as DataConverterIso;
        
        // But usually this will fit your needs:
        use InTradeSys\eBay\trading\EbatNs_DataConverter as DataConverter;
        
        class MyDataConverter extends DataConverter
        {
        	public function encodeData($value, $type, $typePropertyName)
        	{
        		// This will cause that every sent partner name is "No Name Ltd."
        		// That only has an effect on requests. It does not change values represented by the model.
        		if ($type === 'ItemType' && $typePropertyName === 'PartnerName') {
        			$value = 'No Name Ltd.';
        
        			// If you wish to skip the encoding or apply your own,
        			// you do not need to call the parent method:
        			return $value;
        		}
        
        		return parent::encodeData($value, $type, $typePropertyName);
        	}
        
        	public function decodeData($value, $type, $typePropertyName)
        	{
        		// This will appear if you call: $itemType->getPartnerName()
        		// It also does not change any values in the model.
        		if ($type === 'ItemType' && $typePropertyName === 'PartnerName' && $value === 'No Name Ltd.') {
        			$value = '-//-';
        		}
        
        		return $value;
        	}
        }
        
        // ...
        $proxy = new Proxy($session, new MyDataConverter());
        // ...
        

        Error
        Unexpected Error!
        Please confirm...