Skip to main content

Update Issue

PATCH 

https://secure.fleetio.com/api/v2/issues/:id

Update an Issue

Request

Path Parameters

    id stringrequired

    Possible values: Value must match regular expression ^[0-9]+$

    The id of the relevant record

Body

    asset_idinteger

    The ID of the asset associated with the Issue.

    asset_typestring

    The type of the asset associated with the Issue.

    Possible values: [Vehicle, Equipment]

    summarystring

    A short summary of the Issue.

    descriptionstring

    A longer description of the Issue.

    reported_by_idinteger

    The id of the Contact who reported this Issue.

    reported_atdate-time

    The date and time this Issue is reported. We recommend using ISO-8601 formatted dates to avoid ambiguity.

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

    The id of the associated IssuePriority for this Issue.

    numberinteger

    A unique identifier for the Issue.

    due_datedate-time

    The date on which this Issue should be resolved by. We recommend using ISO-8601 formatted dates to avoid ambiguity.

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

    The meter value at which this Issue should be resolved by.

    due_secondary_meter_valuefloat

    The secondary meter value at which this Issue should be resolved by.

    fault_idinteger

    The id of the Fault associated with this Issue.

    custom_fieldsobjectnullable

    *Full details on working with Custom Fields here.

    meter_entry_attributes object

    An Issue may be associated with a Meter Entry.

    valuefloat

    The value is the actual number on the meter that increments over time. The unit is determined by the configured meter_unit on the associated Vehicle.

    Example: 108043
    voidboolean

    If you attempt to save a meter value, which is too high or too low, Fleetio's validation rules will reject it. If you need to bypass this validation, you may mark an entry as void.

    secondary_meter_entry_attributes object

    An Issue may be associated with a secondary Meter Entry.

    valuefloat

    The value is the actual number on the meter that increments over time. The unit is determined by the configured meter_unit on the associated Vehicle.

    Example: 108043
    voidboolean

    If you attempt to save a meter value, which is too high or too low, Fleetio's validation rules will reject it. If you need to bypass this validation, you may mark an entry as void.

    comments_attributes object[]
  • Array [
  • titlestring

    The title of the comment.

    commentstring

    The comment text.

  • ]
  • documents_attributes object[]

    An array of one or more document objects to add to the record. Follow our Attaching Documents and Images guide to upload to our third party storage provider in order to obtain file_url.

  • Array [
  • namestring

    The name to give the file which will be shown in the UI.

    Possible values: <= 255 characters

    file_urlstring

    The URL obtained from our storage provider that points to the file.

    Possible values: <= 255 characters

    file_mime_typestring

    The MIME type of the file. For example, application/pdf.

    Possible values: <= 255 characters

    file_namestring

    The name of the file.

    Possible values: <= 255 characters

    file_sizeinteger

    The size of the file in bytes.

  • ]
  • images_attributes object[]

    An array of one or more image objects to add to the record. Follow our Attaching Documents and Images guide to upload to our third party storage provider in order to obtain file_url.

  • Array [
  • namestring

    The name to give the image which will be shown in the UI.

    Possible values: <= 255 characters

    file_urlstring

    The URL obtained from our storage provider that points to the image.

    Possible values: <= 255 characters

    file_mime_typestring

    The MIME type of the image. For example, image/png.

    Possible values: <= 255 characters

    file_namestring

    The name of the image.

    Possible values: <= 255 characters

    file_sizeinteger

    The size of the image file in bytes.

  • ]
  • assigned_contact_idsinteger[]

    An array of ids of assigned Contacts related to the Issue.

    label_idsinteger[]

Responses

OK

Response Headers
    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
      numberintegerrequired

      A unique identifier for the Issue.

      Possible values: >= 1

      summarystringrequired

      A summary of the Issue.

      descriptionstringnullablerequired

      A longer description of the Issue.

      statestringrequired

      The Issue's current state.

      Possible values: [open, closed, resolved]

      reported_atdate-timenullablerequired

      The date and time at which this Issue was reported.

      Example: 2023-03-14T13:46:27-06:00
      reported_by objectnullablerequired

      The Contact ID of the User who reported this Issue.

      idId (integer)

      Possible values: >= 1

      resolvable_typestringnullablerequired

      The type of the object which can resolve this Issue.

      Possible values: [ServiceEntry, WorkOrder]

      resolved_atdate-timenullablerequired

      The date and time at which this Issue was resolved.

      Example: 2023-03-14T13:46:27-06:00
      resolved_by objectnullablerequired

      The Contact ID of the User that resolved this Issue.

      idId (integer)

      Possible values: >= 1

      resolved_notestringrequired

      Any notes associated with resolving this Issue.

      Default value:
      closed_atdate-timenullablerequired

      The date and time at which this Issue was closed.

      Example: 2023-03-14T13:46:27-06:00
      closed_by objectnullablerequired

      The Contact ID of the User that closed this Issue.

      idId (integer)

      Possible values: >= 1

      closed_notestringrequired

      Any notes associated with closing this Issue.

      Default value:
      due_datedatenullablerequired

      The date on which this Issue should be resolved by. Formatted according to ISO-8601 in User's local time zone.

      Example: 2023-03-14
      due_meter_valuefloatnullablerequired

      The meter value at which this Issue should be resolved by.

      due_secondary_meter_valuefloatnullablerequired

      The secondary meter value at which this Issue should be resolved by.

      is_overduebooleanrequired

      Indicates whether the Issue is overdue.

      issue_priority object

      An Issue Priority represents the priority level of an Issue.

      idinteger

      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
      account_idId (integer)

      Possible values: >= 1

      aliasstringnullable

      Can be used to replace the default priority name provided. Changes how the Issue is displayed throughout Fleetio.

      namestring

      The name of the Issue Priority.

      slugstring

      Indicates which icon will be shown for the Issue Priority.

      descriptionstring

      A description providing more details about the Issue Priority.

      defaultboolean

      Indicates whether this Issue Priority will be set as default for new Issues.

      enabledboolean

      Indicates whether this Issue Priority is currently enabled.

      positioninteger

      The position or order of the Issue Priority in a list or hierarchy.

      resolvable objectnullablerequired

      The ID of the object which can resolve this Issue.

      idId (integer)

      Possible values: >= 1

      creation_typestringrequired

      Indicates if this Issue was created manually or by a workflow.

      Possible values: [manual, workflow]

      attachment_permissions objectnullablerequired
      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.

      asset objectrequired
      idId (integer)

      Possible values: >= 1

      namestring

      The name of the asset associated with the Issue.

      image_url_mediumstringnullable

      The URL to a medium-sized image of the asset associated with the Issue.

      asset_typestringrequired

      The asset type that has the Issue.

      Possible values: [Vehicle, Equipment]

      submitted_inspection_form objectnullablerequired
      idId (integer)

      Possible values: >= 1

      fault objectnullablerequired
      idId (integer)

      Possible values: >= 1

      watchers_countinteger

      The count of watchers associated with the Issue.

      comments_countinteger

      The count of Comments associated with the Issue.

      images_countinteger

      The count of images associated with the Issue.

      documents_countinteger

      The count of documents associated with the Issue.

      custom_fieldsobjectnullable

      *Full details on working with Custom Fields here.

      labels object[]

      An array of labels associated with the Issue. Can be included in the response by passing labels in the includes query parameter.

    • Array [
    • idId (integer)

      Possible values: >= 1

      namestring

      The name of the label.

      colorstring

      The color of the label.

    • ]

    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 -X PATCH 'https://secure.fleetio.com/api/v2/issues/:id' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Token <Authorization>' \
    -H 'Account-Token: <Authorization>' \
    -d '{
    "asset_id": 0,
    "asset_type": "Vehicle",
    "summary": "string",
    "description": "string",
    "reported_by_id": 0,
    "reported_at": "2023-03-14T13:46:27-06:00",
    "issue_priority_id": 0,
    "number": 0,
    "due_date": "2023-03-14T13:46:27-06:00",
    "due_meter_value": 0,
    "due_secondary_meter_value": 0,
    "fault_id": 0,
    "custom_fields": {},
    "meter_entry_attributes": {
    "value": "108043",
    "void": true
    },
    "secondary_meter_entry_attributes": {
    "value": "108043",
    "void": true
    },
    "comments_attributes": [
    {
    "title": "string",
    "comment": "string"
    }
    ],
    "documents_attributes": [
    {
    "name": "string",
    "file_url": "string",
    "file_mime_type": "string",
    "file_name": "string",
    "file_size": 0
    }
    ],
    "images_attributes": [
    {
    "name": "string",
    "file_url": "string",
    "file_mime_type": "string",
    "file_name": "string",
    "file_size": 0
    }
    ],
    "assigned_contact_ids": [
    0
    ],
    "label_ids": [
    0
    ]
    }'
    Request Collapse all
    Base URL
    https://secure.fleetio.com/api
    Auth
    Parameters
    — pathrequired
    Body
    {
      "asset_id": 0,
      "asset_type": "Vehicle",
      "summary": "string",
      "description": "string",
      "reported_by_id": 0,
      "reported_at": "2023-03-14T13:46:27-06:00",
      "issue_priority_id": 0,
      "number": 0,
      "due_date": "2023-03-14T13:46:27-06:00",
      "due_meter_value": 0,
      "due_secondary_meter_value": 0,
      "fault_id": 0,
      "custom_fields": {},
      "meter_entry_attributes": {
        "value": "108043",
        "void": true
      },
      "secondary_meter_entry_attributes": {
        "value": "108043",
        "void": true
      },
      "comments_attributes": [
        {
          "title": "string",
          "comment": "string"
        }
      ],
      "documents_attributes": [
        {
          "name": "string",
          "file_url": "string",
          "file_mime_type": "string",
          "file_name": "string",
          "file_size": 0
        }
      ],
      "images_attributes": [
        {
          "name": "string",
          "file_url": "string",
          "file_mime_type": "string",
          "file_name": "string",
          "file_size": 0
        }
      ],
      "assigned_contact_ids": [
        0
      ],
      "label_ids": [
        0
      ]
    }
    
    ResponseClear

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