Skip to main content
POST
/
ifta-detail
/
csv
Create a job to generate csv files of IFTA mileage segments.
curl --request POST \
  --url https://api.samsara.com/ifta-detail/csv \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "endHour": "2019-06-13T19:00:00Z",
  "startHour": "2019-06-13T19:00:00Z",
  "vehicleIds": "1234,5678,samsara.vin:1HGBH41JXMN109186",
  "vehicleParentTagIds": "1234,5678",
  "vehicleTagIds": "1234,5678"
}
'
{
  "data": {
    "args": {
      "endHour": "2019-06-13T19:00:00Z",
      "startHour": "2019-06-13T19:00:00Z",
      "vehicleIds": [
        12345678,
        56789123
      ]
    },
    "jobId": "8cabba84-bef4-4951-8cd2-78ce898fd8e6",
    "jobStatus": "Processing",
    "requestedAtTime": "2019-06-13T19:00:00Z",
    "completedAtTime": "2019-06-13T19:00:00Z",
    "details": "Try limiting the number of vehicles requested per job to reduce the processing duration.",
    "failedAtTime": "2019-06-13T19:00:00Z",
    "files": [
      {
        "createdAtTime": "2019-06-13T19:00:00Z",
        "downloadUrl": "https://s3.download-url.com",
        "downloadUrlExpirationTime": "2019-06-13T19:00:00Z",
        "name": "output-001.csv.gz",
        "recordCount": 8126609865522604000
      }
    ],
    "startedAtTime": "2019-06-13T19:00:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Body

application/json

The payload to create a new IftaDetailJob.

endHour
string
required

An end time in RFC 3339 format. Hour precision and timezones are supported. Any minutes or seconds will be truncated down to the nearest hour. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. The maximum request duration is 1 month. Limit the number of vehicles to 1000 when requesting more than 24 hours of data. (Examples: 2019-06-13T19:00:00Z, 2019-06-13T19:00:00.000Z, OR 2015-09-15T14:00:00-04:00).

Example:

"2019-06-13T19:00:00Z"

startHour
string
required

A start time in RFC 3339 format. Hour precision and timezones are supported. Any minutes or seconds will be truncated down to the nearest hour. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. The maximum request duration is 1 month. Limit the number of vehicles to 1000 when requesting more than 24 hours of data. (Examples: 2019-06-13T19:00:00Z, 2019-06-13T19:00:00.000Z, OR 2015-09-15T14:00:00-04:00).

Example:

"2019-06-13T19:00:00Z"

vehicleIds
string

A filter on the data based on this comma-separated list of vehicle IDs and external IDs. The number of vehicles requested per job shouldn't exceed 5000. Example: vehicleIds: '1234,5678,samsara.vin:1HGBH41JXMN109186'

Example:

"1234,5678,samsara.vin:1HGBH41JXMN109186"

vehicleParentTagIds
string

A filter on the data based on this comma-separated list of vehicle parent tag IDs. The number of vehicles requested per job shouldn't exceed 5000. Example: vehicleParentTagIds: '1234,5678'

Example:

"1234,5678"

vehicleTagIds
string

A filter on the data based on this comma-separated list of vehicle tag IDs. The number of vehicles requested per job shouldn't exceed 5000. Example: vehicleTagIds: '1234,5678'

Example:

"1234,5678"

Response

Created response.

data
object
required

A job representing the async generation of IFTA mileage segments. The job should be polled until the state is terminal.