{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/infinihash-com/json-schema/infinihash-com-obligation-schema.json",
  "title": "Obligation",
  "description": "A deferred verification obligation (e.g. a driving-licence photo owed after a card crosses a spend threshold). Lapse is evaluated lazily on read.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kyc-api-infinihash-openapi.json#/components/schemas/Obligation",
  "type": "object",
  "required": [
    "id",
    "type",
    "status",
    "on_lapse",
    "due_by",
    "blocking",
    "overdue_seconds"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "Obligation type, currently dl_image."
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "satisfied",
        "lapsed",
        "waived"
      ]
    },
    "card_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "transaction_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "submission_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "decision_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "amount": {
      "type": [
        "number",
        "null"
      ]
    },
    "card_cumulative_total": {
      "type": [
        "number",
        "null"
      ]
    },
    "ruleset_version": {
      "type": "integer"
    },
    "reason_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "on_lapse": {
      "type": "string",
      "description": "Tenant decision on lapse: flag | block | escalate."
    },
    "due_by": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "satisfied_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "document_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "satisfied_note": {
      "type": [
        "string",
        "null"
      ]
    },
    "lapsed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "blocking": {
      "type": "boolean",
      "description": "Derived: status is lapsed and on_lapse is block."
    },
    "overdue_seconds": {
      "type": "integer",
      "description": "Derived: seconds past due_by while still open; 0 otherwise."
    }
  }
}