第三方付款的运输标签生成中缺少 FEDEX 运输费率详细信息

FEDEX shipment rate details missing in Shipping Label generation for Third party payment

我正在使用 FEDEX API 使用他们的 ShipService WSDL 从 FEDEX 获取运输标签。我已经在我的应用程序中集成了该功能,并且能够成功地从 FEDEX 生成标签。

由于最近的要求,我们需要从我们的应用程序中添加 第三方作为付款人 选项。为了实现这一点,我将 PaymentType 从 SENDER 更改为 THIRD_PARTY 并且还根据 FEDEX API 文档填充了必要的字段,如地址、联系人等。

payment.setPaymentType(PaymentType.THIRD_PARTY);

服务调用成功,我也得到了有效响应,但是当使用 THIRD_PARTY 作为付款人时缺少 ShipmentRate 详细信息,而当使用 SENDER 作为 PaymentType 时可用。我需要费率详细信息以便在我的申请中进行进一步处理。

以下是我通过 SENDER PaymentType 获得的详细信息。

<v13:CompletedShipmentDetail>
    <v13:ShipmentRating>
        <v13:ActualRateType>PAYOR_ACCOUNT_PACKAGE</v13:ActualRateType>
        <v13:ShipmentRateDetails>
            <v13:RateType>PAYOR_ACCOUNT_PACKAGE</v13:RateType>
            <v13:RateZone>4</v13:RateZone>
            <v13:RatedWeightMethod>DIM</v13:RatedWeightMethod>
            <v13:DimDivisor>166</v13:DimDivisor>
            <v13:FuelSurchargePercent>4.25</v13:FuelSurchargePercent>
            <v13:TotalBillingWeight>
                <v13:Units>LB</v13:Units>
                <v13:Value>17.0</v13:Value>
            </v13:TotalBillingWeight>
            <v13:TotalDimWeight>
                <v13:Units>LB</v13:Units>
                <v13:Value>17.0</v13:Value>
            </v13:TotalDimWeight>
            <v13:TotalBaseCharge>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>11.32</v13:Amount>
            </v13:TotalBaseCharge>
            <v13:TotalFreightDiscounts>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>0.0</v13:Amount>
            </v13:TotalFreightDiscounts>
            <v13:TotalNetFreight>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>11.32</v13:Amount>
            </v13:TotalNetFreight>
            <v13:TotalSurcharges>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>9.48</v13:Amount>
            </v13:TotalSurcharges>
            <v13:TotalNetFedExCharge>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>20.8</v13:Amount>
            </v13:TotalNetFedExCharge>
            <v13:TotalTaxes>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>0.0</v13:Amount>
            </v13:TotalTaxes>
            <v13:TotalNetCharge>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>20.8</v13:Amount>
            </v13:TotalNetCharge>
            <v13:TotalRebates>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>0.0</v13:Amount>
            </v13:TotalRebates>
            <v13:Surcharges>
                <v13:SurchargeType>ADDITIONAL_HANDLING</v13:SurchargeType>
                <v13:Level>PACKAGE</v13:Level>
                <v13:Description>Additional handling surcharge - dimension</v13:Description>
                <v13:Amount>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>9.0</v13:Amount>
                </v13:Amount>
            </v13:Surcharges>
            <v13:Surcharges>
                <v13:SurchargeType>FUEL</v13:SurchargeType>
                <v13:Level>PACKAGE</v13:Level>
                <v13:Description>FedEx Ground Fuel</v13:Description>
                <v13:Amount>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>0.48</v13:Amount>
                </v13:Amount>
            </v13:Surcharges>
        </v13:ShipmentRateDetails>
    </v13:ShipmentRating>
    <v13:CompletedPackageDetails>
        <v13:SequenceNumber>1</v13:SequenceNumber>
        <v13:TrackingIds>
            <v13:TrackingIdType>FEDEX</v13:TrackingIdType>
            <v13:TrackingNumber>794662859722</v13:TrackingNumber>
        </v13:TrackingIds>
        <v13:GroupNumber>0</v13:GroupNumber>
        <v13:PackageRating>
            <v13:ActualRateType>PAYOR_ACCOUNT_PACKAGE</v13:ActualRateType>
            <v13:PackageRateDetails>
                <v13:RateType>PAYOR_ACCOUNT_PACKAGE</v13:RateType>
                <v13:RatedWeightMethod>DIM</v13:RatedWeightMethod>
                <v13:BillingWeight>
                    <v13:Units>LB</v13:Units>
                    <v13:Value>17.0</v13:Value>
                </v13:BillingWeight>
                <v13:DimWeight>
                    <v13:Units>LB</v13:Units>
                    <v13:Value>17.0</v13:Value>
                </v13:DimWeight>
                <v13:BaseCharge>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>11.32</v13:Amount>
                </v13:BaseCharge>
                <v13:TotalFreightDiscounts>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>0.0</v13:Amount>
                </v13:TotalFreightDiscounts>
                <v13:NetFreight>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>11.32</v13:Amount>
                </v13:NetFreight>
                <v13:TotalSurcharges>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>9.48</v13:Amount>
                </v13:TotalSurcharges>
                <v13:NetFedExCharge>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>20.8</v13:Amount>
                </v13:NetFedExCharge>
                <v13:TotalTaxes>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>0.0</v13:Amount>
                </v13:TotalTaxes>
                <v13:NetCharge>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>20.8</v13:Amount>
                </v13:NetCharge>
                <v13:TotalRebates>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>0.0</v13:Amount>
                </v13:TotalRebates>
                <v13:Surcharges>
                    <v13:SurchargeType>ADDITIONAL_HANDLING</v13:SurchargeType>
                    <v13:Level>PACKAGE</v13:Level>
                    <v13:Description>Additional handling surcharge - dimension</v13:Description>
                    <v13:Amount>
                        <v13:Currency>USD</v13:Currency>
                        <v13:Amount>9.0</v13:Amount>
                    </v13:Amount>
                </v13:Surcharges>
                <v13:Surcharges>
                    <v13:SurchargeType>FUEL</v13:SurchargeType>
                    <v13:Level>PACKAGE</v13:Level>
                    <v13:Description>FedEx Ground Fuel</v13:Description>
                    <v13:Amount>
                        <v13:Currency>USD</v13:Currency>
                        <v13:Amount>0.48</v13:Amount>
                    </v13:Amount>
                </v13:Surcharges>
            </v13:PackageRateDetails>
        </v13:PackageRating>

        <v13:SignatureOption>SERVICE_DEFAULT</v13:SignatureOption>
    </v13:CompletedPackageDetails>
</v13:CompletedShipmentDetail>

以下是我目前在 THIRD_PARTY 付款方式下收到的回复。(缺少上面显示的费率详细信息)

<v13:CompletedShipmentDetail>
<v13:UsDomestic>true</v13:UsDomestic>
<v13:CarrierCode>FDXG</v13:CarrierCode>
<v13:PackagingDescription>YOUR_PACKAGING</v13:PackagingDescription>
<v13:OperationalDetail>
    <v13:OriginLocationNumber>928</v13:OriginLocationNumber>
    <v13:DestinationLocationNumber>952</v13:DestinationLocationNumber>
    <v13:TransitTime>TWO_DAYS</v13:TransitTime>
    <v13:IneligibleForMoneyBackGuarantee>false</v13:IneligibleForMoneyBackGuarantee>
    <v13:DeliveryEligibilities>SATURDAY_DELIVERY</v13:DeliveryEligibilities>
    <v13:ServiceCode>92</v13:ServiceCode>
</v13:OperationalDetail>
<v13:CompletedPackageDetails>
    <v13:SequenceNumber>1</v13:SequenceNumber>
    <v13:TrackingIds>
        <v13:TrackingIdType>FEDEX</v13:TrackingIdType>
        <v13:TrackingNumber>TRACKING_NUMBER</v13:TrackingNumber>
    </v13:TrackingIds>
    <v13:GroupNumber>0</v13:GroupNumber>
    <v13:OversizeClass>OVERSIZE_2</v13:OversizeClass>
    <v13:OperationalDetail>
        <v13:OperationalInstructions>
            <v13:Number>2</v13:Number>
            <v13:Content>TRK#</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>7</v13:Number>
            <v13:Content>9622041730008000297100794662859700</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>8</v13:Number>
            <v13:Content>539J2/3F56/31D0</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>10</v13:Number>
            <v13:Content>7946 6285 9700</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>15</v13:Number>
            <v13:Content>95206</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>18</v13:Number>
            <v13:Content>9622 0417 3 (000 800 0297) 1 00 7946 6285 9700</v13:Content>
        </v13:OperationalInstructions>
        <v13:Barcodes>
            <v13:BinaryBarcodes>
                <v13:Type>COMMON_2D</v13:Type>
                <v13:Value>REMOVED_BARCODE_DATA</v13:Value>
            </v13:BinaryBarcodes>
            <v13:StringBarcodes>
                <v13:Type>FEDEX_1D</v13:Type>
                <v13:Value>REMOVED_BARCODE_DATA</v13:Value>
            </v13:StringBarcodes>
        </v13:Barcodes>
        <v13:GroundServiceCode>417</v13:GroundServiceCode>
    </v13:OperationalDetail>
    <v13:Label>
        <v13:Type>OUTBOUND_LABEL</v13:Type>
        <v13:ShippingDocumentDisposition>RETURNED</v13:ShippingDocumentDisposition>
        <v13:ImageType>PNG</v13:ImageType>
        <v13:Resolution>200</v13:Resolution>
        <v13:CopiesToPrint>1</v13:CopiesToPrint>
        <v13:Parts>
            <v13:DocumentPartSequenceNumber>1</v13:DocumentPartSequenceNumber>
            <v13:Image>REMOVED_IMAGE_DATA</v13:Image>
        </v13:Parts>
    </v13:Label>
    <v13:SignatureOption>SERVICE_DEFAULT</v13:SignatureOption>
</v13:CompletedPackageDetails>

我是否需要在请求中发送一些标志以接收 THIRD_PARTY 付款的费率详情?还是 FEDEX 不会在 THIRD_PARTY 个付款案例中发送运费详情?

如有任何帮助,我们将不胜感激。

谢谢

已收到 FEDEX 支持团队的回复,如下所述。

"In answer to your question, RateDetails are not returned for either RECIPIENT or THIRD_PARTY billing. This is considered private customer information and will only be provided for the SENDER account. This is working as designed."

希望它可以节省人们面对类似问题的时间:)。

对我来说不起作用。无论我为 <vs:RateRequestTypes></vs:RateRequestTypes>(LIST、PREFERRED 或 NONE)提交什么,我总是收到错误消息 "Unable to obtain courtesy rates"。我想知道这是否不起作用,因为我仍在使用测试环境...