I'm trying to list an item on eBay with the eBay Trading API using PHP and CURL
Everything (XML and my script) looks OK or I just don't see what I'm doing wrong.
This is my request:
<?xml version="1.0" encoding="utf-8"?>
<AddItemsRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<ErrorLanguage>en_US</ErrorLanguage>
<AddItemRequestContainer>
<MessageID>100</MessageID>
<Item>
<BuyItNowPrice>238.00</BuyItNowPrice>
<CategoryMappingAllowed>true</CategoryMappingAllowed>
<ConditionID>1000</ConditionID>
<Country>CA</Country>
<Currency>CAD</Currency>
<Title>TEST</Title>
<Description>DEscription</Description>
<DispatchTimeMax>3</DispatchTimeMax>
<ListingDuration>Days_7</ListingDuration>
<ListingType>FixedPriceItem</ListingType>
<PaymentMethods>PayPal</PaymentMethods>
<PayPalEmailAddress>paypal@jccayer.com</PayPalEmailAddress>
<PictureDetails>
<Item.PictureDetails.PictureURL>
http://www.jccayer.com/productphoto/2793-22-1_ep1.jpg
</Item.PictureDetails.PictureURL>
<PictureURL>http://www.jccayer.com/productphoto/2793-22-1_ep1.jpg</PictureURL>
</PictureDetails>
<PostalCode>K0A1M0</PostalCode>
<PrimaryCategory>
<CategoryID>279</CategoryID>
</PrimaryCategory>
<Quantity>1</Quantity>
<ReturnPolicy>
<ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption>
<RefundOption>MoneyBack</RefundOption>
<ReturnsWithinOption>Days_30</ReturnsWithinOption>
<Description>Text description of return policy details</Description>
<ShippingCostPaidByOption>Buyer</ShippingCostPaidByOption>
</ReturnPolicy>
<ShippingDetails>
<ShippingType>Flat</ShippingType>
<ShippingServiceOptions>
<ShippingServicePriority>1</ShippingServicePriority>
<ShippingService>CA_UPSStandardCanada</ShippingService>
<ShippingServiceCost>21.50</ShippingServiceCost>
</ShippingServiceOptions>
</ShippingDetails>
<Site>Canada</Site>
<UUID>4d8b04a3ae054a978a66848fafd524c9</UUID>
</Item>
</AddItemRequestContainer>
<RequesterCredentials>
<eBayAuthToken>[INSERT YOUR OWN AUTH TOKEN]</eBayAuthToken>
</RequesterCredentials>
</AddItemsRequest>
Response:
Array
(
[Timestamp] => 2013-08-22T13:16:02.397Z
[Ack] => Failure
[Errors] => Array
(
[ShortMessage] => Invalid job context type
[LongMessage] => The job context object is not supported by Action Service Framework.
[ErrorCode] => 21843
[SeverityCode] => Error
[ErrorParameters] => Array
(
[0] => Array
(
[@attributes] => Array
(
[ParamID] => 0
)
[Value] => AddItem
)
[1] => Array
(
[@attributes] => Array
(
[ParamID] => 1
)
[Value] => AddItemsRequestType
)
)
[ErrorClassification] => RequestError
)
[Version] => 833
[Build] => E833_UNI_API5_16246498_R1
)
Anyone have an idea what could be wrong?
Edit
As i got the answer from David T. Sadler he advised me to try to use StartingPrice
instead of BuyItNowPrice
So that is what I did. Also David said he was able to run my XML through the API testing tool. When I tried it, it did not work over there either.
Here is my new request
Headers
X-EBAY-API-COMPATIBILITY-LEVEL:833
X-EBAY-API-DEV-NAME:76803363-a07b-4c24-b5c7-f38ce3dd1ba7
X-EBAY-API-APP-NAME:JeanClau-bd2d-4e64-9466-41fbecfb8bb6
X-EBAY-API-CERT-NAME:4624a573-0320-4604-ac18-f7fc07d0ea8b
X-EBAY-API-SITEID:2
X-EBAY-API-CALL-NAME:AddItem
XML Request
<?xml version="1.0" encoding="utf-8"?>
<AddItemsRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<ErrorLanguage>en_US</ErrorLanguage>
<AddItemRequestContainer>
<MessageID>100</MessageID>
<Item>
<StartingPrice>238.00</StartingPrice>
<CategoryMappingAllowed>true</CategoryMappingAllowed>
<ConditionID>1000</ConditionID>
<Country>CA</Country>
<Currency>CAD</Currency>
<Title>TEST</Title>
<Description>DEscription</Description>
<DispatchTimeMax>3</DispatchTimeMax>
<ListingDuration>Days_7</ListingDuration>
<ListingType>FixedPriceItem</ListingType>
<PaymentMethods>PayPal</PaymentMethods>
<PayPalEmailAddress>paypal@jccayer.com</PayPalEmailAddress>
<PictureDetails>
<Item.PictureDetails.PictureURL>
http://www.jccayer.com/productphoto/2793-22-1_ep1.jpg
</Item.PictureDetails.PictureURL>
<PictureURL>http://www.jccayer.com/productphoto/2793-22-1_ep1.jpg</PictureURL>
</PictureDetails>
<PostalCode>K0A1M0</PostalCode>
<PrimaryCategory>
<CategoryID>279</CategoryID>
</PrimaryCategory>
<Quantity>1</Quantity>
<ReturnPolicy>
<ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption>
<RefundOption>MoneyBack</RefundOption>
<ReturnsWithinOption>Days_30</ReturnsWithinOption>
<Description>Text description of return policy details</Description>
<ShippingCostPaidByOption>Buyer</ShippingCostPaidByOption>
</ReturnPolicy>
<ShippingDetails>
<ShippingType>Flat</ShippingType>
<ShippingServiceOptions>
<ShippingServicePriority>1</ShippingServicePriority>
<ShippingService>CA_UPSStandardCanada</ShippingService>
<ShippingServiceCost>21.50</ShippingServiceCost>
</ShippingServiceOptions>
</ShippingDetails>
<Site>Canada</Site>
<UUID>4d8b04a3ae054a978a66848fafd524c9</UUID>
</Item>
</AddItemRequestContainer>
<RequesterCredentials>
<eBayAuthToken>[INSERT YOUR OWN AUTH TOKEN]</eBayAuthToken>
</RequesterCredentials>
</AddItemsRequest>
Response
<?xml version="1.0" encoding="UTF-8"?>
<AddItemsResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2013-08-23T13:31:10.575Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Auth token is invalid.</ShortMessage>
<LongMessage>Validation of the authentication token in API request failed.</LongMessage>
<ErrorCode>931</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>833</Version>
<Build>E833_UNI_API5_16246498_R1</Build>
</AddItemsResponse>