2 min read
Stores feed integration
You can add information about your physical stores in your Poq app. This means your customers can easily find you in the high street, and find the nearest place that offers collection for products bought in your app.
There are two ways you can include store information in your app. You can either use the CMS to add and update stores, or you can create a feed file that updates on a regular basis.
This documentation is for setting up a store feed.
About the stores feed
The store feed includes location details, geo-location for maps, opening times and whether the store offers a collection service for customers to pick up their orders.
To do this, you need to provide Poq a single CSV or XML file which Poq uses to populate store information in your app.
You can then make this available to Poq via an FTP site or similar method. It is very likely that you are already planning or providing a feed for your product catalogue. You can host the Stores feed in the same location.
Intervals to update store information
Poq uses the store feed file to update store details at agreed regular intervals, so you should aim to keep your store feed as up to date as possible each day.
Talk to your contact at Poq to agree the intervals between store feed updates.
Hosting the feed file
You may host this file on an FTP/SFTP location protected by a username or password, or publicly hosted in a location accessible via standard HTTP protocol. Setting up dedicated connectivity (i.e. VPN) is not supported out of the box and would require custom scoping.
Alternatively, Poq can provide SFTP credentials that can be used to upload your feed file onto our datastore.
File Format
We support both CSV and XML file formats. Both file types are fully supported but we find CSV files easier to work with due to better tooling, smaller file size, and better human readability.
Formatting The Feed
The table below shows the required information that you need to include in the feed, along with other information that you may wish to include.
For every store, your feed needs to contain the following required information, and can include the non-required information:
Latitude and longitude coordinates
You can add the latitude and longitude details of your store so it can be located on a map on their device.
There are several helpful websites where you can find the latitude and longitude of an address, including whatsmygps.com.
The website should provide you with the coordinates as decimal values of latitude and longitude.
For example, the Poq office decimal coordinates are:
Lat: 51.519643
Long: -0.0841096
Make a note of your store's decimal coordinates, they are used to locate it on a map.
Name | Required | Description |
---|---|---|
id | Yes | A unique identifier in your system for the store. |
address | Yes | Street address of the store. |
address2 | No | Second line of address for store, if required. |
city | Yes | City in which the store is located. |
country | Yes | Country in which the store is located. |
postCode | Yes | Postal code for the store. |
latitude | Yes | Decimal latitude coordinate for the store. This is a string. |
longitude | Yes | Decimal longitude coordinate for the store. This is a string. |
title | Yes | Name of the store. This is often based on the location, for example: Poq Store Oxford Street. |
phone | No | Contact telephone number for the store. |
isAvailableForInStoreCollection | No | true or false value to tell customers whether they can collect products bought on the app in this store. |
mondayOpenTime | No | Text value to show opening time on Mondays. |
tuesdayOpenTime | No | Text value to show opening time on Tuesdays. |
wednesdayOpenTime | No | Text value to show opening time on Wednesdays. |
thursdayOpenTime | No | Text value to show opening time on Thursdays. |
fridayOpenTime | No | Text value to show opening time on Fridays. |
saturdayOpenTime | No | Text value to show opening time on Saturdays. |
sundayOpenTime | No | Text value to show opening time on Sundays. |
mondayCloseTime | No | Text value to show closing time on Mondays. |
tuesdayCloseTime | No | Text value to show closing time on Tuesdays. |
wednesdayCloseTime | No | Text value to show closing time on Wednesdays. |
thursdayCloseTime | No | Text value to show closing time on Thursdays. |
fridayCloseTime | No | Text value to show closing time on Fridays. |
saturdayCloseTime | No | Text value to show closing time on Saturdays. |
sundayCloseTime | No | Text value to show closing time on Sundays. |
CSV Files
Your CSV file should be in line with the comma separated values format as defined in RFC 4180 specification. Make sure your feed file includes a header line appearing as the first line of the file.
Sample CSV file template:
id,address,address2,city,country,postCode,latitude,longitude,title,phone,isAvailableForInStoreCollection,mondayOpenTime,tuesdayOpenTime,wednesdayOpenTime,thursdayOpenTime,fridayOpenTime,saturdayOpenTime,sundayOpenTime,mondayCloseTime,tuesdayCloseTime,wednesdayCloseTime,thursdayCloseTime,fridayCloseTime,saturdayCloseTime,sundayCloseTime"store_1","Monmouth House","58 City Road","London","United Kingdom","EC1Y 2AL",0.0880964,51.5246789,"Poq Commerce Store","+44 (0) 203 794 4120",true,"08:00","08:00","08:00","08:00","08:00","08:00","08:00","20:00","20:00","20:00","20:00","20:00","20:00","20:00"
XML Files
If you are providing your feed as an XML file, your feed needs to always contain a <stores>
root tag, with a <store>
tag for each store.
Sample XML file template:
<stores> <store> <id>store_1</id> <address>Monmouth House</address> <address2>58 City Road</address2> <city>London</city> <country>United Kingdom</country> <postCode>EC1Y 2AL</postCode> <latitude>0.0880964</latitude> <longitude>51.5246789</longitude> <title>Poq Commerce Store</title> <phone>+44 (0) 203 794 4120</phone> <isAvailableForInStoreCollection>true</isAvailableForInStoreCollection> <mondayOpenTime>08:00</mondayOpenTime> <tuesdayOpenTime>08:00</tuesdayOpenTime> <wednesdayOpenTime>08:00</wednesdayOpenTime> <thursdayOpenTime>08:00</thursdayOpenTime> <fridayOpenTime>08:00</fridayOpenTime> <saturdayOpenTime>08:00</saturdayOpenTime> <sundayOpenTime>08:00</sundayOpenTime> <mondayCloseTime>20:00</mondayCloseTime> <tuesdayCloseTime>20:00</tuesdayCloseTime> <wednesdayCloseTime>20:00</wednesdayCloseTime> <thursdayCloseTime>20:00</thursdayCloseTime> <fridayCloseTime>20:00</fridayCloseTime> <saturdayCloseTime>20:00</saturdayCloseTime> <sundayCloseTime>20:00</sundayCloseTime> </store></stores>