> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Work Order Line Item

> This endpoint creates a new work order line item.

### Body

<ParamField body="id" type="string">
  This is the unique identifier of the work order line item.
</ParamField>

<ParamField body="line_status" type="string">
  This is the status or state of the work order line item.
</ParamField>

<ParamField body="line_type" type="string">
  This is the type or category of the work order line item.
</ParamField>

<ParamField body="part_name" type="string">
  This is the name of the part or item included in the work order line item.
</ParamField>

<ParamField body="part_number" type="string">
  This is the number or code associated with the part or item included in the work order line item.
</ParamField>

<ParamField body="total_quantity" type="number">
  This is the total quantity of the part or item required or used in the work order line item.
</ParamField>

<ParamField body="unit_quantity" type="number">
  This is the quantity of the part or item required or used per unit in the work order line item.
</ParamField>

<ParamField body="work_order_number" type="string">
  This is the number associated with the work order to which the line item belongs.
</ParamField>

### Response

<ResponseField name="id" type="string">
  This is the unique identifier of the work order line item.
</ResponseField>

<ResponseField name="line_status" type="string">
  This is the status or state of the work order line item.
</ResponseField>

<ResponseField name="line_type" type="string">
  This is the type or category of the work order line item.
</ResponseField>

<ResponseField name="part_name" type="string">
  This is the name of the part or item included in the work order line item.
</ResponseField>

<ResponseField name="part_number" type="string">
  This is the number or code associated with the part or item included in the work order line item.
</ResponseField>

<ResponseField name="total_quantity" type="number">
  This is the total quantity of the part or item required or used in the work order line item.
</ResponseField>

<ResponseField name="unit_quantity" type="number">
  This is the quantity of the part or item required or used per unit in the work order line item.
</ResponseField>

<ResponseField name="work_order_number" type="string">
  This is the number associated with the work order to which the line item belongs.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://api.stateset.com/v1/work_order_line_item' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "current_token": ""
  }'
  ```

  ```graphQL GraphQL theme={null}
                   mutation addWorkOrderLineItem($work_order_line_item: work_order_line_items_insert_input!) {
                    insert_work_order_line_items(objects: [$work_order_line_item]) {
                      returning {
                          id
                          line_status
                          line_type
                          part_name
                          part_number
                          total_quantity
                          unit_quantity
                          work_order_number
                    }
                  }
                }
  ```

  ```js Node.js theme={null}
  const workOrderLineItem = await stateset.workOrderItem.create({
    '0901f083-aa1c-43c5-af5c-0a9d2fc64e30'

  });

  ```

  ```python Python theme={null}
  work_order_line_item = stateset.work_order_line_item.create(
      {
          "work_order_line_item": {

          
          }
      }
  )
  ```

  ```ruby Ruby theme={null}
  work_order_line_item = Stateset::WorkOrderItem.create(
      {
          "work_order_line_item": {

          }
      }
  )
  ```

  ```php PHP theme={null}
  $work_order_line_item = $stateset->work_order_line_item->create(
      [
          "work_order_line_item" => [

          ]
      ]
  );
  ```

  ```go Golang theme={null}

  WorkOrderLineItem , err := stateset.WorkOrderLineItem.Create(

  )
  ```

  ```java Java theme={null}

  WorkOrderLineItem workOrderLineItem = stateset.workOrderLineItem.create(


  );
  ```

  ```csharp C# theme={null}

  var workOrderLineItem = stateset.WorkOrderLineItem.Create(


  );
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    {
      "data": {
        "insert_work_order_line_items": {
          "returning": [
            {
              "id": "0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
              "line_status": "In Progress",
              "line_type": "Part",
              "part_name": "Part 1",
              "part_number": "123456",
              "total_quantity": 10,
              "unit_quantity": 1,
              "work_order_number": "WO-0001"
            }
          ]
        }
      }
    }
  }
  ```
</ResponseExample>

## Work Order Line Items

| Name                | Type    | Description                                                              |
| ------------------- | ------- | ------------------------------------------------------------------------ |
| id                  | Text    | Unique identifier for the line item                                      |
| line\_status        | Text    | Status or state of the line item                                         |
| line\_type          | Text    | Type or category of the line item                                        |
| part\_name          | Text    | Name of the part or item included in the line item                       |
| part\_number        | Text    | Number or code associated with the part or item                          |
| total\_quantity     | Numeric | Total quantity of the part or item required or used in the work order    |
| unit\_quantity      | Numeric | Quantity of the part or item required or used per unit in the work order |
| work\_order\_number | Text    | Number associated with the work order to which the line item belongs     |
