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=1618995679 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 9e31867548a36ae9f3319a7f41f5af45481737670bee2769d441177d5f78544c9445a630cc58182f76f7ea3dfe3fbea7daac83eb71928c4dbdb8425e9f55a9c17e08910a8fc979fc08ef3fedcab74da6819c2493de92e99f3f623d104d7274ba17eb38cd
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=1618995680 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 9e31867548a36ae9f3319a7f41f5af45481737670bee2769d441177d5f78544c9445a630cc58182f76f7ea3dfe3fbea7daac83eb71928c4dbdb8425e9f55a9c17e08910a8fc979fc08ef3fedcab74da6819c2493de92e99f3f623d104d7274ba17eb38cd
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=1618992079&end=1618995679 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 9e31867548a36ae9f3319a7f41f5af45481737670bee2769d441177d5f78544c9445a630cc58182f76f7ea3dfe3fbea7daac83eb71928c4dbdb8425e9f55a9c17e08910a8fc979fc08ef3fedcab74da6819c2493de92e99f3f623d104d7274ba17eb38cd
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=1618992079&end=1618995679 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 9e31867548a36ae9f3319a7f41f5af45481737670bee2769d441177d5f78544c9445a630cc58182f76f7ea3dfe3fbea7daac83eb71928c4dbdb8425e9f55a9c17e08910a8fc979fc08ef3fedcab74da6819c2493de92e99f3f623d104d7274ba17eb38cd
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=1618995679&countries%5B0%5D=BE HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 9e31867548a36ae9f3319a7f41f5af45481737670bee2769d441177d5f78544c9445a630cc58182f76f7ea3dfe3fbea7daac83eb71928c4dbdb8425e9f55a9c17e08910a8fc979fc08ef3fedcab74da6819c2493de92e99f3f623d104d7274ba17eb38cd
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=1618995679 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer b5d8b2b3d75ed2dedefb26fc5963a2dbfa1078c8b2949a890539a5d9880dd60023343bce13e54b362dfd1c5d53d34e6dbc41883cfa18ef8274354b42b625bece71ca505ad6bbd7c79c5cefbaa3343b2c7438683ee08189751b4a4dfd0658f4e3df689110
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: 107

{
    "shop_amount": 2860,
    "order_amount": 1137,
    "order_price": 11634329,
    "active_users": 545
}

Example response 2 Only request a part of the data

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

{
    "order_amount": 1137
}

Example response 3 Only request for today

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

{
    "shop_amount": 2860,
    "order_amount": 574
}

Example response 4 Wait for update

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

{
    "order_amount": 574
}

Example response 5 Filter by country

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

{
    "shop_amount": 2848,
    "order_amount": 1123,
    "order_price": 13654834,
    "active_users": 561
}

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."
}
Version update available Please adjust your integration to the latest stable version (1.5.2)
1.5.0 stable