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

# Transfer Warranty

> This endpoint transfers a warranty to a new owner.

### Body

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

<ParamField body="new_owner_id" type="string">
  The ID of the new owner
</ParamField>

<ParamField body="new_owner_email" type="string">
  The email address of the new owner
</ParamField>

<ParamField body="transfer_date" type="string">
  The date of the warranty transfer
</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="previous_owner_id" type="string">
  The ID of the previous owner
</ResponseField>

<ResponseField name="new_owner_id" type="string">
  The ID of the new owner
</ResponseField>

<ResponseField name="transfer_date" type="string">
  The date when the warranty was transferred
</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/transfer' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
      "new_owner_id": "usr_789xyz",
      "new_owner_email": "newowner@example.com",
      "transfer_date": "2024-01-15"
  }'
  ```

  ```graphQL GraphQL theme={null}
        mutation warrantyTransferMutation {
          warrantyTransfer(id: "${warrantyId}", newOwnerId: "${newOwnerId}", newOwnerEmail: "${newOwnerEmail}", transferDate: "${transferDate}") {
            warranty {
              id,
              previous_owner_id,
              new_owner_id,
              transfer_date
            }
            userErrors {
              field
              message
            }
          }
        }
      `;
  ```

  ```js Node.js theme={null}
  const warranties = await stateset.warranties.transfer({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    new_owner_id: 'usr_789xyz',
    new_owner_email: 'newowner@example.com',
    transfer_date: '2024-01-15'
  });
  ```

  ```python Python theme={null}
  warranties = stateset.warranties.transfer({
    'id': '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    'new_owner_id': 'usr_789xyz',
    'new_owner_email': 'newowner@example.com',
    'transfer_date': '2024-01-15'
  })
  ```

  ```ruby Ruby theme={null}
  warranties = Stateset::Warranty.transfer({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    new_owner_id: 'usr_789xyz',
    new_owner_email: 'newowner@example.com',
    transfer_date: '2024-01-15'
  })
  ```

  ```go Go theme={null}
  warranties, err := stateset.Warranties.transfer({
    ID: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    NewOwnerID: 'usr_789xyz',
    NewOwnerEmail: 'newowner@example.com',
    TransferDate: '2024-01-15'
  })
  ```

  ```java Java theme={null}
  Warranty warranties = stateset.Warranties.transfer({
    id: '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    newOwnerId: 'usr_789xyz',
    newOwnerEmail: 'newowner@example.com',
    transferDate: '2024-01-15'
  });
  ```

  ```php PHP theme={null}
  $warranties = $stateset->warranties->transfer([
    'id' => '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    'new_owner_id' => 'usr_789xyz',
    'new_owner_email' => 'newowner@example.com',
    'transfer_date' => '2024-01-15'
  ]);
  ```

  ```csharp C# theme={null}
  var warranties = await stateset.Warranties.Transfer(new {
    Id = '0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    NewOwnerId = 'usr_789xyz',
    NewOwnerEmail = 'newowner@example.com',
    TransferDate = '2024-01-15'
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "e0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "object": "warranty",
    "transferred": true,
    "previous_owner_id": "usr_123abc",
    "new_owner_id": "usr_789xyz",
    "new_owner_email": "newowner@example.com",
    "transfer_date": "2024-01-15"
  }
  ```
</ResponseExample>
