تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
في بعض الحالات، قد تُجري عدة طلبات إلى واجهة برمجة التطبيقات Address Validation API لعنوان واحد. على سبيل المثال، قد يجري العميل تغييرات على عنوانه بعد الاطّلاع على نتائج عملية التحقّق الأولى. بعد ذلك، عليك إجراء عملية تحقّق ثانية من العنوان المعدَّل.
يوضّح هذا المستند إجراءَين رئيسيَّين يمكنك اتّخاذهما عند إصدار سلسلة من الطلبات للعنوان نفسه إلى Address Validation API. هذه الإجراءات ليست من متطلبات الاستخدام الصارمة، ولكنّها إجراءات مفيدة من جانبك لتحسين جودة البيانات والاستجابة الإجمالية للنظام.
إرسال طلب إلى نقطة النهاية provideValidationFeedback
ضبط الحقل previousResponseID
إرسال طلب provideValidationFeedback
في نهاية سلسلة من عمليات التحقّق، تنصح Google بإجراء طلب إلى Provide Validation Feedback API للإشارة إلى النتيجة النهائية لجميع عمليات التحقّق. يضبط الطلب حقلَين:
conclusion: تشير إلى إصدار التحقّق الذي استخدمته في خدمتك،
سواء كان الإصدار الذي قدّمه المستخدم أو الإصدار الذي تم عرضه من
واجهة Address Validation API.
responseId: يشير إلى رقم تعريف الردّ الأول من واجهة برمجة التطبيقات Address Validation API. يُرجى الاطّلاع على ضبط الحقل previousResponseId أدناه.
يحدّد الحقل responseId نتائج التحقّق من صحة العنوان التي تريد تقديم ملاحظات بشأنها. يجب أن تكون هذه القيمة هي نفسها responseId
القيمة التي تعرضها المكالمة الأولى إلى
الطريقة validateAddress.
راجِع نص الطلب في دليل المرجع الخاص بملاحظات التحقّق.
ضبط الحقل previousResponseID
عند إصدار طلب متابعة إلى Address Validation API لعنوان معيّن، اضبط الحقل previousResponseId.
بالنسبة إلى قيمة previousResponseId، استخدِم القيمة من responseId التي تعرضها واجهة برمجة التطبيقات بعد طلب التحقّق الأوّل.
استخدِم القيمة نفسها لجميع طلبات المتابعة إلى أن تكتمل السلسلة.
تاريخ التعديل الأخير: 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 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eWhen validating an address multiple times, use the \u003ccode\u003eprovideValidationFeedback\u003c/code\u003e endpoint to inform Google of the final address version used.\u003c/p\u003e\n"],["\u003cp\u003eInclude the original response ID in the \u003ccode\u003eprovideValidationFeedback\u003c/code\u003e request and set the \u003ccode\u003epreviousResponseId\u003c/code\u003e for subsequent validation calls to improve data quality and response time.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003econclusion\u003c/code\u003e field in the feedback request indicates whether the user's original, a validated, or another address version was ultimately used.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003epreviousResponseId\u003c/code\u003e helps the API understand the context of the address validation sequence and potentially optimize results.\u003c/p\u003e\n"]]],[],null,["In some cases, you might make multiple calls to the\nAddress Validation API for a single address. For example, the customer might make\nchanges to their address after seeing the results of the first\nvalidation. You then perform a second validation on the updated address.\n\nThis document describes two key actions you can take when you issue a series of\nrequests for the same address to the Address Validation API. These actions are\nnot a strict usage requirement, but a helpful action on your part to improve\noverall data quality and system response.\n\n- Send a request to the `provideValidationFeedback` endpoint\n- Set the `previousResponseID` field\n\nSend a `provideValidationFeedback` request\n\nAt the end of a series of validations, Google recommends making a call to the\nProvide Validation Feedback API to indicate the final outcome of\nall the validations. The request sets two fields:\n\n- `conclusion` --- Indicates the validation version you used in your service, whether it was the one provided by the user, or the one returned from the Address Validation API.\n- `responseId` --- Indicates the response ID of the **first** response from the Address Validation API. See [Set the previousResponseId field](#followup-requests) below.\n\nUse either the\n[provideValidationFeedback](/maps/documentation/address-validation/reference/rest/v1/TopLevel/provideValidationFeedback)\nmethod (REST) or\n[ProvideValidationFeedback](/maps/documentation/address-validationreference/rpc/google.maps.addressvalidation.v1#google.maps.addressvalidation.v1.AddressValidation.ProvideValidationFeedback)\nmethod (gRPC).\n\nThe following example passes a [JSON body](/maps/documentation/address-validation/reference/rest/v1/TopLevel/validateAddress#request-body) to the request defining the\nconclusion: \n\n```json\ncurl -X POST -d '{\n \"conclusion\": \"VALIDATED_VERSION_USED\",\n \"responseId\": \"de22bed8-7f52-44cb-8526-faceac57150a\"\n}' \\\n-H 'Content-Type: application/json' \\\n\"https://addressvalidation.googleapis.com/v1:provideValidationFeedback?key=\u003cvar translate=\"no\"\u003eAPI_KEY\u003c/var\u003e\"\n```\n\n- The `conclusion` field identifies one of the following actions from your side:\n - `VALIDATED_VERSION_USED`: the validated version of the address from the Address Validation API.\n - `USER_VERSION_USED`: the original version provided by the user.\n - `UNVALIDATED_VERSION_USED`: a version that was a result of a prompt to the user, but did not re-validate it with the Address Validation API.\n - `UNUSED`: abandoned the transaction.\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| See [Validation Conclusion](/maps/documentation/address-validation/reference/rest/v1/TopLevel/provideValidationFeedback#validationconclusion) in the reference guide. |\n\n- The `responseId` field specifies which address validation results you are providing feedback for. This value must be the same as the `responseId` value returned by the **first** call to the [validateAddress](/maps/documentation/address-validation/reference/rest/v1/TopLevel/validateAddress) method.\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| See [Request Body](/maps/documentation/address-validation/reference/rest/v1/TopLevel/provideValidationFeedback#request-body) in the validation feedback reference guide. |\n\nSet the `previousResponseID` field\n\nWhen issuing a follow-up request the Address Validation API for a given address, set\nthe `previousResponseId` field.\n\n- For the value of the `previousResponseId`, use the value from the `responseId` returned by API after the **first** validation request.\n- Use this same value for any and all followup requests until the series completes.\n\nThis sequence diagram shows the preferred flow:"]]