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.
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
| Group | Main Role |
|---|---|
| Warehouse Staff | Create shipping labels, print labels, pack goods |
| Sales Staff | Calculate rates, add shipping fees to orders |
| Logistics Manager | Configure shipping methods, manage FedEx account |
EN/VI Terminology Reference
| Fields | Trường dữ liệu | Description |
|---|---|---|
| API Key | Khóa API | API key from FedEx Developer |
| Secret Key | Mã khóa bí mật | Secret key from FedEx Developer |
| Account Number | Số tài khoản | FedEx account number |
| FedEx Service Type | Loại dịch vụ FedEx | Priority Overnight, International Priority, Ground |
| FedEx Drop-Off Type | Hình thức gửi hàng FedEx | How to hand off shipment |
| FedEx Package Type | Loại kiện hàng FedEx | Default package type |
| Package Weight Unit | Đơn vị trọng lượng gói | KG or LB |
| Package Length Unit | Đơn vị chiều dài kiện hàng | CM or Inches |
| Label Size | Kích thước nhãn | PAPER_LETTER, PAPER_4X6 |
| Label Format | Định dạng nhãn | PDF, PNG, ZPL |
| Email Notifications | Thông báo email | Send notifications to customers |
| Duties paid by | Người trả thuế quan | Sender or Recipient |
| Residential delivery | Giao hàng tận nhà | Mark address as residential |
| Electronic Trade Documents | Chứ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
| Information | Location | Required |
|---|---|---|
| HS Code | Product → Accounting tab | Yes |
| Country of Origin | Product | Yes |
| Product Weight | Product | Yes |
| Customs Value | Product value | Yes |
| VAT Number | Partner (company) | Recommended |
| Incoterms | Sales order | Recommended |
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
| Error | Cause | Solution |
|---|---|---|
| You must setup client ID and secret | Missing API Key/Secret | Enter complete API Key, Secret Key, Account Number |
| Could not decode response | FedEx API error or timeout | Check internet, retry, check FedEx API status |
| Something went wrong | Connection error | Check network, firewall, retry later |
| Invalid address | Missing address info | Check Street, City, ZIP, State, Country |
| Automated return label not supported | Multi-package shipment | Disable Return Label on Delivery, create manually |
| Missing customs info | Missing HS code/origin | Enter HS Code, Country of Origin, weight |