Public API: Overview

Public API

Quick Summary: Connect your systems to account data through the FedEx REST API.

Overview

The Public API connects your systems to orders, returns, products, inventory, tracking, and shipping data. Use it for custom integrations, automated workflows, reporting, or your own applications.

Quick start

  1. Open the user menu in the top right and select Developers.
  2. Select Get Access when the page offers it.
  3. Select Explore to open the API reference.
  4. Use the displayed sandbox URL and Sandbox Token for testing.
  5. On the production Developers page, use Production Token with its displayed URL for live requests.

If no production token has been issued, contact your Account Manager through a secure channel.

With Integrations access, Public API under Account Management → Integrations opens the same page. The API is mounted at /api/v1/, /api/v2/, and /api/v3/.

Note: If neither route is available, ask your company administrator to review your Developers or Integrations access.

Accessing the API documentation

Select Explore to open the API reference in a new tab. It documents available routes, request fields, response formats, authentication, and examples. Use API Endpoint Reference for a concise route inventory.

Authentication

The API uses a token tied to your client account. Send the token in this header:

Authorization: Token YOUR_API_TOKEN
Accept: application/json
Credential Availability and use
Production Token Used for live requests. The production Developers page displays an issued token with its matching production URL. Sandbox does not display it.
Sandbox Token Used for testing against the sandbox environment. It cannot change production data.
Sandbox account Provides the sandbox portal URL and sign-in credentials when they have been provisioned.

Select Get Access when shown. After provisioning succeeds, the production page displays the issued Production Token and any available sandbox credentials. Use the URL shown with each token so the token and environment match.

On the production Developers page, use Regenerate Token beside the token you need to replace. Confirm the selected environment before continuing. Use Regenerate Credentials for the Sandbox account password. Regenerating a token invalidates its previous value. Update every connected integration after replacement.

Do not send sandbox requests to the production URL or use production credentials against the sandbox. If a request returns 401, begin with the header format and environment.

Use GET /client/ as a connectivity check after authentication. Its success confirms the token and account scope before a larger request.

Key API resources

Resource group Common use
Orders and returns Create, retrieve, update, export, and act on orders and return orders.
Products and inventory Maintain products and item groups. Read product stock entries.
ASNs Create and manage Advance Shipping Notices.
Tracking Retrieve order or client tracking events and create client tracking events.
Shipping and addresses Read rates, couriers, shipping options, countries, warehouses, and shipping zones. Manage address records.
Webhooks Subscribe to order, return order, ASN, product, and tracking events.

Some controls depend on account configuration or record status. Call OPTIONS on an endpoint or read the generated reference before sending a write request.

NS-PID on Parcel Forwarding orders

For a Parcel Forwarding order, add ns_pid to each applicable entry in order_lines. Public API v1 and v2 accept the same field. You can supply the item details directly without first creating a catalog product.

The following is an order-line excerpt; include the remaining required order and item fields from the API reference:

{
  "order_type": "parcel_forwarding",
  "order_lines": [
    {
      "item_sku": "FW-ITEM-001",
      "ns_pid": "MFR-MODEL-001"
    }
  ]
}

ns_pid is an optional string of up to 200 characters . Spaces and symbols are preserved; null is rejected. Omit it when creating a new item to leave the value empty. When updating an existing temporary order item, omit it to preserve the value or send "ns_pid": "" to clear it. The saved value is returned in Parcel Forwarding order-line responses.

If the line references an existing saved SKU, the catalog product's NS-PID is used and the supplied value is ignored. To change a saved catalog product, use the Products API or the product form.

Forward quarantined items

To create a forward order from quarantined return items, set stock_type to quarantine. Add condition to an order line when that line must use one return condition.

{
  "item_sku": "SKU-001",
  "quantity": 2,
  "condition": "new"
}

Omit condition when any quarantined item for that SKU can be used. Use /return_items/return-item-conditions/available-options/ to read codes available to the account.

The standard codes are new, used, unset, damaged, damaged_packaging, expired, and cannot_decide. An account can hide some system conditions. Active custom conditions can also be available.

The API checks the requested SKU, quantity, and condition before it creates the order. An invalid condition or insufficient matching stock returns a validation error.

Webhooks

Create subscriptions through POST /webhooks/. The available topics cover order, return order, ASN, product, and tracking events. HTTPS callback URLs are required.

Each delivery is a separate HTTP POST with a Webhook-Topic header. The callback must answer with a 2xx status within 30 seconds . Redirects fail delivery.

Failed deliveries use bounded exponential retries. The subscription owner receives a warning after 1 day of failures. The subscription is disabled after 5 days of failures.

Creating a subscription does not prove callback delivery. Confirm a 2xx response and monitor the subscription state. The sandbox supports POST /webhooks/trigger/ for a test event.

Events fired while a subscription is disabled are not replayed. Fix the callback, enable the subscription with PATCH /webhooks/{id}/, and recover missed records through the relevant list routes.

Troubleshooting

Issue Cause Solution
Developers is missing The contact or account lacks Developers access Ask your company administrator or Account Manager to review access
Get Access fails Credential provisioning could not complete Check the page again later or contact your Account Manager or support with the time of the failure
No production token appears You are viewing sandbox, or no production token has been issued Open the production Developers page. Select Get Access if offered, or contact your Account Manager through a secure channel
API returns 401 Unauthorized The token is missing, replaced, or belongs to the other environment Use Authorization: Token YOUR_TOKEN with the token and URL for the same environment
API returns 403 Forbidden The requested action is unavailable for the account or record Check the route and action in the generated reference, then review account access with support
API returns 404 Not Found The route, record, or task is unavailable to this token Compare the exact path with the reference and confirm the record belongs to this account
Sandbox calls affect live data A production token or URL was used for testing Use the displayed sandbox URL with Sandbox Token
Forward order rejects a condition or quantity The code is unavailable or matching quarantine stock is insufficient Read available condition codes and quarantine quantities, then retry with a valid line
Webhook does not arrive The callback is not HTTPS, returns outside 2xx, redirects, or the subscription is inactive Fix the endpoint and confirm is_active with GET /webhooks/{id}/

Support

For API questions or access problems, contact qa-testing+operations@floship.com. Include the request path, environment, response status, and request time. Never include a token in your support message.