{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"product":{"type":"string","minLength":1,"maxLength":160,"description":"One product/specification shared by every offer"},"unit":{"type":"string","minLength":1,"maxLength":32,"description":"Common base unit, for example piece or kg. No inferred unit conversions"},"quantity":{"type":"integer","minimum":1,"maximum":1000000},"currency":{"type":"string","enum":["USD","EUR","GBP","TRY","IRT","AED","SAR","CAD","AUD","JPY","KWD"],"description":"Comparison currency. IRT means Iranian toman, not rial"},"maxTotal":{"default":null,"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d{0,11})(\\.\\d{1,6})?$"},{"type":"null"}]},"neededWithinDays":{"default":null,"anyOf":[{"type":"integer","minimum":0,"maximum":3650},{"type":"null"}]},"quotes":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,32}$"},"supplier":{"type":"string","minLength":1,"maxLength":80},"unit":{"type":"string","minLength":1,"maxLength":32},"sameSpecification":{"type":"boolean","description":"Only true when the requester has verified the same product specification; not inferred from price or name"},"currency":{"type":"string","enum":["USD","EUR","GBP","TRY","IRT","AED","SAR","CAD","AUD","JPY","KWD"]},"fxRate":{"default":null,"description":"1 unit of offer currency equals this many comparison-currency units. Required for different currencies, no live rates","anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d{0,11})(\\.\\d{1,6})?$"},{"type":"null"}]},"packSize":{"default":1,"description":"Base units in each pack; prices are per pack","type":"integer","minimum":1,"maximum":1000000},"minUnits":{"default":1,"description":"Minimum order in base units","type":"integer","minimum":1,"maximum":1000000},"maxUnits":{"default":null,"description":"Confirmed maximum available base units, null means unknown","anyOf":[{"type":"integer","minimum":0,"maximum":1000000000000},{"type":"null"}]},"pricePerPack":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d{0,11})(\\.\\d{1,6})?$"},{"type":"null"}]},"tiers":{"default":[],"description":"All-units price breaks; not graduated bands. Highest applicable threshold wins","maxItems":8,"type":"array","items":{"type":"object","properties":{"minUnits":{"type":"integer","minimum":1,"maximum":1000000},"pricePerPack":{"type":"string","pattern":"^(0|[1-9]\\d{0,11})(\\.\\d{1,6})?$"}},"required":["minUnits","pricePerPack"],"additionalProperties":false}},"discountPercent":{"default":0,"description":"Discount on merchandise only; applied after the price tier","type":"number","minimum":0,"maximum":100,"multipleOf":0.01},"shipping":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d{0,11})(\\.\\d{1,6})?$"},{"type":"null"}],"description":"Total shipping charge in offer currency. 0 means confirmed free, null means unknown"},"otherCosts":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d{0,11})(\\.\\d{1,6})?$"},{"type":"null"}],"description":"Total other charges in offer currency, including duties if applicable. null means unknown"},"tax":{"type":"object","properties":{"mode":{"type":"string","enum":["included","excluded","unknown"]},"rate":{"default":null,"anyOf":[{"type":"number","minimum":0,"maximum":100,"multipleOf":0.01},{"type":"null"}]}},"required":["mode","rate"],"additionalProperties":false,"description":"Excluded tax applies to discounted goods plus shipping plus other charges. Use unknown for unsupported/mixed tax treatment"},"leadDays":{"default":null,"description":"Confirmed days until delivery, not dispatch","anyOf":[{"type":"integer","minimum":0,"maximum":3650},{"type":"null"}]},"upfrontPercent":{"default":null,"description":"Share of the final total payable upfront; null means unknown","anyOf":[{"type":"number","minimum":0,"maximum":100,"multipleOf":0.01},{"type":"null"}]}},"required":["id","supplier","unit","sameSpecification","currency","fxRate","packSize","minUnits","maxUnits","pricePerPack","tiers","discountPercent","shipping","otherCosts","tax","leadDays","upfrontPercent"],"additionalProperties":false}}},"required":["product","unit","quantity","currency","maxTotal","neededWithinDays","quotes"],"additionalProperties":false}