Create Work Order Line Item
Creates a new Work Order Line Item
Path Parameters
- work_order_id string required
Possible values: Value must match regular expression
^[0-9]+$
The id of the associated Work Order
- application/json
Request Body
- type string
Possible values: [
WorkOrderServiceTaskLineItem
,WorkOrderFreeTextLineItem
] - item_type string
Possible values: [
Issue
,ServiceTask
]The Type of the item associated with the Work Order Line Item
- item_id integer
The ID of the item associated with this Work Order Line Item.
- description string
- issue_ids integer[]
The IDs of any
Issues
associated with this Work Order Line Item. - labor_cost float
The cost of labor of this line item.
- parts_cost float
The cost of
Parts
of this line item. - subtotal float
The subtotal of this line item.
- vmrs_reason_for_repair_id integer
The ID of the VMRS Reason for Repair associated with this Work Order Line Item.
- vmrs_system_group_id integer
The ID of the VMRS System Group associated with this Work Order Line Item.
- vmrs_system_id integer
The ID of the VMRS System associated with this Work Order Line Item.
- vmrs_assembly_id integer
The ID of the VMRS Assembly associated with this Work Order Line Item.
- vmrs_component_id integer
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.
work_order_id integerThe parent Work Order ID.
item_id integerThe ID of the Part or Contact associated with this sub line item.
item_type stringPossible values: [
Part
,Contact
]quantity floatThe quantity of labor or parts for this sub line item.
unit_cost floatThe cost per unit of labor or parts for this sub line item.
subtotal floatThe subtotal of this sub line item.
position integerThe 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
.work_order_id integerThe parent Work Order ID.
item_id integerThe ID of the Part associated with this part sub line item.
item_type stringPossible values: [
Part
]quantity floatThe quantity of the Part for this part sub line item.
unit_cost floatThe cost per unit of the Part for this part sub line item.
subtotal floatThe subtotal of the Part for this part sub line item.
position integerThe 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
.work_order_id integerThe parent Work Order ID.
item_id integerThe ID of the Contact associated with this labor sub line item.
item_type stringPossible values: [
Contact
]quantity floatThe quantity of labor for this labor sub line item.
unit_cost floatThe cost per unit of labor for this labor sub line item.
subtotal floatThe subtotal of this labor sub line item.
position integerThe position of this labor sub line item in the list of sub line items.
- 201
- 401
- 403
- 422
- 500
OK
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- id integer
Possible values:
>= 1
- created_at date-time
The date and time at which this record was created.
- updated_at date-time
The date and time at which this record was most recently updated.
- title string
The title of this line item.
- description string
A description of this Work Order Line Item.
- position integer
The position of this Work Order Line Item in a list of Work Order Line Items.
- item_id integer
The ID of the item associated with this Work Order Line Item.
- item_type string
Possible values: [
Issue
,ServiceTask
]The type of item associated with this Work Order Line Item.
- work_order_id integer
The ID of the
Work Order
that this line item belongs to. - parts_cost_cents integer
The cost of
Parts
in cents of this line item. - labor_cost_cents integer
The cost of labor in cents of this line item.
- service_reminder_id integer
The ID of the
Service Reminder
associated with this line item, if applicable. - subtotal_cents string
The subtotal in cents of this line item.
- work_order_line_item_id integer
- vehicle_id integer
- vehicle_archived_at date-time
- vmrs_system_id NullableId
Possible values:
>= 1
- vmrs_assembly_id NullableId
Possible values:
>= 1
- vmrs_component_id NullableId
Possible values:
>= 1
- vmrs_reason_for_repair_id NullableId
Possible values:
>= 1
- vmrs_system_group_id NullableId
Possible values:
>= 1
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"title": "string",
"description": "string",
"position": 0,
"item_id": 0,
"item_type": "Issue",
"work_order_id": 0,
"parts_cost_cents": 0,
"labor_cost_cents": 0,
"service_reminder_id": 0,
"subtotal_cents": "string",
"work_order_line_item_id": 0,
"vehicle_id": 0,
"vehicle_archived_at": "2023-03-14T13:46:27-06:00",
"vmrs_system_id": 0,
"vmrs_assembly_id": 0,
"vmrs_component_id": 0,
"vmrs_reason_for_repair_id": 0,
"vmrs_system_group_id": 0
}
Request could not be authenticated
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
Insufficient permission to perform this operation
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
Unprocessable Entity
- application/json
- Schema
- Example (from schema)
- Example
Schema
errors object
typeitems string
{
"errors": {}
}
{
"errors": {
"field1": [
"error1",
"error2"
],
"field2": [
"error3"
]
}
}
Something unexpected happened
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}