{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/subcontract/v2.json",
  "title": "subcontract contract v2",
  "type": "object",
  "required": [
    "external_id",
    "project",
    "status",
    "subcontractor"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "the subcontract's title",
      "x-demiton-requiredness": "optional"
    },
    "number": {
      "type": "string",
      "description": "the subcontract number",
      "x-demiton-requiredness": "optional"
    },
    "status": {
      "type": "string",
      "description": "the subcontract's lifecycle state",
      "x-demiton-requiredness": "required"
    },
    "project": {
      "type": "string",
      "description": "the project the subcontract is let on",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "currency": {
      "type": "currency",
      "description": "the currency of the amounts",
      "x-demiton-requiredness": "optional"
    },
    "executed": {
      "type": "boolean",
      "description": "whether the subcontract has been signed",
      "x-demiton-requiredness": "optional"
    },
    "line_items": {
      "type": "array",
      "description": "the subcontract's itemised scope",
      "x-demiton-requiredness": "optional"
    },
    "total_paid": {
      "type": "number",
      "description": "what has been paid to date",
      "x-demiton-requiredness": "optional",
      "x-demiton-type": "money"
    },
    "description": {
      "type": "string",
      "description": "the scope of the subcontract",
      "x-demiton-requiredness": "optional"
    },
    "external_id": {
      "type": "string",
      "description": "the source system's own subcontract id",
      "x-demiton-requiredness": "required"
    },
    "contract_sum": {
      "type": "number",
      "description": "the original subcontract sum",
      "x-demiton-requiredness": "optional",
      "x-demiton-type": "money"
    },
    "delivery_date": {
      "type": "string",
      "description": "when the subcontract works are due",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "day",
      "format": "date",
      "x-demiton-type": "date"
    },
    "payment_terms": {
      "type": "string",
      "description": "the payment terms agreed",
      "x-demiton-requiredness": "optional"
    },
    "subcontractor": {
      "type": "string",
      "description": "the party the work is let to",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "pending_changes": {
      "type": "number",
      "description": "the value of change orders not yet approved",
      "x-demiton-requiredness": "optional",
      "x-demiton-type": "money"
    },
    "percentage_paid": {
      "type": "number",
      "description": "the share of the sum paid",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "percent",
      "x-demiton-type": "decimal"
    },
    "approved_changes": {
      "type": "number",
      "description": "the value of approved change orders",
      "x-demiton-requiredness": "optional",
      "x-demiton-type": "money"
    },
    "remaining_balance": {
      "type": "number",
      "description": "what remains unpaid",
      "x-demiton-requiredness": "optional",
      "x-demiton-type": "money"
    },
    "retention_percent": {
      "type": "number",
      "description": "the retention rate withheld from payments",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "percent",
      "x-demiton-type": "decimal"
    },
    "revised_contract_sum": {
      "type": "number",
      "description": "the sum after approved changes",
      "x-demiton-requiredness": "optional",
      "x-demiton-type": "money"
    },
    "actual_completion_date": {
      "type": "string",
      "description": "when the subcontract works were completed",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "day",
      "format": "date",
      "x-demiton-type": "date"
    }
  },
  "x-demiton-register-type": "subcontract",
  "x-demiton-contract-version": "2.0.2",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "AS 4000:2025",
        "title": "General Conditions of Contract (construct only)",
        "access": "paywalled_secondary",
        "clause": "Annexure Part A (per commentary)",
        "region": "Australia",
        "edition": "2025",
        "checked_on": "2026-09-14"
      },
      {
        "code": "AS 4902-2000",
        "title": "General Conditions of Contract for Design and Construct",
        "access": "paywalled_secondary",
        "region": "Australia",
        "edition": "2000",
        "checked_on": "2026-09-14"
      },
      {
        "code": "AU SoP Acts",
        "title": "Australian state and territory Security of Payment Acts (NSW 1999, QLD 2017, VIC 2002, WA 2021, SA 2009, TAS 2009, ACT 2009, NT 2004)",
        "access": "public_summary",
        "region": "Australia",
        "edition": "various",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Corporations Act 2001 (Cth) s 286",
        "title": "Corporations Act 2001 (Cth) - financial records, 7-year retention",
        "access": "full_text_verified",
        "clause": "s 286",
        "region": "Australia",
        "edition": "current",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Directive 2014/24/EU",
        "title": "Directive 2014/24/EU on public procurement",
        "access": "full_text_verified",
        "clause": "Art. 71",
        "region": "European Union",
        "edition": "consolidated",
        "checked_on": "2026-09-14"
      },
      {
        "code": "NZ CCA 2002",
        "title": "Construction Contracts Act 2002 (NZ), 2002 No 46, as amended 2015 and 2023",
        "access": "full_text_verified",
        "clause": "ss 18A-18I, 20-22",
        "region": "New Zealand",
        "edition": "as at 5 Oct 2023",
        "checked_on": "2026-09-14"
      },
      {
        "code": "NZ Government Procurement Rules",
        "title": "New Zealand Government Procurement Rules",
        "access": "public_summary",
        "clause": "Rule 31",
        "region": "New Zealand",
        "edition": "5th edition",
        "checked_on": "2026-09-14"
      },
      {
        "code": "HGCRA 1996 Part II",
        "title": "Housing Grants, Construction and Regeneration Act 1996, Part II (as amended by LDEDCA 2009)",
        "access": "full_text_verified",
        "clause": "ss 110-113",
        "region": "United Kingdom",
        "edition": "1996 c. 53 as amended",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "The subcontract itself: the instrument, not the subcontractor or the claim.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/subcontract/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}