### SearchRecord Entity Example (JSON) Source: https://context7.com/credittimeline/spec/llms.txt Represents a credit search or enquiry. Captures visibility (hard/soft), search type, input details, and the searching organisation. Hard searches are visible to other lenders while soft searches are not. ```json { "search_id": "sr_01", "searched_at": "2026-02-07", "organisation_id": "org_cra_ltd", "search_type": "consumer_enquiry", "visibility": "soft", "joint_application": false, "input_name": "Knight Robert S", "input_dob": "1990-06-26", "input_address_id": "addr_current_01", "reference": "search-ref-123", "purpose_text": "Consumer enquiry", "source_import_id": "imp_2026_02_07_eqf" } ``` -------------------------------- ### CreditScore Entity Example (JSON) Source: https://context7.com/credittimeline/spec/llms.txt Captures provider-specific credit scores with their ranges, bands, and contributing factors. Scores are attributable to a specific import via source_import_id enabling historical score tracking across agencies. ```json { "score_id": "score_eqf_01", "score_type": "credit_score", "score_name": "Equifax Credit Score", "score_value": 720, "score_min": 0, "score_max": 1000, "score_band": "Good", "calculated_at": "2026-02-07", "score_factors": [ "Long credit history", "Low utilization" ], "source_import_id": "imp_2026_02_07_eqf" } ``` -------------------------------- ### Tradeline Entity Example (JSON) Source: https://context7.com/credittimeline/spec/llms.txt A Tradeline represents a credit account, such as a mortgage or credit card. It contains identifiers, terms, point-in-time snapshots, and monthly metrics for historical data. The `canonical_id` ensures consistent identification across different imports. ```json { "tradeline_id": "tl_halifax_mortgage_01", "canonical_id": "canon_halifax_mortgage_01", "furnisher_organisation_id": "org_halifax", "account_type": "mortgage", "opened_at": "2024-08-20", "status_current": "up_to_date", "repayment_frequency": "monthly", "regular_payment_amount": 163400, "identifiers": [ { "identifier_id": "tid_01", "identifier_type": "masked_account_number", "value": "XXXXXXXXXXX300P", "source_import_id": "imp_2026_02_07_eqf" } ], "terms": { "terms_id": "terms_01", "term_type": "mortgage", "term_count": 420, "term_payment_amount": 163400, "source_import_id": "imp_2026_02_07_eqf" }, "snapshots": [ { "snapshot_id": "snap_01", "as_of_date": "2026-01-13", "status_current": "active", "current_balance": 33251100, "opening_balance": 0, "delinquent_balance": 0, "source_import_id": "imp_2026_02_07_eqf" } ], "monthly_metrics": [ { "monthly_metric_id": "mm_01", "period": "2025-12", "metric_type": "payment_status", "value_text": "0", "canonical_status": "up_to_date", "raw_status_code": "0", "source_import_id": "imp_2026_02_07_eqf" }, { "monthly_metric_id": "mm_02", "period": "2025-12", "metric_type": "balance", "value_numeric": 33251100, "source_import_id": "imp_2026_02_07_eqf" } ], "source_import_id": "imp_2026_02_07_eqf" } ``` -------------------------------- ### Public Records and Fraud Markers Example (JSON) Source: https://context7.com/credittimeline/spec/llms.txt JSON structure illustrating the representation of public records (like CCJs and bankruptcies) and fraud markers (like CIFAS) within the CreditTimeline v1 schema. It includes details such as record types, dates, amounts, and associated addresses. ```json { "public_records": [ { "public_record_id": "pr_01", "record_type": "ccj", "court_or_register": "County Court", "amount": 150000, "recorded_at": "2023-06-15", "satisfied_at": "2024-01-20", "status": "satisfied", "address_id": "addr_prev_01", "source_import_id": "imp_2026_02_07_eqf" } ], "fraud_markers": [ { "fraud_marker_id": "fm_01", "scheme": "cifas", "marker_type": "protective_registration", "placed_at": "2025-01-15", "expires_at": "2027-01-15", "address_scope": "current", "source_import_id": "imp_2026_02_07_eqf" } ] } ``` -------------------------------- ### Dispute Entity Example (JSON) Source: https://context7.com/credittimeline/spec/llms.txt JSON object representing a dispute lodged against a credit file entry in CreditTimeline v1. It includes fields for the dispute ID, the entity being disputed, dates, status, and associated import information for tracking provenance. ```json { "dispute_id": "disp_01", "entity_domain": "tradeline", "entity_id": "tl_halifax_mortgage_01", "opened_at": "2026-02-07", "status": "open", "notes": "Customer requested validation of account opening date.", "source_import_id": "imp_2026_02_07_eqf" } ``` -------------------------------- ### Address and AddressAssociation Entities Example (JSON) Source: https://context7.com/credittimeline/spec/llms.txt Addresses are normalized postal records stored separately from their associations. The AddressAssociation entity links subjects to addresses with roles (current, previous, linked) and validity dates, enabling address history tracking. ```json { "addresses": [ { "address_id": "addr_current_01", "line_1": "32 Mitchell Drive", "town_city": "Eastleigh", "county_region": "Hants", "postcode": "SO50 7FU", "country_code": "GB", "normalized_single_line": "32 MITCHELL DRIVE, EASTLEIGH, SO50 7FU" } ], "address_associations": [ { "association_id": "assoc_01", "address_id": "addr_current_01", "role": "current", "valid_from": "2024-09-01", "source_import_id": "imp_2026_02_07_eqf" }, { "association_id": "assoc_02", "address_id": "addr_prev_01", "role": "previous", "valid_to": "2024-09-01", "source_import_id": "imp_2026_02_07_eqf" } ] } ``` -------------------------------- ### Validate Credit Timeline Payload with AJV Source: https://context7.com/credittimeline/spec/llms.txt Validates a canonical credit timeline payload against the JSON Schema using the AJV command-line interface. It specifies the schema version, validation options, and paths to the schema and example data files. ```bash # Validate a canonical payload against the JSON Schema using AJV ajv validate \ --spec=draft2020 \ --strict=false \ --validate-formats=false \ -r schemas/credittimeline-v1-enums.json \ -s schemas/credittimeline-file.v1.schema.json \ -d examples/credittimeline-file.v1.example.json ``` -------------------------------- ### Monetary Values Representation (JSON) Source: https://context7.com/credittimeline/spec/llms.txt Example JSON structure for representing monetary values in CreditTimeline v1. Amounts are stored as integers in minor currency units (e.g., pence for GBP) to prevent floating-point precision issues. The currency code defaults to GBP. ```json { "currency_code": "GBP", "current_balance": 33251100, "credit_limit": 50000000, "regular_payment_amount": 163400, "price_paid": 37800000 } ``` -------------------------------- ### Convert Pence to Formatted Pounds (Python) Source: https://context7.com/credittimeline/spec/llms.txt Python code snippet demonstrating the conversion of monetary values from pence (minor currency units) to a formatted string representing pounds. This is useful for displaying financial data in a human-readable format. ```python # Converting to display format balance_pence = 33251100 balance_pounds = balance_pence / 100 # 332511.00 formatted = f"£{balance_pounds:,.2f}" # £332,511.00 ``` -------------------------------- ### Run Full Validation Suite with Bash Script Source: https://context7.com/credittimeline/spec/llms.txt Executes the complete validation suite for the credit timeline specification using a bash script. This command includes strict policy checks and directs the validation reports to a specified directory. ```bash # Run the full validation suite with strict policy checks bash scripts/validate-spec.sh --strict --report-dir artifacts/validation ``` -------------------------------- ### SQLite Schema - Core Tables (SQL) Source: https://context7.com/credittimeline/spec/llms.txt Defines the core tables for the SQLite database, including provenance tracking fields like source_import_id and source_system. The tradeline_monthly_metric table includes a unique constraint for deduplication. ```sql -- Core provenance tables CREATE TABLE IF NOT EXISTS import_batch ( import_id TEXT PRIMARY KEY, file_id TEXT NOT NULL REFERENCES credit_file(file_id), subject_id TEXT NOT NULL REFERENCES subject(subject_id), imported_at TEXT NOT NULL, currency_code TEXT DEFAULT 'GBP', source_system TEXT NOT NULL, acquisition_method TEXT NOT NULL, mapping_version TEXT ); -- Tradeline with provenance CREATE TABLE IF NOT EXISTS tradeline ( tradeline_id TEXT PRIMARY KEY, canonical_id TEXT, subject_id TEXT NOT NULL REFERENCES subject(subject_id), furnisher_organisation_id TEXT REFERENCES organisation(organisation_id), account_type TEXT, opened_at TEXT, closed_at TEXT, status_current TEXT, source_import_id TEXT NOT NULL REFERENCES import_batch(import_id), source_system TEXT NOT NULL ); -- Monthly metrics with dedupe key CREATE TABLE IF NOT EXISTS tradeline_monthly_metric ( monthly_metric_id TEXT PRIMARY KEY, tradeline_id TEXT NOT NULL REFERENCES tradeline(tradeline_id), period TEXT NOT NULL, metric_type TEXT NOT NULL, value_numeric INTEGER, canonical_status TEXT, raw_status_code TEXT, metric_value_key TEXT NOT NULL, source_import_id TEXT NOT NULL REFERENCES import_batch(import_id), UNIQUE (tradeline_id, period, metric_type, source_import_id, metric_value_key) ); -- Indexes for common queries CREATE INDEX IF NOT EXISTS idx_tradeline_metric_tradeline_period ON tradeline_monthly_metric(tradeline_id, period DESC, metric_type); CREATE INDEX IF NOT EXISTS idx_search_subject_date ON search_record(subject_id, searched_at DESC, visibility); ``` -------------------------------- ### CreditFile Root Object Structure (JSON) Source: https://context7.com/credittimeline/spec/llms.txt The CreditFile object serves as the main envelope for credit report data. It requires essential metadata like schema version, file ID, subject ID, creation timestamp, and at least one import batch. Domain-specific arrays such as tradelines and addresses are optional. ```json { "schema_version": "1.0.0", "file_id": "file_2026_02_07_eqf", "subject_id": "subj_01", "created_at": "2026-02-07T20:00:00Z", "currency_code": "GBP", "imports": [ { "import_id": "imp_2026_02_07_eqf", "imported_at": "2026-02-07T19:58:00Z", "source_system": "equifax", "acquisition_method": "pdf_upload", "mapping_version": "adapter-eqf-0.1.0" } ], "subject": { "subject_id": "subj_01", "names": [ { "name_id": "name_legal_01", "full_name": "Robert Stephen Knight", "name_type": "legal", "source_import_id": "imp_2026_02_07_eqf" } ], "dates_of_birth": [ { "dob": "1990-06-26", "source_import_id": "imp_2026_02_07_eqf", "confidence": "high" } ] }, "addresses": [], "tradelines": [], "searches": [], "credit_scores": [] } ``` -------------------------------- ### Credit Timeline Enumeration Definitions (JSON) Source: https://context7.com/credittimeline/spec/llms.txt Centralized JSON object defining enumeration values for various credit-related fields in CreditTimeline v1. This ensures consistency across different data adapters for fields like source systems, account types, and payment statuses. ```json { "sourceSystem": ["equifax", "transunion", "experian", "other"], "acquisitionMethod": ["pdf_upload", "html_scrape", "api", "image", "other"], "tradelineAccountType": [ "credit_card", "mortgage", "secured_loan", "unsecured_loan", "current_account", "telecom", "utility", "rental", "budget_account", "insurance", "other", "unknown" ], "canonicalPaymentStatus": [ "up_to_date", "in_arrears", "arrangement", "settled", "default", "query", "gone_away", "no_update", "inactive", "written_off", "transferred", "repossession", "unknown" ], "searchType": [ "credit_application", "debt_collection", "quotation", "identity_check", "consumer_enquiry", "aml", "insurance_quote", "other" ], "searchVisibility": ["hard", "soft", "unknown"] } ``` -------------------------------- ### ImportBatch Entity Definition (JSON) Source: https://context7.com/credittimeline/spec/llms.txt The ImportBatch entity details a single data acquisition from a specific source system. It includes provenance information such as the source Credit Reference Agency (CRA), acquisition method, and optional raw data artifacts. All data points must link back to a valid `import_id`. ```json { "import_id": "imp_2026_02_07_eqf", "imported_at": "2026-02-07T19:58:00Z", "currency_code": "GBP", "source_system": "equifax", "source_wrapper": "statutory_direct", "acquisition_method": "pdf_upload", "mapping_version": "adapter-eqf-0.1.0", "confidence_notes": "Address roles and status codes mapped directly from report labels.", "raw_artifacts": [ { "artifact_id": "art_eqf_pdf_01", "artifact_type": "pdf", "sha256": "7a45970e5e2d5b7a21d8f8abed9d0ccf998ca72b1f1df35814f5ca14d987d6a3", "uri": "vault://artifacts/2026/02/eqf-credit-report.pdf" } ] } ``` -------------------------------- ### Payment Status Normalization Mapping (JSON) Source: https://context7.com/credittimeline/spec/llms.txt Payment status codes are normalized from provider-specific codes to canonical statuses. The specification preserves both raw_status_code and canonical_status to maintain provenance while enabling cross-provider analysis. ```json { "payment_status_map": { "equifax": { "0": "up_to_date", "1": "in_arrears", "2": "in_arrears", "D": "default", "S": "settled", "U": "no_update", "G": "gone_away", "W": "written_off" }, "transunion": { "0": "up_to_date", "UC": "no_update", "?": "unknown", "D": "default", "S": "settled" } } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.