Skip to main content

Update Work Order

PATCH 

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

deprecated

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

Update a Work Order

Request

Path Parameters

    id stringrequired

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

    The id of the relevant record

Body

    issued_atdate-time

    The date and time at which this Work Order was issued. 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 this Work Order was started. 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 this Work Order was completed. We recommend using ISO-8601 formatted dates to avoid ambiguity.

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

    Possible values: >= 1

    work_order_status_namestring

    The name of the Work Order Status associated with this Work Order.

    invoice_numberstring

    The number of the Invoice associated with this Work Order.

    Possible values: <= 255 characters

    vendor_idId (integer)

    Possible values: >= 1

    vendor_namestring

    The name of the Vendor associated with this Work Order.

    Possible values: <= 255 characters

    vehicle_idId (integer)

    Possible values: >= 1

    vehicle_namestring

    The name of the Vehicle associated with this Work Order.

    Possible values: <= 255 characters

    discount_typestring

    The type of discount applied to this Work Order.

    Possible values: [percentage, amount]

    discountfloat

    The discount amount in decimal currency units applied to this Work Order.

    discount_percentagefloat

    The percentage of the discount applied to this Work Order. Used if discount_type is set to percentage.

    tax_1_percentagefloat

    The percentage of the first tax applied to this Work Order. Used if tax_1_type is set to percentage.

    tax_1_typeTaxType (string)nullable

    The type of tax to apply to this record.

    Possible values: [fixed, percentage]

    Default value: percentage
    tax_1float

    The amount of the first tax applied to this Work Order. Used if tax_1_type is set to amount.

    tax_2_percentagefloat

    The percentage of the second tax applied to this Work Order. Used if tax_2_type is set to percentage.

    tax_2_typeTaxType (string)nullable

    The type of tax to apply to this record.

    Possible values: [fixed, percentage]

    Default value: percentage
    tax_2float

    The amount of the second tax applied to this Work Order. Used if tax_2_type is set to amount.

    issued_by_idId (integer)

    Possible values: >= 1

    contact_idId (integer)

    Possible values: >= 1

    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
    purchase_order_numberstring

    The number of the Purchase Order associated with this Work Order.

    descriptionstring

    A description of this Work Order.

    numberinteger

    The number to be applied to this Work Order. Must be unique.

    meter_entry_attributes object

    A Work Order may also 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 Work Order 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.

    custom_fieldsobjectnullable

    *Full details on working with Custom Fields here.

    ending_meter_same_as_startboolean

    Use start meter for completion meter?

    vmrs_repair_priority_class_idId (integer)

    Possible values: >= 1

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/work_orders/:id' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token <Authorization>' \
-H 'Account-Token: <Authorization>' \
-d '{
"issued_at": "2023-03-14T13:46:27-06:00",
"started_at": "2023-03-14T13:46:27-06:00",
"completed_at": "2023-03-14T13:46:27-06:00",
"work_order_status_id": 0,
"work_order_status_name": "string",
"invoice_number": "string",
"vendor_id": 0,
"vendor_name": "string",
"vehicle_id": 0,
"vehicle_name": "string",
"discount_type": "percentage",
"discount": 0,
"discount_percentage": 0,
"tax_1_percentage": 0,
"tax_1_type": "percentage",
"tax_1": 0,
"tax_2_percentage": 0,
"tax_2_type": "percentage",
"tax_2": 0,
"issued_by_id": 0,
"contact_id": 0,
"label_list": "High Priority",
"purchase_order_number": "string",
"description": "string",
"number": 0,
"meter_entry_attributes": {
"value": "108043",
"void": true
},
"secondary_meter_entry_attributes": {
"value": "108043",
"void": true
},
"custom_fields": {},
"ending_meter_same_as_start": true,
"vmrs_repair_priority_class_id": 0
}'
Request Collapse all
Base URL
https://secure.fleetio.com/api
Auth
Parameters
— pathrequired
Body
{
  "issued_at": "2023-03-14T13:46:27-06:00",
  "started_at": "2023-03-14T13:46:27-06:00",
  "completed_at": "2023-03-14T13:46:27-06:00",
  "work_order_status_id": 0,
  "work_order_status_name": "string",
  "invoice_number": "string",
  "vendor_id": 0,
  "vendor_name": "string",
  "vehicle_id": 0,
  "vehicle_name": "string",
  "discount_type": "percentage",
  "discount": 0,
  "discount_percentage": 0,
  "tax_1_percentage": 0,
  "tax_1_type": "percentage",
  "tax_1": 0,
  "tax_2_percentage": 0,
  "tax_2_type": "percentage",
  "tax_2": 0,
  "issued_by_id": 0,
  "contact_id": 0,
  "label_list": "High Priority",
  "purchase_order_number": "string",
  "description": "string",
  "number": 0,
  "meter_entry_attributes": {
    "value": "108043",
    "void": true
  },
  "secondary_meter_entry_attributes": {
    "value": "108043",
    "void": true
  },
  "custom_fields": {},
  "ending_meter_same_as_start": true,
  "vmrs_repair_priority_class_id": 0
}
ResponseClear

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