{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/emporix/json-schema/emporix-price-list-price-update-schema.json",
  "title": "priceListPriceUpdate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emporix-prices-assigned-to-price-lists-api-openapi.yml#/components/schemas/priceListPriceUpdate",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of the price that belongs to a price list, generated when the price is created and added to the price list."
        }
      }
    },
    {
      "$ref": "#/$defs/priceListPriceCore",
      "required": [
        "itemId",
        "priceModelId",
        "tierValues"
      ]
    },
    {
      "type": "object",
      "properties": {
        "metadata": {
          "properties": {
            "version": {
              "type": "number",
              "description": "Current version of the object."
            }
          },
          "required": [
            "version"
          ]
        }
      }
    }
  ],
  "required": [
    "metadata",
    "id"
  ],
  "$defs": {
    "priceListPriceCore": {
      "title": "priceListPriceCore",
      "properties": {
        "itemId": {
          "type": "object",
          "description": "Item for which the price is defined.",
          "properties": {
            "itemType": {
              "type": "string",
              "description": "Type of the referenced item. Possible values:\n* `PRODUCT`\n* `SKU`\n\n  **The `SKU` value is in preview mode** - the system does not fully operate on the SKU concept yet.\n"
            },
            "id": {
              "type": "string",
              "description": "Product's unique identifier, generated when the product is created through the Product Service.\n"
            }
          }
        },
        "priceModelId": {
          "type": "string",
          "description": "ID of the price model to which the price is assigned. If the ID is not provided, the default price model is used."
        },
        "tierValues": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "$ref": "#/$defs/tierValueCreation"
              },
              {
                "type": "object",
                "properties": {
                  "priceValue": {
                    "type": "number",
                    "description": "This field should contain a net price given by a number where the cent part is separated by a dot sign - such as `12.99`.\n\n**Note**: The cent part of the price is not limited to two digits. You can specify the price with any precision."
                  }
                }
              }
            ]
          }
        }
      }
    },
    "tierValueCreation": {
      "description": "",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "An identifier of a tier. The ID is required only if the priceModelId is provided. If the price model is the default, the tier value is automatically assigned according to the default price model."
        },
        "priceValue": {
          "type": "number",
          "description": "Gross price (if the `includesTax` field is set to `true`) or net price (if the `includesTax` field is set to `false`).\n\nThis field should contain by a number where the cent part is separated by a dot sign - such as `12.99`.\n\n**Note**: The cent part of the price is not limited to two digits. You can specify the price with any precision."
        }
      },
      "required": [
        "priceValue"
      ]
    }
  }
}