Skip to main content

Update Work Order

PATCH 

https://secure.fleetio.com/api/v2/work_orders/:work_order_id/work_order_line_items/:id

Update a Work Order

Request

Path Parameters

    work_order_id stringrequired

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

    The id of the associated Work Order

    id stringrequired

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

    The id of the relevant record

Body

    typestring

    Possible values: [WorkOrderServiceTaskLineItem, WorkOrderFreeTextLineItem]

    item_typestring

    The Type of the item associated with the Work Order Line Item

    Possible values: [Issue, ServiceTask]

    item_idinteger

    The ID of the item associated with this Work Order Line Item.

    descriptionstring
    issue_idsinteger[]

    The IDs of any Issues associated with this Work Order Line Item.

    labor_costfloat

    The cost of labor of this line item.

    parts_costfloat

    The cost of Parts of this line item.

    subtotalfloat

    The subtotal of this line item.

    vmrs_reason_for_repair_idinteger

    The ID of the VMRS Reason for Repair associated with this Work Order Line Item.

    vmrs_system_group_idinteger

    The ID of the VMRS System Group associated with this Work Order Line Item.

    vmrs_system_idinteger

    The ID of the VMRS System associated with this Work Order Line Item.

    vmrs_assembly_idinteger

    The ID of the VMRS Assembly associated with this Work Order Line Item.

    vmrs_component_idinteger

    The ID of the VMRS Component associated with this Work Order Line Item.

    work_order_sub_line_items_attributes object[]

    The sub line items associated with this Work Order Line Item. May be used for parts or labor.

  • Array [
  • work_order_idinteger

    The parent Work Order ID.

    item_idinteger

    The ID of the Part or Contact associated with this sub line item.

    item_typestring

    Possible values: [Part, Contact]

    quantityfloat

    The quantity of labor or parts for this sub line item.

    unit_costfloat

    The cost per unit of labor or parts for this sub line item.

    subtotalfloat

    The subtotal of this sub line item.

    positioninteger

    The position of this sub line item in the list of sub line items.

  • ]
  • work_order_part_line_items_attributes object[]

    The part line items associated with this Work Order Line Item. May be used instead of work_order_sub_line_items_attributes.

  • Array [
  • work_order_idinteger

    The parent Work Order ID.

    item_idinteger

    The ID of the Part associated with this part sub line item.

    item_typestring

    Possible values: [Part]

    quantityfloat

    The quantity of the Part for this part sub line item.

    unit_costfloat

    The cost per unit of the Part for this part sub line item.

    subtotalfloat

    The subtotal of the Part for this part sub line item.

    positioninteger

    The position of this part sub line item in the list of sub line items.

  • ]
  • work_order_labor_line_items_attributes object[]

    The labor line items associated with this Work Order Line Item. May be used instead of work_order_sub_line_items_attributes.

  • Array [
  • work_order_idinteger

    The parent Work Order ID.

    item_idinteger

    The ID of the Contact associated with this labor sub line item.

    item_typestring

    Possible values: [Contact]

    quantityfloat

    The quantity of labor for this labor sub line item.

    unit_costfloat

    The cost per unit of labor for this labor sub line item.

    subtotalfloat

    The subtotal of this labor sub line item.

    positioninteger

    The position of this labor sub line item in the list of sub line items.

  • ]

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/v2/work_orders/:work_order_id/work_order_line_items/:id' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token <Authorization>' \
-H 'Account-Token: <Authorization>' \
-d '{
"type": "WorkOrderServiceTaskLineItem",
"item_type": "Issue",
"item_id": 0,
"description": "string",
"issue_ids": [
0
],
"labor_cost": 0,
"parts_cost": 0,
"subtotal": 0,
"vmrs_reason_for_repair_id": 0,
"vmrs_system_group_id": 0,
"vmrs_system_id": 0,
"vmrs_assembly_id": 0,
"vmrs_component_id": 0,
"work_order_sub_line_items_attributes": [
{
"work_order_id": 0,
"item_id": 0,
"item_type": "Part",
"quantity": 0,
"unit_cost": 0,
"subtotal": 0,
"position": 0
}
],
"work_order_part_line_items_attributes": [
{
"work_order_id": 0,
"item_id": 0,
"item_type": "Part",
"quantity": 0,
"unit_cost": 0,
"subtotal": 0,
"position": 0
}
],
"work_order_labor_line_items_attributes": [
{
"work_order_id": 0,
"item_id": 0,
"item_type": "Contact",
"quantity": 0,
"unit_cost": 0,
"subtotal": 0,
"position": 0
}
]
}'
Request Collapse all
Base URL
https://secure.fleetio.com/api
Auth
Parameters
— pathrequired
— pathrequired
Body
{
  "type": "WorkOrderServiceTaskLineItem",
  "item_type": "Issue",
  "item_id": 0,
  "description": "string",
  "issue_ids": [
    0
  ],
  "labor_cost": 0,
  "parts_cost": 0,
  "subtotal": 0,
  "vmrs_reason_for_repair_id": 0,
  "vmrs_system_group_id": 0,
  "vmrs_system_id": 0,
  "vmrs_assembly_id": 0,
  "vmrs_component_id": 0,
  "work_order_sub_line_items_attributes": [
    {
      "work_order_id": 0,
      "item_id": 0,
      "item_type": "Part",
      "quantity": 0,
      "unit_cost": 0,
      "subtotal": 0,
      "position": 0
    }
  ],
  "work_order_part_line_items_attributes": [
    {
      "work_order_id": 0,
      "item_id": 0,
      "item_type": "Part",
      "quantity": 0,
      "unit_cost": 0,
      "subtotal": 0,
      "position": 0
    }
  ],
  "work_order_labor_line_items_attributes": [
    {
      "work_order_id": 0,
      "item_id": 0,
      "item_type": "Contact",
      "quantity": 0,
      "unit_cost": 0,
      "subtotal": 0,
      "position": 0
    }
  ]
}
ResponseClear

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