{"$id": "off.1.0", "type": "object", "$defs": {"line": {"type": "object", "required": ["line_id", "item", "quantity", "unit_price"], "properties": {"tax": {"type": "object"}, "item": {"type": "object"}, "notes": {"type": "string"}, "line_id": {"type": "string"}, "delivery": {"type": "object"}, "discount": {"type": "object"}, "line_net": {"type": "number"}, "optional": {"type": "boolean"}, "quantity": {"type": "number"}, "line_gross": {"type": "number"}, "price_base": {"enum": ["net", "gross"], "type": "string"}, "unit_price": {"type": "number"}, "line_number": {"type": "string"}, "section_ref": {"type": "string"}, "alternative_to": {"type": "string"}, "price_valid_until": {"type": "string", "format": "date"}}}, "links": {"type": "object", "properties": {"project": {"type": "object"}, "attachments": {"type": "array"}, "converted_to": {"type": "object"}, "gtc_reference": {"type": "object"}, "previous_offer": {"type": "object"}, "related_offers": {"type": "array"}, "based_on_budget": {"type": "object"}, "request_reference": {"type": "object"}, "framework_contract": {"type": "object"}}}, "party": {"type": "object", "required": ["name"], "properties": {"name": {"type": "string"}, "tax_id": {"type": "string"}, "address": {"type": "object"}, "contact": {"type": "object"}, "entity_ref": {"type": "string"}, "legal_name": {"type": "string"}, "registration": {"type": "object"}}}, "terms": {"type": "object", "required": ["mode"], "properties": {"mode": {"enum": ["embedded", "reference", "both"], "type": "string"}, "exclusions": {"type": "object"}, "assumptions": {"type": "object"}, "gtc_reference": {"type": "object"}, "embedded_terms": {"type": "object", "properties": {"payment": {"type": "object"}, "delivery": {"type": "object"}, "warranty": {"type": "object"}, "liability": {"type": "object"}, "other_terms": {"type": "array"}, "termination": {"type": "object"}, "confidentiality": {"type": "object"}, "intellectual_property": {"type": "object"}}}, "special_conditions": {"type": "array"}}}, "totals": {"type": "object", "required": ["total_net", "total_gross", "total_payable"], "properties": {"currency": {"type": "string"}, "rounding": {"type": "number"}, "total_net": {"type": "number"}, "total_tax": {"type": "number"}, "lines_count": {"type": "integer"}, "sum_charges": {"type": "number"}, "total_gross": {"type": "number"}, "sum_lines_net": {"type": "number"}, "tax_breakdown": {"type": "array"}, "total_payable": {"type": "number"}, "sections_count": {"type": "integer"}, "sum_allowances": {"type": "number"}, "payment_summary": {"type": "object"}}}, "parties": {"type": "object", "required": ["offeror"], "properties": {"offeree": {"$ref": "#/$defs/party"}, "offeror": {"$ref": "#/$defs/party"}, "prepared_by": {"type": "object"}, "authorized_by": {"type": "object"}}}, "section": {"type": "object", "required": ["section_id", "title"], "properties": {"title": {"type": "string"}, "number": {"type": "string"}, "subtotal": {"type": "number"}, "section_id": {"type": "string"}, "description": {"type": "string"}, "section_total": {"type": "number"}, "parent_section": {"type": "string"}, "discount_amount": {"type": "number"}, "discount_percent": {"type": "number"}}}, "extended": {"type": "object", "properties": {"source": {"type": "object"}, "metadata": {"type": "object", "required": ["schema_version"], "properties": {"version": {"type": "integer"}, "h_maestro": {"type": "string"}, "created_at": {"type": "string", "format": "date-time"}, "created_by": {"type": "string"}, "updated_at": {"type": "string", "format": "date-time"}, "updated_by": {"type": "string"}, "schema_version": {"type": "string", "const": "off.1.0"}}}, "workflow": {"type": "object"}, "analytics": {"type": "object"}, "signature": {"type": "object"}, "negotiation": {"type": "object"}, "pdf_generation": {"type": "object"}, "delivery_tracking": {"type": "object"}}}, "regional": {"type": "object"}, "tax_info": {"type": "object"}, "validity": {"type": "object", "required": ["validity_period"], "properties": {"expiry": {"type": "object"}, "acceptance": {"type": "object"}, "conversion": {"type": "object"}, "withdrawal": {"type": "object"}, "binding_nature": {"type": "object"}, "validity_period": {"type": "object"}, "rejection_record": {"type": "object"}, "acceptance_record": {"type": "object"}}}, "alternatives": {"type": "object", "properties": {"has_options": {"type": "boolean"}, "option_groups": {"type": "array"}, "alternative_offers": {"type": "array"}, "options_description": {"type": "string"}, "totals_with_options": {"type": "object"}}}, "allowance_charge": {"type": "object", "properties": {"id": {"type": "string"}, "charge": {"type": "boolean"}, "reason": {"type": "string"}, "conditions": {"type": "string"}, "calculation": {"type": "object"}, "reason_code": {"type": "string"}, "tax_percent": {"type": "number"}, "tax_category": {"type": "string"}}}}, "$schema": "https://hst.tzzr.eu/schemas/offer/v1.0/schema.json", "required": ["L1_core", "L3_validity"], "properties": {"L1_core": {"type": "object", "required": ["header", "parties", "lines", "totals", "terms"], "properties": {"lines": {"type": "array", "items": {"$ref": "#/$defs/line"}, "minItems": 1}, "terms": {"$ref": "#/$defs/terms"}, "header": {"type": "object", "required": ["offer_id", "offer_number", "issue_date", "currency", "status", "validity"], "properties": {"notes": {"type": "string"}, "title": {"type": "string"}, "status": {"enum": ["draft", "sent", "viewed", "negotiating", "accepted", "rejected", "expired", "withdrawn"], "type": "string"}, "binding": {"type": "object"}, "summary": {"type": "string"}, "currency": {"type": "string", "pattern": "^[A-Z]{3}$"}, "language": {"type": "string"}, "offer_id": {"type": "string", "pattern": "^off-[a-f0-9-]+$"}, "validity": {"type": "object", "required": ["valid_until"], "properties": {"valid_from": {"type": "string", "format": "date"}, "valid_until": {"type": "string", "format": "date"}, "validity_days": {"type": "integer"}, "extension_allowed": {"type": "boolean"}, "extension_conditions": {"type": "string"}}}, "type_code": {"enum": ["STD", "FRM", "BID", "RFP", "REN", "UPG", "CNG"], "type": "string"}, "issue_date": {"type": "string", "format": "date"}, "issue_place": {"type": "string"}, "offer_number": {"type": "string"}, "internal_notes": {"type": "string"}}}, "totals": {"$ref": "#/$defs/totals"}, "parties": {"$ref": "#/$defs/parties"}, "sections": {"type": "array", "items": {"$ref": "#/$defs/section"}}, "alternatives": {"$ref": "#/$defs/alternatives"}, "allowances_charges": {"type": "array", "items": {"$ref": "#/$defs/allowance_charge"}}}}, "L5_links": {"$ref": "#/$defs/links"}, "L2_tax_info": {"$ref": "#/$defs/tax_info"}, "L3_validity": {"$ref": "#/$defs/validity"}, "L4_regional": {"$ref": "#/$defs/regional"}, "L6_extended": {"$ref": "#/$defs/extended"}}}