> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runalloy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FedEx

> Integration details and setup guide for the FedEx connector in Alloy Automation.

## Pre-Built Tooling

| Category                            | Details                                        |
| ----------------------------------- | ---------------------------------------------- |
| **Authentication**                  | OAuth 2.0 (Client Credentials) or Bearer Token |
| **Two-Way Sync**                    | Yes                                            |
| **Events Supported**                | Yes (Webhooks/Tracking)                        |
| **Realtime**                        | Yes                                            |
| **Supports Rate Limiting**          | Yes                                            |
| **Authentication Scopes Supported** | N/A (Client Credentials flow)                  |

***

## Objects Supported

Alloy Automation supports syncing the following objects from **FedEx**:

* **Shipments**
* **Tracking**
* **Rates**
* **Address Validation**
* **Pickup**
* **Service Availability**
* **Documents** (Labels, Commercial Invoices)
* **Location Services**

***

## Set Up Guide

### Trial Access

| Question                                           | Answer                                                                                                                                                                     |
| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Offers free trial?**                             | Yes. FedEx provides a test environment for developers. Sign up for a FedEx Developer account at [https://developer.fedex.com](https://developer.fedex.com) to get started. |
| **Requires requires paid sandbox**                 | No paid sandbox required. FedEx provides a free test environment with test credentials.                                                                                    |
| **Requires partnership to obtain authentication?** | Yes. You need a FedEx account number to access production APIs. Register at [https://developer.fedex.com](https://developer.fedex.com).                                    |

***

### Authentication (OAuth 2.0 Client Credentials)

FedEx uses OAuth 2.0 Client Credentials flow for API authentication.

1. Go to **FedEx Developer Portal** at [https://developer.fedex.com](https://developer.fedex.com).
2. Sign in or create a new developer account.
3. Navigate to **My Projects** and create a new project.
4. Select the APIs you need (e.g., Ship, Track, Rate) and note the API key and secret key provided.
5. Your application will use these credentials to obtain access tokens via the OAuth 2.0 Client Credentials flow:
   * Token URL: [https://apis.fedex.com/oauth/token](https://apis.fedex.com/oauth/token)
   * Grant Type: client\_credentials
6. Enter your **API Key** (Client ID) and **Secret Key** (Client Secret) into Alloy Automation.

#### API Documentation

For detailed API documentation, visit: [https://developer.fedex.com/api/en-us/home.html](https://developer.fedex.com/api/en-us/home.html)

#### Important Notes

* FedEx APIs require a valid FedEx account number for production use
* Test environment credentials are separate from production credentials
* Access tokens expire after a certain period and must be refreshed
* Different APIs may require different API products to be enabled in your project

***

## Use Cases

### 1) Shipping rate calculation

Fetch real-time shipping rates from FedEx at checkout, allowing customers to compare service levels and costs before completing their purchase.

### 2) Label generation and fulfillment

Automatically create FedEx shipping labels when orders are placed, including domestic and international shipments with customs documentation.

### 3) Package tracking

Retrieve real-time tracking updates for FedEx shipments and push notifications to customers about their delivery status.

### 4) Address verification

Validate shipping addresses before creating shipments to reduce delivery failures and ensure accurate address information.

### 5) Pickup scheduling

Automatically schedule FedEx pickups when shipments are ready, streamlining the fulfillment process and eliminating manual pickup requests.

***

## API Gotchas

* **OAuth token expiration:** Access tokens expire after a set period (typically 1 hour). Implement token refresh logic to avoid authentication failures during long-running operations.
* **Account number required:** Most FedEx API operations require a valid FedEx account number. Ensure your account is properly configured before attempting to create shipments.
* **Test vs production:** Test environment data doesn't create real shipments or charges. Always test thoroughly before switching to production credentials.
* **Service availability:** Not all FedEx services are available in all regions. Check service availability before attempting to create shipments to specific destinations.
* **Address validation:** FedEx performs strict address validation. Invalid or incomplete addresses will result in errors during shipment creation.

> For questions or troubleshooting, contact **[support@runalloy.com](mailto:support@runalloy.com)**.
