bolaget.io (https://bolaget.io)
Systembolaget will remove the information about all the products from their API starting 1st of November. They have also removed the API we used for bolaget.io. This means that bolaget.io no longer can fetch new product updates and is deprecated and now also removed. https://api-portal.systembolaget.se/api-update-blog/changes-in-the-api-portal
This API has nothing to do with Systembolaget, this app consumes a large XML API from Systembolaget and transforms it into a REST JSON API. More info can be found here: http://www.systembolaget.se/api
Please have a look at CHANGELOG.md
for more information. Otherwise this project adheres to Semantic Versioning.
Version | Url |
---|---|
v1 |
https://bolaget.io/v1 |
All resources will be available without versioning in the url and be an alias for the latest API version.
GET /products
Host: bolaget.io
-
URL Params
Optional:
limit=[number]
- Default limit is 10, max limit is 100offset=[number]
ecological=[bool]
koscher=[bool]
ethical=[bool]
year_from=[number]
year_to=[number]
sales_start_from=[date]
- YYYY-MM-DDsales_start_to=[date]
- YYYY-MM-DDprice_from=[number]
price_to=[integer]
volume_from=[integer]
volume_to=[number]
assortment=[alphanumeric]
- BS = Reservation assortment, TSE = Temporary assortment, FS = Regular assortment and FSN = Regular assortment (new product), TSLS = Locally producedassortment_text=[alphanumeric]
- Ordervaror = BS, Fast sortiment = FS, Tillfälligt sortiment = TSE, Fast sortiment = FS/FSE, Lokalt & Småskaligt = TSLSsort=[alphanumeric]
- Property to sort by, accepting:price:asc|desc
price_per_liter:asc|desc
volume_in_milliliter:asc|desc
sales_start:asc|desc
year:asc|desc
zip_code:asc|desc
name:asc|desc
name|type|style|provider|producer|origin|origin_country|packaging|product_group|sealing|commodities=[alphanumeric]
- Fuzzy matchsearch=[alphanumeric]
- Fuzzy search in several fields
-
Response headers:
X-Total-Count=[number]
- Total count of products based on filtering used for pagination
-
Success Response:
- Code: 200
Content:[{ name: '117 Grythyttan' ... }]
or[]
- Code: 200
-
Error Response:
- Code: 500 INTERNAL SERVER ERROR
Content:{ error : "Ouch, an ugly error has occured!" }
- Code: 500 INTERNAL SERVER ERROR
GET /products/:nr
GET /products/:article_nr
Host: bolaget.io
-
Success Response:
- Code: 200
Content:{ nr: 12, name: "117 Grythyttan" ... }
- Code: 200
-
Error Response:
- Code: 500 INTERNAL SERVER ERROR
Content:{ error : "Ouch, an ugly error has occured!" }
OR
- Code: 404 NOT FOUND
Content:{ error : "Move along, nothing to see here!" }
- Code: 500 INTERNAL SERVER ERROR
GET /stores
Host: bolaget.io
-
URL Params
Optional:
limit=[number]
- Default limit is 10, max limit is 100offset=[number]
labels=[alphanumeric]
- Takes a comma separated list, eg. norrbotten,jämtland, returns documents containing all labels matched (fuzzy)sort=[alphanumeric]
- Property to sort by, accepting:RT90x:asc|desc
RT90y:asc|desc
address:asc|desc
city:asc|desc
county:asc|desc
type|name|city|county|address=[alphanumeric]
- Fuzzy matchsearch=[alphanumeric]
- Fuzzy search in several fields
-
Response headers:
X-Total-Count=[number]
- Total count of stores based on filtering used for pagination
-
Success Response:
- Code: 200
Content:[{ adress_1: 'Kungsholmstorg 11 A' ... }]
or[]
- Code: 200
-
Error Response:
- Code: 500 Internal Server Error
Content:{ error : "Ouch, an ugly error has occured!" }
- Code: 500 Internal Server Error
GET /stores/:nr
Host: bolaget.io
-
Success Response:
- Code: 200
Content:{ address: "Vasagatan 25", ... }
- Code: 200
-
Error Response:
- Code: 500 INTERNAL SERVER ERROR
Content:{ error : "Ouch, an ugly error has occured!" }
OR
- Code: 404 NOT FOUND
Content:{ error : "Move along, nothing to see here!" }
- Code: 500 INTERNAL SERVER ERROR
You need a local Kubernetes cluster (minikube, docker-for-mac etc.) with helm
installed.
Build:
make build
Install:
helm install \
-f chart/values.yaml \
-f chart/values-dev.yaml \
--set web.image.tag=local \
--set web.image.pullPolicy=Never \
--name bolagetio \
./chart
Using Docker and Docker Compose (https://www.docker.com/)
Build
docker-compose build
Start
docker-compose up web
Start worker
docker-compose run --rm web npm run dev:worker
Run tests
docker-compose run --rm web npm test