Tradera.com logotype

Tradera Developer Program

PublicService

Documentation Version 3 > PublicService

Services that can be called without any specific authorization (except for a Developer account).

The following operations are supported. For a formal definition, please review the Service Description.

  • FetchToken

    Returns a previously created authorization token for the specified user.

    Parameters
    1. userId, The Id of the user
    2. secretKey, The secret key used when the token was created documentation
    Returns

    The authorization Token object

    Code Example

    This PHP example show how this method can be used to retrieve the token.

      1:
      2:
      3:
      4:
      5:
      6:
      7:
      8:
      9:
     10:
     11:
     12:
     13:
     14:
     15:
     16:
     17:
     18:
     19:
     20:
     21:
     22:
     23:
     24:
     25:
     26:
     27:
     28:
     29:
     30:
     31:
     32:
     33:
     34:
     35:
     36:
    
    try {
    	// Replace the following variables with your own key management
    	// $APPLICATION_KEY
    	// $APPLICATION_ID
    	// $USER_ID
    	// $SECRET_KEY - this is the same key (skey) used when logging on userr
    	$userId = $USER_ID;
    	$secretKey = $SECRET_KEY;
    	$appId = $APPLICATION_ID;
    	$appKey = $APPLICATION_KEY;
    	
    	$publicServiceUrl = 'https://api.tradera.com/v3/PublicService.asmx';
    
    	$publicServiceUrlWithAuth = $publicServiceUrl
    					. '?appId=' . $appId
    					. '&appKey=' . $appKey;
    
    	$publicClient = new SoapClient(
    		$publicServiceUrl . '?WSDL',
    		array('location' => $publicServiceUrlWithAuth)
    	);
    
    	// Parameters for call to FetchToken
    	$fetchTokenParams = new StdClass();
    	$fetchTokenParams -> userId = $userId;
    	$fetchTokenParams -> secretKey = $secretKey;
    	// Make SOAP call
    	$fetchTokenResponse = $publicClient -> FetchToken($fetchTokenParams);
    
    	// Handle result
    	echo 'Token: ' . $fetchTokenResponse -> FetchTokenResult -> AuthToken . PHP_EOL
    	. 'Expires: ' . $fetchTokenResponse -> FetchTokenResult -> HardExpirationTime . PHP_EOL;
    }
    catch(SoapFault $soapFault) {
    	echo 'Error: ' . $soapFault->faultstring;
    }
    
  • GetAcceptedBidderTypes

    Returns the available accepted bidder types.

    Returns

    Array of IdDescriptionPair objects

  • GetCategories

    Returns a hierarchy of Category objects.

    Returns

    Hierarchy of Category objects

  • GetCounties

    Returns a list of counties that can be used in the search query
    in the method GetSearchResultAdvanced .

    Returns

    Array of IdDescriptionPair objects

  • GetExpoItemTypes

    Returns the available expo item types. Includes the price in SEK as Value,
    for possible total fee calculation in the client application.

    Returns

    Array of IdDescriptionPair objects

  • GetFeedback

    This API method returns feedback information regarding a specific user.

    Parameters
    1. getFeedbackRequest, Request object containing user id and filters for the feedback data, see GetFeedbackRequest
    Returns

    A list of GetFeedback items

  • GetFeedbackSummary

    This API method returns feedback summary regarding a specific user.

    Parameters
    1. getFeedbackRequest, Request object containing user id GetFeedbackSummaryRequest
    Returns

    An object containing total number of positive and negative feedback, for the requested user, over the last month, last six months and last twleve months GetFeedbackSummaryResponse

  • GetItem

    Gets an Item.

    Parameters
    1. itemId, The Id of the Item (auction)
    Returns

    Item (auction) object

  • GetItemAddedDescriptions

  • GetItemFieldValues

    Returns an ItemFieldsResponse that holds available values for some of the item fields.

    Returns

    ItemFieldsResponse object.

    Code Example

    This Example prints the information in the ItemFieldsResponse.

      1:
      2:
      3:
      4:
      5:
      6:
      7:
      8:
      9:
     10:
     11:
     12:
     13:
     14:
     15:
     16:
     17:
     18:
     19:
     20:
     21:
     22:
     23:
     24:
     25:
     26:
     27:
     28:
     29:
     30:
     31:
     32:
     33:
     34:
     35:
     36:
     37:
     38:
     39:
     40:
     41:
     42:
     43:
     44:
     45:
     46:
     47:
    
    try {
    	// Replace the following variables with your own key management
    	// $APPLICATION_KEY
    	// $APPLICATION_ID
    	$appId = $APPLICATION_ID;
    	$appKey = $APPLICATION_KEY;
    	$publicServiceUrl = 'https://api.tradera.com/v3/PublicService.asmx';
    
    	$publicServiceUrlWithAuth = $publicServiceUrl
    					. '?appId=' . $appId
    					. '&appKey=' . $appKey;
    
    	$publicClient = new SoapClient(
    		$publicServiceUrl . '?WSDL',
    		array('location' => $publicServiceUrlWithAuth)
    	);
    
    
    	// Make Soap call
    	$getItemFieldValuesResponse = $publicClient->GetItemFieldValues();
    	$result = $getItemFieldValuesResponse -> GetItemFieldValuesResult;
    
    	// Handle result
    	echo 'VAT:' . PHP_EOL;
    	foreach ($result -> VAT as $vat) {
    		echo '' . $vat . PHP_EOL;
    	}
    
    	echo 'Item attributes:' . PHP_EOL;
    	foreach ($result -> ItemAttributes as $itemAttr) {
    		echo 'Id: ' . $itemAttr -> Id . ' Description: ' . $itemAttr -> Description . PHP_EOL;
    	}
    
    	echo 'Payment types:' . PHP_EOL;
    	foreach ($result -> PaymentTypes as $payType) {
    		echo 'Id: ' . $payType -> Id . ' Description: ' . $payType -> Description . PHP_EOL;
    	}
    
    	echo 'Shipping types:' . PHP_EOL;
    	foreach ($result -> ShippingTypes as $shipType) {
    		echo 'Id: ' . $shipType -> Id . ' Description: ' . $shipType -> Description . PHP_EOL;
    	}
    
    }
    catch(SoapFault $soapFault) {
    	echo 'Error: ' . $soapFault->faultstring;
    }
    
  • GetItemTypes

    Returns the available item types.

    Returns

    Array of IdDescriptionPair objects

  • GetOfficalTime

    Returns the offical Tradera.com local time (for use with auction endings).

    Returns

    Offical Tradera.com local time

  • GetPaymentTypes

    DEPRECATED: Use GetItemFieldValues instead.

    Returns the available payment types.

    Returns

    Array of IdDescriptionPair objects

  • GetSearchResult

    DEPRECATED: Use Search in SearchService instead.

    Search for items.

    Parameters
    1. query, The search query
    2. categoryId, The Id of the category to search in (0 for all categories)
    3. pageNumber, The page to return, starting with 1 for the first page.
    4. orderBy, How the results should be ordered
    Returns

    Filled SearchResult object

  • GetSearchResultAdvanced

    DEPRECATED: Use SearchAdvanced in SearchService instead.

    Search for items with advanced parameters.

    Parameters
    1. query, The Query with search parameters.
    Returns

    Filled SearchResult object

  • GetSearchResultAdvancedXml

    Search for items with advanced parameters, using an XML string.
    SOAP clients are encouraged to use the GetSearchResultAdvanced method instead.

    Parameters
    1. queryXml, XML data containing parameters for the query. XML format:

      <Query>
      <SearchWords>string</SearchWords>
      <CategoryId>int</CategoryId>
      <SearchInDescription>bool</SearchInDescription>
      <Mode>int or string</Mode>
      <PriceMinimum>int</PriceMinimum>
      <PriceMaximum>int</PriceMaximum>
      <BidsMinimum>int</BidsMinimum>
      <BidsMaximum>int</BidsMaximum>
      <ZipCode>string</ZipCode>
      <CountyId>int</CountyId>
      <Alias>string</Alias>
      <OrderBy>int or string</OrderBy>
      <ItemStatus>int or string</ItemStatus>
      <ItemType>int or string</ItemType>
      <OnlyAuctionsWithBuyNow>bool</OnlyAuctionsWithBuyNow>
      <OnlyItemsWithThumbnail>bool</OnlyItemsWithThumbnail>
      <ItemsPerPage>int</ItemsPerPage>
      <PageNumber>int</PageNumber>

      </Query>
      See the Query class for a description of the parameters.
    Returns

    Filled SearchResult object

  • GetSellerItems

    Gets items for a seller.

    Parameters
    1. userId, The user Id of the seller
    2. categoryId, The Id of the category to look for items in (use 0 for all categories)
    3. filterType, The filter to use:
      0 = All (max 60 days old items),
      1 = Only active items (EndDate > NOW),
      2 = Only inactive items (EndDate < NOW)

      Can be overridden with either the minEndDate or maxEndate parameters.
    4. minEndDate, Will return items with EndDate > than this parameter.
      Either send NULL or a DateTime <= DateTime.MinValue (0001-01-01 00:00:00) if not used.
      Note that no auctions older than 60 days will be returned regardless of minEndDate sent.
    5. maxEndDate, Will return items with EndDate < than this parameter.
      Either send NULL or a DateTime >= DateTime.MaxValue (9999-12-31 00:00:00) if not used.
    Returns

    Array of items (auctions)

  • GetSellerItemsQuickInfo

    Returns minimal of item information. Usefull to get id's of newly created items

  • GetShippingTypes

    DEPRECATED: Use GetItemFieldValues instead.

    Returns the available types of shipping when the buyer pays freight.

    Returns

    Array of IdDescriptionPair objects

  • GetUserByAlias

    Gets an user based based on the alias

    Parameters
    1. alias, The alias of the user
    Returns

    User object with some fields populated

XHTML CSS