Skip to main content

Create Work Order Line Item

POST 

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

Creates a new Work Order Line Item

Request

Path Parameters

    work_order_id stringrequired

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

    The id of the associated Work Order

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

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
      titlestringnullable

      The title of this line item.

      descriptionstringnullable

      A description of this Work Order Line Item.

      positionintegernullable

      The position of this Work Order Line Item in a list of Work Order Line Items.

      item_idintegerrequired

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

      item_typestringrequired

      The type of item associated with this Work Order Line Item.

      Possible values: [Issue, ServiceTask]

      work_order_idintegerrequired

      The ID of the Work Order that this line item belongs to.

      parts_cost_centsintegerrequired

      The cost of Parts in cents of this line item.

      labor_cost_centsintegerrequired

      The cost of labor in cents of this line item.

      service_reminder_idintegernullable

      The ID of the Service Reminder associated with this line item, if applicable.

      subtotal_centsstringrequired

      The subtotal in cents of this line item.

      work_order_line_item_idintegernullable
      vehicle_idintegernullable
      vehicle_archived_atdate-timenullable
      Example: 2023-03-14T13:46:27-06:00
      vmrs_system_idNullableId (integer)nullable

      Possible values: >= 1

      vmrs_assembly_idNullableId (integer)nullable

      Possible values: >= 1

      vmrs_component_idNullableId (integer)nullable

      Possible values: >= 1

      vmrs_reason_for_repair_idNullableId (integer)nullable

      Possible values: >= 1

      vmrs_system_group_idNullableId (integer)nullable

      Possible values: >= 1

    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)

    Request Collapse all
    Base URL
    https://secure.fleetio.com/api
    Auth
    Parameters
    — 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!