commercetools · Schema

ProductDraft

Request body for creating a new product.

CommerceComposable CommerceE-CommerceGraphQLRESTSDKAgentic Commerce

Properties

Name Type Description
productType object
key string User-defined unique key for the product.
name object
slug object
description object
categories array Categories to assign the product to on creation.
masterVariant object
variants array Additional variants to create with the product.
taxCategory object
publish boolean If true, immediately publishes the product after creation.
View JSON Schema on GitHub

JSON Schema

commercetools-product-draft-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/commercetools/main/json-schema/commercetools-product-draft-schema.json",
  "title": "ProductDraft",
  "description": "Request body for creating a new product.",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commercetools-products-api-openapi.yml#/components/schemas/ProductDraft",
  "type": "object",
  "required": [
    "productType",
    "name",
    "slug"
  ],
  "properties": {
    "productType": {
      "$ref": "#/$defs/Reference"
    },
    "key": {
      "type": "string",
      "description": "User-defined unique key for the product."
    },
    "name": {
      "$ref": "#/$defs/LocalizedString"
    },
    "slug": {
      "$ref": "#/$defs/LocalizedString"
    },
    "description": {
      "$ref": "#/$defs/LocalizedString"
    },
    "categories": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Reference"
      },
      "description": "Categories to assign the product to on creation."
    },
    "masterVariant": {
      "$ref": "#/$defs/ProductVariantDraft"
    },
    "variants": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProductVariantDraft"
      },
      "description": "Additional variants to create with the product."
    },
    "taxCategory": {
      "$ref": "#/$defs/Reference"
    },
    "publish": {
      "type": "boolean",
      "description": "If true, immediately publishes the product after creation."
    }
  },
  "$defs": {
    "Attribute": {
      "type": "object",
      "description": "A name-value pair representing a product attribute as defined by the product type.",
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name as defined in the product type."
        },
        "value": {
          "description": "Attribute value. Type depends on the attribute type definition."
        }
      }
    },
    "Image": {
      "type": "object",
      "description": "A product image with URL, dimensions, and optional label.",
      "required": [
        "url",
        "dimensions"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "URL of the image."
        },
        "dimensions": {
          "type": "object",
          "description": "Pixel dimensions of the image.",
          "required": [
            "w",
            "h"
          ],
          "properties": {
            "w": {
              "type": "integer",
              "description": "Image width in pixels."
            },
            "h": {
              "type": "integer",
              "description": "Image height in pixels."
            }
          }
        },
        "label": {
          "type": "string",
          "description": "Optional label for the image."
        }
      }
    },
    "LocalizedString": {
      "type": "object",
      "description": "A map of locale keys to string values used for multilingual content. Keys follow IETF language tag format (e.g., 'en', 'de', 'en-US').",
      "additionalProperties": {
        "type": "string"
      }
    },
    "Money": {
      "type": "object",
      "description": "A monetary value with currency code and amount in the smallest currency unit.",
      "required": [
        "currencyCode",
        "centAmount"
      ],
      "properties": {
        "currencyCode": {
          "type": "string",
          "pattern": "^[A-Z]{3}$",
          "description": "ISO 4217 three-letter currency code (e.g., USD, EUR)."
        },
        "centAmount": {
          "type": "integer",
          "description": "The amount in the smallest indivisible unit of the currency."
        },
        "fractionDigits": {
          "type": "integer",
          "description": "Number of fraction digits for the currency. Defaults to 2."
        }
      }
    },
    "PriceDraft": {
      "type": "object",
      "description": "Draft for creating a price on a product variant.",
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "$ref": "#/$defs/Money"
        },
        "country": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code."
        },
        "customerGroup": {
          "$ref": "#/$defs/Reference"
        },
        "channel": {
          "$ref": "#/$defs/Reference"
        },
        "validFrom": {
          "type": "string",
          "format": "date-time",
          "description": "Start of the validity period for this price."
        },
        "validUntil": {
          "type": "string",
          "format": "date-time",
          "description": "End of the validity period for this price."
        }
      }
    },
    "ProductVariantDraft": {
      "type": "object",
      "description": "Draft for creating a product variant.",
      "properties": {
        "sku": {
          "type": "string",
          "description": "SKU identifier for the variant."
        },
        "key": {
          "type": "string",
          "description": "User-defined unique key for the variant."
        },
        "prices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PriceDraft"
          },
          "description": "Prices to assign to the variant on creation."
        },
        "attributes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Attribute"
          },
          "description": "Product attributes for this variant."
        },
        "images": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Image"
          },
          "description": "Images for the variant."
        }
      }
    },
    "Reference": {
      "type": "object",
      "description": "A reference to another resource by its typeId and id.",
      "required": [
        "typeId",
        "id"
      ],
      "properties": {
        "typeId": {
          "type": "string",
          "description": "The type identifier of the referenced resource (e.g., 'product', 'category')."
        },
        "id": {
          "type": "string",
          "description": "The system-generated unique identifier of the referenced resource."
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/commercetools-product-draft"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.