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

# Inspect Warranty Item

> This endpoint records inspection details for a warranty claim.

### Body

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

<ParamField body="inspection_type" type="string">
  The type of inspection performed (e.g., "physical", "diagnostic", "functional")
</ParamField>

<ParamField body="inspector_id" type="string">
  The ID of the inspector or technician
</ParamField>

<ParamField body="inspection_notes" type="string">
  Detailed notes from the inspection
</ParamField>

<ParamField body="defects_found" type="array">
  List of defects found during inspection
</ParamField>

<ParamField body="inspection_images" type="array">
  URLs of images taken during inspection
</ParamField>

<ParamField body="warranty_valid" type="boolean">
  Whether the issue is covered under warranty
</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="inspection_id" type="string">
  The unique identifier for the inspection record
</ResponseField>

<ResponseField name="inspection_status" type="string">
  The status of the inspection (e.g., "completed", "pending\_review")
</ResponseField>

<ResponseField name="inspection_date" type="string">
  The date when the inspection was performed
</ResponseField>

<ResponseField name="warranty_valid" type="boolean">
  Whether the warranty claim is valid based on inspection
</ResponseField>

<ResponseField name="recommended_action" type="string">
  The recommended action based on inspection results
</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 POST 'https://api.stateset.com/v1/warranties/:id/inspect' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
      "inspection_type": "diagnostic",
      "inspector_id": "tech_456",
      "inspection_notes": "Device shows signs of manufacturing defect in display panel",
      "defects_found": ["dead_pixels", "backlight_bleeding"],
      "inspection_images": ["https://images.stateset.com/inspect/img1.jpg", "https://images.stateset.com/inspect/img2.jpg"],
      "warranty_valid": true
  }'
  ```

  ```graphQL GraphQL theme={null}
        mutation warrantyInspectMutation {
          warrantyInspect(
            id: "${warrantyId}",
            inspectionType: "${inspectionType}",
            inspectorId: "${inspectorId}",
            inspectionNotes: "${inspectionNotes}",
            defectsFound: ${defectsFound},
            inspectionImages: ${inspectionImages},
            warrantyValid: ${warrantyValid}
          ) {
            warranty {
              id,
              status,
              inspection_id,
              inspection_status,
              warranty_valid,
              recommended_action
            }
            userErrors {
              field
              message
            }
          }
        }
      `;
  ```

  ```js Node.js theme={null}
  const warranties = await stateset.warranties.inspect({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    inspection_type: 'diagnostic',
    inspector_id: 'tech_456',
    inspection_notes: 'Device shows signs of manufacturing defect in display panel',
    defects_found: ['dead_pixels', 'backlight_bleeding'],
    inspection_images: ['https://images.stateset.com/inspect/img1.jpg', 'https://images.stateset.com/inspect/img2.jpg'],
    warranty_valid: true
  });
  ```

  ```python Python theme={null}
  warranties = stateset.warranties.inspect({
    'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    'inspection_type': 'diagnostic',
    'inspector_id': 'tech_456',
    'inspection_notes': 'Device shows signs of manufacturing defect in display panel',
    'defects_found': ['dead_pixels', 'backlight_bleeding'],
    'inspection_images': ['https://images.stateset.com/inspect/img1.jpg', 'https://images.stateset.com/inspect/img2.jpg'],
    'warranty_valid': True
  })
  ```

  ```ruby Ruby theme={null}
  warranties = Stateset::Warranty.inspect({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    inspection_type: 'diagnostic',
    inspector_id: 'tech_456',
    inspection_notes: 'Device shows signs of manufacturing defect in display panel',
    defects_found: ['dead_pixels', 'backlight_bleeding'],
    inspection_images: ['https://images.stateset.com/inspect/img1.jpg', 'https://images.stateset.com/inspect/img2.jpg'],
    warranty_valid: true
  })
  ```

  ```go Go theme={null}
  warranties, err := stateset.Warranties.inspect({
    ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    InspectionType: 'diagnostic',
    InspectorID: 'tech_456',
    InspectionNotes: 'Device shows signs of manufacturing defect in display panel',
    DefectsFound: []string{'dead_pixels', 'backlight_bleeding'},
    InspectionImages: []string{'https://images.stateset.com/inspect/img1.jpg', 'https://images.stateset.com/inspect/img2.jpg'},
    WarrantyValid: true
  })
  ```

  ```java Java theme={null}
  Warranty warranties = stateset.Warranties.inspect({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    inspectionType: 'diagnostic',
    inspectorId: 'tech_456',
    inspectionNotes: 'Device shows signs of manufacturing defect in display panel',
    defectsFound: ['dead_pixels', 'backlight_bleeding'],
    inspectionImages: ['https://images.stateset.com/inspect/img1.jpg', 'https://images.stateset.com/inspect/img2.jpg'],
    warrantyValid: true
  });
  ```

  ```php PHP theme={null}
  $warranties = $stateset->warranties->inspect([
    'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    'inspection_type' => 'diagnostic',
    'inspector_id' => 'tech_456',
    'inspection_notes' => 'Device shows signs of manufacturing defect in display panel',
    'defects_found' => ['dead_pixels', 'backlight_bleeding'],
    'inspection_images' => ['https://images.stateset.com/inspect/img1.jpg', 'https://images.stateset.com/inspect/img2.jpg'],
    'warranty_valid' => true
  ]);
  ```

  ```csharp C# theme={null}
  var warranties = await stateset.Warranties.Inspect(new {
    Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    InspectionType = 'diagnostic',
    InspectorId = 'tech_456',
    InspectionNotes = 'Device shows signs of manufacturing defect in display panel',
    DefectsFound = new[] { 'dead_pixels', 'backlight_bleeding' },
    InspectionImages = new[] { 'https://images.stateset.com/inspect/img1.jpg', 'https://images.stateset.com/inspect/img2.jpg' },
    WarrantyValid = true
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "object": "warranty",
    "inspected": true,
    "inspection_id": "insp_abc123",
    "inspection_status": "completed",
    "inspection_date": "2024-01-15T14:30:00Z",
    "warranty_valid": true,
    "defects_found": ["dead_pixels", "backlight_bleeding"],
    "recommended_action": "replace",
    "inspector_id": "tech_456"
  }
  ```
</ResponseExample>
