{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nmi/json-schema/nmi-product-create-request-schema.json",
  "title": "Product Create Request",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nmi-products-api-openapi.yml#/components/schemas/ProductCreateRequest",
  "type": "object",
  "required": [
    "product_sku",
    "product_description",
    "product_cost",
    "product_currency"
  ],
  "properties": {
    "product_sku": {
      "type": "string",
      "maxLength": 256,
      "description": "The unique alpha-numeric SKU for this product. An error will be returned if the SKU is already in use by another product."
    },
    "product_description": {
      "type": "string",
      "maxLength": 255,
      "description": "The user-facing name of the product."
    },
    "product_cost": {
      "type": "number",
      "minimum": 0,
      "description": "The cost of the product before any tax or discounts. Format: `x.xx`"
    },
    "product_currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "description": "The currency for the product's price (e.g., USD, EUR)."
    },
    "product_commodity_code": {
      "type": "string",
      "maxLength": 50,
      "description": "Product commodity code."
    },
    "product_unit_of_measure": {
      "type": "string",
      "maxLength": 3,
      "description": "The unit of measure for the product. Default - `NAR`"
    },
    "product_tax_amount": {
      "type": "number",
      "minimum": 0,
      "description": "The tax that should be added to the product cost. This is a fixed amount, not a percentage."
    },
    "product_discount_amount": {
      "type": "number",
      "minimum": 0,
      "description": "The discount that will be subtracted from the cost of the product."
    },
    "product_image_name": {
      "type": "string",
      "maxLength": 255,
      "description": "The file name of the image being added with product_image_data. Required for image upload."
    },
    "product_image_data": {
      "type": "string",
      "description": "Image for the product, size must be 2MB or smaller. Format: base64 encoded JPG, PNG, or GIF. Required for image upload."
    },
    "product_category": {
      "type": "string",
      "maxLength": 50,
      "description": "Product category."
    }
  }
}