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

# Repair Warranty Item

> This endpoint initiates a repair 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="repair_type" type="string">
  The type of repair needed (e.g., "hardware", "software", "cosmetic")
</ParamField>

<ParamField body="repair_description" type="string">
  Detailed description of the repair needed
</ParamField>

<ParamField body="repair_location" type="string">
  Where the repair will be performed (e.g., "authorized\_service\_center", "mail\_in", "on\_site")
</ParamField>

<ParamField body="estimated_cost" type="number">
  Estimated cost of the repair (if applicable)
</ParamField>

<ParamField body="pickup_required" type="boolean">
  Whether pickup service is required for the item
</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="repair_ticket_id" type="string">
  The unique identifier for the repair ticket
</ResponseField>

<ResponseField name="repair_status" type="string">
  The status of the repair (e.g., "scheduled", "in\_progress", "completed")
</ResponseField>

<ResponseField name="repair_location" type="string">
  The location where the repair will be performed
</ResponseField>

<ResponseField name="estimated_completion" type="string">
  The estimated completion date for the repair
</ResponseField>

<ResponseField name="repair_tracking_url" type="string">
  URL to track the repair status
</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/repair' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
      "repair_type": "hardware",
      "repair_description": "Screen replacement needed due to manufacturing defect",
      "repair_location": "authorized_service_center",
      "estimated_cost": 150.00,
      "pickup_required": true
  }'
  ```

  ```graphQL GraphQL theme={null}
        mutation warrantyRepairMutation {
          warrantyRepair(
            id: "${warrantyId}",
            repairType: "${repairType}",
            repairDescription: "${repairDescription}",
            repairLocation: "${repairLocation}",
            estimatedCost: ${estimatedCost},
            pickupRequired: ${pickupRequired}
          ) {
            warranty {
              id,
              status,
              repair_ticket_id,
              repair_status,
              estimated_completion
            }
            userErrors {
              field
              message
            }
          }
        }
      `;
  ```

  ```js Node.js theme={null}
  const warranties = await stateset.warranties.repair({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    repair_type: 'hardware',
    repair_description: 'Screen replacement needed due to manufacturing defect',
    repair_location: 'authorized_service_center',
    estimated_cost: 150.00,
    pickup_required: true
  });
  ```

  ```python Python theme={null}
  warranties = stateset.warranties.repair({
    'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    'repair_type': 'hardware',
    'repair_description': 'Screen replacement needed due to manufacturing defect',
    'repair_location': 'authorized_service_center',
    'estimated_cost': 150.00,
    'pickup_required': True
  })
  ```

  ```ruby Ruby theme={null}
  warranties = Stateset::Warranty.repair({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    repair_type: 'hardware',
    repair_description: 'Screen replacement needed due to manufacturing defect',
    repair_location: 'authorized_service_center',
    estimated_cost: 150.00,
    pickup_required: true
  })
  ```

  ```go Go theme={null}
  warranties, err := stateset.Warranties.repair({
    ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    RepairType: 'hardware',
    RepairDescription: 'Screen replacement needed due to manufacturing defect',
    RepairLocation: 'authorized_service_center',
    EstimatedCost: 150.00,
    PickupRequired: true
  })
  ```

  ```java Java theme={null}
  Warranty warranties = stateset.Warranties.repair({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    repairType: 'hardware',
    repairDescription: 'Screen replacement needed due to manufacturing defect',
    repairLocation: 'authorized_service_center',
    estimatedCost: 150.00,
    pickupRequired: true
  });
  ```

  ```php PHP theme={null}
  $warranties = $stateset->warranties->repair([
    'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    'repair_type' => 'hardware',
    'repair_description' => 'Screen replacement needed due to manufacturing defect',
    'repair_location' => 'authorized_service_center',
    'estimated_cost' => 150.00,
    'pickup_required' => true
  ]);
  ```

  ```csharp C# theme={null}
  var warranties = await stateset.Warranties.Repair(new {
    Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    RepairType = 'hardware',
    RepairDescription = 'Screen replacement needed due to manufacturing defect',
    RepairLocation = 'authorized_service_center',
    EstimatedCost = 150.00,
    PickupRequired = true
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "object": "warranty",
    "repair_initiated": true,
    "repair_ticket_id": "rpr_ticket_789xyz",
    "repair_status": "scheduled",
    "repair_type": "hardware",
    "repair_location": "authorized_service_center",
    "estimated_completion": "2024-01-25",
    "repair_tracking_url": "https://repairs.stateset.com/track/rpr_ticket_789xyz",
    "pickup_scheduled": "2024-01-16T14:00:00Z"
  }
  ```
</ResponseExample>
