FedEx Shipping - FedEx REST API Integration

Modern shipping integration with latest FedEx REST API

The FedEx Shipping module integrates with FedEx REST API to automatically calculate shipping rates from orders, create FedEx shipping labels directly from Odoo, generate return labels for customers, track shipments via FedEx tracking, and create commercial invoices for international shipments.

The module supports multiple FedEx services (Priority Overnight, International Priority, Ground, etc.) with a modern and more stable API than the legacy version.

REST API
Auto Rate Calculation
Shipping Labels
Tracking
Return Labels
Commercial Invoice
Email Notifications
Residential Delivery

Key Features

Key points

  • Integration with latest FedEx REST API for high performance

  • Automatic shipping rate calculation based on weight and address

  • Create shipping labels in multiple formats (PDF, PNG, ZPL)

  • Generate return labels automatically or manually

  • Real-time shipment tracking via FedEx tracking

  • Support email notifications for customers

  • Handle residential delivery with automatic surcharge

  • Create electronic trade documents (ETD) for international shipments


User Groups

User Permissions

GroupMain Role
Warehouse StaffCreate shipping labels, print labels, pack goods
Sales StaffCalculate rates, add shipping fees to orders
Logistics ManagerConfigure shipping methods, manage FedEx account

EN/VI Terminology Reference

FieldsTrường dữ liệuDescription
API KeyKhóa APIAPI key from FedEx Developer
Secret KeyMã khóa bí mậtSecret key from FedEx Developer
Account NumberSố tài khoảnFedEx account number
FedEx Service TypeLoại dịch vụ FedExPriority Overnight, International Priority, Ground
FedEx Drop-Off TypeHình thức gửi hàng FedExHow to hand off shipment
FedEx Package TypeLoại kiện hàng FedExDefault package type
Package Weight UnitĐơn vị trọng lượng góiKG or LB
Package Length UnitĐơn vị chiều dài kiện hàngCM or Inches
Label SizeKích thước nhãnPAPER_LETTER, PAPER_4X6
Label FormatĐịnh dạng nhãnPDF, PNG, ZPL
Email NotificationsThông báo emailSend notifications to customers
Duties paid byNgười trả thuế quanSender or Recipient
Residential deliveryGiao hàng tận nhàMark address as residential
Electronic Trade DocumentsChứng từ thương mại điện tửETD for international shipments
Union tax id (EORI/IOSS)Mã số thuế liên bang (EORI/IOSS)EU tax ID

Configure FedEx Account

To use the module, create a FedEx Developer account and obtain credentials:

Steps

  • 1. Visit FedEx Developer Website (developer.fedex.com)

  • 2. Register new account or login

  • 3. Go to My Projects tab and create new API project

  • 4. Select APIs: Rate (rating), Ship (labels), Track (tracking), Address Validation

  • 5. Get API Key and Secret Key from project

  • 6. Get Account Number from FedEx account

  • 7. For production: Click Go to API certification, follow certification steps

  • 8. After certification, create production key and link with FedEx account number


Configure Shipping Method

Create and configure FedEx shipping method in Odoo:

Steps

  • 1. Go to Inventory → Configuration → Delivery → Shipping Methods

  • 2. Click New and fill: Shipping Method (name), Provider (FedEx), Delivery Product

  • 3. FedEx Configuration tab - Authentication: API Key, Secret Key, Account Number

  • 4. Configure service: FedEx Service Type, FedEx Drop-Off Type

  • 5. Configure package: FedEx Package Type, Package Weight Unit (KG/LB), Package Length Unit

  • 6. Configure labels: Label Size (PAPER_LETTER/PAPER_4X6), Label Format (PDF)

  • 7. Advanced options: Email Notifications, Duties paid by, Residential delivery, Generate invoice

  • 8. Click Save and test connection with test order


Calculate Shipping Rates

Process for calculating rates from sales order:

Key points

  • Factors affecting rate: Weight and dimensions, sender/receiver address, service type, residential surcharge, insurance

  • Handle errors: Check complete address, product weight entered, valid credentials

Steps

  • 1. Create or open sales order (Sales → Orders → Quotations)

  • 2. Add products to order

  • 3. Click Add Shipping

  • 4. Select configured FedEx method

  • 5. Click Get Rate to fetch rate from FedEx

  • 6. System displays price and adds shipping line to order


Create Shipping Label

Process for creating label from Delivery Order:

Key points

  • Label information: Tracking barcode, sender/receiver address, service type, weight, ship date

  • Print label: Open delivery order → Chatter → Find attachment Label-<tracking>.pdf → Download and print

  • Multi-package: Create packages before validate, enter weight for each package, each package gets separate label

Steps

  • 1. Confirm sales order to create Delivery Order

  • 2. Go to Inventory → Operations → Delivery Orders

  • 3. Open delivery order to process

  • 4. Click Validate to confirm shipment

  • 5. Click Send to Shipper

  • 6. System calls FedEx API, creates shipment, generates label, saves tracking number, attaches PDF label


Create Return Label

Two ways to create return labels:

Key points

  • Manual: Open delivery order → Click Return → Create return picking → Click Get Return Label

  • Automatic: Enable Return Label on Delivery in configuration, return label auto-created when shipping

  • Note: FedEx does not support automatic return label generation for multi-package shipments

  • Send label: Download file from chatter, email to customer, customer prints and attaches to return package


Track Shipment

Tracking number is saved and can be tracked on FedEx:

Key points

  • View tracking: Tracking Reference field on delivery order, notification in chatter

  • Track online: Click Track button or tracking number → Opens FedEx tracking page

  • Email notifications: If Email Notifications enabled, customer receives email when shipment created, in transit, delivered, exception occurs


Cancel Shipment

Process for canceling FedEx shipment:

Key points

  • Conditions: Can only cancel shipment not yet picked up by FedEx

  • Recreate: After canceling, edit information if needed, click Send to Shipper again

Steps

  • 1. Open delivery order with created label

  • 2. Click Cancel Shipment

  • 3. System calls FedEx API to cancel, removes tracking number, clears shipping fee, logs action


Handle International Shipments

Required information for international shipments:

Key points

  • Commercial invoice: No (self-handle), Print PDF (print and attach), ETD (send electronically)

  • Duties: Sender (DDP) or Recipient (DDU)

  • EU tax ID: Enter EORI/IOSS in FedEx configuration if shipping to EU

Information Requirements

InformationLocationRequired
HS CodeProduct → Accounting tabYes
Country of OriginProductYes
Product WeightProductYes
Customs ValueProduct valueYes
VAT NumberPartner (company)Recommended
IncotermsSales orderRecommended

Practical Tips

Key points

  • Optimize rates: Enter accurate weight/dimensions, choose appropriate service, use FedEx packaging, mark correct residential/business

  • Reduce errors: Check complete address (street, city, zip, country), valid phone, customer email, weight > 0

  • Manage credentials: Use test when developing, switch to production when live, toggle Production Environment

  • Debug: Enable Log XML in Technical Settings, check logs in Settings → Technical → Logging


Common Error Handling

Common Errors and Solutions

ErrorCauseSolution
You must setup client ID and secretMissing API Key/SecretEnter complete API Key, Secret Key, Account Number
Could not decode responseFedEx API error or timeoutCheck internet, retry, check FedEx API status
Something went wrongConnection errorCheck network, firewall, retry later
Invalid addressMissing address infoCheck Street, City, ZIP, State, Country
Automated return label not supportedMulti-package shipmentDisable Return Label on Delivery, create manually
Missing customs infoMissing HS code/originEnter HS Code, Country of Origin, weight