想象一个具有标准结账流程的标准网上商店,客户必须输入有效的送货地址。我正在寻找UPS Address Validation - Street Level API的良好用法,但似乎无法掌握如何以有意义的方式使用该建议。
设想
客户正确的地址是
2060 N 肯塔基
州圣阿灵顿弗吉尼亚州 22205
美国
案例:客户输入错误的门牌号
他输入2600而不是2060
来自 API 的建议
"Candidate": [{
"AddressKeyFormat": {
"AddressLine": "2600 S KENT ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22202",
"PostcodeExtendedLow": "2218",
"Region": "ARLINGTON VA 22202-2218",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "1000-1098 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "2310",
"Region": "ARLINGTON VA 22205-2310",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "1001-1099 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "2309",
"Region": "ARLINGTON VA 22205-2309",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "1100-1198 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "3516",
"Region": "ARLINGTON VA 22205-3516",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "1101-1199 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "3515",
"Region": "ARLINGTON VA 22205-3515",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "1500-1598 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "2825",
"Region": "ARLINGTON VA 22205-2825",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "1501-1599 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "2824",
"Region": "ARLINGTON VA 22205-2824",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "1800-1899 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "2826",
"Region": "ARLINGTON VA 22205-2826",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "2000-2098 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "3218",
"Region": "ARLINGTON VA 22205-3218",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "2001-2099 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "3217",
"Region": "ARLINGTON VA 22205-3217",
"CountryCode": "US"
}
}, {
"AddressKeyFormat": {
"AddressLine": "2100-2199 N KENTUCKY ST",
"PoliticalDivision2": "ARLINGTON",
"PoliticalDivision1": "VA",
"PostcodePrimaryLow": "22205",
"PostcodeExtendedLow": "3219",
"Region": "ARLINGTON VA 22205-3219",
"CountryCode": "US"
}
}
...
对客户有什么建议?
当然,向客户提供第一个建议是有意义的
“您是说 2600 S KENT ST”吗?
AddressLine
但是,如果元素包含一系列门牌号码,您将如何呈现其余选项。
1000-1098 N 肯塔基街
问题
你见过或实施过这样的事情吗?- 请提供一个可以找到它的链接 非常感谢任何提示