# Update an existing Product

Utilize this endpoint to modify one or more attributes of an existing product within your hub, ensuring its details are current and accurate. This flexible tool allows for precise amendments, enhancing your product management workflow.

## Update an existing Product

<mark style="color:purple;">`PATCH`</mark> `https://v2.parcelroblox.com/products/update/:product_id`

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%2FEAsKMYm2a3muXSKll1cV%2Fpatch_product_example.png?alt=media&#x26;token=85919221-6c7c-4721-b9e6-433c6d40d5d7" alt="" data-size="original">

#### Path Parameters

| Name                                          | Type   | Description |
| --------------------------------------------- | ------ | ----------- |
| product\_id<mark style="color:red;">\*</mark> | string | Product ID  |

#### 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                   |
| ---------------------- | ------------- | ----------------------------- |
| name                   | string        | Product Name                  |
| description            | string        | Product Description           |
| developer\_product\_id | string        | Roblox Developer Product ID   |
| file                   | string        | File URL (or text message)    |
| onsale                 | boolean       | Product Sale Status           |
| role\_id               | string / null | Discord Buyer Role ID         |
| decal\_id              | string / null | Roblox Decal ID               |
| stock                  | string        | Product Stock                 |
| category               | string        | Product Category              |
| instructions           | string / null | Product Delivery Instructions |

#### Available Categories

```json
aviation, military, vehicles, maritime, healthcare, education, hospitality, retail, technology, industrial, urban, residential, other
```

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

```javascript
{ "status": "200", "message": "OK", "data": { "state": "Product updated", "changes": object } }
```

{% 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 product name that you supplied is already registered:

```javascript
{ "status": "400", "message": "The name '' is already in-use.\nPlease use a different product name.", "data": {} }
```

If the Roblox Developer Product ID that you supplied does not exist:

```javascript
{ "status": "400", "message": "Developer Product ID could not be found.\nAre you sure that you've entered the correct developer product ID?\nPossible solution: Make sure the Developer Product exists in the Hub game.", "data": {} }
```

If you did not supply a Product Stock (Parcel Pro only):

```javascript
{ "status": "400", "message": "Missing stock or invalid input. Please respond with a number between 0-999 or unlimited.", "data": {} }
```

If you the Product Stock you supplied is not within the number range (Parcel Pro only):

```javascript
{ "status": "400", "message": "On the stock field, please respond with a number between 0-999.", "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="403: Forbidden " %}
If your current tier does not support certain fields:

```javascript
{ "status": "403", "message": "Access forbidden: Your tier (Parcel Free) does not allow configuring stock, instructions, or role_id.", "data": {} }
```

{% 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": {} }
```

{% endtab %}

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

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

{% endtab %}
{% endtabs %}
