When we get complaints we'd like to know how many we get in a day or other date range, so if there is a spike in complaints we can act on it.

Add new endpoint to return the number of complaints in a date range.

Unit tests to follow in the next commit.
This commit is contained in:
Rebecca Law
2018-06-07 10:30:50 +01:00
committed by Katie Smith
parent 639a3f42b2
commit e638653f11
3 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
complaint_count_request = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "complaint count request schema",
"type": "object",
"title": "Complaint count request",
"properties": {
"start_date": {"type": ["string", "null"], "format": "datetime"},
"end_date": {"type": ["string", "null"], "format": "datetime"},
}
}