{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/lightspeed/main/json-schema/lightspeed-product-create-body-schema.json",
  "title": "Product",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lightspeed-products-api-openapi.yml#/components/schemas/ProductCreateBody",
  "properties": {
    "account_code_purchase": {
      "description": "The code used to attribute the purchase of the product to a specific account for the Xero integration.",
      "type": "string"
    },
    "account_code_sale": {
      "description": "The code used to attribute the sales of the product to a specific account for the Xero integration.",
      "type": "string"
    },
    "all_outlets_tax": {
      "description": "Only used for tax inclusive stores.",
      "properties": {
        "is_default": {
          "description": "Is this the default tax.",
          "type": "boolean"
        },
        "tax_id": {
          "description": "The tax id associated with this product.",
          "format": "UUID",
          "type": "string"
        }
      },
      "type": "object"
    },
    "attributes": {
      "$ref": "#/$defs/Attribute"
    },
    "brand_id": {
      "description": "The brand ID.",
      "format": "UUID",
      "type": "string"
    },
    "composite": {
      "description": "A list of composite components.",
      "items": {
        "$ref": "#/$defs/Composite"
      },
      "type": "array"
    },
    "description": {
      "description": "A detailed description of the Product. **Note** Can contain HTML.",
      "type": "string"
    },
    "dimensions_unit": {
      "description": "Unit of measurement for product dimensions. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
      "enum": [
        "IN",
        "CM",
        "MM",
        "YD"
      ],
      "type": "string"
    },
    "handle": {
      "description": "Product handle.",
      "type": "string"
    },
    "height": {
      "description": "Product height. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
      "type": "number"
    },
    "images": {
      "description": "A list of image objects.",
      "items": {
        "$ref": "#/$defs/ProductAddImage"
      },
      "type": "array"
    },
    "inventory": {
      "items": {
        "$ref": "#/$defs/ProductAddInventoryPayload"
      },
      "type": "array"
    },
    "is_active": {
      "description": "Indicated whether the Product is active.",
      "type": "boolean"
    },
    "length": {
      "description": "Product length. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
      "type": "number"
    },
    "loyalty_amount": {
      "description": "The amount of loyalty the customer receives buying this item.",
      "type": "number"
    },
    "name": {
      "description": "Product name. **Note:** Variants share the same name.",
      "type": "string"
    },
    "outlet_taxes": {
      "description": "Only used for tax exclusive stores.",
      "items": {
        "$ref": "#/$defs/ProductAddOutletTax"
      },
      "type": "array"
    },
    "price_excluding_tax": {
      "description": "The price before tax is added.",
      "type": "number"
    },
    "price_including_tax": {
      "description": "The price including all the relevant taxes.",
      "type": "number"
    },
    "product_category_id": {
      "description": "The product category.",
      "format": "UUID",
      "type": "string"
    },
    "product_codes": {
      "items": {
        "$ref": "#/$defs/ProductCode"
      },
      "type": "array"
    },
    "product_suppliers": {
      "items": {
        "$ref": "#/$defs/ProductSupplier"
      },
      "type": "array"
    },
    "product_type_id": {
      "description": "The product category. **Note** Product types are now product categories.",
      "format": "UUID",
      "type": "string"
    },
    "sku": {
      "description": "Product sku. **Note:** Should be unique.",
      "type": "string"
    },
    "source": {
      "description": "Indicates the origin of the product. Can be USER, SHOPIFY.",
      "type": "string"
    },
    "source_id": {
      "description": "External reference ID.",
      "type": "string"
    },
    "source_variant_id": {
      "description": "Secondary external reference ID.",
      "type": "string"
    },
    "supplier_code": {
      "description": "Supplier code.",
      "type": "string"
    },
    "supplier_id": {
      "description": "The supplier ID.",
      "format": "UUID",
      "type": "string"
    },
    "supply_price": {
      "description": "Default supply price.",
      "format": "double",
      "type": "number"
    },
    "tag_ids": {
      "description": "An array of tag IDs associated with this product.",
      "items": {
        "description": "A tag ID.",
        "format": "UUID",
        "type": "string"
      },
      "type": "array"
    },
    "variants": {
      "items": {
        "$ref": "#/$defs/ProductAddVariantPayload"
      },
      "type": "array"
    },
    "weight": {
      "description": "Product weight. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
      "type": "number"
    },
    "weight_unit": {
      "description": "Unit of measurement for product weight. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
      "enum": [
        "CT",
        "G",
        "OZ",
        "LB",
        "KG"
      ],
      "type": "string"
    },
    "width": {
      "description": "Product width. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
      "type": "number"
    }
  },
  "required": [
    "name"
  ],
  "type": "object",
  "$defs": {
    "Attribute": {
      "properties": {
        "key": {
          "description": "The key for the attribute.",
          "type": "string"
        },
        "value": {
          "description": "The value for the attribute.",
          "type": "string"
        }
      },
      "required": [
        "key",
        "value"
      ],
      "title": "Attribute",
      "type": "object"
    },
    "Composite": {
      "properties": {
        "product_id": {
          "description": "The ID of the component product.",
          "format": "uuid",
          "type": "string"
        },
        "quantity": {
          "description": "The quantity of the component product.",
          "type": "number"
        }
      },
      "title": "Composite",
      "type": "object"
    },
    "ProductAddImage": {
      "properties": {
        "index": {
          "description": "The position of the image in the list of images.",
          "format": "int64",
          "type": "integer"
        },
        "location": {
          "description": "The location of the given file. Depending on the image provider type. s3 - The s3 key for s3 transfers. url - A full URL for url based images. product-image - the image id from an existing product image. sku-image - the image id from an existing variant image.\n",
          "type": "string"
        },
        "type": {
          "description": "The image provider type.",
          "enum": [
            "s3",
            "url",
            "product-image",
            "sku-image"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "location"
      ],
      "title": "Add Image",
      "type": "object"
    },
    "ProductAddInventoryPayload": {
      "properties": {
        "current_amount": {
          "description": "Current inventory at a given outlet.",
          "format": "double",
          "type": "number"
        },
        "outlet_id": {
          "description": "The outlet the inventory is for.",
          "format": "UUID",
          "type": "string"
        },
        "reorder_amount": {
          "description": "The default of the quantity for auto-filled inventory orders.",
          "type": "number"
        },
        "reorder_point": {
          "description": "Quantity below which the product should be included in the auto-filled inventory orders. use -1 to clear the reorder point.",
          "type": "number"
        }
      },
      "required": [
        "outlet_id",
        "current_amount"
      ],
      "title": "Product Add Inventory Payload",
      "type": "object"
    },
    "ProductAddOutletTax": {
      "properties": {
        "outlet_id": {
          "description": "The outlet the tax is for.",
          "format": "UUID",
          "type": "string"
        },
        "tax_id": {
          "description": "The tax id associated with this outlet.",
          "format": "UUID",
          "type": "string"
        }
      },
      "required": [
        "outlet_id",
        "tax_id"
      ],
      "title": "Product Add Outlet Tax",
      "type": "object"
    },
    "ProductAddVariantPayload": {
      "properties": {
        "all_outlets_tax": {
          "description": "Only used for tax inclusive stores.",
          "properties": {
            "is_default": {
              "description": "Is this the default tax.",
              "type": "boolean"
            },
            "tax_id": {
              "description": "The tax id associated with this product.",
              "format": "UUID",
              "type": "string"
            }
          },
          "type": "object"
        },
        "dimensions_unit": {
          "description": "Unit of measurement for product dimensions. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
          "enum": [
            "IN",
            "CM",
            "MM",
            "YD"
          ],
          "type": "string"
        },
        "height": {
          "description": "Product height. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
          "type": "number"
        },
        "images": {
          "description": "A list of image objects.",
          "items": {
            "$ref": "#/$defs/ProductAddImage"
          },
          "type": "array"
        },
        "inventory": {
          "items": {
            "$ref": "#/$defs/ProductAddInventoryPayload"
          },
          "type": "array"
        },
        "length": {
          "description": "Product length. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
          "type": "number"
        },
        "outlet_taxes": {
          "description": "Only used for tax exclusive stores.",
          "items": {
            "$ref": "#/$defs/ProductAddOutletTax"
          },
          "type": "array"
        },
        "price_excluding_tax": {
          "description": "The price before tax is added.",
          "type": "number"
        },
        "price_including_tax": {
          "description": "The price including all the relevant taxes.",
          "type": "number"
        },
        "product_codes": {
          "items": {
            "$ref": "#/$defs/ProductCode"
          },
          "type": "array"
        },
        "product_suppliers": {
          "items": {
            "$ref": "#/$defs/ProductSupplier"
          },
          "type": "array"
        },
        "sku": {
          "description": "Product sku. This value should be included in the `product_codes` array. If it's not, it will be added automatically.",
          "type": "string"
        },
        "supplier_code": {
          "description": "Supplier code.",
          "type": "string"
        },
        "supply_price": {
          "description": "Default supply price.",
          "format": "double",
          "type": "number"
        },
        "variant_definitions": {
          "description": "The attributes associated with this variant. e.g. Size.",
          "items": {
            "$ref": "#/$defs/VariantAttribute"
          },
          "type": "array"
        },
        "weight": {
          "description": "Product weight. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
          "type": "number"
        },
        "weight_unit": {
          "description": "Unit of measurement for product weight. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
          "enum": [
            "CT",
            "G",
            "OZ",
            "LB",
            "KG"
          ],
          "type": "string"
        },
        "width": {
          "description": "Product width. These are used to calculate variable shipping rates for stores using Lightspeed eCom.",
          "type": "number"
        }
      },
      "title": "Add Product Variant Payload",
      "type": "object"
    },
    "ProductCode": {
      "properties": {
        "code": {
          "description": "The sku code being added.",
          "type": "string"
        },
        "id": {
          "description": "Auto-generated object ID.",
          "type": "string"
        },
        "type": {
          "description": "The type of code being added.",
          "enum": [
            "CUSTOM",
            "EAN",
            "ISBN",
            "ITF",
            "JAN",
            "UPC"
          ],
          "type": "string"
        }
      },
      "required": [
        "code",
        "id"
      ],
      "title": "ProductCode",
      "type": "object"
    },
    "ProductSupplier": {
      "properties": {
        "code": {
          "description": "The code associated with this supplier.",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Auto-generated object ID.",
          "format": "UUID",
          "type": "string"
        },
        "price": {
          "description": "The price associated with this supplier.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "product_id": {
          "description": "The ID of the product.",
          "format": "UUID",
          "type": "string"
        },
        "supplier_id": {
          "description": "The ID of the supplier.",
          "format": "UUID",
          "type": [
            "string",
            "null"
          ]
        },
        "supplier_name": {
          "description": "The name of the supplier.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "product_id",
        "supplier_id",
        "supplier_name"
      ],
      "title": "Product Supplier",
      "type": "object"
    },
    "VariantAttribute": {
      "properties": {
        "attribute_id": {
          "description": "The ID of the variant attribute.",
          "format": "uuid",
          "type": "string"
        },
        "value": {
          "description": "The value associated with the given attribute_id. e.g. Green.",
          "type": "string"
        }
      },
      "title": "Variant Attribute",
      "type": "object"
    }
  }
}