Welcome to JodaCare API documentation.
The first part of this documentation contains information about our objects and how they work together. This is important to read first because the objects can be combined in multiple ways.
The second part is a description of the endpoints and how they are used.
Attributes | Description |
---|---|
url |
The url |
id |
The id |
calendar |
The url to the user's calendar |
userprofile |
The userprofile of this user (See UserProfile for details) |
settings |
The url to the user's settings |
userinfo_set |
An array of urls to this user's user-info objects |
relation_set |
An array of urls to this user's relations |
primary_contacts |
An array of urls to this user's primary contacts |
closest_relatives |
An array of urls to this user's closest relatives |
service_receivers |
An array of urls to this user's service receivers |
last_login |
When the user last was logged in |
is_superuser |
Whether the user is a superuser |
email |
The email address |
first_name |
The first name |
last_name |
The last name |
is_staff |
Whether the user is a staff member (can log into the admin panel) |
is_employee |
Whether the user is an employee |
is_active |
Whether the user is active |
is_service_receiver |
Whether the user is a service receiver |
created |
When it was created |
updated |
When it was updated |
stripe_customer_id |
The Stripe customer id |
institutions |
A list of urls to the institutions this user is a member of |
functional_groups |
A list of urls to the functional groups this user is a member of |
Attributes | Description |
---|---|
url |
The url |
image |
The profile image of this user |
thumbnails |
Thumbnails of the profile image |
description |
A description of this user |
job_title |
The job title. Used if the user is an employee |
date_of_birth |
The date of birth. Used primarily for service receivers |
cell_phone_number |
The cell phone number |
safety_system |
The safety system. Used for service receivers who have GPS trackers |
created |
When it was created |
updated |
When it was updated |
user |
The url to user this profile belongs to |
address |
The user's address (See Address for more info) |
Attributes | Description |
---|---|
url |
The url |
events |
A list of recent calendar events |
user |
The url of the user this calendar belongs to |
name |
The name of the calendar (set to the user's email address on creation) |
An event is a single event in a user's calendar. Ex. a doctor's appointment.
Events can also be repeated (recurring). Ex. a dancing class. Event occurrences will be generated based on the rule
.
Attributes | Description |
---|---|
url |
The url |
rule |
The rule of how the event occurs (See Rule) ONLY SET ON RECURRING EVENTS |
occurrences |
The occurrences of the event (See Occurrence) |
entries |
A list of
GenericText
objects which has this event as its
content_object |
images |
A list of
GenericImage
objects which has this event as its
content_object |
start |
start date and time (ISO) |
end |
end date and time (ISO) |
title |
The title |
description |
The description |
end_recurring_period |
The date the recurring event will stop |
color_event |
HEX color |
creator |
Url of the user which has created the event |
calendar |
Url of the calendar this event belongs to |
If an event is recurring, it has occurrences. Occurrences are generated dynamically on request unless they have been saved. We have to save an occurrence if we cancel it, add comments (GenericText) or images (GenericImage) or change the date and time of the occurrence.
Attributes | Description |
---|---|
url |
The url |
entries |
A list of
GenericText
objects which has this event as its
content_object |
images |
A list of
GenericImage
objects which has this event as its
content_object |
cancelled_by |
The url of the user who has cancelled the occurrence |
start |
start date and time (ISO) |
end |
end date and time (ISO) |
title |
The title |
description |
The description |
cancelled |
Whether the occurrence is cancelled, |
original_start |
The original start date and time (ISO) |
original_end |
The original end date and time (ISO) |
created_on |
Date and time of creation |
updated_on |
Date and time when it was updated |
event |
Url of the event this occurrence belongs to |
A rule determines how a recurring event occurs. Occurrences are calculated based on a rule.
Attributes | Description |
---|---|
url |
The url |
name |
The name |
description |
The description |
frequency |
The frequence |
params |
A string of parameters separated by semicolon |
Frequencies: DAILY, WEEKLY, MONTHLY, YEARLY
Weekday params: 0-6 (Mon - Sun)
Hour params: 00-23
{
"frequency": "DAILY",
"params": "byhour:09,14,18"
}
{
"frequency": "WEEKLY",
"params": "byweekday:0,3"
}
A functional group is essentialy a group any user can be a member of. It can belong to either an Institution or an Event.
Attributes | Description |
---|---|
url |
The url |
content_object |
The url to the Instition or Event it belongs to |
members |
A list of its members urls |
groupinfo_set |
A list of urls to its
group-info |
name |
The name |
created |
Date and time of creation |
updated |
Date and time when it was updated |
An Institution is typically a nursing home or a hospital, or a department. Institutions can have parents and/or children.
Attributes | Description |
---|---|
url |
The url |
users |
A list of users belonging to the institution |
children |
A list of child institutions |
name |
The name |
phone_number |
The phone number |
cell_phone_number |
The cell phone number |
created |
Date and time of creation |
updated |
Date and time when it was updated |
parent |
Url to the parent institution |
contact |
Url of the user listed as contact |
address |
Url to the Address |
employees |
A list of url to the employees |
UserInfo works as a container for GenericText objects.
Attributes | Description |
---|---|
url |
The url |
entries |
A list of recent entries (GenericText) |
user |
Url to the user it belongs to |
description |
The description.
messages
,
feed
or
moderated |
created |
Date and time of creation |
updated |
Date and time when it was updated |
GroupInfo works as a container for GenericText objects.
Attributes | Description |
---|---|
url |
The url |
entries |
A list of recent entries (GenericText) |
description |
The description.
messages
,
feed
or
moderated |
created |
Date and time of creation |
updated |
Date and time when it was updated |
group |
Url to the functional group it belongs to |
Both messages and entries are generic-text
objects, but with some differences in which attributes that should be populated.
Attributes | Description |
---|---|
url |
The url |
content_object |
The url to the user- or group-info this entry is attached to |
type |
The type of the
content_object |
children |
Other
generic-text
which has this generic-text as its content_object |
created_by |
The user who has created the object |
content_object_detail |
Details about the user/functional-group the content_object of this generic-text is published to |
text |
The text of the object |
priority |
MESSAGES ONLY The priority |
created |
When it was created |
updated |
When it was updated |
read_by |
MESSAGES ONLY An array of urls to users who have read this entry |
liked_by |
ENTRIES ONLY An array of urls to users who have cared about this entry |
Attributes | Description |
---|---|
url |
The url |
content_object |
The url to the user- or group-info this entry is attached to |
type |
The type of the
content_object |
image |
Url to the original image |
mimetype |
The mimetype |
thumbnails |
A list of thumbnails |
size
: The size
created
| Date and time of creation
updated
| Date and time when it was updated
created_by
| Url to the creator
A user can have many relations, and different type of relations have different access rules.
Attributes | Description |
---|---|
url |
The url |
name |
The name |
description |
The description |
created |
Date and time of creation |
updated |
Date and time when it was updated |
Attributes | Description |
---|---|
url |
The url |
relation_type |
The relation type |
description |
The description. Ex. Son, Daughter |
created |
Date and time of creation |
updated |
Date and time when it was updated |
user |
Url to the service receiver |
grantee |
Url to the user with grantee permissions on the service receiver |
Attributes | Description |
---|---|
url |
The url, |
recipient |
The email address of the recipient, |
is_active |
Whether it is active or not |
inviter |
The url of the inviter |
relation_to |
The url to the service receiver |
relation_type |
The url to the relation type |
Property | Description |
---|---|
email |
(required) the user's email address |
password |
(required) the user's password |
{
"email": "{email}",
"password": "{password}"
}
{
"token": "{token}"
}
Property | Description |
---|---|
token |
(required) the user's token |
{
"token": "{token}"
}
{
"token": "{token}"
}
Property | Description |
---|---|
token |
(required) the user's token |
{
"token": "{token}"
}
{
"token": "{token}"
}
Property | Description |
---|---|
password |
(required) the new password |
{
"password": "{password}"
}
This registeres a new user and returns a token. The token can be stored locally and used for authenticated requests.
Property | Description |
---|---|
email |
(required) the user's email address |
password |
(required) the user's password |
{
"email": "{email}",
"password": "{password}"
}
{
"url": "{url}",
"token": "{token}"
}
Entries are published to the service receiver or functional group's book. An entry is a generic-text
object with a user- or
group-info as it's content_object
.
Returns entries from all users and functional groups the authenticated user has access to. Typically used to generate a feed of recent entries.
Query params | Description |
---|---|
limit |
(optional) The pagination limit |
offset |
(optional) The pagination offset |
To get a service receiver's feed you need to send two requests. First, you need the url to the service receiver's user-info
for feed
. The second request is where you fetch the entries.
Parameters | Description |
---|---|
id |
(required) The id of the service receiver |
Parameters | Description |
---|---|
id |
(required) The id of the user-info |
To get a functional groups's feed you need to send two requests. First, you need the url to the functional group's group-info
for feed
. The second request is where you fetch the entries.
Parameters | Description |
---|---|
id |
(required) The id of the functional group |
Parameters | Description |
---|---|
id |
(required) The id of the group-info |
Returns messages from all users and functional groups the authenticated user has access to. Typically used to generate a feed of recent messages.
Query params | Description |
---|---|
limit |
(optional) The pagination limit |
offset |
(optional) The pagination offset |
To get a service receiver's messages you need to send two requests. First, you need the url to the service receiver's user-info
for messages
. The second request is where you fetch the messages.
Parameters | Description |
---|---|
id |
(required) The id of the service receiver |
Parameters | Description |
---|---|
id |
(required) The id of the user-info |
To get a functional group's messages you need to send two requests. First, you need the url to the functional group's group-info
for messages
. The second request is where you fetch the messages.
Parameters | Description |
---|---|
id |
(required) The id of the functional group |
Parameters | Description |
---|---|
id |
(required) The id of the group-info |
Query params | Description |
---|---|
is_active |
(optional) Show only active users |
is_employee |
(optional) Show only employees |
is_service_receiver |
(optional) Show only service receivers |
limit |
(optional) The pagination limit |
offset |
(optional) The pagination offset |
Attributes | Description |
---|---|
url |
The url |
userprofile |
The userprofile of this user (See UserProfile for details) |
last_login |
When the user last was logged in |
is_superuser |
Whether the user is a superuser |
email |
The email address |
first_name |
The first name |
last_name |
The last name |
is_staff |
Whether the user is a staff member (can log into the admin panel) |
is_employee |
Whether the user is an employee |
is_active |
Whether the user is active |
is_service_receiver |
Whether the user is a service receiver |
Attributes | Description |
---|---|
email |
The email |
password |
The password |
Attributes | Description |
---|---|
first_name |
The first name |
last_name |
The last name |
email |
The email |
password |
The password |