Developer Documentation (API)
- Authentication
- PHP Package
- V2 Endpoints
- Pass Templates
- Get a list of templates
- Describe the structure of a pass template
- Create a new template
- Update a template
- Patch a template
- Publish changes of a template
- Get information about fields of a pass-template only
- Schedule a Push Notification
- List scheduled notifications of a template
- Delete a scheduled Push Notification
- Copy a Pass Template
- Delete a Pass Template
- Create an iFrame Integration for a Template
- Create an URL Integration for a Template
- Passes
- REST Hooks
- Validating passes
- Deprecated endpoints
Get history of active and inactive passes for a timeframe
GET Request
Endpoint URL https://veski.leikbreytir.is/ api/pass/statistics/{pass-template-uid}/activehistory/{startingday}
Purpose
Get the history of the total number of active and inactive passes for a template.
This starts at the given day until today.
Required input parameters
- HTTP Authorization Header that contains your API key
- pass-template-uid – the UID of the pass template for whose passes you want to get statistics for
- startingday (optional) – the day in the format Y-m-d (e.g. 2020-10-01) from when onwards the system should return data. If you don’t specify this parameter you’ll get data for the last seven days.
Returned values
JSON-Array containing the UID and the name of your pass-templates.
- date – the date in the format Y-m-d
- active – the total number of active passes at that day
- inactive – the total number of inactive passes at that day
Please note that the system does not keep statistical data for deleted passes. If you remove a pass it will also be removed from this timeline.
Example output:
[
{
"date": "2020-10-01",
"active": 7,
"inactive": 4
},
{
"date": "2020-10-02",
"active": 7,
"inactive": 4
},
{
"date": "2020-10-03",
"active": 7,
"inactive": 4
},
{
"date": "2020-10-04",
"active": 7,
"inactive": 4
},
{
"date": "2020-10-05",
"active": 7,
"inactive": 4
},
{
"date": "2020-10-06",
"active": 7,
"inactive": 4
},
{
"date": "2020-10-07",
"active": 7,
"inactive": 4
},
{
"date": "2020-10-08",
"active": 8,
"inactive": 5
}
]