Swyft API (2020-04)

Download OpenAPI specification:Download

Welcome to the Swyft API. You can use this API to fetch real time rates, create labels, delete labels and retrieve labels for printing.

If you need help please don't hesitate to reach out to your Swyft account manager.

Authentication

AccessToken

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

Rates

[2020-04] Fetch Rates

Fetch rates for given origin and destination.

Request Body schema: application/json
required
object (Address)

Pickup address.

required
object (Address)

Pickup address.

signature_required
boolean (Signature Required)
Default: false

Signature required on delivery.

package_count
number (Package Count)
Default: 1

Number of packages to be delivered to a single location.

Responses

Request samples

Content type
application/json
{
  • "origin":
    {
    },
  • "destination":
    {
    },
  • "signature_required": true,
  • "package_count": 1
}

Response samples

Content type
application/json
[
  • {
    }
]

[2020-04] Bulk Fetch Rates

Fetch rates for a bulk list of origins and destinations.

Request Body schema: application/json
Array of objects

Responses

Request samples

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

Response samples

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

Labels

[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.

Request Body schema: application/json
Array ()
package_type
required
string
Enum: "SMALL" "MEDIUM" "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)

A individual reciving or sending a package

required
object (Recipient)

A individual reciving or sending a package

signature_required
boolean

Signature required on delivery.

notes
string

Specific notes about delivery location for driver.

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.

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.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

[2020-04] Create Bulk Labels Deprecated

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.

Request Body schema: application/json
Array ()
package_type
required
string
Enum: "SMALL" "MEDIUM" "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)

A individual reciving or sending a package

required
object (Recipient)

A individual reciving or sending a package

signature_required
boolean

Signature required on delivery.

notes
string

Specific notes about delivery location for driver.

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.

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.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {