> For the complete documentation index, see [llms.txt](https://docs.globo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globo.io/pre-order/app-api/rest-api/pre-order/put-update-product.md).

# \[PUT] Update product

### \* Authentication&#x20;

<mark style="color:red;">Required</mark> `Authorization`

Limit  `throttle: 30,1`

Endpoint <mark style="background-color:green;">\[PUT]</mark> - `/shop-api/pre-order/products/update`

### Headers

<table><thead><tr><th width="218.7421875">Header</th><th width="119.5">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization</code></td><td>Yes</td><td>Shop public API key <code>Bearer token</code></td></tr><tr><td><code>Content-Type</code></td><td>Yes</td><td><code>application/json</code></td></tr></tbody></table>

***

### 1. Request Payload

<table><thead><tr><th>Field</th><th width="197.02734375">Type</th><th width="109.22265625">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>products</code></td><td>array</td><td>Yes</td><td>Product lines to update (min 1)</td></tr><tr><td><code>products.*.id</code></td><td>integer | string</td><td>Yes</td><td>Product line DB ID (from List Products)</td></tr><tr><td><code>products.*.product_id</code></td><td>integer | string</td><td>Yes</td><td>Shopify product ID</td></tr><tr><td><code>products.*.variant_id</code></td><td>integer | string</td><td>Yes</td><td>Shopify variant ID</td></tr><tr><td><code>products.*.profile_id</code></td><td>integer | string</td><td>Yes</td><td>Target offer ID</td></tr><tr><td><code>products.*.limit</code></td><td>number | string | null</td><td>No</td><td>Unit limit; <code>null</code> / <code>""</code> = unlimited</td></tr><tr><td><code>products.*.end_quantity</code></td><td>number | string | null</td><td>No</td><td>End quantity; <code>null</code> / <code>""</code> clears it</td></tr></tbody></table>

#### Example

```json
{
    "products": [
        {
            "id": 5012,
            "product_id": 7890123456789,
            "variant_id": 4567890123456,
            "profile_id": 123,
            "limit": 100,
            "end_quantity": 5
        },
        {
            "id": 5013,
            "product_id": 7890123456790,
            "variant_id": 4567890123457,
            "profile_id": 456,
            "limit": null,
            "end_quantity": null
        }
    ]
}
```

***

### 2. Success Response `200`

```json
{"success": true,"message": "Products updated","changed_line_ids": [5012, 5013]}
```

If every line was unchanged or not found:

```json
{"success": true,"message": "Products updated","changed_line_ids": []}
```

***

### 3. Response Keys & Fields

**Top-level**

<table><thead><tr><th width="187.19140625">Key</th><th width="125.24609375">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td>boolean</td><td><code>true</code> when the request completes successfully</td></tr><tr><td><code>message</code></td><td>string</td><td><code>"Products updated"</code></td></tr><tr><td><code>changed_line_ids</code></td><td>array</td><td>Product line <code>id</code>s that were actually modified</td></tr></tbody></table>

**Request field reference**

<table><thead><tr><th width="189.8671875">Field</th><th width="149.640625">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>integer</td><td>Internal product-line ID (not Shopify ID)</td></tr><tr><td><code>product_id</code></td><td>integer</td><td>Shopify product ID</td></tr><tr><td><code>variant_id</code></td><td>integer</td><td>Shopify variant ID</td></tr><tr><td><code>profile_id</code></td><td>integer</td><td>Offer (profile) ID to assign</td></tr><tr><td><code>limit</code></td><td>number | null</td><td>Max pre-order units; <code>null</code> = unlimited</td></tr><tr><td><code>end_quantity</code></td><td>number | null</td><td>Inventory end-quantity threshold</td></tr></tbody></table>

**Side effects**

<table><thead><tr><th width="230.296875">Change</th><th>Side effect</th></tr></thead><tbody><tr><td><code>limit</code> changed</td><td><code>updateRemainingUnitsMetafield</code> job</td></tr><tr><td><code>end_quantity</code> changed</td><td><code>updateEndQuantityVariantsMetafield</code> job</td></tr><tr><td><code>profile_id</code> changed</td><td>Profiles metafield refresh; possible selling-plan variant add/remove</td></tr></tbody></table>

***

### 4. Failed Response

Validation error — HTTP `200`

```json
{
    "success": false,
    "message": {
        "products": [
            "The products field is required."
        ],
        "products.0.id": [
            "The products.0.id field is required."
        ],
        "products.0.profile_id": [
            "The products.0.profile_id field is required."
        ]
    }
}
```

Unexpected server error — HTTP `200`

```json
{"success": false,"message": "Something went wrong"}
```
