Skip to content
BolderBolder Developers
Esc
↑↓navigate↵open⌘Jpreview

Update product

Updates an existing product. All fields are optional — only supplied fields are updated. Requires admin scope.

PUT/shops/{shop_id}/products/{id}
Authorization
AuthorizationBearer token (JWT) · headerrequired

OAuth 2.0 Bearer token. Obtain via POST https://auth.onbolder.com/oauth/token.

Scopes:admin
Path parameters
shop_idstringrequired

Shop ID or subdomain

idstringrequired

Product ID or slug

Request body
requiredapplication/json
titlestring

Product title. Required on create.

priceinteger

Price in cents

price_comparisoninteger

"Was" price in cents

descriptionstring
statusstring
default: "hidden"
Allowed:visiblehidden
product_type_namestring

Name for new or existing product type

vendorstring
tagsstring[]
collectionsobject[]
Show properties
Array of object
idinteger

Assign existing collection by ID

titlestring

Create and assign new collection by title

variantsVariantInput[]
Show properties
Array of VariantInput
titlestring

Required on create

positioninteger

Ordering position (lower comes first). On a chained-variants product, omitting it on create defaults to the current highest position instead of 0.

skustring

Must be unique within the shop

stockinteger
default: 1
available_if_no_stockinteger

1 = always available, 0 = unavailable when out of stock

default: 1
Allowed:01
weight_in_gramsinteger
priceinteger

Override product price for this variant (cents)

price_comparisoninteger

Override comparison price for this variant (cents)

custom_attributesCustomAttributeInput[]
Show properties
Array of CustomAttributeInput
namestringrequired
valuestringrequired
field_typestring
default: "string"
Allowed:stringemailurlintboolean
requiredboolean
default: false
Responses
200

Product updated

idstring
slugstring
titlestring
statusstring
Allowed:visiblehidden
priceinteger

Price in cents

price_comparisoninteger | null

Original/comparison price in cents ("was" price)

discount_percentagenumber | null
currency_codestring
vendorstring
tagsstring[]
created_onstring<date-time>
updated_onstring<date-time>
_linksobject
_embeddedobject
Show properties
variantsVariantDetails[]
Show properties
Array of VariantDetails
idinteger
titlestring
positioninteger
skustring | null
priceinteger
price_comparisoninteger | null
stockinteger
available_if_no_stockboolean
weight_in_gramsinteger
_linksobject
imagesProductImage[]
Show properties
Array of ProductImage
file_namestring
titlestring
_linksImageLinks

Links to image at various sizes

Show properties
thumbnailHalLink
Show properties
hrefstring
methodstring
titlestring
typestring
templatedboolean
smallHalLink
mediumHalLink
largeHalLink
originalHalLink
collectionsCollection[]
Show properties
Array of Collection
idinteger
titlestring
slugstring
shop_idinteger
custom_attributesCustomAttribute[]
Show properties
Array of CustomAttribute
idinteger
namestring
valuestring
field_typestring
Allowed:stringemailurlintboolean
requiredboolean
keystring
descriptionstring
422

Validation errors

_classstring[]
_embeddedobject
Show properties
errorsobject[]
Show properties
Array of object
_classstring[]
fieldstring
messagesstring[]
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT 'https://api.onbolder.com/v1/shops/string/products/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "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
    }
  ]
}'
Response
{
  "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"
}

Was this page helpful?