Kibooz API (1)
REST API of Kibooz, the kindergarten app where teachers record the mood of children and parents follow it and earn points for sorting trash.
Every JSON response uses one envelope. A success has success: true with an optional message and data. A failure has success: false, a message and a stable errorCode, and validation failures also carry a details object with one message per field.
Protected routes need the access token from login as a bearer token. Rate limits answer 429 with RATE_LIMITED and a Retry-After header. They count requests per signed-in user, and login, registration and token routes per account, never per IP address. The daily limit of trash claims is a different 429 with TRASH_DAILY_LIMIT_REACHED and no Retry-After header, because it ends at midnight of the local day. Login, registration, changing the password and deleting the account also answer 429 with RATE_LIMITED and Retry-After: 1 when the server is busy checking passwords, and the three photo uploads (the avatar, a trash claim and a chat photo) answer the same when the server is already receiving as many photos as it may, or when the same account already has as many uploads running as one account may. A client can send the same request once more after that second.
Every operation can also fail with 500 and INTERNAL_ERROR when the server breaks, or with 503 and SERVER_TIMEOUT and a Retry-After header when a request did not finish within the time the server gives it. A path that does not exist answers 404 with NOT_FOUND, a method that is not allowed answers 405 with METHOD_NOT_ALLOWED, a request that cannot be processed answers 400 with BAD_REQUEST, a request with a non-empty Content-Encoding other than identity, such as gzip or zstd, answers 415 with BAD_REQUEST, a JSON body of more than 64 KB answers 413 with BODY_TOO_LARGE on every route except the three photo uploads, and a photo over its size limit answers 413 with FILE_TOO_LARGE. A client should branch on errorCode and treat an unknown code like its status.
Whether the API is up, and the history of past incidents, is on the status page at https://status.syafahadyan.com/.
A day, such as "today" or the Monday to Friday of a week, is the local day of the school. It follows the timezone of the deployment, which is Asia/Jakarta unless the operator sets another one.