{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clment-com/json-schema/clment-com-key-date-schema.json",
  "title": "KeyDate",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clment-com-openapi.yml#/components/schemas/KeyDate",
  "type": "object",
  "required": [
    "id",
    "contractId",
    "contractName",
    "dateType",
    "date",
    "isCustom"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Identifies the date, and is the `{id}` that `POST /dates/{id}/set-reminder` takes. For an AI-extracted date it is composed from the contract and the date type (`{contractId}_effectiveDate`); for a user-added one it is the custom date's own id. Undocumented until an SDK harness test tried to set a reminder and found no id to send."
    },
    "contractId": {
      "type": "string"
    },
    "contractName": {
      "type": "string"
    },
    "contractNumber": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The CLM number a person would recognise the contract by."
    },
    "contractTypeCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "contractTypeLabel": {
      "type": [
        "string",
        "null"
      ]
    },
    "contractCategoryCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "contractCategoryLabel": {
      "type": [
        "string",
        "null"
      ]
    },
    "displayDescription": {
      "type": [
        "string",
        "null"
      ],
      "description": "A ready-made label for the date, contract name included."
    },
    "dateType": {
      "type": "string"
    },
    "date": {
      "type": "string",
      "format": "date-time"
    },
    "dateString": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date as it reads in the document, e.g. \"September 1, 2015\"."
    },
    "isApproximate": {
      "type": "boolean",
      "description": "True when the date was inferred rather than stated outright."
    },
    "isCustom": {
      "type": "boolean",
      "description": "True for user-added dates, false for AI-extracted canonical dates."
    },
    "customDateId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Present when isCustom — the underlying custom date row."
    },
    "label": {
      "type": [
        "string",
        "null"
      ],
      "description": "The user's own label, on a custom date."
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "context": {
      "type": [
        "string",
        "null"
      ],
      "description": "The surrounding text the date was extracted from."
    },
    "pageNumber": {
      "type": [
        "integer",
        "null"
      ]
    },
    "reminderSet": {
      "type": "boolean",
      "description": "Whether a reminder is currently enabled for this date."
    },
    "reminderDaysBefore": {
      "type": [
        "integer",
        "null"
      ],
      "description": "How many days ahead the reminder fires. Read it before changing it, so you can put it back."
    },
    "reminderSentAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}