---
search:
  tags:
    - Products
    - PUT
seo:
  description: >-
    Updates an existing product. All fields are optional — only supplied…
    Reference for the PUT /shops/{shop_id}/products/{id} endpoint in the Bolder
    API v1.
sidebar:
  label: Update product
  badge: PUT
title: Update product
type: openapi-operation
---
Updates an existing product. All fields are optional — only supplied fields are updated.
Requires `admin` scope.

`PUT /shops/{shop_id}/products/{id}`

**Request body** (`application/json`, required)

- `title` (string) — Product title. Required on create.
- `price` (integer) — Price in cents
- `price_comparison` (integer) — "Was" price in cents
- `description` (string)
- `status` (string)
- `product_type_name` (string) — Name for new or existing product type
- `vendor` (string)
- `tags` (string[])
- `collections` (object[])
- `variants` (VariantInput[])
- `custom_attributes` (CustomAttributeInput[])

Request body example:

```json
{
  "title": "string",
  "price": 0,
  "price_comparison": 0,
  "description": "string",
  "status": "visible",
  "product_type_name": "string",
  "vendor": "string",
  "tags": [
    "string"
  ],
  "collections": [
    {
      "id": 0,
      "title": "string"
    }
  ],
  "variants": [
    {
      "title": "string",
      "position": 0,
      "sku": "string",
      "stock": 1,
      "available_if_no_stock": 0,
      "weight_in_grams": 0,
      "price": 0,
      "price_comparison": 0
    }
  ],
  "custom_attributes": [
    {
      "name": "string",
      "value": "string",
      "field_type": "string",
      "required": false
    }
  ]
}
```

**Responses**

- `200` — Product updated
- `422` — Validation errors

Response example, 200:

```json
{
  "id": "string",
  "slug": "string",
  "title": "string",
  "status": "visible",
  "price": 0,
  "price_comparison": 0,
  "discount_percentage": 0,
  "currency_code": "string",
  "vendor": "string",
  "tags": [
    "string"
  ],
  "created_on": "2019-08-24T14:15:22Z",
  "updated_on": "2019-08-24T14:15:22Z",
  "_links": {},
  "_embedded": {
    "shop": {
      "id": "string",
      "name": "string",
      "subdomain": "string",
      "url": "string",
      "description": "string",
      "currency_code": "string",
      "locale": "string",
      "created_on": "2019-08-24T14:15:22Z",
      "updated_on": "2019-08-24T14:15:22Z",
      "product_counts": {
        "visible": 0,
        "hidden": 0
      },
      "_links": {}
    },
    "image": {
      "file_name": "string",
      "title": "string",
      "_links": {
        "thumbnail": {
          "href": "string",
          "method": "string",
          "title": "string",
          "type": "string",
          "templated": true
        },
        "small": {
          "href": "string",
          "method": "string",
          "title": "string",
          "type": "string",
          "templated": true
        },
        "medium": {
          "href": "string",
          "method": "string",
          "title": "string",
          "type": "string",
          "templated": true
        },
        "large": {
          "href": "string",
          "method": "string",
          "title": "string",
          "type": "string",
          "templated": true
        },
        "original": {
          "href": "string",
          "method": "string",
          "title": "string",
          "type": "string",
          "templated": true
        }
      }
    },
    "variants": [
      {
        "id": 0,
        "title": "string",
        "position": 0,
        "sku": "string",
        "price": 0,
        "price_comparison": 0,
        "stock": 0,
        "available_if_no_stock": true,
        "weight_in_grams": 0,
        "_links": {}
      }
    ],
    "collections": [
      {
        "id": 0,
        "title": "string",
        "slug": "string",
        "shop_id": 0
      }
    ],
    "images": [
      {
        "file_name": "string",
        "title": "string",
        "_links": {
          "thumbnail": {
            "href": "string",
            "method": "string",
            "title": "string",
            "type": "string",
            "templated": true
          },
          "small": {
            "href": "string",
            "method": "string",
            "title": "string",
            "type": "string",
            "templated": true
          },
          "medium": {
            "href": "string",
            "method": "string",
            "title": "string",
            "type": "string",
            "templated": true
          },
          "large": {
            "href": "string",
            "method": "string",
            "title": "string",
            "type": "string",
            "templated": true
          },
          "original": {
            "href": "string",
            "method": "string",
            "title": "string",
            "type": "string",
            "templated": true
          }
        }
      }
    ],
    "custom_attributes": [
      {
        "id": 0,
        "name": "string",
        "value": "string",
        "field_type": "string",
        "required": true,
        "key": "string"
      }
    ]
  },
  "description": "string"
}
```

Response example, 422:

```json
{
  "_class": [
    "errors"
  ],
  "_embedded": {
    "errors": [
      {
        "_class": [
          "error"
        ],
        "field": "product.title",
        "messages": [
          "can't be blank"
        ]
      }
    ]
  }
}
```
