إضافة مبنى فرعي إلى العنوان - أمثلة (الولايات المتحدة فقط)
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يوضّح هذا المستند عددًا من السيناريوهات الواقعية التي تقدّم فيها واجهة برمجة التطبيقات Address Validation API إشارات استجابة تضمن سلوك إضافة مبانٍ فرعية من نظامك. تتوفّر هذه الإشارات لعناوين الولايات المتحدة فقط.
اطّلِع على أمثلة على سير العمل في مقالة إنشاء منطق التحقّق من الصحة للحصول على السياق.
مثال شائع: إضافة أماكن فرعية
يوضّح هذا السيناريو عنوانًا قد يطلب فيه نظامك من العميل إضافة رقم وحدة إلى العنوان.
يغطّي المثال التالي حالة يشير فيها verdict إلى مشاكل في جودة العنوان تستدعي إجراء المزيد من التحقيقات. توضّح هذه الأمثلة أيضًا كيف يمكن أن تنتقل منطقك من الحكم إلى مكوّنات العنوان للحصول على صورة أكثر اكتمالاً من أجل تحسين منطق نظامك.
المباني الفرعية غير المتوفّرة والمكوّنات المستنتَجة والمستبدَلة
يوضّح هذا المثال إدخال عنوان في الولايات المتحدة يتضمّن منطقة غير متوفّرة ورمزًا بريديًا غير صحيح.
تم إدخال العنوان
المنطقة
1450 Brickell Avenue, FL 33132-4065
الولايات المتحدة
حكم بشأن الأماكن الفرعية غير المتوفّرة والمكوّنات المستنتَجة والمستبدَلة
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["This document describes a number of real-world scenarios where the\nAddress Validation API provides response signals that warrant an *add subpremises*\nbehavior from your system. These signals are only available for US addresses.\nSee [Example workflows](/maps/documentation/address-validation/build-validation-logic#example-workflows) in\n**Build your validation logic** for context.\n| **Note:** The examples here are illustrative, but don't cover all scenarios.\n\nCommon example: add subpremises\n\nThis scenario illustrates an address in which your system might prompt a\ncustomer to add a unit number to the address.\n\n| Address entered | Region |\n|--------------------------------------------|--------|\n| 1450 Brickell Avenue, Miami, FL 33131-4065 | US |\n\nVerdict for an address missing a subpremises\n\nThe example below highlights the important signal. \n\n {\n \"inputGranularity\": \"PREMISE\",\n \"validationGranularity\": \"PREMISE\",\n \"geocodeGranularity\": \"PREMISE\",\n \"possibleNextAction\": \"CONFIRM_ADD_SUBPREMISES\"\n }\n\n| **Action:** For this address, you might prompt your user to add a unit number.\n\nEdge case example: add subpremises\n\nThe following example covers a situation in which the `verdict` indicates\naddress quality issues that warrant further investigation. This examples also\nillustrates how your logic can travel from the verdict to the address components\nto obtain a more complete picture in order to enhance your system logic.\n\nMissing subpremises and inferred and replaced components\n\nThis example illustrates entry of a US address with a missing locality and an\nincorrect postal code.\n\n| Address entered | Region |\n|-------------------------------------|--------|\n| 1450 Brickell Avenue, FL 33132-4065 | US |\n\nVerdict for a missing subpremises and inferred and replaced components \n\n {\n \"inputGranularity\": \"PREMISE\",\n \"validationGranularity\": \"PREMISE\",\n \"geocodeGranularity\": \"PREMISE\",\n \"hasInferredComponents\": true,\n \"hasReplacedComponents\": true,\n \"possibleNextAction\": \"CONFIRM_ADD_SUBPREMISES\"\n }\n\nFurther investigation of the address components reveals that the locality has\nbeen inferred, and the postal code has been replaced. \n\n {\n \"componentName\": {\n \"text\": \"33131\",\n }\n \"componentType\": \"postal_code\",\n \"confirmationLevel\": \"CONFIRMED\",\n \"replaced\": true\n },\n {\n \"componentName\": {\n \"text\": \"Miami\",\n \"languageCode\": \"en\"\n }\n \"componentType\": \"locality\",\n \"confirmationLevel\": \"CONFIRMED\",\n \"inferred\": true\n }\n\n| **Action:** For this address, you might prompt your user to add a unit number, or prompt them to review the entire address."]]