This is the web API for accessing Systembolaget's product line. You can use it to retrieve JSON encoded data about the products in Systembolaget's product line, and the API allows you to filter your request in various ways.
URL: /search/products/all
If you don't give any GET parameters, the above URL will give you a JSON with all products.
Parameter | Value |
---|---|
min_price | A number, e.g. 50 or 50.5 |
max_price | A number, e.g. 50 or 50.5 |
min_alcohol | A number between 0 and 100 |
max_alcohol | A number between 0 and 100 |
Example:
URL: /search/products/all?min_alcohol=50&max_price=270&name=Guinness&max_alcohol=60
Response (example):
[ { "name": "Bols Gold Strike", "price": 239.00, "volume": 500, "alcohol": 50.00, "nr": 74502, "product_group": "Likör" }, { "name": "Chartreuse Grön", "price": 269.00, "volume": 350, "alcohol": 55.00, "nr": 60602, "product_group": "Likör" } ]
In the current version of this API (1.0), the only implemented staus code is 200 OK. In future versions, we'll add more status codes to match what it going on at the server side, e.g. "404 Not found" if the server can't find data matching the parameters, 400 Bad request if the server can't understand the parameters. This will also, in the future, be accompanied with a JSON containing a more detailed error message.
200 OK
400 Bad request
(not yet implemented)404 Not found
(not yet implemented)
200 OK Connection: Keep-Alive Date: Fri, 01 Dec 2017 08:54:43 GMT Server: Winstone Servlet Engine v0.9.10 Content-Length: 308 Content-Type: application/json;charset=UTF-8 Client-Date: Fri, 01 Dec 2017 08:54:43 GMT Client-Peer: 127.0.0.1:8080 Client-Response-Num: 1 X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
400 Bad Request Connection: Keep-Alive Date: Fri, 08 Apr 2016 11:28:56 GMT Server: Winstone Servlet Engine v0.9.10 Content-Length: 60 Content-Type: application/json Client-Date: Fri, 08 Apr 2016 11:28:56 GMT Client-Peer: 129.16.213.178:8080 Client-Response-Num: 1 X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
404 Not Found Connection: Keep-Alive Date: Fri, 08 Apr 2016 11:37:11 GMT Server: Winstone Servlet Engine v0.9.10 Content-Length: 50 Content-Type: application/json Client-Date: Fri, 08 Apr 2016 11:37:11 GMT Client-Peer: 129.16.213.178:8080 Client-Response-Num: 1 X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
Here are some examples of error responses from the API.
In the current version, bad parameters or missing data both result in a JSON result of an empty array:
[]
In the current version, bad parameters or missing data both result in a JSON result of an empty array:
[]