{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/companydata-dk/json-schema/companydata-dk-records-response-schema.json",
  "title": "RecordsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/companydata-dk-working-lists-api-openapi.yml#/components/schemas/RecordsResponse",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/RecordSummary"
      },
      "type": "array",
      "title": "Data"
    },
    "meta": {
      "additionalProperties": true,
      "type": "object",
      "title": "Meta",
      "default": {}
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "CompanySnapshot": {
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Status"
        },
        "company_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Company Type"
        },
        "industry_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Industry Code"
        },
        "industry_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Industry Text"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City"
        },
        "municipality_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Municipality Code"
        }
      },
      "type": "object",
      "title": "CompanySnapshot",
      "description": "Denormalized company card, refreshed when the record is touched."
    },
    "RecordSummary": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "cvr": {
          "type": "string",
          "title": "Cvr"
        },
        "company": {
          "$ref": "#/$defs/CompanySnapshot"
        },
        "status": {
          "type": "string",
          "enum": [
            "ny",
            "kontaktet",
            "dialog",
            "vundet",
            "tabt"
          ],
          "title": "Status"
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source"
        },
        "owner_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Owner Email"
        },
        "created_by_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created By Email"
        },
        "next_followup_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Next Followup At"
        },
        "last_activity_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Activity At"
        },
        "open_followup_count": {
          "type": "integer",
          "title": "Open Followup Count",
          "default": 0
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "cvr",
        "company",
        "status",
        "created_at"
      ],
      "title": "RecordSummary",
      "description": "Row in the working-list table view."
    }
  }
}