POST
/
connections
curl --request POST \
  --url https://api.withterminal.com/tsp/v1/connections \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "provider": "geotab",
  "credentials": {
    "username": "<string>",
    "password": "<string>",
    "database": "<string>"
  },
  "company": {
    "name": "<string>",
    "dotNumbers": [
      "<string>"
    ]
  },
  "externalId": "<string>",
  "syncMode": "automatic",
  "backfill": {
    "startFrom": "2021-01-06T03:24:53.000Z",
    "days": 123
  },
  "tags": [
    "Tag Name"
  ]
}'
{
  "id": "conn_01GV12VR4DJP70GD1ZBK0SDWFH",
  "company": {
    "name": "Frank's Trucking",
    "dotNumbers": [
      "1234567"
    ]
  },
  "status": "connected",
  "provider": {
    "code": "geotab",
    "name": "Geotab"
  },
  "externalId": "1234",
  "sourceId": "123456789",
  "syncMode": "automatic",
  "token": "con_tkn_22vUhkC6tgre4kwaYfUkCDA1rzn6eyb4",
  "tags": [
    "Tag Name"
  ],
  "linkUrl": "https://link.withterminal.com/connection/{CONNECTION_ID}?key={PUBLISHABLE_KEY}",
  "createdAt": "2021-01-06T03:24:53.000Z",
  "updatedAt": "2021-01-06T03:24:53.000Z"
}

For most use cases we recommend using the Link UI to create connections.

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
  • Geotab

  • Verizon

  • Sandbox

  • Samsara

  • Motive

  • Omnitracs XRS

  • GPSTab

  • ELD One

  • ELD Rider

  • Fleet Complete Hub

  • BigRoad

  • Verizon Reveal

  • Verizon Fleet

  • EROAD

  • Surfsight

  • Azuga

  • Zonar

  • RoadStar

  • MasterELD

  • Right Trucking

  • RealELD

  • TFM ELD

  • FM ELD

  • TruckX

  • Omnitracs ES

  • Webfleet

  • Omnitracs

provider
enum<string>
required
Available options:
geotab
credentials
object
required
company
object
externalId
string
syncMode
enum<string>
default: automatic

Enum values:

  • automatic: Terminal will keep this connections data up to date
  • manual: Terminal will only sync data upon request
Available options:
automatic,
manual
backfill
object

Optional backfill to be requested upon successful connection. Will start from NOW if not provided.

tags
string[]

Response

201 - application/json
id
string
required
company
object
required
status
enum<string>
required

Enum values:

  • connected: active and authenticated connection
  • disconnected: connection is no longer authenticated - please ask your user to link the account again
  • archived: connection has been archived from view - attempts to re-connect will cause us to check the connection status again
Available options:
connected,
disconnected,
archived
provider
object
required
externalId
string

An optional ID from your system that can be used to reference connections.

sourceId
string

The ID used in the source system to represent the account this connection has access to.

This may be an organizationId or accountId.

Note: not all systems expose this information, in which case it may be undefined.

syncMode
enum<string>
default: automaticrequired

Enum values:

  • automatic: Terminal will keep this connections data up to date
  • manual: Terminal will only sync data upon request
Available options:
automatic,
manual
token
string
required

This token is used when interacting with a connections' data.

tags
string[]

An optional list of tags from your system that can be used to reference connections.

linkUrl
string

The URL to send your user to in order to have them re-authenticate the connection.

createdAt
string
required
updatedAt
string
required