PHP と CURL を使用して eBay Trading API で eBay に商品を出品しようとしています。
すべて (XML とスクリプト) は問題ないように見えますが、何が間違っているのかわかりません。
これは私の要求です:
<?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>
応答:
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
)
誰が何が間違っているのか考えていますか?
編集
David T. Sadler から回答を得たので、StartingPrice
代わりに使用するようにアドバイスされました。BuyItNowPrice
それが私がしたことです。また、David は、API テスト ツールを使用して私の XML を実行できたと述べています。やってみたところ、そちらもダメでした。
これが私の新しい要求です
ヘッダー
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 リクエスト
<?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>
応答
<?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>