> ## 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.

# Close Warranty

> This endpoint closes a warranty.

### Body

<ParamField body="warranty_id" type="string">
  The ID provided in the data tab may be used to identify the warranty
</ParamField>

<ParamField body="resolution" type="string">
  The resolution or outcome of the warranty claim
</ParamField>

### Response

<ResponseField name="id" type="string">
  The ID provided in the data tab may be used to identify the warranty
</ResponseField>

<ResponseField name="object" type="string">
  The object type
</ResponseField>

<ResponseField name="closed_at" type="string">
  The timestamp when the warranty was closed
</ResponseField>

<ResponseField name="success" type="number">
  Indicates whether the call was successful. true if successful, false if not.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/warranty/:id/close' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
      "resolution": "Replaced product under warranty"
  }'
  ```

  ```graphQL GraphQL theme={null}
        mutation warrantyCloseMutation {
          warrantyClose(id: "${warrantyId}", resolution: "${resolution}") {
            warranty {
              id,
              status,
              closed_at
            }
            userErrors {
              field
              message
            }
          }
        }
      `;
  ```

  ```js Node.js theme={null}
  const warranties = await stateset.warranties.close({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    resolution: 'Replaced product under warranty'
  });
  ```

  ```python Python theme={null}
  warranties = stateset.warranties.close({
    'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    'resolution': 'Replaced product under warranty'
  })
  ```

  ```ruby Ruby theme={null}
  warranties = Stateset::Warranty.close({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    resolution: 'Replaced product under warranty'
  })
  ```

  ```go Go theme={null}
  warranties, err := stateset.Warranties.close({
    ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    Resolution: 'Replaced product under warranty'
  })
  ```

  ```java Java theme={null}
  Warranty warranties = stateset.Warranties.close({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    resolution: 'Replaced product under warranty'
  });
  ```

  ```php PHP theme={null}
  $warranties = $stateset->warranties->close([
    'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    'resolution' => 'Replaced product under warranty'
  ]);
  ```

  ```csharp C# theme={null}
  var warranties = await stateset.Warranties.Close(new {
    Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    Resolution = 'Replaced product under warranty'
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "object": "warranty",
    "closed": true,
    "closed_at": "2024-01-15T10:30:00Z",
    "resolution": "Replaced product under warranty"
  }
  ```
</ResponseExample>
