Next Commerce
Products

Products Update

Update an existing product.

PUT
/products/{id}/

Authorization

oauth2 catalogue:write
AuthorizationBearer <token>

Generate an Access Token through Settings > API Access for single store access or use the Authorization Code flow with your partner App Client ID. Use required permission scopes for API endpoint access. Example Authorization: Bearer 123

In: header

Scope: catalogue:write

Path Parameters

id*integer

A unique integer value identifying this Product.

Header Parameters

X-29next-API-Version*string
Default"2023-02-10"
Value in"2023-02-10"

Request Body

categories?array<>Deprecated
children?array<>
description?string
enable_subscription?boolean
external_tax_code?|

Tax code to be used with external tax systems such as Avalara, TaxJar.

interval?|
  • day - Day
  • week - Week
  • month - Month
  • year - Year
Value in"day" | "week" | "month" | "year" | "" | null
interval_counts?array<>|

Choose a predefined value or type to enter custom value(s).

is_discountable?boolean

This flag indicates if this product can be used in an offer or not

is_public?boolean

Show this product in search results and catalogue listings.

meta_description?|
meta_title?|
metadata?|
ranking?integer

The highest ranking are shown first

Range-2147483648 <= value <= 2147483647
recommended_products?array<>
slug?string
Match^[-a-zA-Z0-9_]+$
Lengthlength <= 255
template?|

Custom template name from your theme, ie catalogue/product.{custom_name}.html

title?string
variant_attributes?array<>

Response Body

application/json

curl -X PUT "https://example.29next.store/api/admin/products/0/" \
  -H "X-29next-API-Version: 2023-02-10" \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "categories": [
    {
      "id": 0,
      "name": "string",
      "slug": "string"
    }
  ],
  "children": [
    {
      "allow_backorders": true,
      "date_created": "2019-08-24T14:15:22Z",
      "date_updated": "2019-08-24T14:15:22Z",
      "id": 0,
      "images": "string",
      "inventory_availability": "in_stock",
      "metadata": {},
      "prices": [
        {
          "currency": "string",
          "price": "string",
          "retail": "string",
          "subscription": "string",
          "subscription_suggested_downsell": "string"
        }
      ],
      "product_id": 0,
      "purchase_availability": "available",
      "requires_shipping": true,
      "sku": "string",
      "stockrecords": [
        {
          "id": 0,
          "location_id": 0,
          "low_stock_threshold": 2147483647,
          "num_allocated": 0,
          "num_in_stock": -2147483648,
          "price": "string",
          "price_currency": "string",
          "price_retail": "string",
          "sku": "string"
        }
      ],
      "structure": "standalone",
      "title": "string",
      "track_stock": true,
      "unit_cost": "string",
      "upc": "string",
      "variant_attribute_values": [
        {
          "code": "string",
          "name": "string",
          "value": "string"
        }
      ]
    }
  ],
  "date_created": "2019-08-24T14:15:22Z",
  "date_updated": "2019-08-24T14:15:22Z",
  "description": "string",
  "enable_subscription": true,
  "external_tax_code": "string",
  "id": 0,
  "images": [
    {
      "attachment": "string",
      "caption": "string",
      "display_order": 2147483647,
      "file_name": "string",
      "id": 0,
      "src": "http://example.com"
    }
  ],
  "interval": "day",
  "interval_counts": [
    -2147483648
  ],
  "is_discountable": true,
  "is_public": true,
  "meta_description": "string",
  "meta_title": "string",
  "metadata": {},
  "ranking": -2147483648,
  "rating": 0,
  "recommended_products": [
    0
  ],
  "slug": "string",
  "structure": "standalone",
  "template": "string",
  "title": "string",
  "url": "http://example.com",
  "variant_attributes": [
    {
      "code": "string",
      "name": "string",
      "values": [
        "string"
      ]
    }
  ]
}