AddItemXml |WebMethod|
Adds an ItemRequest into the Tradera systems using an XML string. SOAP clients
are encouraged to use the AddItem method instead.
If uploading images, set the AutoCommit AutoCommit to false, call AddItemImage for every image and then
call AddItemCommit after the last image. For more information about the different elements in the Request XML, see the ItemRequest class.
Note that this is an asynchronous call, which means that the item is not added into the Tradera system when this method returns. It is only added
to a queue for processing, see AddItem and AddShopItem for additional information.
Parameters- createItemRequestXml, XML data containing the values for the new Item. XML format:
<CreateItemRequest>
<AutoCommit>bool</AutoCommit>
<ItemType>int</ItemType>
<Title>string</Title>
<ShippingCondition>string</ShippingCondition>
<PaymentCondition>string</PaymentCondition>
<CategoryId>int</CategoryId>
<Duration>int</Duration>
<Restarts>int</Restarts>
<StartPrice>int</StartPrice>
<ReservePrice>int</ReservePrice>
<BuyItNowPrice>int</BuyItNowPrice>
<Description>string</Description>
<AcceptedBidderId>int</AcceptedBidderId>
<VAT>int</VAT>
<OwnReferences>
<OwnReference>string</OwnReference>
<OwnReference>string</OwnReference>
<OwnReference>string</OwnReference>
<OwnReference>string</OwnReference>
</OwnReferences>
<ExpoItemIds>
<ExpoItemId>int</ExpoItemId>
<ExpoItemId>int</ExpoItemId>
</ExpoItemIds>
<PaymentOptionIds>
<PaymentOptionId>int</PaymentOptionId>
<PaymentOptionId>int</PaymentOptionId>
</PaymentOptionIds>
<ShippingOptions>
<ShippingOption>
<Id>int</Id>
<Cost>int</Cost>
</ShippingOption>
<ShippingOption>
<Id>int</Id>
<Cost>int</Cost>
</ShippingOption>
</ShippingOptions>
<ItemAttributes>
<ItemAttribute>int</ItemAttribute>
<ItemAttribute>int</ItemAttribute>
</ItemAttributes>
</CreateItemRequest>
See the ItemRequest class for a description of the parameters.
ReturnsResponse data ( QueuedRequestResponse ) with request id and item id. The item id is the id of
the new item on Tradera. The request id is the identifier of the current request and is used together with API metthod GetRequestResults to
get final result of this call.
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/AddItemXml"
<?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>
<AddItemXml xmlns="http://api.tradera.com">
<createItemRequestXml>string</createItemRequestXml>
</AddItemXml>
</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>
<AddItemXmlResponse xmlns="http://api.tradera.com">
<AddItemXmlResult>
<RequestId>int</RequestId>
<ItemId>int</ItemId>
</AddItemXmlResult>
</AddItemXmlResponse>
</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>
<AddItemXml xmlns="http://api.tradera.com">
<createItemRequestXml>string</createItemRequestXml>
</AddItemXml>
</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>
<AddItemXmlResponse xmlns="http://api.tradera.com">
<AddItemXmlResult>
<RequestId>int</RequestId>
<ItemId>int</ItemId>
</AddItemXmlResult>
</AddItemXmlResponse>
</soap12:Body>
</soap12:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /v3/RestrictedService.asmx/AddItemXml?createItemRequestXml=string HTTP/1.1
Host: api.tradera.com
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<QueuedRequestResponse xmlns="http://api.tradera.com">
<RequestId>int</RequestId>
<ItemId>int</ItemId>
</QueuedRequestResponse>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /v3/RestrictedService.asmx/AddItemXml HTTP/1.1
Host: api.tradera.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
createItemRequestXml=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<QueuedRequestResponse xmlns="http://api.tradera.com">
<RequestId>int</RequestId>
<ItemId>int</ItemId>
</QueuedRequestResponse>