TYRA Cloud Functions API (2026-03-27)

Download OpenAPI specification:

Dbtools

repairACL

Repairs the ACL for any parse object (except for _User, then use repairUserACL instead.) It repairs the school based read permission in the ACL. It will also repair, the permission of an owner (User), if given, with both read and write, if param userId is supplied. NOTE: For the supporter app to be aware of the object to repair, it need access rights to it.

Request Body schema: application/json
required
className
required
string

The class name of the parse object to repair

objId
required
string

The object Id of the parse object to repair

schoolId
required
string

The school Id of the object to repair

roleCodes
required
string

The role codes to restore in the ACL, can be "a", "t", "ts", "p"

userId
required
string

The User Id to restore in the ACL as a User permission, typically an owner, read and write. If the User restore should be skipped, skip this parameter.

Responses

Request samples

Content type
application/json
{
  • "className": "string",
  • "objId": "string",
  • "schoolId": "string",
  • "roleCodes": "string",
  • "userId": "string"
}

Response samples

Content type
application/json
null

Absence

absencePutToHistory

Mark an active absence as completed and move it to cold storage.

Request Body schema: application/json
required
absenceId
required
string

Responses

Request samples

Content type
application/json
{
  • "absenceId": "string"
}

Response samples

Content type
application/json
{ }

absenceReportBack

Mark an active absence as completed.

Request Body schema: application/json
required
absenceId
required
string
kidId
required
string
includeToday
required
boolean
sendPush
boolean

Responses

Request samples

Content type
application/json
{
  • "absenceId": "string",
  • "kidId": "string",
  • "includeToday": true,
  • "sendPush": true
}

Response samples

Content type
application/json
{ }

addAbsence

Add a new active or future absence

Request Body schema: application/json
required
startDate
required
string

Start date (YYYY-MM-DD)

endDate
required
string

End date (YYYY-MM-DD)

schoolId
required
string

School ID

kidId
required
string

Kid ID

sendPush
boolean=true

Whether to send push notification

Responses

Request samples

Content type
application/json
{
  • "startDate": "string",
  • "endDate": "string",
  • "schoolId": "string",
  • "kidId": "string",
  • "sendPush": null
}

Response samples

Content type
application/json
{ }

addHistoricAbsence

Add a historic absence

Request Body schema: application/json
required
startDate
required
string

Start date (YYYY-MM-DD)

endDate
required
string

End date (YYYY-MM-DD)

schoolId
required
string

School ID

kidId
required
string

Kid ID

Responses

Request samples

Content type
application/json
{
  • "startDate": "string",
  • "endDate": "string",
  • "schoolId": "string",
  • "kidId": "string"
}

Response samples

Content type
application/json
{ }

confirmAbsence

Lock / Unlock an absence. When locked, edits to the absence are not allowed.

Request Body schema: application/json
required
absenceId
required
string

Absence ID

confirmed
required
boolean

Whether the absence is confirmed or not

Responses

Request samples

Content type
application/json
{
  • "absenceId": "string",
  • "confirmed": true
}

Response samples

Content type
application/json
{ }

deleteAbsence

Delete historic, active or future absence

Request Body schema: application/json
required
absenceId
required
string

Absence id

kidId
string

Kid id

Responses

Request samples

Content type
application/json
{
  • "absenceId": "string",
  • "kidId": "string"
}

Response samples

Content type
application/json
{ }

editAbsence

Edit active or future absence

Note: Historic absence is NOT editable

Request Body schema: application/json
required
absenceId
required
string

Absence id

startDate
required
string

Start date (YYYY-MM-DD)

endDate
required
string

End date (YYYY-MM-DD)

info
string

Info about absence

sendPush
boolean

Whether to send push notification

Responses

Request samples

Content type
application/json
{
  • "absenceId": "string",
  • "startDate": "string",
  • "endDate": "string",
  • "info": "string",
  • "sendPush": true
}

Response samples

Content type
application/json
{ }

getAbsenceKids

get all active & future absences for a school

Request Body schema: application/json
required
schoolId
required
string

School ID

webCall
boolean

True if executing client is a React app

Responses

Request samples

Content type
application/json
{
  • "schoolId": "string",
  • "webCall": true
}

Response samples

Content type
application/json
{ }

getAbsences

Get all active & future absences for specific Kid

Request Body schema: application/json
required
schoolId
required
string

School ID

kidId
required
string

Kid ID

excludeAnonymous
required
boolean

Exclude anonymous users

Responses

Request samples

Content type
application/json
{
  • "schoolId": "string",
  • "kidId": "string",
  • "excludeAnonymous": true
}

Response samples

Content type
application/json
{ }

getHistoricAbsence

Get Historic Absence on a child

Request Body schema: application/json
required
kidId
required
string

Object ID of the kid to get historic absence for.

includeUser
required
boolean

If user element should be the full Parse Object for user, or just the object ID. (Default is just object ID)

Responses

Request samples

Content type
application/json
{
  • "kidId": "string",
  • "includeUser": true
}

Response samples

Content type
application/json
{ }

sendAbsenceReminder

Send reminder about absence to guardians

Request Body schema: application/json
required
kidId
required
string

Kid ID

absenceID
required
string

Absence ID

Responses

Request samples

Content type
application/json
{
  • "kidId": "string",
  • "absenceID": "string"
}

Response samples

Content type
application/json
{ }

Contacts

getContacts

Fetches contact profiles for a school, scoped by the caller’s UserRole.

Returned contacts are filtered and redacted based on:

  • Caller role type (admin, teacher, guardian)
  • Target user visibility settings

Multiple UserRoles pointing to the same person are merged, and all related kid pointers are aggregated into a single contact entry.

Request Body schema: application/json
required
roleId
required
string

ObjectId of the caller’s UserRole.

kidId
string

ObjectId of a kid to filter by.

Responses

Request samples

Content type
application/json
{
  • "roleId": "string",
  • "kidId": "string"
}

Response samples

Content type
application/json
{ }

Events3

getEvents3

[object Object],[object Object],[object Object]

Request Body schema: application/json
required
schoolId
required
string

School id to fetch events for.

userRoleId
string

UserRole id used for authorization and context. If omitted, the first role for the school is used.

dateStart
string

Inclusive start date (YYYY-MM-DD). See defaults above.

dateEnd
string

Inclusive end date (YYYY-MM-DD). See defaults above.

departmentIds
string[]

Only return events for these department ids.

tagsIds
string[]

Only return events matching these tag ids.

kidsIds
string[]

Only return events involving these kid ids.

eventTypes
string[]

Only return events of these types.

eventGroupInfoId
string

Only return events belonging to this group info id.

eventVisibility
staffeventsread

Visibility level used when selecting staff events.

Responses

Request samples

Content type
application/json
{
  • "schoolId": "string",
  • "userRoleId": "string",
  • "dateStart": "string",
  • "dateEnd": "string",
  • "departmentIds": null,
  • "tagsIds": null,
  • "kidsIds": null,
  • "eventTypes": null,
  • "eventGroupInfoId": "string",
  • "eventVisibility": null
}

Response samples

Content type
application/json
{ }

Kids

checkInOutKids

Will check in or check out a list of kids. Several options can be attached. To be used to check in or out even a single kid.

Will also save Log (kids log) and Notification. If sendPush, push notification is sent.

Request Body schema: application/json
required
schoolId
required
string

School id.

kidIds
required
string[]

Array of ids of Kids to check in or out.

isCheckIn
required
boolean

Whether to check in, othewise check out.

modifiedCheckInOutTime
required
date|undefined

An alternative timestamp for check in or out. If not defined, current time is used. To use for instance it the staff forgot to do it.

pickupUserRoleIds
required
(string|null)[]

People, in the form of UserRole ids (connected to User or AlternativeContact), which will be assigned to pick up the kid at end of school day. One entry for each kid, if a certain kid will not have a pickuper assigned, set the value to null. The array is allowed to be empty or shorter than the kid id list.

pickupTime
required
string

A new pickutime to be assigned for each kid in kidIds.

performerId
required
string

The UserRole which did perform the check in or out. Used for notices and push.

sendPush
required
boolean

Whether push should be sent afterwards.

Responses

Request samples

Content type
application/json
{
  • "schoolId": "string",
  • "kidIds": null,
  • "isCheckIn": true,
  • "modifiedCheckInOutTime": null,
  • "pickupUserRoleIds": null,
  • "pickupTime": "string",
  • "performerId": "string",
  • "sendPush": true
}

Response samples

Content type
application/json
null

setKidNote

Adjusts one of the three available checkinout notes for a kid.

Request Body schema: application/json
required
schoolId
required
string

School id.

kidId
required
string

Kid id to adjust checkinout note for.

noteType
required
kid_note_type

The type of note to adjust.

remove
required
boolean

If true the note will be removed instead of set.

comment
required
string|undefined

Content of the note to be set.

sendPush
required
boolean

Whether push should be sent afterwards.

Responses

Request samples

Content type
application/json
{
  • "schoolId": "string",
  • "kidId": "string",
  • "noteType": null,
  • "remove": true,
  • "comment": null,
  • "sendPush": true
}

Response samples

Content type
application/json
null

setKidPickup

Adjusts the pickup time and person who will pick up the kid.

Request Body schema: application/json
required
schoolId
required
string

School id.

kidId
required
string

Kid id to perform the operation for.

pickupUserRoleId
required
string|undefined

UserRoleid (connected to User or AlternativeContact), which will be assigned to pick up the kid at end of school day.

pickupTime
required
string

A new pickup time to be assigned to the kid.

performerId
required
string

The UserRole which did perform the operation. Used for notices and push.

sendPush
required
boolean

Whether push should be sent afterwards.

Responses

Request samples

Content type
application/json
{
  • "schoolId": "string",
  • "kidId": "string",
  • "pickupUserRoleId": null,
  • "pickupTime": "string",
  • "performerId": "string",
  • "sendPush": true
}

Response samples

Content type
application/json
null

Login

getJWT

Get Json Web Token for access to REST API.

Request Body schema: application/json
required
roleId
required
string

User Role ID

Responses

Request samples

Content type
application/json
{
  • "roleId": "string"
}

Response samples

Content type
application/json
{ }

initiateLoginSession

Initiates a login session between client and server.

Possible login actions include:

  • Verify - Verify MFA code sent to user
  • BankID - Auth using Mobilt BankID
  • Choice - Choose one of multiple users tied to username
  • Idp - Continue on external IdP site
Request Body schema: application/json
required
username
required
string

Username of the person trying to log in.

loginMethod
required
number

Username type (email, phone, nin)

clientType
required
string

Client platform (Web, Android iOS, supporter)

chosenId
string

User's objectId (if already selected by loginAction.Choice)

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "loginMethod": 0,
  • "clientType": "string",
  • "chosenId": "string"
}

Response samples

Content type
application/json
{ }

Person

createPerson

Creates a new Person object.

Request Body schema: application/json
required
givenName
required
string

The person's given name.

familyName
required
string

The person's family name.

displayName
string

The person's display name.

civicNo
string

The person's civic number.

email
string

The person's email address.

emailType
emailtype

The person's email type.

phone
string

The person's phone number.

phoneType
phonenumbertype

The person's phone type.

streetAddress
string

The person's street address.

locality
string

The person's locality.

postalCode
string

The person's postal code.

country
string

The person's country.

loginMethod
user_type

The preferred login method.

userId
string

The user ID to link to the person.

schoolId
required
string

The school ID.

Responses

Request samples

Content type
application/json
{
  • "givenName": "string",
  • "familyName": "string",
  • "displayName": "string",
  • "civicNo": "string",
  • "email": "string",
  • "emailType": null,
  • "phone": "string",
  • "phoneType": null,
  • "streetAddress": "string",
  • "locality": "string",
  • "postalCode": "string",
  • "country": "string",
  • "loginMethod": null,
  • "userId": "string",
  • "schoolId": "string"
}

Response samples

Content type
application/json
"string"

findPerson

Finds a person object for a school

Request Body schema: application/json
required
username
string

The username for the person.

userId
string

The objectId for a user to search for.

schoolId
required
string

ObjectId for the school.

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "userId": "string",
  • "schoolId": "string"
}

Response samples

Content type
application/json
null

validateInviteForm

Validate user-input for creating a person object

Request Body schema: application/json
required
territory
number

School territory (only used for civicNo validation)

email
string

Email address to validate

phone
string

Phone number to validate

civicNo
string

Civic Number (NIN) to validate

Responses

Request samples

Content type
application/json
{
  • "territory": 0,
  • "email": "string",
  • "phone": "string",
  • "civicNo": "string"
}

Response samples

Content type
application/json
null

Roles

createRole

Creates a user role for a given person based on the provided role type.

Supported role types:

  • USER_ROLE_TYPE.PARENT: Creates a guardian role.
  • USER_ROLE_TYPE.TEACHER, USER_ROLE_TYPE.ADMIN, USER_ROLE_TYPE.SUPER_ADMIN: Creates a staff role.

If req.params.personUUID is not provided, the function attempts to look up the Person using req.params.userId.

Request Body schema: application/json
required
personUUID
string

The UUID of the Person.

userId
string

The objectId of the User to link if personUUID isn't provided.

schoolId
required
string

The objectId of the School. (required)

roleNum
required
number

The role number (USER_ROLE_TYPE). (required)

title
string

Optional title for the role.

department
string

The objectId of the Department.

kidId
string

The objectId of the Kid, for parent role.

configuration
string

Serialized configuration for the role.

directActivation
boolean

Whether to activate the role immediately.

Responses

Request samples

Content type
application/json
{
  • "personUUID": "string",
  • "userId": "string",
  • "schoolId": "string",
  • "roleNum": 0,
  • "title": "string",
  • "department": "string",
  • "kidId": "string",
  • "configuration": "string",
  • "directActivation": true
}

Response samples

Content type
application/json
"string"

repairRole

Helper function to repair a user role.

Request Body schema: application/json
required
object
required
object

Missing or invalid field: object

Responses

Request samples

Content type
application/json
{
  • "object": { }
}

Response samples

Content type
application/json
{ }

School

createSchool

Create a new school

Request Body schema: application/json
required
display_school_name
required
string

Display name of the school

timezone
required
string

IATA time zone of the school

territory
required
number

ISO 3166-1 numeric country code

organisation_id
string

SS12K org ID

organisation_context_id
string

SS12K org context ID

pipedrive_deal_id
string

Pipedrive Deal ID

Responses

Request samples

Content type
application/json
{
  • "display_school_name": "string",
  • "timezone": "string",
  • "territory": 0,
  • "organisation_id": "string",
  • "organisation_context_id": "string",
  • "pipedrive_deal_id": "string"
}

Response samples

Content type
application/json
{ }

Users

requestPasswordReset

Used to request a "forgot password" email for the user. Can be used without being authenticated.

Request Body schema: application/json
required
username
required
string

Username for the user requesting a new password.

Responses

Request samples

Content type
application/json
{
  • "username": "string"
}

Response samples

Content type
application/json
{ }

deleteUserRole

Delete a user role

Request Body schema: application/json
required
userRoleId
required
string

The ObjectID of the user role to delete.

deletedByMyself
boolean

Whether the function is called by the user role owner or not.

sendPush
boolean

Whether to send push notification.

Responses

Request samples

Content type
application/json
{
  • "userRoleId": "string",
  • "deletedByMyself": true,
  • "sendPush": true
}

Response samples

Content type
application/json
{ }

deleteOwnUserRole

Delete of own user role.

Request Body schema: application/json
required
userRoleId
required
string

User Role to delete.

sendPush
boolean

Whether to send push notification.

Responses

Request samples

Content type
application/json
{
  • "userRoleId": "string",
  • "sendPush": true
}

Response samples

Content type
application/json
{ }

findUsers

Cloud function to find existing users by searching for existing records using NIN, email, or phone. It returns matched user data, with anonymization for non-matching fields.

Request Body schema: application/json
required
nin
string

National Identification Number.

email
string

Email of the user.

phone
string

Phone number of the user.

Responses

Request samples

Content type
application/json
{
  • "nin": "string",
  • "email": "string",
  • "phone": "string"
}

Response samples

Content type
application/json
null

setNIN

Set NIN for initiator

Request Body schema: application/json
required
nin
string|undefined

Param nin can be a string or undefined, in which case it is unset in the db. This is considered the users choice to not submit a nin.

territory
required
number

the territory of the nin, despite the Users territory.

Responses

Request samples

Content type
application/json
{
  • "nin": null,
  • "territory": 0
}

Response samples

Content type
application/json
{ }

verifyPassword

Verify that a given password matches the user's password. Mainly used to authorize sensitive actions in the app.

Request Body schema: application/json
required
password
required
string

The user-supplied password

Responses

Request samples

Content type
application/json
{
  • "password": "string"
}

Response samples

Content type
application/json
true