首页 文章

服务类型优先于运营商代码;用于评估错误的服务类型

提问于
浏览
2

我尝试从fedex收到运费,所以我发送到Fedex(https://wsbeta.fedex.com:443/web-services/rate)请求,如下所示(它被序列化为xml对象):

<?xml version=\"1.0\" encoding=\"utf-16\"?>
<RateRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
  <WebAuthenticationDetail xmlns=\"http://fedex.com/ws/rate/v10\">
    <UserCredential>
      <Key>some key</Key>
      <Password>some password</Password>
    </UserCredential>
  </WebAuthenticationDetail>
  <ClientDetail xmlns=\"http://fedex.com/ws/rate/v10\">
    <AccountNumber>some account number</AccountNumber>
    <MeterNumber>some meter number</MeterNumber>
  </ClientDetail>
  <TransactionDetail xmlns=\"http://fedex.com/ws/rate/v10\">
    <CustomerTransactionId>some CustomerTransactionId</CustomerTransactionId>
  </TransactionDetail>
  <Version xmlns=\"http://fedex.com/ws/rate/v10\">
    <ServiceId>crs</ServiceId>
    <Major>10</Major>
    <Intermediate>0</Intermediate>
    <Minor>0</Minor>
  </Version>
  <ReturnTransitAndCommit xmlns=\"http://fedex.com/ws/rate/v10\">true</ReturnTransitAndCommit>
  <CarrierCodes xmlns=\"http://fedex.com/ws/rate/v10\">FDXE</CarrierCodes>
  <RequestedShipment xmlns=\"http://fedex.com/ws/rate/v10\">
    <ShipTimestamp>2012-08-10T11:42:00.2669059+02:00</ShipTimestamp>
    <ServiceType>GROUND_HOME_DELIVERY</ServiceType>
    <PackagingType>YOUR_PACKAGING</PackagingType>
    <TotalInsuredValue>
      <Currency>USD</Currency>
    </TotalInsuredValue>
    <Shipper>
      <Address>
        <City>San Francisco</City>
        <StateOrProvinceCode>CA</StateOrProvinceCode>
        <PostalCode>94129</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </Shipper>
    <Recipient>
      <Address>
        <StreetLines>S</StreetLines>
        <StreetLines>s</StreetLines>
        <City>New York</City>
        <StateOrProvinceCode>NY</StateOrProvinceCode>
        <PostalCode>10001</PostalCode>
        <CountryCode>US</CountryCode>
        <Residential>true</Residential>
      </Address>
    </Recipient>
    <ShippingChargesPayment />
    <RateRequestTypes>ACCOUNT</RateRequestTypes>
    <RateRequestTypes>LIST</RateRequestTypes>
    <PackageCount>1</PackageCount>
    <RequestedPackageLineItems>
      <SequenceNumber>1</SequenceNumber>
      <GroupPackageCount>1</GroupPackageCount>
      <InsuredValue />
      <Weight>
        <Units>LB</Units>
        <Value>133.00000</Value>
      </Weight>
      <Dimensions>
        <Units>IN</Units>
      </Dimensions>
    </RequestedPackageLineItems>
  </RequestedShipment>
</RateRequest>

我仍然收到两个错误:

  • 870 - 服务类型优先于运营商代码;用于评估的服务类型

  • 809 - 包装1 - 重量缺失或无效 .

我应该改变什么来解决这个问题?

1 回答

  • 4

    我找到了解决方案要解决第一个问题,我必须更改没有CarrierCodes的ServiceType值 . 适用于GROUND_HOME_DELIVERY的CarrierCode是FDXG .

    第二个问题是重量超过70磅的包装应该使用FEDEX_GROUND发送,而不是GROUND_HOME_DELIVERY .

相关问题