A simple Python program for polling the Albert Heijn REST and Graph API's to get updates on new "Overblijver" boxes.
The program works by grabbing the nearest x (default 5) number of Albert Heijn stores based on your latitude and longitude. After this it keeps a record of stores with boxes available and it will send you a Telegram notification when something's changed. e.g. boxes are available, a box is gone, everything is gone.
# Clone this project
$ docker pull ghcr.io/tobiass1402/appiesniper:v0.1.4
# Run the project with env file
$ docker run --env-file ./.env -d ghcr.io/tobiass1402/appiesniper:v0.1.4
# Run the project with docker env variables
$ docker run -d ghcr.io/tobiass1402/appiesniper:v0.1.4 -e longitude=5.1331746 -e latitude=51.5868726 -e telegram_bot_token='xxxxxxxx:xxxxxxxxxxxxxxxxxxxx' -e telegram_chat_id='xxxxxxxx' -e number_of_stores=5
# Clone this project
$ git clone https://github.com/TobiasS1402/appiesniper
# Access
$ cd appiesniper
# Build the container environment
$ docker build . -t tobiass1402/appiesniper
# Run the project with env file
$ docker run --env-file ./.env -d tobiass1402/appiesniper
# Run the project with docker env variables
$ docker run -d tobiass1402/appiesniper -e longitude=5.1331746 -e latitude=51.5868726 -e telegram_bot_token='xxxxxxxx:xxxxxxxxxxxxxxxxxxxx' -e telegram_chat_id='xxxxxxxx' -e number_of_stores=5
# Clone this project
$ git clone https://github.com/TobiasS1402/appiesniper
# Access
$ cd appiesniper
# Install dependencies
$ pip -r install requirements.txt
# Customise environment variables
$ cp .env.example .env
# Run the project
$ python3 main.py
Telegram bot features:
- 📦 Type of box and amount
- 🏢 Location streetname, number & city
- 🏃♂️ Meters distance from set up longitude & latitude
- 💰 Discounted price down from "original"
- 🔔 Pickup time window
- 🕢 Store opening time window
https://api.ah.nl/ms/mobile-services/leftovers/v2/surprise-boxes/member
https://api.ah.nl/ms/mobile-services/leftovers/v2/surprise-boxes/available/stores/[store nr.]
#acquired from strore browser at https://www.ah.nl/winkels?storeId=2268https://api.ah.nl/mobile-auth/v1/auth/token/anonymous
https://api.ah.nl/mobile-auth/v1/auth/token/refresh