Tradera Developer Program

RestrictedService

Documentation Version 3 > RestrictedService > SetPricesOnNonShopItems

SetPricesOnNonShopItems |WebMethod|

Sets the different price-types on a non shop item.

To use this method the auction cannot have bids.

Parameters
  1. itemId, The id of the auction.
  2. openingPrice, The auction start price.
    - Is Mandatory.
    - Has to be less then ReservedPrice (if ReservedPrice set)
    - Has to be less then BinPrice (if BinPrice set)
  3. ReservedPrice, !Optional. The reservation price. (40kr)
    - Is not Mandatory.
    - The reservation price is the lowest accepted price for the auction.
    - It costs 40kr to add a reservation price and it is not beneficial for low price auctions
    - Has to be greater then OpeningPrice
    - Has to be less then BinPrice
    - The ReservedPrice cannot be removed if set. It can only be changed.
    - To not add a ReservedPrice set the ReservedPrice object to null.
  4. BinPrice, !Optional. The buy it now price.
    - Is not Mandatory.
    - BinPrice is a price on which you can sell the product before having any bids.
    - Has to be greater then OpeningPrice.
    - Has to be greater then ReservedPrice (if ReservedPrice is set)
    - To not add a BinPrice set the BinPrice object to null.
    - To remove a BinPrice set the BinPrice object to null.

Code Example

This .NET Framework example shows how the method can be used. Too keep it general no tools have been used for class generation.

The example first shows different requests payloads and then a complete example.

  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:
 48:
 49:
 50:
 51:
 52:
 53:
 54:
 55:
 56:
 57:
 58:
 59:
 60:
 61:
 62:
 63:
 64:
 65:
 66:
 67:
 68:
 69:
 70:
 71:
 72:
 73:
 74:
 75:
 76:
 77:
 78:
 79:
 80:
 81:
 82:
 83:
 84:
 85:
 86:
 87:
 88:
 89:
 90:
 91:
 92:
 93:
 94:
 95:
 96:
 97:
 98:
 99:
100:
101:
102:
103:
CHANGE OPENINGPRICE

var payLoad = new RestrictedService.SetPricesOnNonShopItemRequest
	{
		 NonShopItem = new RestrictedService.SetPricesNonShopItem
			 {
				 Id = itemId,
				 OpeningPrice = openingPrice
			 }
};


CHANGE OPENINGPRICE AND ADD/UPDATE RESERVEDPRICE

var payLoad = new RestrictedService.SetPricesOnNonShopItemRequest
	{
		 NonShopItem = new RestrictedService.SetPricesNonShopItem
			 {
				 Id = itemId,
				 OpeningPrice = [Your opening price] ,
				 ReservedPrice = new RestrictedService.ReservedPrice { Price = [Your reserved price] }
			 }
 };


CHANGE OPENINGPRICE, ADD/UPDATE RESERVEDPRICE AND ADD BINPRICE

var payLoad = new RestrictedService.SetPricesOnNonShopItemRequest
	{
		 NonShopItem = new RestrictedService.SetPricesNonShopItem
		 {
				 Id = itemId,
				 OpeningPrice = [Your opening price] ,
				 ReservedPrice = new RestrictedService.ReservedPrice { Price = [Your reserved price] },
				 BinPrice = new RestrictedService.BinPrice { Price = [Your bin price] }
		 }
	};


class Program
{
 static void Main(string[] args)
{
		 using (var client = new RestrictedService.RestrictedServiceSoapClient("RestrictedServiceSoap"))
		 {
				 int appId = 0;
				 string appKey = "";

				 var authenticationHeader = new RestrictedService.AuthenticationHeader
				 {
						 AppId = appId,
						 AppKey = appKey,
				 };

				 string token = "";
				 int userId = 0;

				 var authorizationHeader = new RestrictedService.AuthorizationHeader
				 {
						 Token = token,
						 UserId = userId
				 };

				 int itemId = 99999999;

				 //The start price
				 int openingPrice = 10;

				 //The buy it now price
				 //To ignore setting a bin price, please leave RestrictedService.BinPrice object as null
				 int binPrice = 100;

				 //Please note that having a reserved price costs 40kr
				 //To ignore setting a reserved price, please leave RestrictedService.ReservedPrice object as null
				 int reservedPrice = 50;

				 var payLoad = new RestrictedService.SetPricesOnNonShopItemRequest
				 {
						 NonShopItem = new RestrictedService.SetPricesNonShopItem
						 {
								 Id = itemId,
								 OpeningPrice = openingPrice,
								 BinPrice = new RestrictedService.BinPrice { Price = binPrice },
								 ReservedPrice = new RestrictedService.ReservedPrice { Price = reservedPrice },
						 }
				 };

				 var response = client.SetPricesOnNonShopItems(authenticationHeader, authorizationHeader, null, payLoad);

				 if (!response.IsSuccessful)
				 {
						 foreach (var validationError in response.ValidationErrors)
						 {
								 Console.WriteLine(validationError.ErrorMessage);
						 }
				 }
				 else
				 {
						 Console.WriteLine("Successful");
				 }
		 }
}
}

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /v3/RestrictedService.asmx HTTP/1.1
Host: api.tradera.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://api.tradera.com/SetPricesOnNonShopItems"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <AuthenticationHeader xmlns="http://api.tradera.com">
      <AppId>int</AppId>
      <AppKey>string</AppKey>
    </AuthenticationHeader>
    <AuthorizationHeader xmlns="http://api.tradera.com">
      <UserId>int</UserId>
      <Token>string</Token>
    </AuthorizationHeader>
    <ConfigurationHeader xmlns="http://api.tradera.com">
      <Sandbox>int</Sandbox>
      <MaxResultAge>int</MaxResultAge>
    </ConfigurationHeader>
  </soap:Header>
  <soap:Body>
    <SetPricesOnNonShopItems xmlns="http://api.tradera.com">
      <request>
        <NonShopItem>
          <Id>int</Id>
          <OpeningPrice>int</OpeningPrice>
          <ReservedPrice>
            <Price>int</Price>
          </ReservedPrice>
          <BinPrice>
            <Price>int</Price>
          </BinPrice>
        </NonShopItem>
      </request>
    </SetPricesOnNonShopItems>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SetPricesOnNonShopItemsResponse xmlns="http://api.tradera.com">
      <SetPricesOnNonShopItemsResult>
        <IsSuccessful>boolean</IsSuccessful>
        <ValidationErrors>
          <SetPricesOnNonShopItemsError>
            <Item>
              <Id>int</Id>
              <OpeningPrice>int</OpeningPrice>
              <ReservedPrice>
                <Price>int</Price>
              </ReservedPrice>
              <BinPrice>
                <Price>int</Price>
              </BinPrice>
            </Item>
            <ErrorMessage>string</ErrorMessage>
          </SetPricesOnNonShopItemsError>
          <SetPricesOnNonShopItemsError>
            <Item>
              <Id>int</Id>
              <OpeningPrice>int</OpeningPrice>
              <ReservedPrice>
                <Price>int</Price>
              </ReservedPrice>
              <BinPrice>
                <Price>int</Price>
              </BinPrice>
            </Item>
            <ErrorMessage>string</ErrorMessage>
          </SetPricesOnNonShopItemsError>
        </ValidationErrors>
      </SetPricesOnNonShopItemsResult>
    </SetPricesOnNonShopItemsResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /v3/RestrictedService.asmx HTTP/1.1
Host: api.tradera.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Header>
    <AuthenticationHeader xmlns="http://api.tradera.com">
      <AppId>int</AppId>
      <AppKey>string</AppKey>
    </AuthenticationHeader>
    <AuthorizationHeader xmlns="http://api.tradera.com">
      <UserId>int</UserId>
      <Token>string</Token>
    </AuthorizationHeader>
    <ConfigurationHeader xmlns="http://api.tradera.com">
      <Sandbox>int</Sandbox>
      <MaxResultAge>int</MaxResultAge>
    </ConfigurationHeader>
  </soap12:Header>
  <soap12:Body>
    <SetPricesOnNonShopItems xmlns="http://api.tradera.com">
      <request>
        <NonShopItem>
          <Id>int</Id>
          <OpeningPrice>int</OpeningPrice>
          <ReservedPrice>
            <Price>int</Price>
          </ReservedPrice>
          <BinPrice>
            <Price>int</Price>
          </BinPrice>
        </NonShopItem>
      </request>
    </SetPricesOnNonShopItems>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <SetPricesOnNonShopItemsResponse xmlns="http://api.tradera.com">
      <SetPricesOnNonShopItemsResult>
        <IsSuccessful>boolean</IsSuccessful>
        <ValidationErrors>
          <SetPricesOnNonShopItemsError>
            <Item>
              <Id>int</Id>
              <OpeningPrice>int</OpeningPrice>
              <ReservedPrice>
                <Price>int</Price>
              </ReservedPrice>
              <BinPrice>
                <Price>int</Price>
              </BinPrice>
            </Item>
            <ErrorMessage>string</ErrorMessage>
          </SetPricesOnNonShopItemsError>
          <SetPricesOnNonShopItemsError>
            <Item>
              <Id>int</Id>
              <OpeningPrice>int</OpeningPrice>
              <ReservedPrice>
                <Price>int</Price>
              </ReservedPrice>
              <BinPrice>
                <Price>int</Price>
              </BinPrice>
            </Item>
            <ErrorMessage>string</ErrorMessage>
          </SetPricesOnNonShopItemsError>
        </ValidationErrors>
      </SetPricesOnNonShopItemsResult>
    </SetPricesOnNonShopItemsResponse>
  </soap12:Body>
</soap12:Envelope>

XHTML CSS