curl --request GET \
--url https://api.withterminal.com/tsp/v1/connections/current \
--header 'Authorization: Bearer <token>' \
--header 'Connection-Token: <connection-token>'
{
"id": "conn_01GV12VR4DJP70GD1ZBK0SDWFH",
"company": {
"name": "Acme Inc.",
"dotNumbers": [
"1234567"
]
},
"account": {
"name": "Frank's Trucking",
"dotNumbers": [
"1234567"
],
"user": {
"sourceId": "1234567",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com"
}
},
"token": "T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB",
"status": "connected",
"provider": {
"code": "geotab",
"name": "Geotab"
},
"sourceId": "123456789",
"externalId": "1234",
"tags": [
"<string>"
],
"syncMode": "automatic",
"linkUrl": "https://link.withterminal.com/connection/{CONNECTION_ID}?key={PUBLISHABLE_KEY}",
"lastSync": {
"id": "sync_01GV12VR4DJP70GD1ZBK0SDWFH",
"status": "completed",
"failureReason": "Reason for failure if sync status is 'failed'",
"issues": [
"isu_01D8ZQFGHVJ858NBF2Q7DV9MNC"
],
"startFrom": "2021-01-06T03:24:53.000Z",
"requestedAt": "2021-01-06T03:24:53.000Z",
"completedAt": "2021-01-06T03:24:53.000Z",
"attempts": 1
},
"agreements": [
{
"id": "agr_01D9ZQFGHVJ858NBF2Q7DV9MNH",
"connectionId": "conn_01GV12VR4DJP70GD1ZBK0SDWFH",
"agreementUrl": "<string>",
"acceptedBy": {
"sourceId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>"
},
"acceptedAt": "2021-01-06T03:24:53.000Z",
"location": "New York, NY",
"ipAddress": "127.0.0.1",
"userAgent": "<string>"
}
],
"filters": {
"vehicles": {
"status": "active",
"excludeIds": [
"vcl_01D8ZQFGHVJ858NBF2Q7DV9MNC"
]
},
"drivers": {
"status": "active",
"excludeIds": [
"drv_01D8ZQFGHVJ858NBF2Q7DV9MNC"
]
}
},
"options": {
"ingestHistoryFromSourceSystem": true
},
"createdAt": "2021-01-06T03:24:53.000Z",
"updatedAt": "2021-01-06T03:24:53.000Z"
}
Get the details of the current active connection. The current connection is derived from the provided connection token.
curl --request GET \
--url https://api.withterminal.com/tsp/v1/connections/current \
--header 'Authorization: Bearer <token>' \
--header 'Connection-Token: <connection-token>'
{
"id": "conn_01GV12VR4DJP70GD1ZBK0SDWFH",
"company": {
"name": "Acme Inc.",
"dotNumbers": [
"1234567"
]
},
"account": {
"name": "Frank's Trucking",
"dotNumbers": [
"1234567"
],
"user": {
"sourceId": "1234567",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com"
}
},
"token": "T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB",
"status": "connected",
"provider": {
"code": "geotab",
"name": "Geotab"
},
"sourceId": "123456789",
"externalId": "1234",
"tags": [
"<string>"
],
"syncMode": "automatic",
"linkUrl": "https://link.withterminal.com/connection/{CONNECTION_ID}?key={PUBLISHABLE_KEY}",
"lastSync": {
"id": "sync_01GV12VR4DJP70GD1ZBK0SDWFH",
"status": "completed",
"failureReason": "Reason for failure if sync status is 'failed'",
"issues": [
"isu_01D8ZQFGHVJ858NBF2Q7DV9MNC"
],
"startFrom": "2021-01-06T03:24:53.000Z",
"requestedAt": "2021-01-06T03:24:53.000Z",
"completedAt": "2021-01-06T03:24:53.000Z",
"attempts": 1
},
"agreements": [
{
"id": "agr_01D9ZQFGHVJ858NBF2Q7DV9MNH",
"connectionId": "conn_01GV12VR4DJP70GD1ZBK0SDWFH",
"agreementUrl": "<string>",
"acceptedBy": {
"sourceId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>"
},
"acceptedAt": "2021-01-06T03:24:53.000Z",
"location": "New York, NY",
"ipAddress": "127.0.0.1",
"userAgent": "<string>"
}
],
"filters": {
"vehicles": {
"status": "active",
"excludeIds": [
"vcl_01D8ZQFGHVJ858NBF2Q7DV9MNC"
]
},
"drivers": {
"status": "active",
"excludeIds": [
"drv_01D8ZQFGHVJ858NBF2Q7DV9MNC"
]
}
},
"options": {
"ingestHistoryFromSourceSystem": true
},
"createdAt": "2021-01-06T03:24:53.000Z",
"updatedAt": "2021-01-06T03:24:53.000Z"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The token returned when a user authenticated their account. This authorizes access to a specific account.
"con_tkn_22vUhkC6tgre4kwaYfUkCDA1rzn6eyb4"
OK
The connection your application has with your customer's TSP.