{
  "openapi": "3.0.3",
  "info": {
    "title": "Terminal API",
    "description": "Terminal is a unified API that makes it easy to integrate with the leading telematics service providers.\n\nContact Support:\n Name: Terminal\n Email: connect@withterminal.com",
    "version": "1.0.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.sandbox.withterminal.com/tsp/v1/"
    }
  ],
  "paths": {
    "/public-token/exchange": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Public Token Exchange",
        "description": "Exchange the `publicToken` returned by our hosted authentication flow for a long lived connection token that will be used when requesting data from a customer's TSP.",
        "operationId": "publicTokenExchange",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "publicToken": {
                    "type": "string",
                    "example": "INSERT_PUBLIC_TOKEN"
                  }
                }
              },
              "examples": {
                "Public Token Exchange": {
                  "value": {
                    "publicToken": "INSERT_PUBLIC_TOKEN"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/connections": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "List All Connections",
        "description": "List all of the connections you have for your application. Connections represent the authenticated access you have to your customer's TSP data.",
        "operationId": "listAllConnections",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "externalId",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "123"
            }
          },
          {
            "name": "dotNumber",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "123"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "ut est"
            },
            "description": "Filter connections by tag"
          },
          {
            "name": "updatedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Filter connections that were last updated on or after a given time."
          },
          {
            "name": "updatedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Filter connections that were last updated on or before a given time."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Create Connection",
        "description": "Create a new connection via API. This endpoint can be used to provide a completely custom connection creation experience for your customers.\n\nFor most use cases we recommend using the [Link UI](./rhuaxk9205cn8-link-component) to create connections.",
        "operationId": "createConnection",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "backfill": {
                    "type": "object",
                    "properties": {
                      "days": {
                        "type": "number",
                        "example": 47457977.31426272
                      },
                      "startFrom": {
                        "type": "string",
                        "example": "2021-01-06T03:24:53.000Z"
                      }
                    }
                  },
                  "company": {
                    "type": "object",
                    "properties": {
                      "dotNumbers": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "example": "non"
                        },
                        "example": [
                          "non",
                          "sunt ullamco elit"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "example": "adipisicing amet ea dolor"
                      }
                    }
                  },
                  "credentials": {
                    "type": "object",
                    "properties": {
                      "database": {
                        "type": "string",
                        "example": "non consequat sint dolore adipisicing"
                      },
                      "password": {
                        "type": "string",
                        "example": "culpa non dolore"
                      },
                      "username": {
                        "type": "string",
                        "example": "reprehenderit nulla Lorem"
                      }
                    }
                  },
                  "externalId": {
                    "type": "string",
                    "example": "laborum ullamco pariatur magna"
                  },
                  "provider": {
                    "type": "string",
                    "example": "geotab"
                  },
                  "syncMode": {
                    "type": "string",
                    "example": "automatic"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "Tag Name"
                    },
                    "example": [
                      "Tag Name",
                      "Tag Name"
                    ]
                  }
                }
              },
              "examples": {
                "Create Connection": {
                  "value": {
                    "backfill": {
                      "days": 47457977.31426272,
                      "startFrom": "2021-01-06T03:24:53.000Z"
                    },
                    "company": {
                      "dotNumbers": [
                        "non",
                        "sunt ullamco elit"
                      ],
                      "name": "adipisicing amet ea dolor"
                    },
                    "credentials": {
                      "database": "non consequat sint dolore adipisicing",
                      "password": "culpa non dolore",
                      "username": "reprehenderit nulla Lorem"
                    },
                    "externalId": "laborum ullamco pariatur magna",
                    "provider": "geotab",
                    "syncMode": "automatic",
                    "tags": [
                      "Tag Name",
                      "Tag Name"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/connections/current": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "Get Current Connection",
        "description": "Get the details of the current active connection. The current connection is derived from the provided connection token.",
        "operationId": "getCurrentConnection",
        "parameters": [
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "patch": {
        "tags": [
          "Connections"
        ],
        "summary": "Update Current Connection",
        "description": "Update the details of the current active connection. The current connection is derived from the provided connection token.",
        "operationId": "updateCurrentConnection",
        "parameters": [
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "company": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "example": "Acme Inc."
                      }
                    }
                  },
                  "externalId": {
                    "type": "string",
                    "example": "officia proident"
                  },
                  "status": {
                    "type": "string",
                    "example": "veniam sed mollit commodo"
                  },
                  "syncMode": {
                    "type": "string",
                    "example": "automatic"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "ullamco sed nisi officia"
                    },
                    "example": [
                      "ullamco sed nisi officia",
                      "ullamco fugiat anim"
                    ]
                  }
                }
              },
              "examples": {
                "Update Current Connection": {
                  "value": {
                    "company": {
                      "name": "Acme Inc."
                    },
                    "externalId": "officia proident",
                    "status": "veniam sed mollit commodo",
                    "syncMode": "automatic",
                    "tags": [
                      "ullamco sed nisi officia",
                      "ullamco fugiat anim"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/syncs": {
      "get": {
        "tags": [
          "Data Management"
        ],
        "summary": "List Sync History",
        "description": "List a log of all batch sync jobs for the current connection.",
        "operationId": "listSyncHistory",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "in_progress"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand related resources in the response to reduce requests."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "post": {
        "tags": [
          "Data Management"
        ],
        "summary": "Request Sync",
        "description": "Manually request to sync the current connections data.\n\nBy default, Terminal will sync all connections where `syncMode = automatic` on a regular cadence. For customers that may not need a fleet's data to be kept up to date and want to reduce their active tracked trucks, you can set `syncMode = manual` and invoke this endpoint when you want to sync data.\n\nIf you're wondering if this is relevent to your use case then feel free to reach out and we'd be happy to assist.",
        "operationId": "requestSync",
        "parameters": [
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "days": {
                    "type": "number",
                    "example": 7
                  }
                }
              },
              "examples": {
                "Request Sync": {
                  "value": {
                    "days": 7
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/syncs/{id}": {
      "get": {
        "tags": [
          "Data Management"
        ],
        "summary": "Get Sync Job Status",
        "description": "Get the status of a sync job by ID.",
        "operationId": "getSyncJobStatus",
        "parameters": [
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand related resources in the response to reduce requests."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "example": "{{syncId}}"
          },
          "description": "(Required) "
        }
      ]
    },
    "/passthrough": {
      "post": {
        "tags": [
          "Data Management"
        ],
        "summary": "Passthrough",
        "description": "Make an authenticated request to the underlying telematics provider. \n\nThis endpoint helps ensure that you are never limited by Terminal. You can use passthrough requests to access capabilities that may be limited to a specific TSP or not yet in the normalized model.\n\nOur team is here an ready to support custom use cases that may need `/passthrough`",
        "operationId": "passthrough",
        "parameters": [
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "example": "{\"reportId\":\"1234\"}"
                  },
                  "headers": {
                    "type": "object",
                    "properties": {}
                  },
                  "method": {
                    "type": "string",
                    "example": "POST"
                  },
                  "path": {
                    "type": "string",
                    "example": "/reports"
                  }
                }
              },
              "examples": {
                "Passthrough": {
                  "value": {
                    "body": "{\"reportId\":\"1234\"}",
                    "headers": {},
                    "method": "POST",
                    "path": "/reports"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/drivers": {
      "get": {
        "tags": [
          "Drivers"
        ],
        "summary": "List Drivers",
        "description": "List all of the drivers in the connected account",
        "operationId": "listDrivers",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified after a provided date."
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified before a provided date."
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/drivers/{id}": {
      "get": {
        "tags": [
          "Drivers"
        ],
        "summary": "Get Driver",
        "description": "Get the details of a specific driver",
        "operationId": "getDriver",
        "parameters": [
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "example": "{{driverId}}"
          },
          "description": "(Required) "
        }
      ]
    },
    "/groups": {
      "get": {
        "tags": [
          "Groups"
        ],
        "summary": "List Groups",
        "description": "List Groups",
        "operationId": "listGroups",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified after a provided date."
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified before a provided date."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/hos/available-time": {
      "get": {
        "tags": [
          "Hours of Service"
        ],
        "summary": "Available Time for Drivers",
        "description": "List available time for the driver. This endpoint provides live access to the driver's available time. Different than most endpoints, this endpoint calls the provider's API in real time to get the latest available time for the driver. This endpoint is useful for building real time applications that need to know the driver's available time.",
        "operationId": "availableTimeForDrivers",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "driverIds",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{driverId}}"
            },
            "description": "Comma separated list of driver IDs to filter for"
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/hos/logs": {
      "get": {
        "tags": [
          "Hours of Service"
        ],
        "summary": "List HOS Logs",
        "description": "List all hours of service logs. Currently, HOS logs are tracked as the distinct changes in duty status. In the future we will be offering endpoints to expose current HOS status and historical daily summaries.",
        "operationId": "listHosLogs",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "startedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records of statuses that started after a provided date."
          },
          {
            "name": "startedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records of statuses that started before a provided date."
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified after a provided date."
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified before a provided date."
          },
          {
            "name": "driverIds",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{driverId}}"
            },
            "description": "Comma separated list of driver IDs to filter for"
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/hos/daily-logs": {
      "get": {
        "tags": [
          "Hours of Service"
        ],
        "summary": "List HOS Daily Logs",
        "description": "List daily summary of hours of service. Each daily log represents the time a driver spent in each duty status for a given day.",
        "operationId": "listHosDailyLogs",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1947-03-03"
            },
            "description": "Only include daily logs from on or after a specific date"
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1947-03-03"
            },
            "description": "Only include daily logs from on or before a specific date"
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified after a provided date."
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified before a provided date."
          },
          {
            "name": "driverIds",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{driverId}}"
            },
            "description": "Comma separated list of driver IDs to filter for"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/ifta/summary": {
      "get": {
        "tags": [
          "IFTA"
        ],
        "summary": "Get IFTA Summary",
        "description": "Get all vehicle IFTA reports for the requested time span.\n\nCurrently can only increment by full months. \n\n_Note:_ data may change for a few days after the month. We will continue to update those reports to ensure you get accurate results.",
        "operationId": "getIftaSummary",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "startMonth",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01"
            },
            "description": "(Required) The month from which to start including vehicle reports"
          },
          {
            "name": "endMonth",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01"
            },
            "description": "(Required) Include vehicle reports up to and including this month"
          },
          {
            "name": "groupBy",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "vehicle,jurisdiction"
            },
            "description": "Computes the total distance traversed within a specified month range, with the results grouped by either jurisdiction, vehicle, or both. If no grouping parameter is provided, the default grouping is `vehicle,jurisdiction`."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/issues": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List Issues",
        "description": "List all issues that have been observed by Terminal.\nIssues are generated when we observe something that may impact the completeness or accuracy of the data we provide but do not justify a full error.\nFor example, if we lack permissions for a specific resource or need to skip an item due to invalid data.",
        "operationId": "listIssues",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "lastReportedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1967-06-22"
            },
            "description": "Timestamp to start when the issue was last observed"
          },
          {
            "name": "lastReportedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1967-06-22"
            },
            "description": "Timestamp to end when the issue was last observed"
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand related resources to see all details"
          },
          {
            "name": "connectionId",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "conn_01GV12VR4DJP70GD1ZBK0SDWFH"
            },
            "description": "Filter issues to a specific connection"
          },
          {
            "name": "errorCode",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "missing_safety_configuration"
            },
            "description": "Filter issues to a specific error code"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "ongoing"
            },
            "description": "Filter issues to a specific status"
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/issues/{issueId}/resolve": {
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Resolve Issue",
        "description": "Mark an issue's status as `resolved` until the issue is observed again.",
        "operationId": "resolveIssue",
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "parameters": [
        {
          "name": "issueId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "example": "ut est"
          },
          "description": "(Required) "
        }
      ]
    },
    "/providers": {
      "get": {
        "tags": [
          "Providers"
        ],
        "summary": "List Providers",
        "description": "Retrieve a list of the providers Terminal supports. This endpoint will grow to include additional details about the supported capabilities of each provider.",
        "operationId": "listProviders",
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/safety/events": {
      "get": {
        "tags": [
          "Safety"
        ],
        "summary": "List Safety Events",
        "description": "List all safety events detected by the provider.",
        "operationId": "listSafetyEvents",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified after a provided date."
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified before a provided date."
          },
          {
            "name": "startedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records of statuses that started after a provided date."
          },
          {
            "name": "startedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records of statuses that started before a provided date."
          },
          {
            "name": "driverIds",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{driverId}}"
            },
            "description": "Comma separated list of driver IDs to filter for"
          },
          {
            "name": "vehicleIds",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{vehicleId}}"
            },
            "description": "Comma separated list of vehicle IDs to filter for"
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/trailers": {
      "get": {
        "tags": [
          "Trailers"
        ],
        "summary": "List Trailers",
        "description": "List Trailers",
        "operationId": "listTrailers",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified after a provided date."
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified before a provided date."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/trailers/locations": {
      "get": {
        "tags": [
          "Trailers"
        ],
        "summary": "Latest Trailer Locations",
        "description": "Latest Trailer Locations",
        "operationId": "latestTrailerLocations",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/vehicles": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "summary": "List Vehicles",
        "description": "List all of the vehicles in the connected account",
        "operationId": "listVehicles",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified after a provided date."
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified before a provided date."
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/vehicles/{id}": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "summary": "Get Vehicle",
        "description": "Get the details of a specific vehicle",
        "operationId": "getVehicle",
        "parameters": [
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "example": "{{vehicleId}}"
          },
          "description": "(Required) "
        }
      ]
    },
    "/vehicles/locations": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "summary": "Latest Vehicle Locations",
        "description": "List the latest location of the vehicles in the connected account.\nThis endpoint will call the provider's API in real time to get the latest location of the vehicle. \n_Please note: this endpoint will exclude vehicles that have no last known location._",
        "operationId": "latestVehicleLocations",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "vehicleIds",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{vehicleId}}"
            },
            "description": "Comma separated list of vehicle IDs to filter for"
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/vehicles/{vehicleId}/locations": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "summary": "Historical Vehicle Locations",
        "description": "List the historical breadcrumb locations for a vehicle.\n\n_Note:_\n\nGiven the large volume of location data available, we encourage customers to accept compressed (`gzip`) responses in order to maximize throughput. This is supported with many popular HTTP clients. Result limits vary depending on if results are compressed or not.",
        "operationId": "historicalVehicleLocations",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "startAt",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Timestamp to start from - defaults to `TODAY - 1 MONTH`"
          },
          {
            "name": "endAt",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Timestamp to end at - defaults to `TODAY`"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "parameters": [
        {
          "name": "vehicleId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "example": "{{vehicleId}}"
          },
          "description": "(Required) Vehicle to retrieve breadcrumb locations for"
        }
      ]
    },
    "/vehicles/{vehicleId}/stats/historical": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "summary": "Historical Vehicle Stats",
        "description": "List historical stats and logs about the vehicle.",
        "operationId": "historicalVehicleStats",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "startAt",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Timestamp to start from - defaults to `TODAY - 1 MONTH`"
          },
          {
            "name": "endAt",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Timestamp to end at - defaults to `TODAY`"
          },
          {
            "name": "types",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "odometer,engine_state,fuel_level,total_fuel_consumption"
            },
            "description": "Comma separated list of vehicle stats to filter for"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      },
      "parameters": [
        {
          "name": "vehicleId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "example": "{{vehicleId}}"
          },
          "description": "(Required) "
        }
      ]
    },
    "/trips": {
      "get": {
        "tags": [
          "Trips"
        ],
        "summary": "List Trips",
        "description": "List all trips in the connected account. Trips define a period of time where a vehicle is in motion.",
        "operationId": "listTrips",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified after a provided date."
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified before a provided date."
          },
          {
            "name": "startedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include trips that started after a provided date."
          },
          {
            "name": "startedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include trips that started before a provided date."
          },
          {
            "name": "endedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include trips that ended after a provided date."
          },
          {
            "name": "endedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include trips that ended before a provided date."
          },
          {
            "name": "driverIds",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{driverId}}"
            },
            "description": "Comma separated list of driver IDs to filter for"
          },
          {
            "name": "vehicleIds",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{vehicleId}}"
            },
            "description": "Comma separated list of vehicle IDs to filter for"
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string",
              "example": ""
            },
            "description": "Expand resources in the returned response"
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    },
    "/devices": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "List Devices",
        "description": "List all devices in the connected account.",
        "operationId": "listDevices",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "{{nextCursor}}"
            },
            "description": "Pagination cursor to start requests from"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "The maximum number of results to return in a page."
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified after a provided date."
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "2021-01-06T03:24:53.000Z"
            },
            "description": "Only include records that were last modified before a provided date."
          },
          {
            "name": "raw",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "true"
            },
            "description": "Include raw responses used to normalize model. Used for debugging or accessing unique properties that are not unified."
          },
          {
            "name": "connection-token",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "{{connectionToken}}"
            },
            "description": "(Required) The token returned when a user authenticated their account. This authorizes access to a specific account."
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "description": ""
    },
    {
      "name": "Connections",
      "description": ""
    },
    {
      "name": "Data Management",
      "description": ""
    },
    {
      "name": "Drivers",
      "description": ""
    },
    {
      "name": "Groups",
      "description": ""
    },
    {
      "name": "Hours of Service",
      "description": ""
    },
    {
      "name": "IFTA",
      "description": ""
    },
    {
      "name": "Issues",
      "description": ""
    },
    {
      "name": "Providers",
      "description": ""
    },
    {
      "name": "Safety",
      "description": ""
    },
    {
      "name": "Trailers",
      "description": ""
    },
    {
      "name": "Vehicles",
      "description": ""
    },
    {
      "name": "Webhook Events",
      "description": ""
    },
    {
      "name": "Trips",
      "description": ""
    },
    {
      "name": "Devices",
      "description": ""
    }
  ]
}