> ## 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 Bill of Materials Line Item

> This endpoint creates a new bill of materials line item.

### Body

<ParamField body="id" type="string">
  This is the id of the bill of materials line item.
</ParamField>

<ParamField body="part_number" type="string">
  This is the part number of the bill of materials line item.
</ParamField>

<ParamField body="part_name" type="string">
  This is the part name of the bill of materials line item.
</ParamField>

<ParamField body="quantity" type="number">
  This is the quantity of the bill of materials line item.
</ParamField>

<ParamField body="purchase_supply_type" type="string">
  This is the purchase supply type of the bill of materials line item.
</ParamField>

<ParamField body="bill_of_materials_number" type="string">
  This is the bill of materials number of the bill of materials line item.
</ParamField>

### Response

<ResponseField name="id" type="string">
  This is the id of the bill of materials line item.
</ResponseField>

<ResponseField name="bill_of_materials_number" type="string">
  This is the number of the bill of materials to which the line item belongs.
</ResponseField>

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

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

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

<ResponseField name="purchase_supply_type" type="string">
  This is the type or category of the purchase/supply associated with the line item.
</ResponseField>

<ResponseField name="quantity" type="number">
  This is the quantity of the part or item required in the bill of materials.
</ResponseField>

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

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

  ```graphQL GraphQL theme={null}

    mutation AddBillOfMaterialLineItem($bill_of_material_line_item: bill_of_material_line_items_insert_input!) {
      insert_bill_of_material_line_items(objects: [$bill_of_material_line_item]) {
        returning {
          ...BillOfMaterialLineItemFields
        }
      }
    }

    fragment BillOfMaterialLineItemFields on bill_of_material_line_items {
      id
      part_number
      part_name
      quantity
      purchase_supply_type
      bill_of_materials_number
    }

  ```

  ```js Node.js theme={null}

  const created = await stateset.billofmaterialItems.create(
    'bomi_ODkRWQtx9NVsRX'
  );

  ```

  ```python Python theme={null}

  created = stateset.billofmaterialItems.create(
    'bomi_ODkRWQtx9NVsRX'
  )

  ```

  ```ruby Ruby theme={null}

  created = Stateset::BillOfMaterialItems.create(
    'bomi_ODkRWQtx9NVsRX'
  )

  ```

  ```go Golang theme={null}

  created, err := stateset.BillOfMaterialItems.Create(
    'bomi_ODkRWQtx9NVsRX'
  )

  ```

  ```java Java theme={null}

  BillOfMaterialItems created = stateset.billOfMaterialItems.create(
    'bomi_ODkRWQtx9NVsRX'
  );

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    {
      "data": {
        "insert_bill_of_material_line_items": {
          "returning": [
            {
              "id": "bomli_1",
              "bill_of_materials_number": "bom_1",
              "line_type": "part",
              "part_name": "Part 1",
              "part_number": "P1",
              "purchase_supply_type": "purchase",
              "quantity": 1,
              "status": "active"
            }
          ]
        }
      }
    }
  }
  ```
</ResponseExample>
