Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài liệu này mô tả một số trường hợp thực tế mà API Xác thực địa chỉ cung cấp các tín hiệu phản hồi đảm bảo hành vi chấp nhận từ hệ thống của bạn. Xem Ví dụ về quy trình công việc trong phần Tạo logic xác thực để biết bối cảnh.
Ví dụ thường gặp: chấp nhận
Trường hợp này minh hoạ một địa chỉ mà hệ thống của bạn sẽ chấp nhận địa chỉ do khách hàng nhập.
Khi kết hợp với nhau, những tín hiệu này cho thấy một địa chỉ chất lượng cao.
Ví dụ về trường hợp đặc biệt: chấp nhận
Các ví dụ sau đây đề cập đến những trường hợp mà verdict cho biết địa chỉ có vấn đề về chất lượng cần được điều tra thêm. Những ví dụ này cũng minh hoạ cách logic của bạn có thể chuyển từ kết quả sang các thành phần địa chỉ để có được thông tin đầy đủ hơn nhằm nâng cao logic hệ thống.
Số đường phố chưa được xác nhận ở bên ngoài Hoa Kỳ
Ví dụ này minh hoạ việc nhập một địa chỉ ở Ý có tất cả các thành phần địa chỉ, cùng với việc không có thành phần nào được suy luận hoặc thay thế. Tuy nhiên, validationGranularity là ROUTE.
Địa chỉ đã nhập
Khu vực
Via Fonte Grugnale, 14 unit 2, 66054 Vasto CH, Italia
Ví dụ này minh hoạ việc nhập một địa chỉ ở Hoa Kỳ có tất cả các thành phần địa chỉ, không có thành phần nào được suy luận hoặc thay thế. Tuy nhiên, validationGranularity là PREMISE_PROXIMITY.
Dữ liệu không đầy đủ của USPS cho một địa chỉ đã xác nhận
Ví dụ này minh hoạ việc nhập một địa chỉ ở Hoa Kỳ với tất cả các thành phần địa chỉ đã được xác nhận, không có thành phần nào được suy luận hoặc thay thế và validationGranularity là PREMISE. Tuy nhiên, uspsData chưa được điền đầy đủ và không chứa giá trị dpvConfirmation.
Địa chỉ đã nhập
Khu vực
155 Via Condado Way, Palm Beach Gardens, FL 33418-1703
Hoa Kỳ
Kết quả cho một địa chỉ đã xác nhận nhưng có dữ liệu không đầy đủ của USPS
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eThe Address Validation API provides signals to determine if an address should be accepted by your system, even with minor uncertainties.\u003c/p\u003e\n"],["\u003cp\u003eAddresses with \u003ccode\u003evalidationGranularity\u003c/code\u003e of \u003ccode\u003ePREMISE\u003c/code\u003e and no unconfirmed/inferred/replaced components are generally safe to accept.\u003c/p\u003e\n"],["\u003cp\u003eAddresses with \u003ccode\u003eUNCONFIRMED_BUT_PLAUSIBLE\u003c/code\u003e street numbers can be accepted, but consider prompting the customer for confirmation for higher confidence.\u003c/p\u003e\n"],["\u003cp\u003eUS addresses with \u003ccode\u003edpvConfirmation\u003c/code\u003e of 'N' might require customer confirmation or correction, depending on your system's confidence requirements.\u003c/p\u003e\n"],["\u003cp\u003eEven with incomplete USPS data, addresses with \u003ccode\u003evalidationGranularity\u003c/code\u003e of \u003ccode\u003ePREMISE\u003c/code\u003e can often be accepted, but consider prompting the customer for confirmation.\u003c/p\u003e\n"]]],[],null,["This document describes a number of real-world scenarios where the\nAddress Validation API provides response signals that warrant an *accept* behavior\nfrom your system. See\n[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: accept\n\nThis scenario illustrates an address in which your system would accept an\naddress entered by a customer.\n\n| Address entered | Region |\n|--------------------------------------------|--------|\n| 76 Buckingham Palace Road, London SW1W 9TQ | UK |\n\nVerdict for an acceptable address\n\nThe example below highlights the important signals. \n\n {\n \"inputGranularity\": \"PREMISE\",\n \"validationGranularity\": \"PREMISE\",\n \"geocodeGranularity\": \"PREMISE\",\n \"addressComplete\": true\n }\n\nIn addition to this, the response indicates the following:\n\n- `hasUnconfirmedComponents` remains `false`\n- `hasInferredComponents` remains `false`\n- `hasReplacedComponents` remains `false`\n- `hasSpellCorrectedComponents` remains `false`\n\nWhen combined together, these signals indicate a high-quality address.\n| **Action:** Accept.\n\nEdge case examples: accept\n\nThe following examples cover situations in which the `verdict` indicates address\nquality issues that warrant further investigation. These examples also\nillustrate 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\nNon-US unconfirmed street number\n\nThis example illustrates entry of an Italian address with all address components\npresent, along with no inferred or replaced components. However, the\n`validationGranularity` is `ROUTE`.\n\n| Address entered | Region |\n|-------------------------------------------------------|--------|\n| Via Fonte Grugnale, 14 unit 2, 66054 Vasto CH, Italia | IT |\n\nVerdict for an unconfirmed street number \n\n {\n \"inputGranularity\": \"SUB_PREMISE\",\n \"validationGranularity\": \"ROUTE\",\n \"geocodeGranularity\": \"ROUTE\",\n \"addressComplete\": true,\n \"hasUnconfirmedComponents\": true\n }\n\nFurther investigation of the address components reveals that the street\nnumber is `UNCONFIRMED_BUT_PLAUSIBLE`. \n\n {\n \"text\": \"14\",\n \"componentType\": \"street_number\",\n \"confirmationLevel\": \"UNCONFIRMED_BUT_PLAUSIBLE\"\n }\n\n| **Action:** This address can be accepted without further prompting. However, for a higher confidence level, you can prompt the customer to confirm the address. See [Implementation guidance](/maps/documentation/address-validation/build-validation-logic#implementation_guidance) in **Build your validation logic** for more details.\n\nUS unconfirmed street number\n\nThis example illustrates entry of a US address with all address components\npresent, with no inferred or replaced components. However, the\n`validationGranularity` is `PREMISE_PROXIMITY`.\n\n| Address entered | Region |\n|------------------------------------|--------|\n| 975 Carson Dr, Sunnyvale, CA 94086 | US |\n\nUSPS data for an unconfirmed street number \n\n {\n \"firstAddressLine\": \"975 CARSON DR\",\n \"cityStateZipAddressLine\": \"SUNNYVALE CA 94086\",\n \"city\": \"SUNNYVALE\",\n \"state\": \"CA\",\n \"zipCode\": \"94086\"\n \"dpvConfirmation\": \"N\",\n \"dpvFootnote\": \"AAM3\",\n \"carrierRoute\": \"C031\",\n \"carrierRouteIndicator\": \"D\",\n \"postOfficeCity\": \"SUNNYVALE\",\n \"postOfficeState\": \"CA\",\n \"fipsCountyCode\": \"085\",\n \"county\": \"SANTA CLARA\",\n }\n\n| **Action:** Fix. This example is similar to the previous one, and the address can be accepted as entered. However, the additional `dpvConfirmation` code of `N` provides a strong signal to confirm the address with the customer or prompt them to fix it. The behavior you choose for this case ultimately depends on your required confidence level. See [Implementation guidance](/maps/documentation/address-validation/build-validation-logic#implementation_guidance) in **Build your validation logic** for more details.\n\nIncomplete USPS data for a confirmed address\n\nThis example illustrates entry of a US address with all address components\nconfirmed, with no inferred or replaced components, and a\n`validationGranularity` of `PREMISE`. However, the `uspsData` is not fully\npopulated, and does not contain a `dpvConfirmation` value.\n\n| Address entered | Region |\n|--------------------------------------------------------|--------|\n| 155 Via Condado Way, Palm Beach Gardens, FL 33418-1703 | US |\n\nVerdict for a confirmed address with incomplete USPS data \n\n {\n \"inputGranularity\": \"PREMISE\",\n \"validationGranularity\": \"PREMISE\",\n \"geocodeGranularity\": \"PREMISE\",\n \"addressComplete\": true,\n }\n\nUSPS data for a confirmed address with incomplete USPS data \n\n {\n \"standardizedAddress\": {\n \"firstAddressLine\": \"155 VIA CONDADO WAY\",\n \"cityStateZipAddressLine\": \"PALM BEACH GARDENS\",\n \"city\": \"PALM BEACH GARDENS\",\n \"state\": \"FL\",\n \"zipCode\": \"33418\"\n },\n \"carrierRoute\": \"H018\",\n \"postOfficeCity\": \"PALM BEACH GARDENS\",\n \"postOfficeState\": \"FL\"\n }\n\n| **Action:** Accept. Even though the address is not DPV confirmed by the USPS, the `validationGranularity` of `PREMISE` gives a strong signal that this is a valid address. However, for a higher confidence level, you can prompt the customer to confirm the address. See [Implementation guidance](/maps/documentation/address-validation/build-validation-logic#implementation_guidance) in **Build your validation logic** for more details.\n| **Note:** The service receives updated USPS data periodically, so this example may no longer return incomplete USPS data. This example is meant to be illustrative rather than an accurate portrayal of the API response for this address."]]