4

有谁知道在 FedEx Web 服务 RateRequest (SOAP) 查询的响应中生成关税和税款需要哪些字段?我已经被搁置了多天,等待他们的网络服务团队的回复,并且让一位经理在我的脖子上喘气,试图从我们的运费模块中获得关税和税收估计。

我已经尝试了所有我能想到和/或从关于 Soap 服务的稀疏文档中收集到的一切。这是我发送的示例查询(php SoapClient 数据):

RateRequest::__set_state(array(
   'WebAuthenticationDetail' => 
  stdClass::__set_state(array(
     'UserCredential' => 
    stdClass::__set_state(array(
       'Key' => '*fedexkey*',
       'Password' => '*fedexpassword*',
    )),
  )),
   'ClientDetail' => 
  stdClass::__set_state(array(
     'AccountNumber' => '*accountnumber*',
     'MeterNumber' => '*meternumber*',
  )),
   'TransactionDetail' => 
  stdClass::__set_state(array(
     'CustomerTransactionId' => 1,
  )),
   'Version' => 
  stdClass::__set_state(array(
     'ServiceId' => 'crs',
     'Major' => 9,
     'Intermediate' => 0,
     'Minor' => 0,
  )),
   'ReturnTransitAndCommit' => true,
   'CarrierCodes' => NULL,
   'VariableOptions' => NULL,
   'RequestedShipment' => 
  stdClass::__set_state(array(
     'DropoffType' => 'REGULAR_PICKUP',
     'ShipTimestamp' => '2013-05-16T12:37:12-04:00',
     'Shipper' => 
    stdClass::__set_state(array(
       'AccountNumber' => '*accountnum*',
       'Address' => 
      stdClass::__set_state(array(
         'StreetLines' => 
        array (
          0 => '123 Our Street Address',
        ),
         'City' => 'Our City',
         'StateOrProvinceCode' => 'ST',
         'PostalCode' => '12345',
         'CountryCode' => 'US',
      )),
    )),
     'Recipient' => 
    stdClass::__set_state(array(
       'Address' => 
      stdClass::__set_state(array(
         'StreetLines' => 
        array (
          0 => '123 Canada Street address',
        ),
         'City' => 'City in Canada',
         'StateOrProvinceCode' => 'MB',
         'PostalCode' => 'A0A0A0',
         'CountryCode' => 'CA',
      )),
    )),
     'ShippingChargesPayment' => 
    stdClass::__set_state(array(
       'Payor' => 
      stdClass::__set_state(array(
         'AccountNumber' => '*accountnumber*',
         'CountryCode' => 'US',
      )),
    )),
     'RateRequestTypes' => 
    array (
      0 => 'ACCOUNT',
      1 => 'LIST',
    ),
     'PackageCount' => 1,
     'PackageDetail' => 'INDIVIDUAL_PACKAGES',
     'CustomsClearanceDetail' => 
    CustomsClearanceDetail::__set_state(array(
       'Broker' => NULL,
       'ClearanceBrokerage' => NULL,
       'ImporterOfRecord' => NULL,
       'RecipientCustomsId' => NULL,
       'DutiesPayment' => 
      stdClass::__set_state(array(
         'PaymentType' => 'SENDER',
         'Payor' => 
        stdClass::__set_state(array(
           'AccountNumber' => '*accountnumber*',
           'CountryCode' => 'US',
        )),
      )),
       'DocumentContent' => NULL,
       'CustomsValue' => 241.62,
       'FreightOnValue' => NULL,
       'InsuranceCharges' => NULL,
       'PartiesToTransactionAreRelated' => NULL,
       'CommercialInvoice' => NULL,
       'Commodities' => 
      array (
        0 => 
        Commodity::__set_state(array(
           'Name' => 'ART BOOK',
           'NumberOfPieces' => 1,
           'Description' => 'Our Product',
           'CountryOfManufacture' => 'USA',
           'HarmonizedCode' => 4901990000,
           'Weight' => 
          stdClass::__set_state(array(
             'Units' => 'LB',
             'Value' => 2,
          )),
           'Quantity' => 1,
           'QuantityUnits' => NULL,
           'AdditionalMeasures' => NULL,
           'UnitPrice' => 
          stdClass::__set_state(array(
             'Currency' => 'USD',
             'Amount' => 80.54,
          )),
           'CustomsValue' => 
          stdClass::__set_state(array(
             'Currency' => 'USD',
             'Amount' => 80.54,
          )),
           'ExciseConditions' => NULL,
           'ExportLicenseNumber' => NULL,
           'ExportLicenseExpirationDate' => NULL,
           'CIMarksAndNumbers' => NULL,
           'NaftaDetail' => NULL,
        )),
        1 => 
        Commodity::__set_state(array(
           'Name' => 'ART BOOK',
           'NumberOfPieces' => 1,
           'Description' => 'Our product',
           'CountryOfManufacture' => 'USA',
           'HarmonizedCode' => 4901990000,
           'Weight' => 
          stdClass::__set_state(array(
             'Units' => 'LB',
             'Value' => 2,
          )),
           'Quantity' => 1,
           'QuantityUnits' => NULL,
           'AdditionalMeasures' => NULL,
           'UnitPrice' => 
          stdClass::__set_state(array(
             'Currency' => 'USD',
             'Amount' => 80.54,
          )),
           'CustomsValue' => 
          stdClass::__set_state(array(
             'Currency' => 'USD',
             'Amount' => 80.54,
          )),
           'ExciseConditions' => NULL,
           'ExportLicenseNumber' => NULL,
           'ExportLicenseExpirationDate' => NULL,
           'CIMarksAndNumbers' => NULL,
           'NaftaDetail' => NULL,
        )),
        2 => 
        Commodity::__set_state(array(
           'Name' => 'ART BOOK',
           'NumberOfPieces' => 1,
           'Description' => 'Our Product',
           'CountryOfManufacture' => 'USA',
           'HarmonizedCode' => 4901990000,
           'Weight' => 
          stdClass::__set_state(array(
             'Units' => 'LB',
             'Value' => 2,
          )),
           'Quantity' => 1,
           'QuantityUnits' => NULL,
           'AdditionalMeasures' => NULL,
           'UnitPrice' => 
          stdClass::__set_state(array(
             'Currency' => 'USD',
             'Amount' => 80.54,
          )),
           'CustomsValue' => 
          stdClass::__set_state(array(
             'Currency' => 'USD',
             'Amount' => 80.54,
          )),
           'ExciseConditions' => NULL,
           'ExportLicenseNumber' => NULL,
           'ExportLicenseExpirationDate' => NULL,
           'CIMarksAndNumbers' => NULL,
           'NaftaDetail' => NULL,
        )),
      ),
       'ExportDetail' => NULL,
       'RegulatoryControls' => NULL,
    )),
     'RequestedPackageLineItems' => 
    array (
      0 => 
      RequestedPackageLineItem::__set_state(array(
         'SequenceNumber' => NULL,
         'GroupNumber' => NULL,
         'GroupPackageCount' => NULL,
         'VariableHandlingChargeDetail' => NULL,
         'InsuredValue' => NULL,
         'Weight' => 
        stdClass::__set_state(array(
           'Units' => 'LB',
           'Value' => 6,
        )),
         'Dimensions' => 
        stdClass::__set_state(array(
           'Length' => 10,
           'Width' => 8,
           'Height' => 9,
           'Units' => 'IN',
        )),
         'PhysicalPackaging' => NULL,
         'ItemDescription' => NULL,
         'CustomerReferences' => NULL,
         'SpecialServicesRequested' => NULL,
         'ContentRecords' => NULL,
      )),
    ),
  )),
))

[当然更改专有信息]

还有许多其他字段仍然“空”,但有很多,我不确定需要填写哪些字段才能获得关税和税收估算。(我得到的只是这些字段返回的“NULL”)

4

1 回答 1

5

嗨,我已经使用 PHP 完成了这项工作。我使用soap-UI 来测试API 并通过getRequest 调用获得EDT。请参阅下面的肥皂请求。

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v13="http://fedex.com/ws/rate/v13" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <v13:RateRequest>
         <v13:WebAuthenticationDetail>
            <v13:UserCredential>
               <v13:Key>*********</v13:Key>
               <v13:Password>*********</v13:Password>
            </v13:UserCredential>
         </v13:WebAuthenticationDetail>
         <v13:ClientDetail>
            <v13:AccountNumber>*********</v13:AccountNumber>
            <v13:MeterNumber>*********</v13:MeterNumber>
         </v13:ClientDetail>
         <v13:TransactionDetail>
            <v13:CustomerTransactionId>Rate a Single Package V13</v13:CustomerTransactionId>
         </v13:TransactionDetail>
         <v13:Version>
            <v13:ServiceId>crs</v13:ServiceId>
            <v13:Major>13</v13:Major>
            <v13:Intermediate>0</v13:Intermediate>
            <v13:Minor>0</v13:Minor>
         </v13:Version>
         <v13:ReturnTransitAndCommit>true</v13:ReturnTransitAndCommit>
         <v13:RequestedShipment>
            <v13:ShipTimestamp>2013-07-15T12:20:47+02:00</v13:ShipTimestamp>
            <v13:DropoffType>REGULAR_PICKUP</v13:DropoffType>
            <v13:PackagingType>YOUR_PACKAGING</v13:PackagingType>
            <v13:Shipper>
               <v13:Contact>
                  <v13:PersonName>Vyshakh Parakkat</v13:PersonName>
                  <v13:CompanyName>Parakkat</v13:CompanyName>
                  <v13:PhoneNumber>08154711</v13:PhoneNumber>
               </v13:Contact>
               <v13:Address>
                  <v13:StreetLines>Dubai</v13:StreetLines>
                  <v13:City>Dubai city</v13:City>
                  <v13:StateOrProvinceCode/>
<v13:PostalCode>43448</v13:PostalCode>
<v13:CountryCode>AE</v13:CountryCode> 
               </v13:Address>
            </v13:Shipper>
            <v13:Recipient>
               <v13:Contact>
                  <v13:PersonName>Jane Recipient</v13:PersonName>
                  <v13:CompanyName>XYZ Company</v13:CompanyName>
                  <v13:PhoneNumber>8005551212</v13:PhoneNumber>
               </v13:Contact>
               <v13:Address>
                  <v13:StreetLines>Test Recipient Line 1</v13:StreetLines>
                  <v13:City>Ponnani</v13:City>
                  <v13:StateOrProvinceCode/>
                  <v13:PostalCode>679577</v13:PostalCode>
                  <v13:CountryCode>IN</v13:CountryCode>
               </v13:Address>
            </v13:Recipient>
            <v13:CustomsClearanceDetail>
               <v13:DutiesPayment>
                  <v13:PaymentType>SENDER</v13:PaymentType>
                  <v13:Payor>
                   <v13:ResponsibleParty>
                     <v13:AccountNumber>*********</v13:AccountNumber>
                     </v13:ResponsibleParty>
                  </v13:Payor>
               </v13:DutiesPayment>
               <v13:Commodities>
                  <v13:Name>Mobile phone</v13:Name>
                  <v13:NumberOfPieces>1</v13:NumberOfPieces>
                  <v13:Description>TELEPHONE SETS, 
                  INCLUDING TELEPHONES FOR CELLULAR NETWORKS OR FOR OTHER WIRELESS NETWORKS.
                  OTHER APPARATUS FOR THE TRANSMISSION OR RECEPTION OF VOICE, 
                  IMAGES OR OTHER DATA, INCLUDING APPARATUS FOR COMMUNICATION IN A WIRED 
                  OR WIRELESS NETWORK (SUCH AS A LOCAL OR WIDE AREA NETWORK), 
                  OTHER THAN TRANSMISSION OR RECEPTION APPARATUS OF HEADING 8443, 
                  8525, 8527 OR 8528 PARTS THEREOF</v13:Description>
                  <v13:CountryOfManufacture>CN</v13:CountryOfManufacture>
                  <v13:HarmonizedCode>851711100000</v13:HarmonizedCode>
                  <v13:Weight>
                     <v13:Units>KG</v13:Units>
                     <v13:Value>.5</v13:Value>
                  </v13:Weight>
                  <v13:Quantity>1</v13:Quantity>
                  <v13:QuantityUnits>PCS</v13:QuantityUnits>
                  <v13:CustomsValue>
                     <v13:Currency>EUR</v13:Currency>
                     <v13:Amount>368</v13:Amount>
                  </v13:CustomsValue>
               </v13:Commodities>
            </v13:CustomsClearanceDetail>
            <v13:SmartPostDetail/>
            <v13:BlockInsightVisibility>0</v13:BlockInsightVisibility>
            <v13:ShippingDocumentSpecification/>
            <v13:RateRequestTypes>ACCOUNT</v13:RateRequestTypes>
            <!-- Important element for EDT: -->
            <v13:EdtRequestType>ALL</v13:EdtRequestType>
            <v13:PackageCount>1</v13:PackageCount>
            <v13:RequestedPackageLineItems>
               <v13:SequenceNumber>1</v13:SequenceNumber>
               <v13:GroupPackageCount>1</v13:GroupPackageCount>
               <v13:Weight>
                  <v13:Units>KG</v13:Units>
                  <v13:Value>0.5</v13:Value>
               </v13:Weight>
               <v13:Dimensions>
                  <v13:Length>12</v13:Length>
                  <v13:Width>8</v13:Width>
                  <v13:Height>6</v13:Height>
                  <v13:Units>CM</v13:Units>
               </v13:Dimensions>
            </v13:RequestedPackageLineItems>
         </v13:RequestedShipment>
      </v13:RateRequest>
   </soapenv:Body>
</soapenv:Envelope>
于 2013-05-29T12:08:47.657 回答