> ## 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 Warranty Line Item

> This endpoint creates a new warranty line item.

### Body

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

<ParamField body="sku" type="string">
  This is the sku of the warranty line item.
</ParamField>

<ParamField body="name" type="string">
  This is the name of the warranty line item.
</ParamField>

<ParamField body="price" type="string">
  This is the price of the warranty line item.
</ParamField>

<ParamField body="condition" type="string">
  This is the condition of the warranty line item.
</ParamField>

<ParamField body="serial_number" type="string">
  This is the serial number of the warranty line item.
</ParamField>

<ParamField body="amount" type="string">
  This is the amount of the warranty line item.
</ParamField>

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

<ParamField body="created_at" type="string">
  This is the created at of the warranty line item.
</ParamField>

<ParamField body="updated_at" type="string">
  This is the updated at of the warranty line item.
</ParamField>

### Response

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

<ResponseField name="amount" type="string">
  This is the amount of the warranty line item.
</ResponseField>

<ResponseField name="condition" type="string">
  This is the condition of the warranty line item.
</ResponseField>

<ResponseField name="flat_rate_shipping" type="string">
  This is the flat rate shipping of the warranty line item.
</ResponseField>

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

<ResponseField name="price" type="string">
  This is the price of the warranty line item.
</ResponseField>

<ResponseField name="warranty_id" type="string">
  This is the id of the warranty associated with the line item.
</ResponseField>

<ResponseField name="serial_number" type="string">
  This is the serial number of the warranty line item.
</ResponseField>

<ResponseField name="sku" type="string">
  This is the sku of the warranty line item.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://api.stateset.com/v1/warranty_line_item' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "warranty_line_item": {
          "sku": "123456789",
          "name": "Warranty Item",
          "price": "100.00",
          "condition": "New",
          "serial_number": "123456789",
          "amount": "110.00",
          "warranty_id": "0901f083-aa1c-43c5-af5c-0a9d2fc64e30"
      }
  }'
  ```

  ```graphQL GraphQL theme={null}
                 mutation addWarrantyLineItem($warranty_line_item: warranty_line_items_insert_input!) {
                  insert_warranty_line_items(objects: [$warranty_line_item]) {
                    returning {
                      id
                      sku
                      name
                      price
                      condition
                      serial_number
                      amount
                      warranty_id
                  }
                }
            }
  ```

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

  const created = await stateset.warrantyItems.create(
    'wi_ODkRWQtx9NVsRX'
  );

  ```

  ```python Python theme={null}

  created = stateset.warrantyItems.create(
    'wi_ODkRWQtx9NVsRX'
  )

  ```

  ```ruby Ruby theme={null}

  created = Stateset::WarrantyItems.create(
    'wi_ODkRWQtx9NVsRX'
  )

  ```

  ```php PHP theme={null}

  $created = $stateset->warrantyItems->create(
    'wi_ODkRWQtx9NVsRX'
  );

  ```

  ```go Go theme={null}

  WarrantyItems , err := stateset.WarrantyItems.Create(
    'wi_ODkRWQtx9NVsRX'
  )

  ```

  ```java Java theme={null}

  WarrantyItems created = stateset.warrantyItems.create(
    'wi_ODkRWQtx9NVsRX'
  );

  ```

  ```cs C# theme={null}

  var created = stateset.WarrantyItems.Create(
    'wi_ODkRWQtx9NVsRX'
  );

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "warranty_line_items": [
        {
          "id": "0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
          "sku": "123456789",
          "name": "Warranty Item",
          "price": "100.00",
          "condition": "New",
          "tax_refunded": false,
          "flat_rate_shipping": "10.00",
          "warranty_id": "0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
          "serial_number": "123456789",
          "amount": "110.00",
          "image_1": "https://www.example.com/image1.jpg",
          "image_2": "https://www.example.com/image2.jpg",
          "image_3": "https://www.example.com/image3.jpg",
          "match": "123456789"
        }
      ]
    }
  }
  ```
</ResponseExample>
