Skip to main content

Update Service Entry

PATCH 

https://secure.fleetio.com/api/v1/service_entries/:id

deprecated

This endpoint is deprecated and will be removed in a future version. Please use the new v2 endpoint instead.

Update a Service Entry

Request

Path Parameters

    id stringrequired

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

    The id of the relevant record

Body

    datedate-time

    The date of the Service Entry. We recommend using ISO-8601 formatted dates to avoid ambiguity.

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

    The date and time at which the Service Entry was completed. We recommend using ISO-8601 formatted dates to avoid ambiguity.

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

    The date and time at which the Service Entry was started. We recommend using ISO-8601 formatted dates to avoid ambiguity.

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

    Possible values: >= 1

    vehicle_vinstring

    The VIN of the Vehicle associated with this Service Entry.

    Possible values: <= 17 characters

    vendor_idId (integer)

    Possible values: >= 1

    referencestring

    A reference number for this Service Entry.

    Possible values: <= 255 characters

    label_listLabelListParameters (string)

    A comma separated list of tags associated with this record. The only delimiter allowed is a comma (,). Please remove any commas from your labels before saving the record.

    Possible values: <= 255 characters

    Example: High Priority
    general_notesstring

    Any general notes about this Service Entry.

    vmrs_repair_priority_class_idId (integer)

    Possible values: >= 1

    custom_fieldsobjectnullable

    *Full details on working with Custom Fields here.

    meter_entry_attributes object

    A Service Entry 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

    A Service Entry may also 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.

    service_entry_line_items_attributes object[]
  • Array [
  • idId (integer)

    Possible values: >= 1

    service_task_idId (integer)

    Possible values: >= 1

    typeServiceEntryLineItemType (string)

    Denotes the type of the ServiceEntryLineItem

    Possible values: [ServiceEntryServiceTaskLineItem, ServiceEntryLaborLineItem, ServiceEntryPartLineItem, ServiceEntryTaxLineItem, ServiceEntryFeeLineItem, ServiceEntryTireLineItem, ServiceEntryFreeTextLineItem]

    descriptionstring

    Free text field, used for notes or description.

    labor_costfloat

    Total labor cost for this line item.

    Default value: 0
    parts_costfloat

    Total parts cost for this line item.

    Default value: 0
    subtotalfloat

    Subtotal for this line item. If parts_cost or labor_cost are non-zero, this value is ignored.

    Default value: 0
    service_entry_line_item_idinteger

    For nested line items. This value denotes the parent Service Entry Line Item.

    issue_idsstring[]

    An array of issue IDs that you want the line item to be linked to. This field can be passed several times to the server if you wish to link more than one issue (see cURL example).

    vmrs_reason_for_repair_idId (integer)

    Possible values: >= 1

    vmrs_system_group_idId (integer)

    Possible values: >= 1

    vmrs_system_idId (integer)

    Possible values: >= 1

    vmrs_component_idId (integer)

    Possible values: >= 1

    vmrs_assembly_idId (integer)

    Possible values: >= 1

  • ]
  • issue_idsId (integer)[]

    The IDs of any Issues associated with this Service Entry.

    Possible values: >= 1

    service_task_idsId (integer)[]

    The IDs of any Service Tasks associated with this Service Entry.

    Possible values: >= 1

    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.

  • ]
  • labor_subtotalfloat

    The total cost of labor for this Service Entry. This is calculated by summing the labor_cost of each Service Entry Line Item.

    parts_subtotalfloat

    The total cost of Parts for this Service Entry. This is calculated by summing the parts_cost of each Service Entry Line Item.

    subtotalfloat

    The subtotal amount of this Service Entry before any discounts or taxes. This is calculated by summing the subtotal of each Service Entry Line Item.

    discountfloat

    The total discount amount for this Service Entry.

    discount_percentagefloat

    The total discount percentage for this Service Entry.

    discount_typeDiscountType (string)nullable

    The type of discount applied to this record.

    Possible values: [fixed, percentage]

    Default value: percentage
    tax_1float

    The first tax amount for this Service Entry.

    tax_1_percentagefloat

    The first tax percentage for this Service Entry.

    tax_1_typeTaxType (string)nullable

    The type of tax to apply to this record.

    Possible values: [fixed, percentage]

    Default value: percentage
    tax_2float

    The second tax amount for this Service Entry.

    tax_2_percentagefloat

    The second tax percentage for this Service Entry.

    tax_2_typeTaxType (string)nullable

    The type of tax to apply to this record.

    Possible values: [fixed, percentage]

    Default value: percentage
    total_amountfloat

    The grand total of this Service Entry.

Responses

OK

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/v1/service_entries/:id' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token <Authorization>' \
-H 'Account-Token: <Authorization>' \
-d '{
"date": "2023-03-14T13:46:27-06:00",
"completed_at": "2023-03-14T13:46:27-06:00",
"started_at": "2023-03-14T13:46:27-06:00",
"vehicle_id": 0,
"vehicle_vin": "string",
"vendor_id": 0,
"reference": "string",
"label_list": "High Priority",
"general_notes": "string",
"vmrs_repair_priority_class_id": 0,
"custom_fields": {},
"meter_entry_attributes": {
"value": "108043",
"void": true
},
"secondary_meter_entry_attributes": {
"value": "108043",
"void": true
},
"service_entry_line_items_attributes": [
{
"id": 0,
"service_task_id": 0,
"type": "ServiceEntryServiceTaskLineItem",
"description": "string",
"labor_cost": 0,
"parts_cost": 0,
"subtotal": 0,
"service_entry_line_item_id": 0,
"issue_ids": [
"string"
],
"vmrs_reason_for_repair_id": 0,
"vmrs_system_group_id": 0,
"vmrs_system_id": 0,
"vmrs_component_id": 0,
"vmrs_assembly_id": 0
}
],
"issue_ids": [
0
],
"service_task_ids": [
0
],
"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
}
],
"labor_subtotal": 0,
"parts_subtotal": 0,
"subtotal": 0,
"discount": 0,
"discount_percentage": 0,
"discount_type": "percentage",
"tax_1": 0,
"tax_1_percentage": 0,
"tax_1_type": "percentage",
"tax_2": 0,
"tax_2_percentage": 0,
"tax_2_type": "percentage",
"total_amount": 0
}'
Request Collapse all
Base URL
https://secure.fleetio.com/api
Auth
Parameters
— pathrequired
Body
{
  "date": "2023-03-14T13:46:27-06:00",
  "completed_at": "2023-03-14T13:46:27-06:00",
  "started_at": "2023-03-14T13:46:27-06:00",
  "vehicle_id": 0,
  "vehicle_vin": "string",
  "vendor_id": 0,
  "reference": "string",
  "label_list": "High Priority",
  "general_notes": "string",
  "vmrs_repair_priority_class_id": 0,
  "custom_fields": {},
  "meter_entry_attributes": {
    "value": "108043",
    "void": true
  },
  "secondary_meter_entry_attributes": {
    "value": "108043",
    "void": true
  },
  "service_entry_line_items_attributes": [
    {
      "id": 0,
      "service_task_id": 0,
      "type": "ServiceEntryServiceTaskLineItem",
      "description": "string",
      "labor_cost": 0,
      "parts_cost": 0,
      "subtotal": 0,
      "service_entry_line_item_id": 0,
      "issue_ids": [
        "string"
      ],
      "vmrs_reason_for_repair_id": 0,
      "vmrs_system_group_id": 0,
      "vmrs_system_id": 0,
      "vmrs_component_id": 0,
      "vmrs_assembly_id": 0
    }
  ],
  "issue_ids": [
    0
  ],
  "service_task_ids": [
    0
  ],
  "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
    }
  ],
  "labor_subtotal": 0,
  "parts_subtotal": 0,
  "subtotal": 0,
  "discount": 0,
  "discount_percentage": 0,
  "discount_type": "percentage",
  "tax_1": 0,
  "tax_1_percentage": 0,
  "tax_1_type": "percentage",
  "tax_2": 0,
  "tax_2_percentage": 0,
  "tax_2_type": "percentage",
  "total_amount": 0
}
ResponseClear

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