Hi,
I have a use case where i take street name, city, and zip code from user end as free text, and state is to be selected from a dropdown holding all states and form a valid address.
How do i check if the address formed is valid address and exists. if the state is California , then zip code, streets etc should be from California .
Please suggest any forge component or solution to achieve this.
Hey Sneha
I am sure google will provide some test keys, you have to generate them. https://developers.google.com/maps/documentation/address-validation/get-api-key
ThanksShlok Agrawal
Hello Sneha Kumari, I believe what you want is an API instead of a forge component. If you just google it, you will find a huge amount of them. Chose the one that fits you the best :)
In order to integrate APIs in Outsystems, check the following links:
Best regards,
Ana
Yes. Simply if you want to validate that address is validate you should have some source for this. So achieve this there may be many approaches depends on your implementation.
1. As Ana suggested you can use any external API to validate the address.
2. You can also use Google's API to validate address. But it will be paid on the uses basis.
3. You can store data in OS database itself and create entities for City, Zip, State etc. So against these entities values you can check.
regards
Hey @Sneha Kumari
The most comfortable way that I would suggest could be one of 2
Method 1) Have all the city, state and pincode database saved with you and then validate.
Method 2) Use some consume some rest API service and get response from them, for this please refer https://developers.google.com/maps/documentation/address-validation. Here you will find details of how to implement it the
Hi @Shlok Agrawal I am going with method 2 which you suggested , but the issue i am facing is , i am getting error 403 due to api key. Do i need to purchase it? or is it available for free?
Hi Sneha,
You can try it out below for testing purpose,
http://api.zippopotam.us
Thanks.