Amazon MWS CreateShipment 每次都因 Fedex 而失败,没有真正的错误

问题描述 投票:0回答:0

我正在使用 Amazon C# SDK 调用 CreateShipment 并从亚马逊购买发货标签。

https://docs.developer.amazonservices.com/en_UK/merch_fulfill/MerchFulfill_CreateShipment.html

我们每天使用相同的代码 100 次来购买 USPS 和 UPS 标签,但在尝试购买 Fedex 标签时 100% 的时间都失败了。

这是我们得到的错误响应,它不是描述性的。

<ErrorResponse xmlns="https://mws.amazonservices.com/MerchantFulfillment/2015-06-01">
  <Error>
    <Type>Sender</Type>
    <Code>InvalidRequest</Code>
  </Error>
  <RequestId>470076a3-781e-4fa9-8b8e-796c3fd286ef</RequestId>
</ErrorResponse>

这是我们直接来自 SDK 的请求 xml。我只替换了占位符而不是我们的实际信息。

<CreateShipmentRequest
    xmlns="https://mws.amazonservices.com/MerchantFulfillment/2015-06-01">
    <SellerId>{selelr id}</SellerId>
    <ShipmentRequestDetails>
        <AmazonOrderId>{amazon order id}</AmazonOrderId>
        <ItemList>
            <Item>
                <OrderItemId>{amazon item id}</OrderItemId>
                <Quantity>1</Quantity>
            </Item>
        </ItemList>
        <ShipFromAddress>
            <Name>{ship from name}</Name>
            <AddressLine1>{ship from address}</AddressLine1>
            <Email>{email}</Email>
            <City>{city}</City>
            <StateOrProvinceCode>{state}</StateOrProvinceCode>
            <PostalCode>{zip code}</PostalCode>
            <CountryCode>US</CountryCode>
            <Phone>{phone number}</Phone>
        </ShipFromAddress>
        <PackageDimensions>
            <Length>32.00</Length>
            <Width>23.50</Width>
            <Height>2.50</Height>
            <Unit>inches</Unit>
        </PackageDimensions>
        <Weight>
            <Value>120.00</Value>
            <Unit>ounces</Unit>
        </Weight>
        <ShippingServiceOptions>
            <DeliveryExperience>DeliveryConfirmationWithoutSignature</DeliveryExperience>
            <CarrierWillPickUp>False</CarrierWillPickUp>
            <LabelFormat>PDF</LabelFormat>
        </ShippingServiceOptions>
    </ShipmentRequestDetails>
    <ShippingServiceId>FEDEX_PTP_HOME_DELIVERY</ShippingServiceId>
</CreateShipmentRequest>

我的请求不适用于 Fedex,这是怎么回事?作为记录,我已经尝试了所有可用的标签类型。每个人都有同样的问题。

我还在亚马逊支持下提交了大约 10 个案例。他们从不回应。

[更新] 问题最终成为标签格式。显然我的代码中有一个错误,所以它总是要求一个 PDF 标签。 Amazon 不支持 Fedex 的 PDF 标签。他们只支持 PNG 和 ZPL。

amazon-mws
© www.soinside.com 2019 - 2024. All rights reserved.