Get upcoming policy version (ToU/HP)
GET /v1/policies/{policy_type}/upcoming
{
"metadata": {
"policy_id": 4
"type": "terms-of-use",
"active_from": "2028-11-02",
"content_vue_file": "terms-of-use/version-3.vue"
}
}If there is no upcoming policy of this type we should return a 404.
If there are multiple upcoming policies (either with or without an active_from date) we should return a 500
Get the metadata of all policies (of a single type)
GET /v1/policies/{policy_type}
{
"items": [
{
"metadata": {
"policy_id": 1
"type": "terms-of-use",
"active_from": "2020-01-01",
"content_vue_file": "terms-of-use/version-1.vue"
}
},
{
"metadata": {
"policy_id": 4
"type": "terms-of-use",
"active_from": "2022-11-02",
"content_vue_file": "terms-of-use/version-2.vue"
}
},
{
"metadata": {
"policy_id": 5
"type": "terms-of-use",
"content_vue_file": "terms-of-use/version-3.vue"
}
},
...
]
}If there are no policies of this type we should return an empty items array.
Get the reference to the metadata of the current policy version of a single type
GET /v1/policies/{policy_type}/current
{
"metadata": {
"policy_id": 3
"type": "terms-of-use",
"active_from": "2024-11-07",
"content_vue_file": "terms-of-use/version-2.vue"
}
}If there is no current policy of this type we should return a 404.
PRs: