{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/soldstack-dev/json-schema/soldstack-dev-value-response-schema.json",
  "title": "ValueResponse",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/soldstack-dev-openapi.json#/components/schemas/ValueResponse",
  "properties": {
    "source": {
      "type": "string",
      "title": "Source",
      "description": "The marketplace the values come from."
    },
    "currency": {
      "type": "string",
      "title": "Currency",
      "description": "Currency of every value: USD, or CAD for poshmark_ca."
    },
    "sold_after": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sold After",
      "description": "First day of the date window used (from days or sold_after), or null for no start."
    },
    "sold_before": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sold Before",
      "description": "Last day of the date window used, or null for no end."
    },
    "items": {
      "items": {
        "$ref": "#/$defs/ValuedItem"
      },
      "type": "array",
      "title": "Items",
      "description": "One entry per item sent, in the same order."
    },
    "items_valued": {
      "type": "integer",
      "title": "Items Valued",
      "description": "Items that got a value."
    },
    "items_without_value": {
      "type": "integer",
      "title": "Items Without Value",
      "description": "Items whose value is null."
    },
    "total": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Total",
      "description": "Sum of every item's total (value times quantity). Null for a lot sold by weight with no piece count (needs_unit_count): the items are then valued once each, per unit."
    },
    "appraisal_may_be_needed": {
      "type": "boolean",
      "title": "Appraisal May Be Needed",
      "description": "True when a single item, or a group of similar items (same category), is over $5,000 (USD only): the IRS then requires a qualified appraisal for the item or group of similar items."
    },
    "method": {
      "type": "string",
      "title": "Method",
      "description": "How the values were derived, in plain English, with the date: suitable for the donor's records."
    },
    "disclaimer": {
      "type": "string",
      "title": "Disclaimer",
      "description": "Market data, not tax advice; the IRS $5,000 qualified appraisal rule."
    },
    "history_days": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "History Days",
      "description": "90 when this key's plan values only sales from the last 90 days (Free and Starter keys issued from Oct 25 2026); null when the full archive is used (Growth, Business, earlier Starter keys). sold_after and sold_before show the dates used."
    },
    "history_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "History Note",
      "description": "Only when that limit changed the dates you asked for (none, or older than 90 days): says what was used instead."
    },
    "usage": {
      "$ref": "#/$defs/Usage",
      "description": "This month's lookups after this request."
    },
    "extraction": {
      "anyOf": [
        {
          "$ref": "#/$defs/Extraction"
        },
        {
          "type": "null"
        }
      ],
      "description": "Only for a listing request: what was read from the text. Null for items."
    },
    "bid_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/BidRange"
        },
        {
          "type": "null"
        }
      ],
      "description": "Only for a listing request on an itemized or counted lot with a complete, specific total: what lots like this usually sold for at one auction site (low, typical, high). History, not advice. Null otherwise; bid_range_omitted says why."
    },
    "bid_range_omitted": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Bid Range Omitted",
      "description": "Why bid_range is null for a listing request, in words. Null for items."
    },
    "needs_unit_count": {
      "type": "boolean",
      "title": "Needs Unit Count",
      "default": false,
      "description": "True for a lot sold by weight with no piece count: items are valued per unit and total is null. Send the same listing again with unit_count to get a total."
    }
  },
  "type": "object",
  "required": [
    "source",
    "currency",
    "sold_after",
    "sold_before",
    "items",
    "items_valued",
    "items_without_value",
    "total",
    "appraisal_may_be_needed",
    "method",
    "disclaimer",
    "usage"
  ],
  "$defs": {
    "BidRange": {
      "properties": {
        "low": {
          "type": "number",
          "title": "Low",
          "description": "Lot total times the 25th percentile of winning bid / SoldStack value."
        },
        "typical": {
          "type": "number",
          "title": "Typical",
          "description": "Lot total times the median ratio."
        },
        "high": {
          "type": "number",
          "title": "High",
          "description": "Lot total times the 75th percentile ratio."
        },
        "lots": {
          "type": "integer",
          "title": "Lots",
          "description": "How many past lots the ratios come from."
        },
        "source": {
          "type": "string",
          "title": "Source",
          "description": "Where the lots come from. One auction site's history, not advice."
        }
      },
      "type": "object",
      "required": [
        "low",
        "typical",
        "high",
        "lots",
        "source"
      ],
      "title": "BidRange"
    },
    "ConditionStats": {
      "properties": {
        "condition": {
          "type": "string",
          "title": "Condition",
          "description": "Condition value, as in items[].condition."
        },
        "label": {
          "type": "string",
          "title": "Label",
          "description": "Display name, e.g. Like new."
        },
        "count": {
          "type": "integer",
          "title": "Count",
          "description": "Sales in this condition."
        },
        "median": {
          "type": "number",
          "title": "Median",
          "description": "Middle sold price in this condition."
        },
        "p10": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "P10",
          "description": "Low end of the range; only with 3 or more sales."
        },
        "p90": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "P90",
          "description": "High end of the range; only with 3 or more sales."
        }
      },
      "type": "object",
      "required": [
        "condition",
        "label",
        "count",
        "median"
      ],
      "title": "ConditionStats"
    },
    "Dropped": {
      "properties": {
        "line": {
          "type": "string",
          "title": "Line",
          "description": "The item as read, shortened."
        },
        "reason": {
          "type": "string",
          "title": "Reason",
          "description": "Why it was not used."
        }
      },
      "type": "object",
      "required": [
        "line",
        "reason"
      ],
      "title": "Dropped"
    },
    "ExtractedItem": {
      "properties": {
        "index": {
          "type": "integer",
          "title": "Index",
          "description": "Position of the item in the response's items, from 0."
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "What the item is, as read from the listing: the search words used for its value."
        },
        "brand": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Brand",
          "description": "The brand the listing states, or null."
        },
        "condition": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Condition",
          "description": "The condition the listing states (e.g. new_with_tags), or null when it says none."
        },
        "quantity": {
          "type": "integer",
          "title": "Quantity",
          "description": "How many: stated for this item, split from the lot's piece count, or 1."
        },
        "quantity_assumed": {
          "type": "boolean",
          "title": "Quantity Assumed",
          "description": "True when the quantity was split from the lot's piece count."
        },
        "source_snippet": {
          "type": "string",
          "title": "Source Snippet",
          "description": "The words of the listing this item was read from; empty for a list read by rules."
        },
        "uncertain": {
          "type": "boolean",
          "title": "Uncertain",
          "description": "True when the item, its brand or its quantity was inferred instead of read."
        }
      },
      "type": "object",
      "required": [
        "index",
        "description",
        "brand",
        "condition",
        "quantity",
        "quantity_assumed",
        "source_snippet",
        "uncertain"
      ],
      "title": "ExtractedItem"
    },
    "Extraction": {
      "properties": {
        "method": {
          "type": "string",
          "enum": [
            "ai",
            "rules"
          ],
          "title": "Method",
          "description": "ai when a model read the text, rules when it was already a one-item-per-line list."
        },
        "lot_type": {
          "type": "string",
          "enum": [
            "single",
            "itemized",
            "counted_bulk",
            "uncounted_bulk",
            "collectible",
            "not_apparel",
            "unknown"
          ],
          "title": "Lot Type",
          "description": "single, itemized, counted_bulk, uncounted_bulk, collectible, not_apparel or unknown. Decided in code from what the text states."
        },
        "weight_lbs": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Weight Lbs",
          "description": "The lot's weight in pounds, when the text states one."
        },
        "unit_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Unit Count",
          "description": "The piece count used: from the text, or your unit_count. Null when there is none."
        },
        "items": {
          "items": {
            "$ref": "#/$defs/ExtractedItem"
          },
          "type": "array",
          "title": "Items",
          "description": "The items read, in the order of the response's items."
        },
        "dropped": {
          "items": {
            "$ref": "#/$defs/Dropped"
          },
          "type": "array",
          "title": "Dropped",
          "description": "Items read from the text but not used, each with the line and the reason."
        },
        "uncertain_items": {
          "type": "integer",
          "title": "Uncertain Items",
          "description": "How many items were inferred rather than read."
        },
        "unaccounted_items": {
          "type": "integer",
          "title": "Unaccounted Items",
          "description": "Pieces of the lot's count that the items listed don't cover."
        },
        "quantity_note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Quantity Note",
          "description": "How quantities were settled, e.g. 'quantities were split equally across 3 items'."
        }
      },
      "type": "object",
      "required": [
        "method",
        "lot_type",
        "weight_lbs",
        "unit_count",
        "items",
        "dropped",
        "uncertain_items",
        "unaccounted_items",
        "quantity_note"
      ],
      "title": "Extraction"
    },
    "Usage": {
      "properties": {
        "used": {
          "type": "integer",
          "title": "Used",
          "description": "Lookups used this month, after this request."
        },
        "limit": {
          "type": "integer",
          "title": "Limit",
          "description": "Your plan's lookups per month."
        },
        "remaining": {
          "type": "integer",
          "title": "Remaining",
          "description": "limit minus used, never below 0."
        },
        "grace": {
          "type": "integer",
          "title": "Grace",
          "default": 0,
          "description": "Extra lookups allowed past limit before requests are refused: 10% of limit on Growth, 20% on Business (and the retired Scale), 0 on other plans. remaining ignores it."
        },
        "plan": {
          "type": "string",
          "title": "Plan",
          "description": "free, starter, growth or business (scale and pass: retired plans, no longer sold)."
        },
        "resets": {
          "type": "string",
          "title": "Resets",
          "description": "First day of next month (UTC), as an ISO date."
        },
        "charged": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Charged",
          "description": "True when this request used a lookup; false for a cached repeat (also the X-Lookup-Charged header)."
        }
      },
      "type": "object",
      "required": [
        "used",
        "limit",
        "remaining",
        "plan",
        "resets"
      ],
      "title": "Usage"
    },
    "ValueExample": {
      "properties": {
        "title": {
          "type": "string",
          "title": "Title",
          "description": "Listing title as the seller wrote it."
        },
        "price": {
          "type": "number",
          "title": "Price",
          "description": "The price it sold at."
        },
        "sold_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sold At",
          "description": "When it sold (ISO 8601)."
        },
        "condition": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Condition",
          "description": "The listing's condition, e.g. used_good."
        },
        "url": {
          "type": "string",
          "title": "Url",
          "description": "Link to the sold listing."
        }
      },
      "type": "object",
      "required": [
        "title",
        "price",
        "sold_at",
        "condition",
        "url"
      ],
      "title": "ValueExample"
    },
    "ValuedItem": {
      "properties": {
        "index": {
          "type": "integer",
          "title": "Index",
          "description": "Position of the item in the request, from 0."
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "The description you sent."
        },
        "brand": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Brand",
          "description": "The brand you sent, or null."
        },
        "category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Category",
          "description": "The clothing, shoes or bags category used: the one you sent, or read from the description; null when neither says, and always null for goods (see family)."
        },
        "department": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Department",
          "description": "women, men, girls, boys, baby, kids (girls and boys) or unisex: sent, or read from the description or a kids' size; null when unknown."
        },
        "size": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Size",
          "description": "The size you sent, or null. Only a kids' size changes the value (it marks the item as kids')."
        },
        "kids_age": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "baby",
                "toddler",
                "big_kids"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Kids Age",
          "description": "baby, toddler or big_kids: the kids' sizes the value comes from; toddler when the item says toddler and none was sent; null when none was sent (or it doesn't apply to the item's department)."
        },
        "condition": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Condition",
          "description": "The condition as understood, e.g. used_good; null when none was sent."
        },
        "condition_group": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "new",
                "used"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Condition Group",
          "description": "new (new with tags) or used (every other grade): the item's condition group. Null when the condition is unknown."
        },
        "condition_matched": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Condition Matched",
          "description": "The condition of the sales the value comes from: the exact grade sent (e.g. used_good) when at least 10 of its sales are found, else the group (new or used). Null with no value."
        },
        "quantity": {
          "type": "integer",
          "title": "Quantity",
          "description": "How many of this item: the quantity you sent, or, when you sent none, a count the description states (\"throw pillows (4)\", \"candles x5\", \"box of 12 DVDs\"); reason says when it was read."
        },
        "quantity_assumed": {
          "type": "boolean",
          "title": "Quantity Assumed",
          "default": false,
          "description": "True when the quantity was split from the lot's piece count instead of being stated (listing requests only)."
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value",
          "description": "Fair-market value of one item: the median sold price of the sales used. Null when there is nothing to go on; reason says why."
        },
        "low": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Low",
          "description": "25th percentile of the same sales: a quarter sold for less."
        },
        "high": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "High",
          "description": "75th percentile of the same sales: a quarter sold for more."
        },
        "p10": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "P10",
          "description": "10th percentile of the same sales (the low end of /v1/sold's range)."
        },
        "p90": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "P90",
          "description": "90th percentile of the same sales (the high end of /v1/sold's range)."
        },
        "total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total",
          "description": "value times quantity, or null."
        },
        "currency": {
          "type": "string",
          "title": "Currency",
          "description": "USD, or CAD for poshmark_ca."
        },
        "sales_used": {
          "type": "integer",
          "title": "Sales Used",
          "description": "How many sales the value comes from."
        },
        "oldest_sold": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Oldest Sold",
          "description": "ISO date of the oldest of those sales (inside the request's date window)."
        },
        "newest_sold": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Newest Sold",
          "description": "ISO date of the newest of those sales (inside the request's date window)."
        },
        "basis": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "brand + item",
                "item description",
                "category + department + condition",
                "category + condition"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Basis",
          "description": "What the sales have in common with the item: brand + item (the brand search), item description (the description searched), category + department + condition, or category + condition. Null with no value. matched_on says the same in plainer words."
        },
        "matched_on": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "brand + item",
                "item description",
                "category + department",
                "category, all departments"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Matched On",
          "description": "How broad the match is: brand + item, item description, category + department, or category, all departments. Null with no value."
        },
        "broadened": {
          "type": "boolean",
          "title": "Broadened",
          "description": "True when the value comes from wider sales than the item as described: a brand or description search with too few sales, a department with too few (all departments used), or a grade with too few (its condition group used). reason says which."
        },
        "search_query": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Search Query",
          "description": "The marketplace search behind a brand + item or item description value; null otherwise."
        },
        "confidence": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "high",
                "medium",
                "low"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Confidence",
          "description": "high, medium or low. Brand matches take the search's own rating; category + department is at most medium (medium from 30 sales); category alone is low. Null with no value."
        },
        "reason": {
          "type": "string",
          "title": "Reason",
          "description": "Why this value, or why there is none, in plain English, including every fallback. Ready to show users."
        },
        "by_condition": {
          "items": {
            "$ref": "#/$defs/ConditionStats"
          },
          "type": "array",
          "title": "By Condition",
          "description": "The same item's sales (same match and window) split by grade, best first, as in /v1/sold."
        },
        "family": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Family",
          "description": "For household goods, the kind: home, kitchen, electronics, media, toys, kids_gear, pets or beauty. Goods are valued only from enough sales of the same product (never from a category), and toys and kids_gear are always rated low. Null for clothing, shoes and bags."
        }
      },
      "type": "object",
      "required": [
        "index",
        "description",
        "brand",
        "category",
        "department",
        "size",
        "kids_age",
        "condition",
        "condition_group",
        "condition_matched",
        "quantity",
        "value",
        "low",
        "high",
        "p10",
        "p90",
        "total",
        "currency",
        "sales_used",
        "oldest_sold",
        "newest_sold",
        "basis",
        "matched_on",
        "broadened",
        "search_query",
        "confidence",
        "reason",
        "by_condition",
        "examples"
      ],
      "title": "ValuedItem"
    }
  }
}