-
Notifications
You must be signed in to change notification settings - Fork 0
API
Patiphan Srichai edited this page Oct 20, 2021
·
14 revisions
documentation for Suchon's Site API
Contents
Suchon’s Site API is a JSON-based API. All requests are made to endpoints beginning:
https://suchonsite-server.herokuapp.com/
All requests must be secure, i.e. https, not http.
The API is RESTful and arranged around resources.
All requests must be made with an integration token. All requests must be made using https.
retrieve the information of peoples appointment by date Return full list of people's information that have vaccination appointment in that day
The API endpoint exposes this list of people's information as a collection.
A request to fetch a list of people's information looks like this:
GET https://suchonsite-server.herokuapp.com/people/by_date/{{date}}
Example response:
{
"_id": "617042a299a86369e7ba81f5",
"date": "18-10-2021",
"people": [
{
"reservation_id": 1,
"register_timestamp": "2021-10-20T15:19:56.609000",
"name": "Jean",
"surname": "string",
"birth_date": "2021-10-20",
"citizen_id": "1234567890123",
"occupation": "string",
"address": "string",
"priority": "2"
}
],
"__v": 0
}
Where a Reservation object is:
| Field | Type | Description |
|---|---|---|
| date | string | date of vaccination data |
| reservation_id | int | A unique identifier for the reservation |
| register_timestamp | string | recipient registration timestamp |
| name | string | name of the recipient |
| surname | string | surname of the recipient |
| birth_date | string | birth date of the recipient |
| citizen_id | string | citizen id of the recipient |
| occupation | string | occupation of the recipient |
| address | string | living address of the recipient |
| priority | string | recipient's priority in queue |
Possible errors:
| Error code | Description |
|---|---|
| TBA | TBA |