{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tightly-io/json-schema/tightly-io-sales-table-variant-row-schema.json",
  "title": "SalesTableVariantRow",
  "description": "Row for variant-level sales table view (type=variants).",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tightly-io-openapi.json#/components/schemas/SalesTableVariantRow",
  "properties": {
    "aged_stock_cost": {
      "description": "Historical cost value of the same aged closing stock units.",
      "type": [
        "number",
        "null"
      ]
    },
    "aged_stock_share": {
      "description": "Aged units divided by eligible closing stock units.",
      "type": [
        "number",
        "null"
      ]
    },
    "aged_stock_units": {
      "description": "Closing units older than the selected age threshold, based on receipt or lot evidence.",
      "type": [
        "number",
        "null"
      ]
    },
    "available_units": {
      "description": "Reported sellable balance in the historical stock snapshot at the selected as-of date. Does not calculate availability to promise from current reservations or holds.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "average_inventory_cost": {
      "description": "Time-weighted owned inventory value at historical cost across the selected period.",
      "type": [
        "number",
        "null"
      ]
    },
    "average_original_price": {
      "description": "Quantity-weighted original unit price on the same positive sales.",
      "type": [
        "number",
        "null"
      ]
    },
    "average_selling_price": {
      "description": "Net sales divided by net units, including the recorded returns basis.",
      "type": [
        "number",
        "null"
      ]
    },
    "average_stock_units": {
      "description": "Time-weighted stock units across the selected period; requires historical coverage.",
      "type": [
        "number",
        "null"
      ]
    },
    "average_unit_cost": {
      "description": "Weighted recognised unit cost on the matching sales and returns basis.",
      "type": [
        "number",
        "null"
      ]
    },
    "category": {
      "type": [
        "string",
        "null"
      ]
    },
    "closing_stock_units": {
      "description": "Owned stock units at the end of the selected period.",
      "type": [
        "number",
        "null"
      ]
    },
    "cogs": {
      "description": "Historical cost recognised for the same sold and returned units as net sales.",
      "type": [
        "number",
        "null"
      ]
    },
    "current_markdown_depth": {
      "description": "Reduction from matched original offer prices to effective prices at the period end.",
      "type": [
        "number",
        "null"
      ]
    },
    "current_price_max": {
      "description": "The highest effective offer price at the period end, beside current_price_min.",
      "type": [
        "number",
        "null"
      ]
    },
    "current_price_min": {
      "description": "Effective offer prices at the period end, within the selected commercial scope.",
      "type": [
        "number",
        "null"
      ]
    },
    "custom_fields": {
      "type": [
        "object",
        "null"
      ]
    },
    "days_since_last_sale": {
      "description": "Days between the selected period end and the most recent eligible sale in history.",
      "type": [
        "number",
        "null"
      ]
    },
    "discount_per_unit": {
      "description": "Recorded discounts divided by corresponding eligible sold units.",
      "type": [
        "number",
        "null"
      ]
    },
    "discount_rate": {
      "description": "Recorded discount amount divided by corresponding pre-discount sales.",
      "type": [
        "number",
        "null"
      ]
    },
    "discounts": {
      "description": "Null where no line in the window records a discount: an unrecorded discount is not a measured zero. A recorded 0.00 still reads 0.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "forecast_bias": {
      "description": "Forecast minus actual divided by actual over matched completed buckets. Positive means overforecast.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "forecast_wape": {
      "description": "Sum of absolute forecast errors divided by total actuals, using a forecast saved before the actuals.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "forecast_weeks_of_supply": {
      "description": "Future weekly forecast demand covered by eligible stock using the selected forecast curve.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "full_price_quantity_share": {
      "description": "Classified full-price units divided by eligible classified units; requires original-price evidence.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "full_price_revenue_share": {
      "description": "Classified full-price revenue divided by eligible classified revenue; requires original-price evidence.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "full_price_sales_share": {
      "description": "Sales with zero recorded transaction discount; does not establish original full-price status.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "full_price_sell_through_rate": {
      "description": "Classified full-price net units divided by stock made available on the same lifecycle basis.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "full_price_units_share": {
      "description": "Units with zero recorded transaction discount; does not establish original full-price status.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "gmroi": {
      "description": "Selected-period gross profit divided by time-weighted average inventory at cost. Not annualised.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "gross_items_sold": {
      "description": "Positive sales quantities before returns in the selected period.",
      "type": [
        "number",
        "null"
      ]
    },
    "gross_margin": {
      "description": "Gross profit divided by net sales; not markup on cost.",
      "type": [
        "number",
        "null"
      ]
    },
    "gross_profit": {
      "description": "Net sales less matched cost of sales.",
      "type": [
        "number",
        "null"
      ]
    },
    "gross_profit_per_unit": {
      "description": "Gross profit divided by corresponding net units.",
      "type": [
        "number",
        "null"
      ]
    },
    "gross_sales": {
      "type": "number"
    },
    "historical_days_cover": {
      "description": "Eligible closing units divided by measured daily sales velocity for the selected period.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "in_stock_rate": {
      "description": "Ranged SKU-location-days in stock divided by all eligible ranged SKU-location-days.",
      "type": [
        "number",
        "null"
      ]
    },
    "initial_margin": {
      "description": "Margin on the first recorded positive sale, using its historical ticket price and immutable cost layer in the same currency. Does not establish the original launch margin.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "inventory_turns": {
      "description": "Selected-period cost of sales divided by average inventory at cost. Not annualised.",
      "type": [
        "number",
        "null"
      ]
    },
    "lost_sales_dated_days": {
      "description": "Stock-out days in the window that were priced at the rate held for that very day.\n",
      "type": [
        "integer",
        "null"
      ]
    },
    "lost_sales_latest_days": {
      "description": "Stock-out days priced at the variant's current rate because no dated rate survived for them. With lost_sales_dated_days it sums to the window's stock-out days; all latest-days means the figure equals what today's rate alone would give.\n",
      "type": [
        "integer",
        "null"
      ]
    },
    "lost_sales_units": {
      "description": "Units the empty shelf cost, each stock-out day priced at the rate stored for that day; a day with no stored rate is priced at the variant's current rate.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "margin_gap": {
      "description": "Actual gross margin less matched target, in percentage points.",
      "type": [
        "number",
        "null"
      ]
    },
    "margin_leak": {
      "description": "Absolute discounts plus absolute returns for the period.",
      "type": [
        "number",
        "null"
      ]
    },
    "margin_target": {
      "description": "Declared margin target under the same recognised margin basis.",
      "type": [
        "number",
        "null"
      ]
    },
    "metric_reasons": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Why a library metric on this row is null, keyed by the metric's name, with a code such as select_commitment or historical_transaction_cost_or_sales_missing. A metric with no entry here was measured, or was not requested.\n",
      "type": "object"
    },
    "missed_revenue": {
      "type": [
        "number",
        "null"
      ]
    },
    "net_items_sold": {
      "type": "integer"
    },
    "net_items_sold_by_channel": {
      "additionalProperties": {
        "type": "integer"
      },
      "description": "Mapping of sales_channel_id to net items sold in that channel.",
      "type": "object"
    },
    "net_sales": {
      "type": "number"
    },
    "net_sales_change": {
      "description": "Signed net sales delta against the comparison window; null without one.",
      "type": [
        "number",
        "null"
      ]
    },
    "net_sales_per_day": {
      "description": "Net sales divided by calendar days in the selected period.",
      "type": [
        "number",
        "null"
      ]
    },
    "net_sales_swing": {
      "description": "Absolute value of net_sales_change; null without a comparison window.",
      "type": [
        "number",
        "null"
      ]
    },
    "on_order_units": {
      "description": "Outstanding confirmed inbound units at the as-of date; drafts excluded.",
      "type": [
        "number",
        "null"
      ]
    },
    "opening_stock_units": {
      "description": "Owned stock units immediately before the selected period starts.",
      "type": [
        "number",
        "null"
      ]
    },
    "order_count": {
      "description": "Distinct orders containing the matched product or variant.",
      "type": [
        "number",
        "null"
      ]
    },
    "original_price_max": {
      "description": "The highest original transaction unit price, beside original_price_min.",
      "type": [
        "number",
        "null"
      ]
    },
    "original_price_min": {
      "description": "Original transaction unit prices before discounts; not current catalogue prices.",
      "type": [
        "number",
        "null"
      ]
    },
    "out_of_stock_days": {
      "description": "Days in the period on which the item was empty at every location in scope, the rule the grid's stockout days use, read from dated stock snapshots. Null where a snapshot is missing.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "price_sensitivity": {
      "description": "The pricing engine's tier for this line. Null means the engine holds no reading for it; on THIS read a null is never coalesced to STILL_LEARNING, which is a verdict the engine reached about a line it did look at, and price_sensitivity_absence says which blank the null is. Other surfaces are not covered by that sentence: the analytics bindings behind Ask Tightly still substitute STILL_LEARNING for a missing tier.\n",
      "enum": [
        "STILL_LEARNING",
        "INCONSISTENT",
        "LOW",
        "MODERATE",
        "HIGH",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "price_sensitivity_absence": {
      "description": "Which blank a null price_sensitivity is. Set only where the tier is null, and null where a tier is served.\nnot_run: the engine has never measured this store -- no tier table on this tenant, or no run on record and no rows anywhere in it. not_scored: it has measured the store and holds no reading for this line. not_measured: a probe failed and the platform cannot say, which is never reported as not_scored.\nIt does not say whether this line's product pool could lend it a number. That split (borrowed against insufficient) needs the per-variant price evidence, which is one query per line; GET /variants/{variant_id}/price-sensitivity answers it, with the sentence, for a line a reader opens.\n",
      "enum": [
        "not_run",
        "not_scored",
        "not_measured",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "price_sensitivity_absence_word": {
      "description": "The word the cell prints for the code beside it, served rather than composed on the page, one per price_sensitivity_absence code and in the same order. Null wherever price_sensitivity_absence is null, and null for a code shipped before its copy.\n",
      "enum": [
        "Not scored yet",
        "Not scored",
        "Not measured",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "price_sensitivity_computed_at": {
      "description": "When the tier beside it was measured, ISO-8601 in UTC, so the column carries the run's own stamp rather than the reader's clock. Null where there is no tier.\n",
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "product_id": {
      "type": "string"
    },
    "product_image": {
      "type": [
        "string",
        "null"
      ]
    },
    "product_title": {
      "description": "Null where the catalogue holds no product title.",
      "type": [
        "string",
        "null"
      ]
    },
    "profit_share": {
      "description": "Row gross profit divided by gross profit across the full filtered result.",
      "type": [
        "number",
        "null"
      ]
    },
    "realized_average_price": {
      "description": "Quantity-weighted positive-sale unit price after discounts; refunds are separate.",
      "type": [
        "number",
        "null"
      ]
    },
    "realized_price_max": {
      "description": "The highest observed positive-sale unit price after discounts, beside realized_price_min.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "realized_price_min": {
      "description": "Observed positive-sale unit prices after discounts in the selected period.",
      "type": [
        "number",
        "null"
      ]
    },
    "receipts_units": {
      "description": "Recognised inbound units during the selected period, within its inventory boundary.",
      "type": [
        "number",
        "null"
      ]
    },
    "reserved_units": {
      "description": "Units reserved or held at the same as-of date as available stock.",
      "type": [
        "number",
        "null"
      ]
    },
    "return_rate": {
      "type": [
        "number",
        "null"
      ]
    },
    "returned_units": {
      "type": [
        "number",
        "null"
      ]
    },
    "returns": {
      "type": "number"
    },
    "sales_gap": {
      "description": "Actual net sales less the matched selected plan target.",
      "type": [
        "number",
        "null"
      ]
    },
    "sales_gap_pct": {
      "description": "Sales gap divided by the matched selected plan target.",
      "type": [
        "number",
        "null"
      ]
    },
    "sales_plan": {
      "description": "Selected saved plan sales target for the matching product scope and elapsed period.",
      "type": [
        "number",
        "null"
      ]
    },
    "sales_share": {
      "description": "Row net sales divided by net sales across the full filtered result.",
      "type": [
        "number",
        "null"
      ]
    },
    "season_sell_through_rate": {
      "description": "Sell-through from the selected commitment or season start on its matched inventory basis.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "sell_through_gap": {
      "description": "Actual sell-through less matched target, in percentage points.",
      "type": [
        "number",
        "null"
      ]
    },
    "sell_through_rate": {
      "type": [
        "number",
        "null"
      ]
    },
    "sell_through_target": {
      "description": "Declared sell-through target for the same lifecycle and scope.",
      "type": [
        "number",
        "null"
      ]
    },
    "selling_days": {
      "description": "Distinct dates with positive sales in the selected period.",
      "type": [
        "number",
        "null"
      ]
    },
    "shopify_tags": {
      "items": {
        "type": "string"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "sku": {
      "type": [
        "string",
        "null"
      ]
    },
    "stockout_days_inferred": {
      "description": "Of the window's stock-out days, how many were read out of the order history rather than snapshotted at the time. Those days are evidence, not measurement: the line sold, went silent for longer than its own selling cadence explains, and sold again. Present them as inferred and never as measured. 0 where every day was snapshotted, which is every book whose history has not been backfilled.\n",
      "type": [
        "integer",
        "null"
      ]
    },
    "taxes": {
      "description": "Null where no line in the window records tax, on the same terms as discounts. A recorded 0.00 still reads 0.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "total_sales": {
      "description": "Net sales plus the tax collected on it, so it is null wherever no line in the window records tax. Read a null as not measured.\n",
      "type": [
        "number",
        "null"
      ]
    },
    "units_gap": {
      "description": "Actual net units less the matched selected unit target.",
      "type": [
        "number",
        "null"
      ]
    },
    "units_gap_pct": {
      "description": "Unit gap divided by the matched selected unit target.",
      "type": [
        "number",
        "null"
      ]
    },
    "units_per_day": {
      "description": "Net units divided by calendar days in the selected period.",
      "type": [
        "number",
        "null"
      ]
    },
    "units_per_order": {
      "description": "Eligible units divided by distinct matching orders.",
      "type": [
        "number",
        "null"
      ]
    },
    "units_plan": {
      "description": "Selected saved plan unit target for the matching product scope and elapsed period.",
      "type": [
        "number",
        "null"
      ]
    },
    "units_share": {
      "description": "Row net units divided by net units across the full filtered result.",
      "type": [
        "number",
        "null"
      ]
    },
    "variant_id": {
      "type": "string"
    },
    "variant_title": {
      "description": "Null where the catalogue holds no variant title, as a single-variant or marketplace listing often does.\n",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object"
}