# Transfer Whitelist

This endpoint facilitates the transfer of a product license from one user (User A) to another user (User B) within your hub. By executing this route, you can seamlessly reassign product access, ensuring that licenses are directed to the correct individuals.

## Transfer a license from one user to a different user

<mark style="color:purple;">`PATCH`</mark> `https://v2.parcelroblox.com/whitelist/transfer`

Example of how you have to pass the body parameters:

<img src="https://3296878771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrE23lk3kkdfIlGb9B4Tf%2Fuploads%2FJ7xDlpOiE9QCwqkZi0QS%2Fpatch_whitelist-transfer_example.png?alt=media&#x26;token=1f4fda68-1fce-4357-8c24-b9dc69fb068e" alt="" data-size="original">

#### Headers

<table><thead><tr><th width="256">Name</th><th width="170">Type</th><th>Description</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td>prod_DGzVhVsrqNJi4b0Chd9mMPUI9</td></tr><tr><td>Content-Type</td><td>string</td><td>application/json</td></tr></tbody></table>

#### Request Body

| Name                                                     | Type   | Description               |
| -------------------------------------------------------- | ------ | ------------------------- |
| product\_id<mark style="color:red;">\*</mark>            | string | Product ID                |
| sender.userid<mark style="color:red;">\*</mark>          | string | Roblox or Discord User ID |
| sender.userid\_type<mark style="color:red;">\*</mark>    | string | "roblox" or "discord"     |
| recipient.userid<mark style="color:red;">\*</mark>       | string | Roblox or Discord User ID |
| recipient.userid\_type<mark style="color:red;">\*</mark> | string | "roblox" or "discord"     |

{% tabs %}
{% tab title="200: OK " %}
If everything was able to process properly:

```javascript
{ "status": "200", "message": "OK", "data": { "sender": string, "recipient": string, "product_id": string, "state": "License has been transferred" } }
```

{% endtab %}

{% tab title="400: Bad Request " %}
If you did not follow the schema:

```javascript
{ "status": "400", "message": "Your payload did not pass the Schema validation.", "error": string, "data": {} }
```

If the sender does not own the license:

```javascript
{ "status": "400", "message": "Sender does not own this license.", "data": { } }
```

If the recipient already owns the license:

```javascript
{ "status": "400", "message": "Recipient already owns license.", "data": { } }
```

If you provided an invalid User ID Type:

```javascript
{ "status": "400", "message": "Invalid type.\nAvailable types: roblox, discord", "data": {} }
```

{% endtab %}

{% tab title="401: Unauthorized " %}
If you provided an invalid authorization key:

```javascript
{ "status": "401", "message": "Invalid authorization key." }
```

If you did not provide an authorization key:

```javascript
{ "status": "401", "message": "No authorization key was provided." }
```

{% endtab %}

{% tab title="404: Not Found " %}
If the product ID that you supplied does not exist:

```javascript
{ "status": "404", "message": "Product does not exist.", "data": {} }
```

If the user ID that you supplied does not exist within our Database:

```javascript
{ "status": "404", "message": "No Roblox Account associated to this Discord User ID.", "data": {} }
```

{% endtab %}

{% tab title="500: Internal Server Error " %}
If something was wrong on our end:

```javascript
{ "status": "500", "message": "Internal Server Error" }
```

{% endtab %}
{% endtabs %}
