Swyft API

Download OpenAPI specification:Download

Introduction

Swyft is a last-mile delivery service that offers same and next-day shipping to customers at affordable rates. The Swyft technology platform with its network of warehouses and delivery companies provides merchants and their customers the best delivery experience possible.

API Overview

Welcome to the API documentation!

To use our API, make sure to set up your Swyft account by contacting your Merchant Success Manager or by contacting Swyft Support. Most user actions that can be done in our Merchant Dashboard can be done though our REST API.

Common Use Cases:

  • Creating a label
  • Deleting a label
  • Tracking a label
  • Printing a label
  • Getting package delivery rates

Authentication

AccessToken

Security Scheme Type API Key
Header parameter name: X-Swyft-Access-Token

Labels

Label API endpoints provide a way to create, delete, fetch and print labels in Swyft's system.

Package size matrix:

Swyft Size Code Max Vol (cuft) Max Weight (lbs) Max Length on any side (in)
Small 0.5 5 26
Medium 1 10 26
Large 2 20 26
Extra Large 3.3 35 26

[2020-10] Create Bulk Labels

Create a bulk number of labels with a single request. Accepts a maximum of 100 labels per request. Each label will be validated against the label schema, if any do not validate then the request will fail returning the index of the invalid label from the array. If the schema is successful, the labels will be generated and returned as an array of labels, if any of these labels failed to be created due to issues such as address validation, then that row in the returned array will be an error object instead.

Authorizations:
Request Body schema: application/json
One of
Array of objects (CreateLabelsWithPackageType)

Responses

Request samples

Content type
application/json
Example
{
  • "labels": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

[2020-10] Create Label

Create label with specific package and service type.

Authorizations:
Request Body schema: application/json
One of
package_type
required
string
Enum: "SMALL" "MEDIUM" "LARGE" "EXTRA_LARGE"

One of the package types returned when fetching rates.

service_type
required
string
Enum: "SAMEDAY" "NEXTDAY"

One of the service types returned when fetching rates.

business_name
string

Business name on whose behalf package is being delivered. In the case of a 3PL this would be the merchant business name. Is used in communication with client via SMS, etc.

required
object (Recipient with Phone)

An individual receiving or sending a package.

required
Recipient with Phone (object) or Recipient with Email (object) (Recipient)

An individual receiving or sending a package.

signature_required
boolean (signatureRequired)

The customer must provide their signature on delivery through the driver phone application. Requiring a signature will affect the rate for the delivery For condos:

  • If there's a doorman, they can accept the package and sign for it.
  • Even if signatureRequired is false, if the driver can't find a safe place to store the package, it will not be delivered.
  • Setting signatureRequired as true will increase the pricing of the delivery.
notes
string

Specific notes about delivery location for driver.

order_number
string

Order number from client's system.

reference
string

Reference # or ID on the client side in case of any issues. Primarily to be used by our dispatcher to reach out to client but can also be used by client to attach specific metadata to label.

reference2
string

Secondary reference # or ID on the client side in case of any issues. Can be used by client to attach specific metadata to label.

tracking_number
string

Optional unique tracking number. If provided, then the tracking number will be set to the given value. Otherwise it will be randomly generated.

pickup_location_slug
string

Identifier for the pickup location of this package.

Responses

Request samples

Content type
application/json
Example
{
  • "package_type": "SMALL",
  • "service_type": "SAMEDAY",
  • "business_name": "Acme Corporation",
  • "origin": {
    },
  • "destination": {
    },
  • "notes": "Ask concierge for elevator access",
  • "order_number": "12345ABC",
  • "reference": "order #9000",
  • "reference2": "order #9000"
}

Response samples

Content type
application/json
{
  • "id": "bqofiflh5s5id0diioug",
  • "package_type": "SMALL",
  • "service_type": "SAMEDAY",
  • "business_name": "Acme Corporation",
  • "origin": {