{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-prices-result-schema.json",
  "title": "PricesResult",
  "description": "Document representing the price details for a single product. Contains only price-related fields; no images, availability, variations, or other product data are included. Price fields are absent when no pricebook is configured for the requested site and locale context — only `productId` is guaranteed in the response.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-shopper-products-api-openapi.yml#/components/schemas/PricesResult",
  "properties": {
    "productId": {
      "description": "The ID of the product.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "price": {
      "format": "double",
      "description": "The effective sales price of the product. For complex products (master, set), this is the minimum\nprice of the related child products.",
      "type": "number"
    },
    "priceMax": {
      "format": "double",
      "description": "The maximum sales price. For complex products (master, set), this is the maximum price of the related child products.",
      "type": "number"
    },
    "pricePerUnit": {
      "format": "double",
      "description": "The price per unit if defined for the product.",
      "type": "number"
    },
    "pricePerUnitMax": {
      "format": "double",
      "description": "The maximum price per unit, typically for a master product's variant.",
      "type": "number"
    },
    "pricePerUnitUnit": {
      "description": "The unit of measure for the per-unit price (e.g. \"kg\", \"lb\").",
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "tieredPrices": {
      "description": "The list of tiered prices for the product. Each entry represents a price for a given pricebook and minimum order quantity threshold. Uses the effective (lowest) winning price from the merged applicable pricebooks for each quantity tier — matching the SCAPI product endpoint's tieredPrices field.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProductPriceTable"
      }
    },
    "prices": {
      "description": "A map of pricebook IDs to their corresponding prices for this product.",
      "type": "object",
      "additionalProperties": {
        "format": "double",
        "type": "number"
      }
    },
    "currency": {
      "$ref": "#/$defs/CurrencyCode"
    },
    "priceRanges": {
      "description": "Per-pricebook min/max price ranges. Only present for complex products (master, variation group, product set) that have variants with differing prices.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProductPriceRange"
      }
    }
  },
  "required": [
    "productId"
  ],
  "type": "object",
  "$defs": {
    "CurrencyCode": {
      "description": "A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.",
      "pattern": "^([A-Z][A-Z][A-Z]|N/A)$",
      "type": "string"
    },
    "Price": {
      "type": "number",
      "description": "Document representing a price for a product",
      "format": "double"
    },
    "ProductPriceRange": {
      "description": "Document representing the min/max price range for a single pricebook. Only present for complex products (master, variation group, product set).",
      "properties": {
        "pricebook": {
          "description": "The ID of the pricebook.",
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "minPrice": {
          "format": "double",
          "description": "The minimum price across all variants for this pricebook.",
          "type": "number"
        },
        "maxPrice": {
          "format": "double",
          "description": "The maximum price across all variants for this pricebook.",
          "type": "number"
        }
      },
      "type": "object"
    },
    "ProductPriceTable": {
      "description": "Tiered Price Level Object",
      "properties": {
        "price": {
          "description": "Price for the product for the specified tier for the specified pricebook",
          "allOf": [
            {
              "$ref": "#/$defs/Price"
            }
          ]
        },
        "pricebook": {
          "description": "The active pricebook for which this price is defined",
          "type": "string"
        },
        "quantity": {
          "format": "double",
          "description": "Quantity tier for which the price is defined.",
          "type": "number"
        }
      },
      "type": "object"
    }
  }
}