معلومات بادئة هاتف
معلومة مهمة. التحقق من الصيغة وبادئات Google محلياً. لا تكشف هوية المشترك أو نشاط الخط أو المشغّل الحالي أو الموقع الفعلي.
فهم الإجابة
data: النتائج المطلوبة، في كائن أو قائمة.
meta: مصادر البيانات ورخصتها وتواريخها. تعني null أن القيمة غير معروفة أو غير متاحة.
API v2 هو المسار المرجعي. تبقى مسارات /api/v1 القديمة أسماء بديلة متوافقة مع السلوك المنشور حالياً، بما فيه تقسيم الصفحات؛ لم يُحدد موعد لحذفها.
حقول الإجابة 26
تشير [] إلى كل عنصر في القائمة. تعني null غير معروف أو غير متاح، ولا تعني صفراً. لغة الدليل لا تترجم قيم المصادر.
dataobjectالنتيجة المطلوبة: كائن واحد أو قائمة.
data.is_possiblebooleanطول الرقم متوافق مع مخطط الترقيم؛ لا يثبت وجود الرقم.
data.is_valid_formatbooleanالصيغة مطابقة لبيانات المحلل؛ لا تثبت تخصيص الرقم أو إمكانية الاتصال به.
data.is_allocated_rangenullغير معروف هنا: بيانات البادئات ليست سجلاً رسمياً لتخصيص الأرقام.
القيم المقبولة:
nulldata.has_known_prefixbooleanتوجد بادئة مطابقة في البيانات، بصرف النظر عن صلاحية الرقم.
data.e164string | nullالرقم الدولي الموحد مع +212، رمز الاتصال بالمغرب.
data.national_numberstring | nullالرقم بالصيغة الوطنية المغربية مع الصفر الأول.
data.number_typestring | nullالنوع الذي يتعرف عليه المحلل، مثل الهاتف المحمول أو الثابت.
data.reasonstring | nullرمز يوضح سبب رفض الرقم؛ null عند عدم وجود سبب للرفض.
data.matched_prefixstring | nullالبادئة الأكثر تحديداً المطابقة لهذا الرقم.
data.original_operatorobject | nullالمشغل المرتبط بالبادئة في المصدر؛ قد يختلف عن المشغل الحالي.
data.original_operator.codestringمعرّف المشغل داخل كائن المشغل؛ وبادئة وطنية داخل المنطقة الهاتفية.
data.original_operator.namestringاسم المورد، وقد يكون موزّعاً حسب اللغة.
data.current_operatornullغير معروف: تتيح قابلية نقل الرقم تغيير المشغل مع الاحتفاظ بالرقم.
القيم المقبولة:
nulldata.geographic_areaobject | nullالمنطقة المرتبطة بالبادئة، وليست الموقع الفعلي للمتصل.
data.geographic_area.codestringمعرّف المشغل داخل كائن المشغل؛ وبادئة وطنية داخل المنطقة الهاتفية.
data.geographic_area.international_prefixstringالصيغة الدولية للبادئة، باستبدال الصفر الأول بـ+212.
data.geographic_area.descriptionobjectوصف البادئة باللغات المتاحة.
data.geographic_area.description.arnullالقيمة بالعربية؛ null عند غياب الترجمة.
القيم المقبولة:
nulldata.geographic_area.description.frstringالقيمة بالفرنسية؛ null عند غياب الترجمة.
data.geographic_area.description.enstringالقيمة بالإنجليزية؛ null عند غياب الترجمة.
data.geographic_area.areasobjectالمناطق المخدومة حسب المصدر، موزّعة حسب اللغة؛ وليست حدوداً إدارية دقيقة.
data.geographic_area.areas.arnullالقيمة بالعربية؛ null عند غياب الترجمة.
القيم المقبولة:
nulldata.geographic_area.areas.frstring[]القيمة بالفرنسية؛ null عند غياب الترجمة.
data.geographic_area.areas.enstring[]القيمة بالإنجليزية؛ null عند غياب الترجمة.
data.geographic_area.hcp_codenullnull: لا يتوفر ربط إداري مؤكد مع HCP لهذه المناطق الهاتفية.
القيم المقبولة:
null
بنية البيانات
{
"type": "object",
"additionalProperties": false,
"required": [
"data",
"meta"
],
"properties": {
"data": {
"type": "object",
"additionalProperties": false,
"required": [
"is_possible",
"is_valid_format",
"is_allocated_range",
"has_known_prefix",
"e164",
"national_number",
"number_type",
"reason",
"matched_prefix",
"original_operator",
"current_operator",
"geographic_area"
],
"properties": {
"is_possible": {
"type": "boolean",
"description": "Length compatibility with the numbering plan."
},
"is_valid_format": {
"type": "boolean",
"description": "Validity against the pinned parser metadata; does not prove line assignment or reachability."
},
"is_allocated_range": {
"type": "string",
"description": "Unknown: the prefix mapping dataset is not an official allocation registry.",
"nullable": true,
"enum": [
null
]
},
"has_known_prefix": {
"type": "boolean",
"description": "A prefix mapping exists, independently of format validity."
},
"e164": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"national_number": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"number_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"reason": {
"anyOf": [
{
"enum": [
"INVALID_CHARACTERS",
"INVALID_LENGTH",
"NOT_MOROCCAN",
"INVALID_NUMBER_PATTERN"
]
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"matched_prefix": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"original_operator": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"code",
"name"
],
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"current_operator": {
"type": "string",
"description": "Cannot be inferred from a prefix after number portability.",
"nullable": true,
"enum": [
null
]
},
"geographic_area": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"code",
"international_prefix",
"description",
"areas",
"hcp_code"
],
"properties": {
"code": {
"type": "string",
"minLength": 2,
"maxLength": 6,
"pattern": "^0[5-8][0-9]{0,4}$"
},
"international_prefix": {
"type": "string"
},
"description": {
"type": "object",
"additionalProperties": false,
"required": [
"ar",
"fr",
"en"
],
"properties": {
"ar": {
"type": "string",
"nullable": true,
"enum": [
null
]
},
"fr": {
"type": "string"
},
"en": {
"type": "string"
}
}
},
"areas": {
"type": "object",
"additionalProperties": false,
"required": [
"ar",
"fr",
"en"
],
"properties": {
"ar": {
"type": "string",
"nullable": true,
"enum": [
null
]
},
"fr": {
"type": "array",
"items": {
"type": "string"
}
},
"en": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"hcp_code": {
"type": "string",
"nullable": true,
"enum": [
null
]
}
}
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
}
}
},
"meta": {
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"total",
"license",
"retrieved_at",
"transformation_version",
"sources"
],
"properties": {
"dataset": {
"enum": [
"phone-numbers"
]
},
"total": {
"type": "integer",
"minimum": 0
},
"license": {
"enum": [
"Apache-2.0"
]
},
"retrieved_at": {
"type": "string",
"format": "date"
},
"transformation_version": {
"type": "string"
},
"sources": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"producer",
"source_url",
"resource_url",
"license",
"source_updated_at"
],
"properties": {
"dataset": {
"type": "string"
},
"producer": {
"type": "string"
},
"source_url": {
"type": "string",
"format": "uri"
},
"resource_url": {
"type": "string",
"format": "uri"
},
"license": {
"enum": [
"Apache-2.0"
]
},
"source_updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
}
}
}
}
}
}
}
}المصادر وتقسيم الصفحات 13
metaobjectسياق النتيجة: المصادر والتواريخ والرخصة وتقسيم الصفحات عند الاقتضاء.
meta.datasetstringاسم مجموعة البيانات الخاصة بالنتيجة أو المصدر.
القيم المقبولة:
"phone-numbers"meta.totalintegerعدد النتائج المطابقة للمرشحات قبل تقسيم الصفحات؛ وليس حجم هذه الصفحة.
meta.licensestringرخصة إعادة الاستخدام. تعني mixed وجود رخص مختلفة: راجع كل مصدر.
القيم المقبولة:
"Apache-2.0"meta.retrieved_atstringتاريخ جلب المشروع لملف المصدر؛ وليس تاريخ رصد البيانات.
meta.transformation_versionstringإصدار قواعد تحويل مجموعة البيانات؛ مستقل عن إصدار الواجهة.
meta.sourcesobject[]المصادر المستخدمة لهذه النتيجة مع الجهات المنتجة والرخص.
meta.sources[].datasetstringاسم مجموعة البيانات الخاصة بالنتيجة أو المصدر.
meta.sources[].producerstringالجهة التي تنشر البيانات الأصلية.
meta.sources[].source_urlstringصفحة نشر المصدر أو التعريف ببياناته.
meta.sources[].resource_urlstringرابط الملف أو المورد المستخدم فعلياً.
meta.sources[].licensestringرخصة إعادة الاستخدام. تعني mixed وجود رخص مختلفة: راجع كل مصدر.
القيم المقبولة:
"Apache-2.0"meta.sources[].source_updated_atstring | nullآخر تحديث معلن من المصدر؛ وليس تاريخ جلب الملف.
الأخطاء
400: معامل غير صالح أو مفقود.
تتضمن الأخطاء error.code وerror.message وerror.request_id.
errorobjectتفاصيل الطلب الفاشل؛ تحل محل data وmeta.
error.codestringرمز ثابت للخطأ، مثل RESOURCE_NOT_FOUND؛ استعمله في منطق التطبيق.
error.messagestringشرح مقروء للخطأ؛ استعمل code في منطق التطبيق.
error.request_idstringمعرّف هذا الطلب، يفيد عند الإبلاغ عن مشكلة.