Validate addresses using specific templates customized for each country and tailored to various business scenarios. This validation ensures that the data conforms to the information currently stored in the system.
Arguments
countryIsoCode
StringThe ISO 3166-1 alpha-2 code representing the country (e.g., "IN" for India, "US" for the United States).
templateName
templateNameEnumThe type of address form.
validateAddressRequestInput
ValidateAddressRequestInputValidate the detail of a given address.
Response
address
StringComplete address, combining address line 1, address line 2, area, landmark, sector, city, state, and pincode.
address1
StringFirst line of the address, typically containing street or building information.
address2
StringSecond line of the address, which can be used for additional address details if needed.
area
StringLocality or area associated with the address.
landmark
StringProminent nearby landmark that aids in locating the address.
pincode
StringPostal code or PIN code of the address area.
sector
StringSpecifies the sector or district of the address if applicable.
city
StringDenote the city or municipality of the address.
state
StringIndicates the state or province of the address.
name
StringRecipient's name associated with the address.
phone
StringRecipient's contact phone number.
email
StringRecipient's email address.
Mutation
1mutation validateAddress(2 $countryIsoCode: String3 $templateName: templateNameEnum4 $validateAddressRequestInput: ValidateAddressRequestInput5) {6 validateAddress(7 countryIsoCode: $countryIsoCode8 templateName: $templateName9 validateAddressRequestInput: $validateAddressRequestInput10 ) {11 address12 address113 address214 area15 landmark16 pincode17 sector18 city19 state20 name21 phone22 email23 }24}
Try it
Input Variables
1{2 "countryIsoCode": "countryIsoCode",3 "templateName": "checkout_form",4 "validateAddressRequestInput": {5 "address": "2832 Sesame Street",6 "address1": "address1",7 "address2": "address2",8 "area": "area",9 "landmark": "landmark",10 "pincode": "pincode",11 "sector": "sector",12 "city": "Montreal",13 "state": "Quebec",14 "name": "A name",15 "phone": "1+ 418-323-4236",16 "email": "test-email@yourcompany.com"17 }18}
Response
1{2 "validateAddress": {3 "address": "2832 Sesame Street",4 "address1": "address1",5 "address2": "address2",6 "area": "area",7 "landmark": "landmark",8 "pincode": "pincode",9 "sector": "sector",10 "city": "Montreal",11 "state": "Quebec",12 "name": "A name",13 "phone": "1+ 418-323-4236",14 "email": "test-email@yourcompany.com"15 }16}
Was this section helpful?