fedex offers acceleration packages in www.fedex.com/us/developer/ , you will find information about different types of calls to their webservices. as an example if you want to request a rate from fedex you will need to do something like this:

<?php

require_once('../../library/fedex-common.php5');

$newline = "<br />";
//The WSDL is not included with the sample code.
//Please include and reference in $path_to_wsdl variable.
$path_to_wsdl = "../../wsdl/RateService_v13.wsdl";

ini_set("soap.wsdl_cache_enabled", "0");

$client = new SoapClient($path_to_wsdl, array('trace' => 1)); // Refer to http://us3.php.net/manual/en/ref.soap.php for more information

$request['WebAuthenticationDetail'] = array(
    'UserCredential' =>array(
        'Key' => getProperty('key'), 
        'Password' => getProperty('password')
    )
); 
$request['ClientDetail'] = array(
    'AccountNumber' => getProperty('shipaccount'), 
    'MeterNumber' => getProperty('meter')
);
$request['TransactionDetail'] = array('CustomerTransactionId' => ' *** Rate Request v13 using PHP ***');
$request['Version'] = array(
    'ServiceId' => 'crs', 
    'Major' => '13', 
    'Intermediate' => '0', 
    'Minor' => '0'
);
$request['ReturnTransitAndCommit'] = true;
$request['RequestedShipment']['DropoffType'] = 'REGULAR_PICKUP'; // valid values REGULAR_PICKUP, REQUEST_COURIER, ...
$request['RequestedShipment']['ShipTimestamp'] = date('c');
$request['RequestedShipment']['ServiceType'] = 'INTERNATIONAL_PRIORITY'; // valid values STANDARD_OVERNIGHT, PRIORITY_OVERNIGHT, FEDEX_GROUND, ...
$request['RequestedShipment']['PackagingType'] = 'YOUR_PACKAGING'; // valid values FEDEX_BOX, FEDEX_PAK, FEDEX_TUBE, YOUR_PACKAGING, ...
$request['RequestedShipment']['TotalInsuredValue']=array('Ammount'=>100,'Currency'=>'USD');
$request['RequestedShipment']['Shipper'] = addShipper();
$request['RequestedShipment']['Recipient'] = addRecipient();
$request['RequestedShipment']['ShippingChargesPayment'] = addShippingChargesPayment();
$request['RequestedShipment']['RateRequestTypes'] = 'ACCOUNT'; 
$request['RequestedShipment']['RateRequestTypes'] = 'LIST'; 
$request['RequestedShipment']['PackageCount'] = '1';
$request['RequestedShipment']['RequestedPackageLineItems'] = addPackageLineItem1();
try 
{
    if(setEndpoint('changeEndpoint'))
    {
        $newLocation = $client->__setLocation(setEndpoint('endpoint'));
    }

    $response = $client ->getRates($request);

    if ($response -> HighestSeverity != 'FAILURE' && $response -> HighestSeverity != 'ERROR')
    {   
        $rateReply = $response -> RateReplyDetails;
        echo '<table border="1">';
        echo '<tr><td>Service Type</td><td>Amount</td><td>Delivery Date</td></tr><tr>';
        $serviceType = '<td>'.$rateReply -> ServiceType . '</td>';
        $amount = '<td>$' . number_format($rateReply->RatedShipmentDetails[0]->ShipmentRateDetail->TotalNetCharge->Amount,2,".",",") . '</td>';
        if(array_key_exists('DeliveryTimestamp',$rateReply)){
            $deliveryDate= '<td>' . $rateReply->DeliveryTimestamp . '</td>';
        }else if(array_key_exists('TransitTime',$rateReply)){
            $deliveryDate= '<td>' . $rateReply->TransitTime . '</td>';
        }else {
            $deliveryDate='<td>&nbsp;</td>';
        }
        echo $serviceType . $amount. $deliveryDate;
        echo '</tr>';
        echo '</table>';

        printSuccess($client, $response);
    }
    else
    {
        printError($client, $response);
    } 

    writeToLog($client);    // Write to log file   

} catch (SoapFault $exception) {
   printFault($exception, $client);        
}

function addShipper(){
    $shipper = array(
        'Contact' => array(
            'PersonName' => 'Sender Name',
            'CompanyName' => 'Sender Company Name',
            'PhoneNumber' => '9012638716'),
        'Address' => array(
            'StreetLines' => array('Address Line 1'),
            'City' => 'Collierville',
            'StateOrProvinceCode' => 'TN',
            'PostalCode' => '38017',
            'CountryCode' => 'US')
    );
    return $shipper;
}
function addRecipient(){
    $recipient = array(
        'Contact' => array(
            'PersonName' => 'Recipient Name',
            'CompanyName' => 'Company Name',
            'PhoneNumber' => '9012637906'
        ),
        'Address' => array(
            'StreetLines' => array('Address Line 1'),
            'City' => 'Richmond',
            'StateOrProvinceCode' => 'BC',
            'PostalCode' => 'V7C4V4',
            'CountryCode' => 'CA',
            'Residential' => false)
    );
    return $recipient;                                      
}
function addShippingChargesPayment(){
    $shippingChargesPayment = array(
        'PaymentType' => 'SENDER', // valid values RECIPIENT, SENDER and THIRD_PARTY
        'Payor' => array(
            'ResponsibleParty' => array(
            'AccountNumber' => getProperty('billaccount'),
            'CountryCode' => 'US')
        )
    );
    return $shippingChargesPayment;
}
function addLabelSpecification(){
    $labelSpecification = array(
        'LabelFormatType' => 'COMMON2D', // valid values COMMON2D, LABEL_DATA_ONLY
        'ImageType' => 'PDF',  // valid values DPL, EPL2, PDF, ZPLII and PNG
        'LabelStockType' => 'PAPER_7X4.75');
    return $labelSpecification;
}
function addSpecialServices(){
    $specialServices = array(
        'SpecialServiceTypes' => array('COD'),
        'CodDetail' => array(
            'CodCollectionAmount' => array('Currency' => 'USD', 'Amount' => 150),
            'CollectionType' => 'ANY')// ANY, GUARANTEED_FUNDS
    );
    return $specialServices; 
}
function addPackageLineItem1(){
    $packageLineItem = array(
        'SequenceNumber'=>1,
        'GroupPackageCount'=>1,
        'Weight' => array(
            'Value' => 50.0,
            'Units' => 'LB'
        ),
        'Dimensions' => array(
            'Length' => 108,
            'Width' => 5,
            'Height' => 5,
            'Units' => 'IN'
        )
    );
    return $packageLineItem;
}

?>

so go to fedex.com, download wsdl or xml with library and more. run this code and you will receive a quote. important to say that you need an account to access that area, where you will receive a test meter-account to try, and then move to production.. hope it helps.

Answer from s_h on Stack Overflow
Top answer
1 of 1
7

fedex offers acceleration packages in www.fedex.com/us/developer/ , you will find information about different types of calls to their webservices. as an example if you want to request a rate from fedex you will need to do something like this:

<?php

require_once('../../library/fedex-common.php5');

$newline = "<br />";
//The WSDL is not included with the sample code.
//Please include and reference in $path_to_wsdl variable.
$path_to_wsdl = "../../wsdl/RateService_v13.wsdl";

ini_set("soap.wsdl_cache_enabled", "0");

$client = new SoapClient($path_to_wsdl, array('trace' => 1)); // Refer to http://us3.php.net/manual/en/ref.soap.php for more information

$request['WebAuthenticationDetail'] = array(
    'UserCredential' =>array(
        'Key' => getProperty('key'), 
        'Password' => getProperty('password')
    )
); 
$request['ClientDetail'] = array(
    'AccountNumber' => getProperty('shipaccount'), 
    'MeterNumber' => getProperty('meter')
);
$request['TransactionDetail'] = array('CustomerTransactionId' => ' *** Rate Request v13 using PHP ***');
$request['Version'] = array(
    'ServiceId' => 'crs', 
    'Major' => '13', 
    'Intermediate' => '0', 
    'Minor' => '0'
);
$request['ReturnTransitAndCommit'] = true;
$request['RequestedShipment']['DropoffType'] = 'REGULAR_PICKUP'; // valid values REGULAR_PICKUP, REQUEST_COURIER, ...
$request['RequestedShipment']['ShipTimestamp'] = date('c');
$request['RequestedShipment']['ServiceType'] = 'INTERNATIONAL_PRIORITY'; // valid values STANDARD_OVERNIGHT, PRIORITY_OVERNIGHT, FEDEX_GROUND, ...
$request['RequestedShipment']['PackagingType'] = 'YOUR_PACKAGING'; // valid values FEDEX_BOX, FEDEX_PAK, FEDEX_TUBE, YOUR_PACKAGING, ...
$request['RequestedShipment']['TotalInsuredValue']=array('Ammount'=>100,'Currency'=>'USD');
$request['RequestedShipment']['Shipper'] = addShipper();
$request['RequestedShipment']['Recipient'] = addRecipient();
$request['RequestedShipment']['ShippingChargesPayment'] = addShippingChargesPayment();
$request['RequestedShipment']['RateRequestTypes'] = 'ACCOUNT'; 
$request['RequestedShipment']['RateRequestTypes'] = 'LIST'; 
$request['RequestedShipment']['PackageCount'] = '1';
$request['RequestedShipment']['RequestedPackageLineItems'] = addPackageLineItem1();
try 
{
    if(setEndpoint('changeEndpoint'))
    {
        $newLocation = $client->__setLocation(setEndpoint('endpoint'));
    }

    $response = $client ->getRates($request);

    if ($response -> HighestSeverity != 'FAILURE' && $response -> HighestSeverity != 'ERROR')
    {   
        $rateReply = $response -> RateReplyDetails;
        echo '<table border="1">';
        echo '<tr><td>Service Type</td><td>Amount</td><td>Delivery Date</td></tr><tr>';
        $serviceType = '<td>'.$rateReply -> ServiceType . '</td>';
        $amount = '<td>$' . number_format($rateReply->RatedShipmentDetails[0]->ShipmentRateDetail->TotalNetCharge->Amount,2,".",",") . '</td>';
        if(array_key_exists('DeliveryTimestamp',$rateReply)){
            $deliveryDate= '<td>' . $rateReply->DeliveryTimestamp . '</td>';
        }else if(array_key_exists('TransitTime',$rateReply)){
            $deliveryDate= '<td>' . $rateReply->TransitTime . '</td>';
        }else {
            $deliveryDate='<td>&nbsp;</td>';
        }
        echo $serviceType . $amount. $deliveryDate;
        echo '</tr>';
        echo '</table>';

        printSuccess($client, $response);
    }
    else
    {
        printError($client, $response);
    } 

    writeToLog($client);    // Write to log file   

} catch (SoapFault $exception) {
   printFault($exception, $client);        
}

function addShipper(){
    $shipper = array(
        'Contact' => array(
            'PersonName' => 'Sender Name',
            'CompanyName' => 'Sender Company Name',
            'PhoneNumber' => '9012638716'),
        'Address' => array(
            'StreetLines' => array('Address Line 1'),
            'City' => 'Collierville',
            'StateOrProvinceCode' => 'TN',
            'PostalCode' => '38017',
            'CountryCode' => 'US')
    );
    return $shipper;
}
function addRecipient(){
    $recipient = array(
        'Contact' => array(
            'PersonName' => 'Recipient Name',
            'CompanyName' => 'Company Name',
            'PhoneNumber' => '9012637906'
        ),
        'Address' => array(
            'StreetLines' => array('Address Line 1'),
            'City' => 'Richmond',
            'StateOrProvinceCode' => 'BC',
            'PostalCode' => 'V7C4V4',
            'CountryCode' => 'CA',
            'Residential' => false)
    );
    return $recipient;                                      
}
function addShippingChargesPayment(){
    $shippingChargesPayment = array(
        'PaymentType' => 'SENDER', // valid values RECIPIENT, SENDER and THIRD_PARTY
        'Payor' => array(
            'ResponsibleParty' => array(
            'AccountNumber' => getProperty('billaccount'),
            'CountryCode' => 'US')
        )
    );
    return $shippingChargesPayment;
}
function addLabelSpecification(){
    $labelSpecification = array(
        'LabelFormatType' => 'COMMON2D', // valid values COMMON2D, LABEL_DATA_ONLY
        'ImageType' => 'PDF',  // valid values DPL, EPL2, PDF, ZPLII and PNG
        'LabelStockType' => 'PAPER_7X4.75');
    return $labelSpecification;
}
function addSpecialServices(){
    $specialServices = array(
        'SpecialServiceTypes' => array('COD'),
        'CodDetail' => array(
            'CodCollectionAmount' => array('Currency' => 'USD', 'Amount' => 150),
            'CollectionType' => 'ANY')// ANY, GUARANTEED_FUNDS
    );
    return $specialServices; 
}
function addPackageLineItem1(){
    $packageLineItem = array(
        'SequenceNumber'=>1,
        'GroupPackageCount'=>1,
        'Weight' => array(
            'Value' => 50.0,
            'Units' => 'LB'
        ),
        'Dimensions' => array(
            'Length' => 108,
            'Width' => 5,
            'Height' => 5,
            'Units' => 'IN'
        )
    );
    return $packageLineItem;
}

?>

so go to fedex.com, download wsdl or xml with library and more. run this code and you will receive a quote. important to say that you need an account to access that area, where you will receive a test meter-account to try, and then move to production.. hope it helps.

🌐
Pipedream
pipedream.com › apps › fedex › integrations › python
Integrate the FedEx API with the Python API - Pipedream
Pipedream's integration platform allows you to integrate FedEx and Python remarkably fast. Free for developers. The FedEx API provides a direct line to FedEx's shipping, tracking, and rate services, allowing you to automate the logistics within ...
Discussions

FedEx Tracking
As far as I can see, fedex does have a bunch of API's, so yes, you can use that: https://developer.fedex.com/api/en-us/catalog/track.html#/api Hell, they even give you full code examples in many languages: https://developer.fedex.com/api/en-us/catalog/track/v1/docs.html#operation/Track%20by%20Tracking%20Number import requests url = "https://apis-sandbox.fedex.com/track/v1/trackingnumbers" payload = input # 'input' refers to JSON Payload headers = { 'Content-Type': "application/json", 'X-locale': "en_US", 'Authorization': "Bearer " } response = requests.post(url, data=payload, headers=headers) print(response.text) Did you search for this at all? More on reddit.com
🌐 r/learnpython
3
0
June 19, 2023
FedEx API Rate Quote Returns 404: “The resource you requested is no longer available”
What happens if you try /rate/v1/rates/quotes? It looks like your path is missing the s at the end. More on reddit.com
🌐 r/webdev
2
1
June 28, 2024
Getting full tracking details from Fedex API
Solved here in case anybody in the future has this problem and finds this post. https://www.reddit.com/r/learnprogramming/comments/17h2fqe/getting_full_tracking_details_from_fedex_api/?utm_source=share&utm_medium=web2x&context=3 More on reddit.com
🌐 r/webdev
3
2
October 26, 2023
FedEx & TNT API integaration
Welcome to the community! Please ensure that you are following the subreddit's posting rules. If you have any questions, feel free to contact the moderators. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/FedEx
6
1
July 8, 2024
🌐
Shippo
goshippo.com › carriers › fedex-api
FedEx API - Best FedEx API for E-commerce - Easy Integration
April 13, 2026 - ... FedEx 2Day® A.M. ... Easy-to-follow documentation, tutorials, and API reference in our developer center. Quickly integrate with client libraries in PHP, Python, cURL, Ruby, NodeJS, Java, and C#.
🌐
GitHub
github.com › benweatherman › python-ship
GitHub - benweatherman/python-ship: A Python interface to common shipping APIs (UPS, USPS, FedEx) · GitHub
fedex_config = { 'meter_number': 'FedEx Meter Number', 'password': 'FedEx API password', 'account_number': 'FedEx Account Number', 'key': 'FedEx API Key' } ups_config = { 'username': 'UPS Online Username', 'password': 'UPS Online Password', 'shipper_number': 'UPS Shipper Number', 'access_license': 'UPS API License' } The USPS module uses Endicia to calculate shipping rates and generate labels.
Starred by 51 users
Forked by 21 users
Languages   Python
🌐
FedEx
developer.fedex.com › api › en-us › catalog › rate.html
Rates and Transit Times API | FedEx Developer Portal
This API returns estimates for account-specific FedEx rates or FedEx standard list rates for all services available for the origin/destination pair provided, along with estimated cost of shipping with discounts, surcharges, fees and other factors that can affect your shipping rates.
🌐
GitHub
github.com › jzempel › fedex
GitHub - jzempel/fedex: FedEx API for Python
You could easily add additional ... are: get_addresses Get a list of validated shipping addresses. get_rates Get available rates for a given shipment....
Starred by 25 users
Forked by 58 users
Languages   Python 100.0% | Python 100.0%
🌐
Readthedocs
python-fedex.readthedocs.io › en › latest › quick_start.html
Quick Start — python-fedex 2.3.0 documentation
location_request = FedexSearchLocationRequest(CONFIG_OBJ) location_request.Address.PostalCode = '38119' location_request.Address.CountryCode = 'US' rate = FedexRateServiceRequest(CONFIG_OBJ) rate.RequestedShipment.DropoffType = 'REGULAR_PICKUP' rate.RequestedShipment.ServiceType = 'FEDEX_GROUND' rate.RequestedShipment.PackagingType = 'YOUR_PACKAGING' rate.RequestedShipment.Shipper.Address.StateOrProvinceCode = 'SC' rate.RequestedShipment.Shipper.Address.PostalCode = '29631' rate.RequestedShipment.Shipper.Address.CountryCode = 'US' rate.RequestedShipment.Recipient.Address.StateOrProvinceCode =
Find elsewhere
🌐
FedEx
developer.fedex.com › api › en-us › catalog › rate › docs.html
Rates and Transit Times API Documentation | FedEx Developer Portal
This API returns rate for the origin and destination for the requested service and will not validate whether that service is available for your ship date as well as origin and destination. Rates can also be retrieved for intra-Mexico FedEx Express shipping.
🌐
pytz
pythonhosted.org › fedex
API Documentation
This site hosts packages and documentation uploaded by authors of packages on the Python Package Index · The Python Software Foundation ("PSF") does not claim ownership of any third-party code or content ("third party content") placed on the web site and has no obligation of any kind with ...
🌐
EasyPost
easypost.com › home › fedex
FedEx - EasyPost
August 29, 2025 - Access specially discounted rates for FedEx Ground® Economy, FedEx Ground® returns, FedEx® International Connect Plus, and more.
🌐
GitHub
github.com › topics › fedex-api
fedex-api · GitHub Topics · GitHub
ruby ruby-gem sdk rest-api address-validation shipping-api shipping-rates shipping-label shipment-tracking tracking-number shipengine fedex-api ups-api usps-api shipping-cost address-normalization ... magento2 magento2-extension fedex magento2-module magento2-shipping magento2-extension-free fedexapi fedex-api ... Rastreamento automático de AWBs FedEx com dashboard web, alertas de atraso e relatórios Excel. Desenvolvido para operações de importação de medicamentos. python tracking automation dashboard brazil supply-chain pandas openpyxl logistica awb importacao fedex-api
🌐
FedEx
developer.fedex.com › api › en-us › catalog › ship › docs.html
Ship API Documentation | FedEx Developer Portal
Following are the benefits associated ... Europe to U.S. value proposition ... An easy, economical way to ship internationally. Pay a flat rate (based on destination) when you ship up to 22 lbs....
🌐
FedEx
developer.fedex.com › api › en-us › home.html
FedEx APIs and Developer Portal
Our full suite of APIs allows you to tap into the power of FedEx global software solutions. An API project will allow you to manage integration with any of our API solutions. ... Pull information from FedEx logistic solutions into your own applications to compare rates, create labels, process ...
🌐
Google Code
code.google.com › archive › p › python-fedex
Google Code Archive - Long-term storage for Google Code Project Hosting.
Archive · Skip to content · The Google Code Archive requires JavaScript to be enabled in your browser · Google · About Google · Privacy · Terms
🌐
FedEx Canada
fedex.com › en-ca › resources-tools › api.html
FedEx Shipping Integration and Web Services API | FedEx Canada
Integrate common FedEx functionality into your business workflow, including the ability to locate the best rates, estimate transit times, and track shipments.
🌐
Readthedocs
python-fedex.readthedocs.io
Python-Fedex: a suds fedex api wrapper — python-fedex 2.3.0 documentation
Navigation · index · next · python-fedex 2.3.0 documentation » · Python-Fedex: a suds fedex api wrapper¶ · Contents: · Installation · Quick Start · Initialize Config Object · Create and Delete a Shipment
🌐
GitHub
github.com › python-fedex-devs › python-fedex
GitHub - python-fedex-devs/python-fedex: A light wrapper around FedEx's SOAP API.
A light wrapper around FedEx's SOAP API. Contribute to python-fedex-devs/python-fedex development by creating an account on GitHub.
Starred by 158 users
Forked by 136 users
Languages   HTML 90.2% | Python 6.2% | CSS 1.7% | JavaScript 1.1% | Makefile 0.4% | Batchfile 0.4% | HTML 90.2% | Python 6.2% | CSS 1.7% | JavaScript 1.1% | Makefile 0.4% | Batchfile 0.4%
🌐
PyPI
pypi.org › project › fedex
fedex
JavaScript is disabled in your browser. Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser