Using the Address Validation API Reference I noticed a mismatch between what the document states should be received in a response differs from what is actually received in a response.
The documentation states that a response should have the schema:
{
"XAVResponse": {
"Response": {
"ResponseStatus": {
"Code": "s",
"Description": "string"
},
"Alert": [
{
"Code": "string",
"Description": "string"
}
],
"TransactionReference": {
"CustomerContext": "string"
}
},
"ValidAddressIndicator": "string",
"AmbiguousAddressIndicator": "string",
"NoCandidatesIndicator": "string",
"AddressClassification": {
"Code": "s",
"Description": "string"
},
"Candidate": [
{
"AddressClassification": {
"Code": "s",
"Description": "string"
},
"AddressKeyFormat": {
"ConsigneeName": "string",
"AttentionName": "string",
"AddressLine": [
"string"
],
"Region": "string",
"PoliticalDivision2": "string",
"PoliticalDivision1": "string",
"PostcodePrimaryLow": "string",
"PostcodeExtendedLow": "string",
"Urbanization": "string",
"CountryCode": "st"
}
}
]
}
}
Instead, it has the following schema in a real response:
{
"XAVResponse": {
"Response": {
"ResponseStatus": {
"Code": "1",
"Description": "Success"
}
},
"NoCandidatesIndicator": ""
}
}
Below is the request made using the "Try it" feature on the documents page. The request body was just pulled from the sample request in the documentation.
curl 'https://wwwcie.ups.com/api/addressvalidation/v2/1?regionalrequestindicator=False' \
-H 'accept: application/json' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'authorization: Bearer <censored_token>' \
-H 'content-type: application/json' \
-H 'origin: https://developer.ups.com' \
-H 'priority: u=1, i' \
-H 'sec-ch-ua: "Chromium";v="146", "Not-A.Brand";v="24", "Google Chrome";v="146"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-site' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36' \
--data-raw '{"XAVRequest":{"AddressKeyFormat":{"ConsigneeName":"RITZ CAMERA CENTERS-1749","BuildingName":"Innoplex","AddressLine":["26601 ALISO CREEK ROAD","STE D","ALISO VIEJO TOWN CENTER"],"Region":"ROSWELL,GA,30076-1521","PoliticalDivision2":"ALISO VIEJO","PoliticalDivision1":"CA","PostcodePrimaryLow":"92656","PostcodeExtendedLow":"1521","Urbanization":"porto arundal","CountryCode":"US"}}}'
What gives? Why is this suddenly excluding the Candidate property from the response?
Using the Address Validation API Reference I noticed a mismatch between what the document states should be received in a response differs from what is actually received in a response.
The documentation states that a response should have the schema:
Instead, it has the following schema in a real response:
Below is the request made using the "Try it" feature on the documents page. The request body was just pulled from the sample request in the documentation.
What gives? Why is this suddenly excluding the Candidate property from the response?