Every legal document indexed in Dike is identified by a unique, deterministic Canonical ID. Canonical IDs serve as the universal join key across every endpoint in the platform (/v1/search, /v1/reason, /v1/cite, /v1/document/{id}, and /v1/graph/traverse).
[jurisdiction]-[doc_type]-[year]-[official_number]Canonical ID Syntax Specification
Rendering diagram...
Components
jurisdiction(2 characters, lowercase ISO code):eg: Arab Republic of Egyptsa: Kingdom of Saudi Arabiaae: United Arab Emirates
doc_type(abbreviated document category):leg: Primary Legislation / Statutes / Laws (قانون / نظام)dec: Ministerial, Prime Ministerial, or Royal Decrees (قرار / أمر ملكي / مرسوم)reg: Executive Regulations / Implementing Bylaws (لائحة تنفيذية)cass: Court of Cassation / Supreme Court Judgements (أحكام محكمة النقض / المحكمة العليا)fat: Official Fatawa / State Council Opinions (فتاوى مجلس الدولة / دار الإفتاء)circ: Regulatory Circulars & Directives (تعاميم)
year(4 digits, Gregorian calendar):- For Saudi documents enacted by Hijri calendar, the year is normalized to Gregorian with the Hijri year preserved in metadata.
official_number(alphanumeric identifier):- The promulgated statute, decree, or case number (e.g.
131,45-m,1234-q).
- The promulgated statute, decree, or case number (e.g.
Canonical ID Examples
| Canonical ID | Jurisdiction | Type | Title (Arabic) | Description |
|---|---|---|---|---|
eg-leg-1948-131 | Egypt (EG) | Legislation | القانون المدني المصري رقم 131 لسنة 1948 | Egyptian Civil Code |
eg-leg-1999-17 | Egypt (EG) | Legislation | قانون التجارة رقم 17 لسنة 1999 | Egyptian Commercial Code |
eg-cass-civ-1995-1234 | Egypt (EG) | Case Law | طعن نقض مدني رقم 1234 لسنة 65 ق | Egyptian Civil Cassation Ruling |
sa-leg-2023-191 | Saudi Arabia (SA) | Legislation | نظام المعاملات المدنية (مرسوم م/191 لسنة 1444هـ) | Saudi Civil Transactions Law |
sa-dec-2022-105 | Saudi Arabia (SA) | Decree | قرار مجلس الوزراء رقم 105 | Saudi Cabinet Decision |
ae-leg-2021-33 | UAE (AE) | Legislation | مرسوم بقانون اتحادي رقم 33 لسنة 2021 بشأن تنظيم علاقات العمل | UAE Federal Labour Law Decree |
Canonical ID Lifecycle Across Endpoints
Rendering diagram...
Normalization & Parsing Guarantees
When calling POST /v1/cite, Dike parses raw citations into Canonical IDs deterministically:
- Unicode NFKC Normalization: Strips decorative tatweel (
ـ), normalizes whitespace and diacritics. - Arabic-Indic Digit Folding: Automatically converts Eastern Arabic digits (
١، ٢، ٣) to standard digits (1, 2, 3). - Alef & Hamza Unification: Resolves variants (
أ, إ, آ, ا) to ensure robust pattern matching against statutory gazettes. - Validation: Returns
404 citation_not_foundif the parsed law number has no corresponding entry in the corpus.
Stable Identifier Guarantee
Once assigned, a canonical_id is permanent and will never change across API versions, ensuring your database references and cache keys remain durable.