calendar event
Create calendar event
Changed onCreate a calendar event for a patient. Attribute all_day must be set to true and end_at cannot be set for plan-check-in event type.
post/calendar_event
Request
- Base URLhttps://api.twinehealth.com/pub
- Authnone declared
Request body
Example request
{
"data": {
"type": "calendar_event",
"attributes": {
"type": "plan-check-in",
"time_zone": "America/New_York",
"all_day": true,
"start_at": "2018-02-20T00:00:00Z",
"title": "Plan Check-In",
"attendees": [
{
"user": "5a0c8e27a9d454cc150997c9"
},
{
"user": "5a0c8e27a9d454cc150997f7"
}
]
},
"relationships": {
"owner": {
"data": {
"type": "patient",
"id": "5a0c8e27a9d454cc150997f7"
}
}
}
}
}Response
OK
Example response
{
"data": {
"type": "calendar_event",
"id": "5a0c8e2aa9d454cc1509a142",
"attributes": {
"completed_at": "2017-11-03T06:17:34.652Z",
"completed_by": "5a0c8e27a9d454cc150997c9",
"type": "plan-check-in",
"time_zone": "America/New_York",
"all_day": true,
"start_at": "2017-11-03T04:00:00.000Z",
"end_at": "2017-11-03T08:00:00.000Z",
"title": "Plan Check-In",
"attendees": [
{
"_id": "5ac7e74679f6868274a42e28",
"user": "5a0c8e27a9d454cc150997c9",
"response_status": "needsAction"
},
{
"_id": "5ac7e74679f6868274a42e27",
"user": "5a0c8e27a9d454cc150997f7",
"response_status": "needsAction"
}
],
"created_at": "2017-10-20T10:59:40.000Z",
"created_by": "5a0c8e27a9d454cc150997c9",
"updated_at": "2017-10-20T10:59:40.000Z",
"updated_by": "5a0c8e27a9d454cc150997c9"
},
"relationships": {
"owner": {
"links": {
"related": "/pub/calendar_event/5a0c8e2aa9d454cc1509a142/owner"
},
"data": {
"type": "patient",
"id": "5a0c8e27a9d454cc150997f7"
}
}
},
"links": {
"self": "/pub/calendar_event/5a0c8e2aa9d454cc1509a142"
}
}
}Changes
- breaking
removed the success response with the status
- info
added the success response with the status
- breaking
- info
endpoint added
- info