# Sway Guide

Sway is a customer-focused shipping experience specializing in returns that offer same-day and next-day pickups, all for less
than the cost of ground shipping.

This guide includes detailed information on utilizing Sway shipping with the EasyPost API, focusing on account setup, rates,
label creation, manifests, tracking, and more.

---

## Prerequisites

### Account Registration

Sign up for an EasyPost account to obtain a **Test** and **Production** API
key. See Authentication and Key Management for more information.

> Note: Negotiated rates are only available in Production mode.

### Carrier Setup

Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts,
which can be enabled directly from the Dashboard. For additional carriers,
EasyPost supports a Bring Your Own Account (BYOA) option. This requires users to register
directly with the respective carrier.

#### Sway Shipper Account Registration

1. Contact Sway to request a shipper account. A representative will be in touch for additional details regarding the account.
2. Inform Sway about using EasyPost’s API for label purchases.
3. Acquire rates, a pickup location slug, and align any additional shipping needs.
4. Obtain the following test and production account credentials:
   1. Sway API Key
5. Input carrier-specific credentials within the
   EasyPost Carrier Account Dashboard for comprehensive rate access.

#### Sway Account via API

The API structure specified by EasyPost can also be used to add the Sway carrier shipper account.

```shell
curl -X POST https://api.easypost.com/v2/carrier_accounts \
  -u "$EASYPOST_API_KEY": \
  -H 'Content-Type: application/json' \
  -d '{
  "carrier_account": {
    "type": "SwayAccount",
    "description": "SwayAccount",
    "credentials": {
      "api_key": "VALUE"
    },
    "test_credentials": {
      "api_key": "VALUE"
    }
  }
}'
```

### Software Requirements

Download an EasyPost Client Library or utilize the REST API with cURL.

### Documentation Review

Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses.

Related:

- [Getting Started Guide](https://docs.easypost.com/guides/getting-started)
- [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers)

---

## Rates

Sway is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes.

- When creating a shipment, EasyPost requests Sway for shipment rates specific to the user's Sway account.
- The rates provided are directly from Sway and tailored to the user's specific account details.
- In cases of discrepancies or incorrect rates, users are advised to contact their Sway account representative.
- The representative can then update the rates to ensure user account accuracy.

---

## Service Levels

Sway offers the following service levels:

Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sway`.

---

## Hazardous Materials (HAZMAT)

The Sway policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to
contact Sway directly for specific hazmat inquiries.

---

## Pickups

Sway accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly
with Sway during the account registration process, they **cannot be scheduled via the EasyPost API**.

**Coming Soon:** In early 2025, the EasyPost API will support pickup options for Sway.

---

## Tracking

EasyPost simplifies package tracking by offering two methods:

- Tracking with an existing number and carrier.
- Using a Tracker included with an EasyPost-purchased shipping label.

The service integrates webhooks for timely shipment updates. For detailed information on
tracking methods, visit the Tracking Guide.

Related:

- [Trackers Documentation](https://docs.easypost.com/docs/trackers)
- [Trackers Guide](https://docs.easypost.com/guides/tracking-guide)

---

## Additional Resources

### Carrier Metadata

The Carrier Metadata endpoint can programmatically return information about service
levels, predefined packages, supported features, and shipment options.

Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally,
the Carrier Metadata endpoint is available to retrieve comprehensive information about
all carriers on the EasyPost platform, enhancing decision-making for carrier services.

### Support and Troubleshooting

In addition to the guidance provided in our Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform.

Please visit the Help Center for more information.

Related:

- [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata)
- [Help Center](https://support.easypost.com/hc/en-us)

---

## Talk to a Shipping Expert

For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support.

Related:

- [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost)
- [Contact Support](https://support.easypost.com/hc/requests/new)