4

Is anyone aware what fields are necessary to generate duties and taxes in the response from a FedEx web services RateRequest (SOAP) query? I've been put on a multiple-day hold waiting to hear back from their web services team and have a manager breathing down my neck to try to get a duties and taxes estimate from our shipping rate modules.

I've tried everything I can think of and/or glean from the sparse documentation on the Soap services. Here's an example query I'm sending (php SoapClient data):

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,
      )),
    ),
  )),
))

[proprietary information altered of course]

There are a number of other fields still 'null' but there are so many, I'm not sure which ones need to be filled in to get duties and taxes estimates back. (all I get is 'NULL' returned for these fields)

Neoh
  • 15,906
  • 14
  • 66
  • 78
Scott
  • 7,983
  • 2
  • 26
  • 41

1 Answers1

5

Hi I have done this using PHP. I have used soap-UI to test the API and got EDT with getRequest call. Please see soap request below.

<?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>
  • 1
    The crucial part of the snippet above is the `EdtRequestType` variable. I was able to get duties and taxes calculated for shipments from US to India and Germany. One challenge I've come across is that different countries have different harmonized codes for the same type of good. For instance, we are in the business of shipping printed goods (business cards, etc.) and for India the code is 491199900000 whereas for Germany it is 491199000000. In the case of an invalid harmonized code, FedEx will issue a warning, but it still returns the rates without any customs details, so beware. – Franklin P Strube Dec 02 '14 at 21:22
  • You are absolutely right. These HS codes for a material vary depending on the ship to country, so the import duty and tax may change :) – vyshakh parakkat Jan 14 '15 at 11:49