Articles on: Online Ordering

How do I add Google API Key to enable Address lookup and Delivery Polygon zones

Use Google to automatically validate the postcodes and addresses the user enters, and minimise issues with incorrect addresses.


Requirements


  • Google Account
  • To be created by an advanced user
  • Will need credit card details only for verification purposes for billing (Google will not charge).


Open your web browser

Get an API KEY


  1. Click here to go to Google Cloud Platform Console.
  2. From the Project drop-down menu (in header), select or create the project for which you want to add an API key.
  3. From the Navigation menu, select APIs & Services > Library
  4. From the Maps APIs > Select these APIs to add them to Enabled APIs
  5. Places API
  6. Geocoding API
  7. Directions API
  8. Maps JavaScript API
  9. Distance Matrix API
  10. From the Navigation menu, select APIs & Services > Credentials.
  11. On the Credentials page, click Create credentials > API key > Name it Website
    The API key created dialog displays your newly created API key (an encrypted string).  
  12. On this Website API Key > Edit icon > Application Restrictions > Select HTTP referrers (websites) > Enter your website url(s) including any Virtual Brands > mydomain.com/*> See underneath on how to enter the URLs.
  13. SAVE (Note: Take care at the end of URL insert " **/*** ")


  •         A specific URL with an exact path:  ****www.example.com/path*****
  • -Any URL in a single domain with no subdomains, using a wildcard asterisk (*): **example.com/***
  • -Any URL in a single subdomain, using a wildcard asterisk (*): **sub.example.com/***
  • -Any subdomain or path URLs in a single domain, using wildcard asterisks (*): .example.com/
  • -A URL with a non-standard port:  **www.example.com:8000/***



  • 9. Again, on the Credentials page, click Create credentials > API key > Name it Server


  • Make sure Application Restriction is set ->  'None'
  • The API key created dialog displays your newly created API key (an encrypted string).


       

  1. Click  'Save' &  'Close'.


       

  1. The new API keys are listed on the Credentials page under API keys. Copy them <CTRL C> on keyboard



Add a billing account


       

  1. Go to the navigation menu


       

  1. Select Billing


       

  1. Add billing details


Back Office


  1. Go to Company > Setup > Online Ordering > Domain
  2. Paste the Website API Key into Google API Key (Website)
  3. Paste the Server API Key into Google API Key (Server)
  4. Update


Make sure google polygons is activated on the company website : 


**Setup > Online Ordering > Website > Settings > Delivery > Turn ON Google Polygons **


To check that the postcode address lookup is enabled. Access your website and type in a postcode.


Do not enable zones on Store Level


Only enter API  keys at the company level


Do not touch polygon settings in-store level

You will now be eligible for 10,000 requests per month without charge.

Updated on: 19/11/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!