POST
/
connections
curl --request POST \
  --url https://api.withterminal.com/tsp/v1/connections \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "provider": "3pl-tek",
  "credentials": {
    "username": "<string>",
    "password": "<string>"
  },
  "company": {
    "name": "<string>",
    "dotNumbers": [
      "<string>"
    ]
  },
  "options": {
    "ingestHistoryFromSourceSystem": true
  },
  "externalId": "<string>",
  "syncMode": "automatic",
  "backfill": {
    "startFrom": "2021-01-06T03:24:53.000Z",
    "days": 123
  },
  "tags": [
    "Tag Name"
  ],
  "agreements": [
    {
      "agreementUrl": "<string>",
      "type": "end-user-agreement",
      "ipAddress": "127.0.0.1",
      "acceptedAt": "2021-01-06T03:24:53.000Z",
      "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
    }
  ]
}'
{
  "id": "conn_01GV12VR4DJP70GD1ZBK0SDWFH",
  "company": {
    "name": "Frank's Trucking",
    "dotNumbers": [
      "1234567"
    ]
  },
  "account": {
    "name": "Frank's Trucking",
    "dotNumbers": [
      "1234567"
    ],
    "user": {
      "sourceId": "1234567",
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@example.com"
    }
  },
  "status": "connected",
  "provider": {
    "code": "geotab",
    "name": "Geotab"
  },
  "externalId": "1234",
  "sourceId": "123456789",
  "syncMode": "automatic",
  "token": "con_tkn_22vUhkC6tgre4kwaYfUkCDA1rzn6eyb4",
  "tags": [
    "Tag Name"
  ],
  "options": {
    "ingestHistoryFromSourceSystem": true
  },
  "filters": {
    "vehicles": {
      "status": "active",
      "excludeIds": [
        "vcl_01D8ZQFGHVJ858NBF2Q7DV9MNC"
      ]
    },
    "drivers": {
      "status": "active",
      "excludeIds": [
        "drv_01D8ZQFGHVJ858NBF2Q7DV9MNC"
      ]
    }
  },
  "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
header
required

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

Body

application/json

The body is of type object.

Response

201
application/json

Created

The connection your application has with your customer's TSP.