eBay CompleteSale API在响应中给出错误

时间:2014-10-13 21:04:28

标签: ebay-api

我正在使用以下xml进行eBay CompleteSale API调用:

<?xml version="1.0" encoding="utf-8"?>
<CompleteSaleRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>$auth_token</eBayAuthToken>
</RequesterCredentials>
<ItemID>$itemId</ItemID>
<TransactionID>$transId</TransactionID>
<FeedbackInfo>
<CommentText> string </CommentText>
<CommentType>Positive</CommentType>
<TargetUser></TargetUser>
</FeedbackInfo>
<Shipped>1</Shipped>
<Paid>1</Paid>
<ListingType>Half</ListingType>
<Shipment>
    <ShipmentTrackingDetails>
      <ShipmentTrackingNumber>$trackingNo</ShipmentTrackingNumber>
      <ShippingCarrierUsed>$carrier</ShippingCarrierUsed>
    </ShipmentTrackingDetails>
    <ShippedTime>$shippingDate</ShippedTime>
</Shipment>

<ErrorLanguage> string </ErrorLanguage>
<MessageID> string </MessageID>
<Version>889</Version>
<ErrorHandling>BestEffort</ErrorHandling>
<WarningLevel>Low</WarningLevel>
</CompleteSaleRequest>

当我运行脚本时,跟踪号会在eBay中正确更新,但响应XML会出错:

<?xml version="1.0" encoding="UTF-8"?>
<CompleteSaleResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2014-10-13T14:39:52.430Z</Timestamp>
  <Ack>Failure</Ack>
  <CorrelationID> string </CorrelationID>
  <Errors>
    <ShortMessage>Invalid shipment tracking number or carrier</ShortMessage>
    <LongMessage>You have entered an incorrect shipment tracking number/carrier.</LongMessage>
    <ErrorCode>2191111</ErrorCode>
    <SeverityCode>Error</SeverityCode>
    <ErrorClassification>RequestError</ErrorClassification>
  </Errors>
  <Errors>
    <ShortMessage>Tracking numbers invalid</ShortMessage>
    <LongMessage>The following Tracking Numbers are invalid : TRACKING_NUMBER_VALUE.</LongMessage>
    <ErrorCode>21916897</ErrorCode>
    <SeverityCode>Error</SeverityCode>
    <ErrorParameters ParamID="0">
      <Value>TRACKING_NUMBER_VALUE</Value>
    </ErrorParameters>
    <ErrorClassification>RequestError</ErrorClassification>
  </Errors>
  <Errors>
    <ShortMessage>Internal error to the application.</ShortMessage>
    <LongMessage>Internal error to the application.</LongMessage>
    <ErrorCode>10007</ErrorCode>
    <SeverityCode>Error</SeverityCode>
    <ErrorClassification>RequestError</ErrorClassification>
  </Errors>
  <Errors>
    <ShortMessage>An error occurred.</ShortMessage>
    <LongMessage>An error number "{0}" occurred while processing your request.</LongMessage>
    <ErrorCode>36</ErrorCode>
    <SeverityCode>Error</SeverityCode>
    <ErrorClassification>RequestError</ErrorClassification>
  </Errors>
  <Version>893</Version>
  <Build>E893_CORE_APIXO_17070435_R1</Build>
</CompleteSaleResponse>

为什么我没有成功回应?

跟踪号码如下:1Z7X887R0368851221,运营商为'UPS' 请帮忙。 感谢

1 个答案:

答案 0 :(得分:0)

eBay's own dev site:

  

错误10007(“应用程序的内部错误”)表示eBay服务器端出错,而不是应用程序中的错误。

所以你可能需要联系eBay了解具体问题,但我的假设是,虽然eBay会接受载体和追踪号码字段的任何信息,但追踪号码字段的格式必须与其他一些标准集相匹配由运营商插入上游的另一个API。

您是否在UPS自己的跟踪机制中测试了跟踪号码?它会返回有效的包裹跟踪响应吗?

此外,根据eBay开发网站,如果您使用的是UPS Mail Innovations而非UPS,则要指定的运营商名称为UPS-MI