Get statistics

GET /dashboard/statistics

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

Query string (URL)

Append the querystring with following properties to the URL.

A dictionary with fields

Field Type Description
select Dictionary Specify which statistics you want to receive
start Timestamp Start timestamp
end Timestamp End timestamp
countries [Country] Optional. Filter statistics by country

Example request 1 Get all stats from all time

GET /dashboard/statistics?select%5Bshop_amount%5D=1&select%5Border_amount%5D=1&select%5Border_price%5D=1&select%5Bactive_users%5D=1&start=0&end=1592307625 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 45a3627b39b90fe2d3fe15b106535a6f3a4f338c25c59b0dd5615bf505d153e4abf57fdf87073660b7832e0d39e6b99fb63a9af8d86a8d5dfaada5cb632740386381574e5c00fde084cecbd476936b45bcd97fa59cf8b2e26cdf219dcd610059d43db75f
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 2 Only request a part of the data

GET /dashboard/statistics?select%5Border_amount%5D=1&start=0&end=1592307626 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 45a3627b39b90fe2d3fe15b106535a6f3a4f338c25c59b0dd5615bf505d153e4abf57fdf87073660b7832e0d39e6b99fb63a9af8d86a8d5dfaada5cb632740386381574e5c00fde084cecbd476936b45bcd97fa59cf8b2e26cdf219dcd610059d43db75f
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 3 Only request for today

GET /dashboard/statistics?select%5Border_amount%5D=1&select%5Bshop_amount%5D=1&start=1592304025&end=1592307625 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 45a3627b39b90fe2d3fe15b106535a6f3a4f338c25c59b0dd5615bf505d153e4abf57fdf87073660b7832e0d39e6b99fb63a9af8d86a8d5dfaada5cb632740386381574e5c00fde084cecbd476936b45bcd97fa59cf8b2e26cdf219dcd610059d43db75f
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 4 Wait for update

GET /dashboard/statistics?select%5Border_amount%5D=1&start=1592304025&end=1592307625 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 45a3627b39b90fe2d3fe15b106535a6f3a4f338c25c59b0dd5615bf505d153e4abf57fdf87073660b7832e0d39e6b99fb63a9af8d86a8d5dfaada5cb632740386381574e5c00fde084cecbd476936b45bcd97fa59cf8b2e26cdf219dcd610059d43db75f
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 5 Filter by country

GET /dashboard/statistics?select%5Bshop_amount%5D=1&select%5Border_amount%5D=1&select%5Border_price%5D=1&select%5Bactive_users%5D=1&start=0&end=1592307625&countries%5B0%5D=BE HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 45a3627b39b90fe2d3fe15b106535a6f3a4f338c25c59b0dd5615bf505d153e4abf57fdf87073660b7832e0d39e6b99fb63a9af8d86a8d5dfaada5cb632740386381574e5c00fde084cecbd476936b45bcd97fa59cf8b2e26cdf219dcd610059d43db75f
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 6 Permissions for statistics is required

GET /dashboard/statistics?select%5Border_amount%5D=1&start=0&end=1592307625 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 31ec11fe1cfd17c001a6cb098856db69c34b52ed46187cb5164c90f0d26aa1cb775b721902f7958dbfe446fdd43465d22131813b9fa881a613da377dbc46402b63baff769d07b2c0de70ff92c304777fdac64644a53723c554fe2fb8485a5b20cd46c340
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Response

A dictionary with fields

Field Type Description
shop_amount Int Optional. Return total amount of shops
order_amount Int Optional. Return order amount
order_price Int Optional. Total price of orders in cents
active_users Int Optional. Active users

Example response 1 Get all stats from all time

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 102

{
    "shop_amount": 139,
    "order_amount": 56,
    "order_price": 1235700,
    "active_users": 48
}

Example response 2 Only request a part of the data

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 26

{
    "order_amount": 56
}

Example response 3 Only request for today

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 50

{
    "shop_amount": 139,
    "order_amount": 34
}

Example response 4 Wait for update

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 26

{
    "order_amount": 34
}

Example response 5 Filter by country

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 101

{
    "shop_amount": 137,
    "order_amount": 54,
    "order_price": 691982,
    "active_users": 22
}

Example response 6 Permissions for statistics is required

HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
Content-Length: 109

{
    "code": "not_authorized",
    "message": "You do not have access to this endpoint with this account."
}
1.5.0 stable