Skip to main content

Retrieve Current Assignment Vehicle

GET 

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

Retrieve the vehicle's current assignment.

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.

Responses

OK

Schema
    idId (integer)required

    Possible values: >= 1

    created_atdate-time

    The date and time at which this record was created.

    Example: 2023-03-14T13:46:27-06:00
    updated_atdate-time

    The date and time at which this record was most recently updated.

    Example: 2023-03-14T13:46:27-06:00
    vehicle_idId (integer)required

    Possible values: >= 1

    contact_idId (integer)required

    Possible values: >= 1

    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
    custom_fieldsobjectnullablerequired

    *Full details on working with Custom Fields here.

    starting_meter_entry_valuestringnullablerequired

    The meter value at the start of this Vehicle Assignment.

    ending_meter_entry_valuestringnullablerequired

    The meter value at the end of this Vehicle Assignment.

    comments_countintegerrequired

    The number of comments on this Vehicle Assignment.

    contact_full_namestringnullable
    contact_image_urlstringnullable

    The URL pointing to the Contact's image.

    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.

    comments object[]required

    Any Comments made on this Vehicle Assignment.

  • Array [
  • idId (integer)required

    Possible values: >= 1

    created_atdate-time

    The date and time at which this record was created.

    Example: 2023-03-14T13:46:27-06:00
    updated_atdate-time

    The date and time at which this record was most recently updated.

    Example: 2023-03-14T13:46:27-06:00
    commentable_typeCommentableType (string)required

    The type of record that the Comment will be left on. Must be associated with a matching commentable_id.

    Possible values: [Contact, FleetcorCard, FuelEntry, InventoryJournalEntry, Issue, Part, PurchaseOrder, ServiceEntry, ServiceReminder, SubmittedInspectionItem, Vehicle, VehicleAssignment, Vendor, WexCard, WorkOrder]

    commentable_idId (integer)required

    Possible values: >= 1

    user_idId (integer)required

    Possible values: >= 1

    titlestringdeprecated

    The title of the Comment.

    commentstringrequired

    The content of the Comment message body.

    user_full_namestringrequired

    The full name of the User who created the Comment.

    user_image_urlstringnullablerequired

    The image url for the User who created the Comment.

    rich_contentobjectnullablerequired
    html_contentstringnullablerequired

    The comment message body rendered as HTML.

    with_mentionsbooleanrequired

    Indicates if the message body contains @mentions.

  • ]

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)
curl -L 'https://secure.fleetio.com/api/v1/vehicles/:id/current_assignment' \
-H 'Accept: application/json' \
-H 'Authorization: Token <Authorization>' \
-H 'Account-Token: <Authorization>'
Request Collapse all
Base URL
https://secure.fleetio.com/api
Auth
Parameters
— pathrequired
ResponseClear

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