Products

Create a product

Create a new product. Requires the SETTINGS_MANAGE permission.

post/shop/products

Request body

namestring required

Display name of the retail product, shown on the storefront, in the POS product picker, on receipts, and on reports. Plain text; must not contain HTML. 1-255 characters.

product_codestring nullable

A custom product code for the product.

external_idstring nullable

An external identifier for the product.

currencystring

The ISO-4217 currency code in lower case.

descriptionstring nullable

A description of the product.

standard_priceinteger nullable

The standard price for the product, in the smallest currency unit eg pence. Optional at create time — products can be created without a standard price and have one configured later.

offered_onlineboolean

Whether this product is available online.

barcodestring nullable

The barcode of the product. Must be unique within the site.

privateboolean

Whether this product is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

visibility'public' | 'link_only' | 'private'

The visibility status of the product.

inventory_product_idstring object-id nullable

Optional identifier of the inventory product that backs this retail product. When linked, sales of this product decrement stock on the inventory product. Pass null for products that do not draw down stock.

image_idstring nullable

Media ID of the primary product image, shown on the storefront product page and in the POS picker. Upload via createMedia first and pass the returned ID here.

revenue_centrestring nullable

The revenue centre to assign revenue to for this product.

category_idsstring[] nullable

An array of category IDs the product belongs to

brand_idstring uuid nullable

The brand ID of the product

Example request

{
  "name": "Dan's Hand Moisturiser",
  "product_code": "MAS123",
  "external_id": "ext-prod-moisturiser",
  "currency": "gbp",
  "description": "For silky soft hands",
  "standard_price": 5000,
  "offered_online": true,
  "barcode": "5013635312160",
  "visibility": "public",
  "image_id": "5f1234567890abcdef123456",
  "revenue_centre": "spa_retail"
}

Response

A product response object.

Example response

{
  "data": {
    "name": "Dan's Hand Moisturiser",
    "currency": "gbp",
    "description": "For silky soft hands",
    "product_code": "MAS123",
    "price_from": 1000,
    "price_to": 5000,
    "standard_price": 5000,
    "image": {
      "file_name": "super-cool-photo.jpg",
      "mime_type": "image/jpeg",
      "original_url": "https://example.com/media/super-cool-photo.jpg",
      "size": 84256,
      "url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
    },
    "tags": [
      {
        "name": "Moisturisers"
      }
    ],
    "categories": [
      {
        "name": "Moisturisers"
      }
    ],
    "price_rules": [
      {
        "date_from": "2020-02-01",
        "date_to": "2020-04-01",
        "price": 20000
      }
    ],
    "revenue_centre": "spa",
    "customer_cancellation_permitted": "allowed",
    "customer_cancellation_min_duration": "P7D"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.