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. This is in BETA and not supported for all customers.

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
{
  • "rates": [
    ]
}

[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": [
    ]
}

[2021-09] Bulk Fetch Rates

Fetch rates for a bulk list of origins and destinations. Request can only either Dimensions or Package Type.

Request Body schema: application/json
One of
Array of objects

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "created_at": "2021-09-21T13:23:15.000Z",
  • "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 of objects (CreateLabelsWithPackageType)

Responses

Request samples

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

Response samples

Content type
application/json
[