Skip to main content

List Vehicle Assignments

GET 

https://secure.fleetio.com/api/v1/vehicles/:id/vehicle_assignments

List the Vehicle's assignments

Request

Path Parameters

    id stringrequired

    The Fleetio ID of the relevant Vehicle.

    You may also look up Vehicles by their VIN, license plate, or other external ID. See the guide on External Vehicle Ids for information on how to set this up.

Query Parameters

    start_cursor string

    The start cursor for Keyset pagination.

    per_page integer

    Possible values: >= 2 and <= 100

    The number of records per page to return

    Default value: 50
    filter object

    The fields, operations, and values to filter the records by.

    contact_id object
    eqstringrequired
    ended_at object
    oneOf
    ltstringrequired
    created_at object
    oneOf
    ltstringrequired
    updated_at object
    oneOf
    ltstringrequired
    sort object

    The fields and direction to sort the results by.

    started_atSortAscDesc (string)

    Possible values: [asc, desc]

    ended_atSortAscDesc (string)

    Possible values: [asc, desc]

    created_atSortAscDesc (string)

    Possible values: [asc, desc]

    updated_atSortAscDesc (string)

    Possible values: [asc, desc]

    idSortAscDescDefaultDesc (string)

    Possible values: [asc, desc]

    Default value: desc

Responses

OK

Schema
    start_cursorstringnullable

    The current start cursor of the records returned.

    next_cursorstringnullable

    The next cursor to retrieve the next page of records.

    per_pageinteger

    The maxumum number of records returned.

    estimated_remaining_countinteger

    The number of remaining records including the returned records, up to a maximum of 500.

    filtered_by object[]

    The filters applied to the returned record set.

  • Array [
  • anyOf
    contact_id object
    eqstringrequired
  • ]
  • sorted_by object[]

    The sorts applied to the returned record set.

  • Array [
  • anyOf
    started_atSortAscDesc (string)

    Possible values: [asc, desc]

  • ]
  • records object[]
  • Array [
  • idintegerrequired
    vehicle_idintegerrequired

    The id of the vehicle associated with this Vehicle Assignment.

    contact_idintegerrequired

    The id of the contact associated with this Vehicle Assignment.

    started_atdate-timenullablerequired

    The date and time of this Vehicle Assignment. Dates in the future are accepted. We recommend using ISO-8601 formatted dates to avoid ambiguity.

    Example: 2023-03-14T13:46:27-06:00
    ended_atdate-timenullablerequired

    The date and time of this Vehicle Assignment ending. We recommend using ISO-8601 formatted dates to avoid ambiguity.

    Example: 2023-03-14T13:46:27-06:00
    currentbooleanrequired

    Whether this Vehicle Assignment is current/active.

    Default value: false
    futurebooleanrequired

    Whether this Vehicle Assignment is set to take place in the future.

    Default value: false
    starting_meter_entry_valuenumbernullablerequired

    The meter value at the start of this Vehicle Assignment.

    ending_meter_entry_valuenumbernullablerequired

    The meter value at the end of this Vehicle Assignment.

    comments_countintegerrequired

    The number of comments on this Vehicle Assignment.

    attachment_permissions objectnullable
    read_photosboolean

    Indicates whether the user has read permission for photos.

    manage_photosboolean

    Indicates whether the user has permission to manage (eg. upload, delete) photos.

    read_documentsboolean

    Indicates whether the user has read permission for documents.

    manage_documentsboolean

    Indicates whether the user has permission to manage (eg. upload, delete) documents.

    contact objectnullablerequired

    A Contact

    idinteger
    emailstringnullable

    The Contact's email address.

    namestringnullable

    The Contact's full name.

    group_idintegernullable

    If this Contact belongs to a Group, this will be the Fleetio ID of that Group.

    employeebooleannullable

    Whether or not the Contact is an employee.

    employee_numberstringnullable

    The employee number of the Contact.

    default_image_urlstringnullable

    The URL of the Contact's default image/profile photo, if any.

  • ]

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: Prefix the value with "Token", for example: "Token 76cbe06c49a64".
You can generate a new API key [here](https://secure.fleetio.com/api_keys).
name: Account-Tokentype: apiKeyin: headerdescription: You can find your Account-Token [here](https://secure.fleetio.com/api_keys)

Request Collapse all
Base URL
https://secure.fleetio.com/api
Auth
Parameters
— pathrequired
— query
— query
— query
contact_ideq
ended_at
created_at
updated_at
— query
started_at
ended_at
created_at
updated_at
id
ResponseClear

Click the Send API Request button above and see the response here!