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.
Google Account
To be created by an advanced user
Will need credit card details only for verification purposes for billing (Google will not charge).
Click here to go to Google Cloud Platform Console.
From the Project drop-down menu (in header), select or create the project for which you want to add an API key.
From the Navigation menu, select APIs & Services > Library
From the Maps APIs > Select these APIs to add them to Enabled APIs
Places API
Geocoding API
Directions API
Maps JavaScript API
Distance Matrix API
From the Navigation menu, select APIs & Services > Credentials.
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).
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.
SAVE (Note: Take care at the end of URL insert " /* ")
A specific URL with an exact path: [www.example.com/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/](//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).
Click 'Save' & '**Close'.**
The new API keys are listed on the Credentials page under API keys. Copy them <CTRL C> on keyboard
Go to the navigation menu
Select Billing
Add billing details
Go to Company > Setup > Online Ordering > Domain
Paste the Website API Key into Google API Key (Website)
Paste the Server API Key into Google API Key (Server)
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.
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
Click here to go to Google Cloud Platform Console.
From the Project drop-down menu (in header), select or create the project for which you want to add an API key.
From the Navigation menu, select APIs & Services > Library
From the Maps APIs > Select these APIs to add them to Enabled APIs
Places API
Geocoding API
Directions API
Maps JavaScript API
Distance Matrix API
From the Navigation menu, select APIs & Services > Credentials.
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).
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.
SAVE (Note: Take care at the end of URL insert " /* ")
A specific URL with an exact path: [www.example.com/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/](//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).
Click 'Save' & '**Close'.**
The new API keys are listed on the Credentials page under API keys. Copy them <CTRL C> on keyboard
Add a billing account
Go to the navigation menu
Select Billing
Add billing details
Back Office
Go to Company > Setup > Online Ordering > Domain
Paste the Website API Key into Google API Key (Website)
Paste the Server API Key into Google API Key (Server)
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
Thank you!