Skip to content

Parent SDK Reference

Auto-generated by scripts/generate-sdk-docs.py on 2026-04-27. Do not edit manually — regenerate with python3 scripts/generate-sdk-docs.py (or npm run sync from ui-clients/sdk/ to also refresh the underlying OpenAPI specs).

import { attendanceParent, canteenParent, schoolParent, wallet, audit } from '@smartsapp/sdk/parent';

Student Attendance (attendanceParent)

Not yet implemented

This module is planned but not yet available.


Canteen (canteenParent)

Orders

getParentOrder()

Get an order by ID

GET /api/canteen/parent/orders/{orderId}

Parameters:

Name Type In Required Description
orderId string (uuid) path Yes
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentOrderResponse (200)

Field Type Description Example
id string (uuid) Order ID "550e8400-e29b-41d4-a716-446655440000"
batchId string (uuid) ID of the batch this order belongs to "550e8400-e29b-41d4-a716-446655440000"
orderNumber string Human-readable order number "ORD-20260115-001"
child ChildSummary Child summary for order context
totalPrice number Total price of the order 25.0
paymentMode "SIKA_ID" | "ONLINE_PAYMENT" | "CREDIT" | "CASH" | "ALLOCATION" How the order was paid: CASH, MEAL_TICKET, MOBILE_MONEY "SIKA_ID"
status "DRAFT" | "PAID" | "SERVED" | "PARTIALLY_SERVED" | "CANCELLED" Current order status: DRAFT, CONFIRMED, SERVED, CANCELLED "DRAFT"
scheduledDate string (date) Date the order is scheduled for "2026-01-15"
currency string Currency code "GHS"
items OrderItemDetail[] Items included in this order
createdAt string (date-time) When the order was created "2026-01-15T10:30:00Z"

ChildSummary fields:

Field Type Description Example
id string (uuid) Student ID "550e8400-e29b-41d4-a716-446655440000"
firstName string Child's first name "Kofi"
lastName string Child's last name "Asante"
profilePhotoUrl string URL of the child's profile photo "https://storage.example.com/photos/student.jpg"

OrderItemDetail fields:

Field Type Description Example
sectionId string (uuid) ID of the menu section "550e8400-e29b-41d4-a716-446655440000"
sectionName string Name of the menu section "Lunch Main Course"
itemId string (uuid) ID of the ordered item "550e8400-e29b-41d4-a716-446655440000"
itemName string Name of the ordered item "Jollof Rice"
variantId string (uuid) ID of the selected variant "550e8400-e29b-41d4-a716-446655440000"
variantName string Name of the selected variant "Large"
quantity integer (int32) Quantity ordered 1
unitPrice number Unit price at time of order 12.5
served boolean Whether this item has been served
servedAt string (date-time) When the item was served "2026-01-15T12:30:00Z"
servedByName string Name of the user who served the item "Abena Mensah"

Example:

import { canteenParent } from '@smartsapp/sdk/parent';
import type { ParentOrderResponse } from '@smartsapp/sdk/parent';

const { data: parentOrder, error } = await canteenParent.getParentOrder({
  path: { orderId: "..." }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentOrder is typed as ParentOrderResponse

updateParentOrder()

Update a draft order

PUT /api/canteen/parent/orders/{orderId}

Parameters:

Name Type In Required Description
orderId string (uuid) path Yes
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Request Body: ParentUpdateOrderRequest

Field Type Required Description
lines UpdatedOrderLine[] Yes Updated order lines — replaces all existing items in the order

UpdatedOrderLine fields:

Field Type Required Description
sectionId string (uuid) Yes Menu section ID
itemId string (uuid) Yes Item ID
variantId string (uuid) No Variant ID (null for FIXED/NO_PRICE items)
quantity integer (int32) No Quantity

Response: ParentOrderResponse (200)

Field Type Description Example
id string (uuid) Order ID "550e8400-e29b-41d4-a716-446655440000"
batchId string (uuid) ID of the batch this order belongs to "550e8400-e29b-41d4-a716-446655440000"
orderNumber string Human-readable order number "ORD-20260115-001"
child ChildSummary Child summary for order context
totalPrice number Total price of the order 25.0
paymentMode "SIKA_ID" | "ONLINE_PAYMENT" | "CREDIT" | "CASH" | "ALLOCATION" How the order was paid: CASH, MEAL_TICKET, MOBILE_MONEY "SIKA_ID"
status "DRAFT" | "PAID" | "SERVED" | "PARTIALLY_SERVED" | "CANCELLED" Current order status: DRAFT, CONFIRMED, SERVED, CANCELLED "DRAFT"
scheduledDate string (date) Date the order is scheduled for "2026-01-15"
currency string Currency code "GHS"
items OrderItemDetail[] Items included in this order
createdAt string (date-time) When the order was created "2026-01-15T10:30:00Z"

ChildSummary fields:

Field Type Description Example
id string (uuid) Student ID "550e8400-e29b-41d4-a716-446655440000"
firstName string Child's first name "Kofi"
lastName string Child's last name "Asante"
profilePhotoUrl string URL of the child's profile photo "https://storage.example.com/photos/student.jpg"

OrderItemDetail fields:

Field Type Description Example
sectionId string (uuid) ID of the menu section "550e8400-e29b-41d4-a716-446655440000"
sectionName string Name of the menu section "Lunch Main Course"
itemId string (uuid) ID of the ordered item "550e8400-e29b-41d4-a716-446655440000"
itemName string Name of the ordered item "Jollof Rice"
variantId string (uuid) ID of the selected variant "550e8400-e29b-41d4-a716-446655440000"
variantName string Name of the selected variant "Large"
quantity integer (int32) Quantity ordered 1
unitPrice number Unit price at time of order 12.5
served boolean Whether this item has been served
servedAt string (date-time) When the item was served "2026-01-15T12:30:00Z"
servedByName string Name of the user who served the item "Abena Mensah"

Example:

import { canteenParent, zParentUpdateOrderRequest } from '@smartsapp/sdk/parent';
import type { ParentUpdateOrderRequest, ParentOrderResponse } from '@smartsapp/sdk/parent';

const input: ParentUpdateOrderRequest = {
  lines: [{
      sectionId: "550e8400-...",
      itemId: "550e8400-...",
      variantId: "550e8400-...",
      quantity: 1
  }]
};

const parsed = zParentUpdateOrderRequest.safeParse(input);
if (!parsed.success) {
  console.error(parsed.error.issues);
  // [{ path: ['fieldName'], message: 'Required', code: 'invalid_type' }, ...]
  return;
}

const { data: parentOrder, error } = await canteenParent.updateParentOrder({
  body: input,
  path: { orderId: "..." }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentOrder is typed as ParentOrderResponse

removeParentOrder()

Remove a draft order

DELETE /api/canteen/parent/orders/{orderId}

Parameters:

Name Type In Required Description
orderId string (uuid) path Yes
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: void (204)

Example:

import { canteenParent } from '@smartsapp/sdk/parent';

const { data, error } = await canteenParent.removeParentOrder({
  path: { orderId: "..." }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}

cancelParentOrder()

Cancel an order

PUT /api/canteen/parent/orders/{orderId}/cancel

Parameters:

Name Type In Required Description
orderId string (uuid) path Yes
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentOrderResponse (200)

Field Type Description Example
id string (uuid) Order ID "550e8400-e29b-41d4-a716-446655440000"
batchId string (uuid) ID of the batch this order belongs to "550e8400-e29b-41d4-a716-446655440000"
orderNumber string Human-readable order number "ORD-20260115-001"
child ChildSummary Child summary for order context
totalPrice number Total price of the order 25.0
paymentMode "SIKA_ID" | "ONLINE_PAYMENT" | "CREDIT" | "CASH" | "ALLOCATION" How the order was paid: CASH, MEAL_TICKET, MOBILE_MONEY "SIKA_ID"
status "DRAFT" | "PAID" | "SERVED" | "PARTIALLY_SERVED" | "CANCELLED" Current order status: DRAFT, CONFIRMED, SERVED, CANCELLED "DRAFT"
scheduledDate string (date) Date the order is scheduled for "2026-01-15"
currency string Currency code "GHS"
items OrderItemDetail[] Items included in this order
createdAt string (date-time) When the order was created "2026-01-15T10:30:00Z"

ChildSummary fields:

Field Type Description Example
id string (uuid) Student ID "550e8400-e29b-41d4-a716-446655440000"
firstName string Child's first name "Kofi"
lastName string Child's last name "Asante"
profilePhotoUrl string URL of the child's profile photo "https://storage.example.com/photos/student.jpg"

OrderItemDetail fields:

Field Type Description Example
sectionId string (uuid) ID of the menu section "550e8400-e29b-41d4-a716-446655440000"
sectionName string Name of the menu section "Lunch Main Course"
itemId string (uuid) ID of the ordered item "550e8400-e29b-41d4-a716-446655440000"
itemName string Name of the ordered item "Jollof Rice"
variantId string (uuid) ID of the selected variant "550e8400-e29b-41d4-a716-446655440000"
variantName string Name of the selected variant "Large"
quantity integer (int32) Quantity ordered 1
unitPrice number Unit price at time of order 12.5
served boolean Whether this item has been served
servedAt string (date-time) When the item was served "2026-01-15T12:30:00Z"
servedByName string Name of the user who served the item "Abena Mensah"

Example:

import { canteenParent } from '@smartsapp/sdk/parent';
import type { ParentOrderResponse } from '@smartsapp/sdk/parent';

const { data: parentOrder, error } = await canteenParent.cancelParentOrder({
  path: { orderId: "..." }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentOrder is typed as ParentOrderResponse

confirmParentBatch()

Confirm all draft orders in a batch

PUT /api/canteen/parent/orders/batch/{batchId}/confirm

Parameters:

Name Type In Required Description
Idempotency-Key string (uuid) header Yes Client-generated UUID to prevent duplicate confirmation on retries
batchId string (uuid) path Yes
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Request Body: ParentConfirmOrderRequest

Field Type Required Description
paymentMode "SIKA_ID" | "ONLINE_PAYMENT" | "CREDIT" | "CASH" | "ALLOCATION" Yes Payment mode for this order

Response: ParentBatchResponse (200)

Field Type Description Example
batchId string (uuid) Batch ID "550e8400-e29b-41d4-a716-446655440000"
orderCount integer (int32) Number of orders in this batch 3
batchTotalPrice number Total price for all orders in the batch 75.0
totalCancelledPrice number Total price of cancelled orders in the batch 25.0
currency string Currency code "GHS"
orders ParentOrderResponse[] Orders in this batch

ParentOrderResponse fields:

Field Type Description Example
id string (uuid) Order ID "550e8400-e29b-41d4-a716-446655440000"
batchId string (uuid) ID of the batch this order belongs to "550e8400-e29b-41d4-a716-446655440000"
orderNumber string Human-readable order number "ORD-20260115-001"
child ChildSummary Child summary for order context
totalPrice number Total price of the order 25.0
paymentMode "SIKA_ID" | "ONLINE_PAYMENT" | "CREDIT" | "CASH" | "ALLOCATION" How the order was paid: CASH, MEAL_TICKET, MOBILE_MONEY "SIKA_ID"
status "DRAFT" | "PAID" | "SERVED" | "PARTIALLY_SERVED" | "CANCELLED" Current order status: DRAFT, CONFIRMED, SERVED, CANCELLED "DRAFT"
scheduledDate string (date) Date the order is scheduled for "2026-01-15"
currency string Currency code "GHS"
items OrderItemDetail[] Items included in this order
createdAt string (date-time) When the order was created "2026-01-15T10:30:00Z"

Example:

import { canteenParent, zParentConfirmOrderRequest } from '@smartsapp/sdk/parent';
import type { ParentConfirmOrderRequest, ParentBatchResponse } from '@smartsapp/sdk/parent';

const input: ParentConfirmOrderRequest = {
  paymentMode: "SIKA_ID"
};

const parsed = zParentConfirmOrderRequest.safeParse(input);
if (!parsed.success) {
  console.error(parsed.error.issues);
  // [{ path: ['fieldName'], message: 'Required', code: 'invalid_type' }, ...]
  return;
}

const { data: parentBatch, error } = await canteenParent.confirmParentBatch({
  body: input,
  path: { batchId: "..." }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentBatch is typed as ParentBatchResponse

getParentOrders()

List orders grouped by date then by kid

GET /api/canteen/parent/orders

Parameters:

Name Type In Required Description
studentId string (uuid) query No Filter to a specific child. Omit to list across all children.
startDate string (date) query No Start date (inclusive). Defaults to today.
endDate string (date) query No End date (inclusive). No upper bound if omitted.
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentOrdersByDateResponse (200)

Field Type Description Example
dates OrderDateEntry[] Dates with at least one order in the queried period, sorted ascending

OrderDateEntry fields:

Field Type Description Example
date string (date) Scheduled date "2026-01-15"
orderCount integer (int32) Total number of orders on this date across all kids 3
kids KidOrders[] Kids with at least one order on this date, sorted by student name

Example:

import { canteenParent } from '@smartsapp/sdk/parent';
import type { ParentOrdersByDateResponse } from '@smartsapp/sdk/parent';

const { data: parentOrdersByDate, error } = await canteenParent.getParentOrders({
  query: { studentId: "...", startDate: "2026-01-01", endDate: "2026-01-01" }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentOrdersByDate is typed as ParentOrdersByDateResponse

placeParentOrder()

Place a pre-order

POST /api/canteen/parent/orders

Parameters:

Name Type In Required Description
Idempotency-Key string (uuid) header Yes Client-generated UUID to prevent duplicate order creation on retries
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Request Body: ParentPlaceOrderRequest

Field Type Required Description
children ChildOrder[] Yes Orders grouped by child

ChildOrder fields:

Field Type Required Description
studentId string (uuid) Yes Student ID
dates DateOrder[] Yes Orders grouped by date

Response: ParentBatchResponse (201)

Field Type Description Example
batchId string (uuid) Batch ID "550e8400-e29b-41d4-a716-446655440000"
orderCount integer (int32) Number of orders in this batch 3
batchTotalPrice number Total price for all orders in the batch 75.0
totalCancelledPrice number Total price of cancelled orders in the batch 25.0
currency string Currency code "GHS"
orders ParentOrderResponse[] Orders in this batch

ParentOrderResponse fields:

Field Type Description Example
id string (uuid) Order ID "550e8400-e29b-41d4-a716-446655440000"
batchId string (uuid) ID of the batch this order belongs to "550e8400-e29b-41d4-a716-446655440000"
orderNumber string Human-readable order number "ORD-20260115-001"
child ChildSummary Child summary for order context
totalPrice number Total price of the order 25.0
paymentMode "SIKA_ID" | "ONLINE_PAYMENT" | "CREDIT" | "CASH" | "ALLOCATION" How the order was paid: CASH, MEAL_TICKET, MOBILE_MONEY "SIKA_ID"
status "DRAFT" | "PAID" | "SERVED" | "PARTIALLY_SERVED" | "CANCELLED" Current order status: DRAFT, CONFIRMED, SERVED, CANCELLED "DRAFT"
scheduledDate string (date) Date the order is scheduled for "2026-01-15"
currency string Currency code "GHS"
items OrderItemDetail[] Items included in this order
createdAt string (date-time) When the order was created "2026-01-15T10:30:00Z"

Example:

import { canteenParent, zParentPlaceOrderRequest } from '@smartsapp/sdk/parent';
import type { ParentPlaceOrderRequest, ParentBatchResponse } from '@smartsapp/sdk/parent';

const input: ParentPlaceOrderRequest = {
  children: [{
      studentId: "550e8400-...",
      dates: "..."
  }]
};

const parsed = zParentPlaceOrderRequest.safeParse(input);
if (!parsed.success) {
  console.error(parsed.error.issues);
  // [{ path: ['fieldName'], message: 'Required', code: 'invalid_type' }, ...]
  return;
}

const { data: parentBatch, error } = await canteenParent.placeParentOrder({
  body: input
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentBatch is typed as ParentBatchResponse

getParentBatch()

Get a batch of orders

GET /api/canteen/parent/orders/batch/{batchId}

Parameters:

Name Type In Required Description
batchId string (uuid) path Yes
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentBatchResponse (200)

Field Type Description Example
batchId string (uuid) Batch ID "550e8400-e29b-41d4-a716-446655440000"
orderCount integer (int32) Number of orders in this batch 3
batchTotalPrice number Total price for all orders in the batch 75.0
totalCancelledPrice number Total price of cancelled orders in the batch 25.0
currency string Currency code "GHS"
orders ParentOrderResponse[] Orders in this batch

ParentOrderResponse fields:

Field Type Description Example
id string (uuid) Order ID "550e8400-e29b-41d4-a716-446655440000"
batchId string (uuid) ID of the batch this order belongs to "550e8400-e29b-41d4-a716-446655440000"
orderNumber string Human-readable order number "ORD-20260115-001"
child ChildSummary Child summary for order context
totalPrice number Total price of the order 25.0
paymentMode "SIKA_ID" | "ONLINE_PAYMENT" | "CREDIT" | "CASH" | "ALLOCATION" How the order was paid: CASH, MEAL_TICKET, MOBILE_MONEY "SIKA_ID"
status "DRAFT" | "PAID" | "SERVED" | "PARTIALLY_SERVED" | "CANCELLED" Current order status: DRAFT, CONFIRMED, SERVED, CANCELLED "DRAFT"
scheduledDate string (date) Date the order is scheduled for "2026-01-15"
currency string Currency code "GHS"
items OrderItemDetail[] Items included in this order
createdAt string (date-time) When the order was created "2026-01-15T10:30:00Z"

Example:

import { canteenParent } from '@smartsapp/sdk/parent';
import type { ParentBatchResponse } from '@smartsapp/sdk/parent';

const { data: parentBatch, error } = await canteenParent.getParentBatch({
  path: { batchId: "..." }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentBatch is typed as ParentBatchResponse

getKidsSchedule()

Aggregated menu schedule across all of a parent's kids

GET /api/canteen/parent/kids-schedule

Parameters:

Name Type In Required Description
studentId string (uuid) query No Filter to a single kid. Omit to include every one of the parent's kids.
startDate string (date) query No Start date (inclusive). Defaults to today; values before today are clamped to today.
endDate string (date) query No End date (inclusive). No upper bound beyond each applicable menu's end date if omitted.
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentKidsScheduleByDateResponse (200)

Field Type Description Example
dates DateEntry[] Dates with at least one applicable section, sorted ascending

DateEntry fields:

Field Type Description Example
date string (date) Scheduled date "2026-04-21"
sections SectionEntry[] Sections on this date, sorted by serving start time

Example:

import { canteenParent } from '@smartsapp/sdk/parent';
import type { ParentKidsScheduleByDateResponse } from '@smartsapp/sdk/parent';

const { data: parentKidsScheduleByDate, error } = await canteenParent.getKidsSchedule({
  query: { studentId: "...", startDate: "2026-01-01", endDate: "2026-01-01" }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentKidsScheduleByDate is typed as ParentKidsScheduleByDateResponse

getMenusForChild()

List menus available to a child

GET /api/canteen/parent/children/{studentId}/menus

Parameters:

Name Type In Required Description
studentId string (uuid) path Yes Student ID
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentMenuResponse[] (200)

Field Type Description Example
id string (uuid) Menu ID "550e8400-e29b-41d4-a716-446655440000"
name string Name of the menu "Term 1 Lunch Menu"
description string Description of the menu "Daily lunch options for Term 1"
purpose "INFO_ONLY" | "PARENTS_CAN_ORDER" Purpose of the menu: LUNCH, BREAKFAST, SNACK "INFO_ONLY"
paymentType "ORDER_AND_PAY_ITEM_PRICING" | "ORDER_ONLY_NO_PAYMENT" | "ORDER_AND_PAY_TICKET_PRICING" Payment type: PREPAID, POSTPAID "ORDER_AND_PAY_ITEM_PRICING"
startDate string (date) First day the menu is active "2026-01-06"
endDate string (date) Last day the menu is active "2026-03-28"
canOrder boolean Whether the parent can place orders on this menu (false for INFO_ONLY)

Example:

import { canteenParent } from '@smartsapp/sdk/parent';

const { data, error } = await canteenParent.getMenusForChild({
  path: { studentId: "..." }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// data is typed as ParentMenuResponse[]

getMenuScheduleForChild()

Get full menu schedule with items

GET /api/canteen/parent/children/{studentId}/menus/{menuId}/schedule

Parameters:

Name Type In Required Description
studentId string (uuid) path Yes Student ID
menuId string (uuid) path Yes Menu ID
startDate string (date) query No Start date filter (inclusive). Defaults to today.
endDate string (date) query No End date filter (inclusive). Defaults to menu end date.
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentMenuScheduleResponse (200)

Field Type Description Example
menuId string (uuid) ID of the menu "550e8400-e29b-41d4-a716-446655440000"
menuName string Name of the menu "Term 1 Lunch Menu"
sections SectionSchedule[] Menu sections with their scheduled items

SectionSchedule fields:

Field Type Description Example
sectionId string (uuid) Section ID "550e8400-e29b-41d4-a716-446655440000"
name string Name of the section "Lunch Main Course"
servingStartTime string Serving start time "11:30:00"
servingEndTime string Serving end time "13:30:00"
selectionMode "SINGLE" | "MULTIPLE" How students select items: SINGLE or MULTIPLE "SINGLE"
dates DateSchedule[] Schedule grouped by date

Example:

import { canteenParent } from '@smartsapp/sdk/parent';
import type { ParentMenuScheduleResponse } from '@smartsapp/sdk/parent';

const { data: parentMenuSchedule, error } = await canteenParent.getMenuScheduleForChild({
  path: { studentId: "...", menuId: "..." },
  query: { startDate: "2026-01-01", endDate: "2026-01-01" }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentMenuSchedule is typed as ParentMenuScheduleResponse

Catering Services

getAvailableCateringServices()

List catering services whose items appear in menus applicable to the parent's kids

GET /api/canteen/parent/catering-services

Parameters:

Name Type In Required Description
studentId string (uuid) query No Filter to a single kid. Omit to include every one of the parent's kids.
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentCateringServiceResponse[] (200)

Field Type Description Example
id string (uuid) Catering service ID "550e8400-..."
name string Catering service name "Green Kitchen"
logo string URL of the catering service logo
email string Contact email
phone string Contact phone

Example:

import { canteenParent } from '@smartsapp/sdk/parent';

const { data, error } = await canteenParent.getAvailableCateringServices({
  query: { studentId: "..." }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// data is typed as ParentCateringServiceResponse[]

getCateringServiceSchedule()

Kids-schedule scoped to a single catering service

GET /api/canteen/parent/catering-services/{cateringServiceId}/schedule

Parameters:

Name Type In Required Description
cateringServiceId string (uuid) path Yes Catering service ID
studentId string (uuid) query No Filter to a single kid. Omit to include every one of the parent's kids.
startDate string (date) query No Start date (inclusive). Defaults to today.
endDate string (date) query No End date (inclusive). No upper bound beyond each applicable menu's end date if omitted.
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentKidsScheduleByDateResponse (200)

Field Type Description Example
dates DateEntry[] Dates with at least one applicable section, sorted ascending

DateEntry fields:

Field Type Description Example
date string (date) Scheduled date "2026-04-21"
sections SectionEntry[] Sections on this date, sorted by serving start time

Example:

import { canteenParent } from '@smartsapp/sdk/parent';
import type { ParentKidsScheduleByDateResponse } from '@smartsapp/sdk/parent';

const { data: parentKidsScheduleByDate, error } = await canteenParent.getCateringServiceSchedule({
  path: { cateringServiceId: "..." },
  query: { studentId: "...", startDate: "2026-01-01", endDate: "2026-01-01" }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// parentKidsScheduleByDate is typed as ParentKidsScheduleByDateResponse


School (schoolParent)

Children

getMyChildren()

List the authenticated parent's children

GET /api/school/parent/children

Parameters:

Name Type In Required Description
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: ParentChildResponse[] (200)

Field Type Description Example
id string (uuid) Student ID "550e8400-..."
firstName string First name
lastName string Last name
profilePhotoUrl string Profile photo URL
classroomId string (uuid) Classroom ID "550e8400-..."
classroomName string Classroom name
campusId string (uuid) Campus ID "550e8400-..."
campusName string Campus name

Example:

import { schoolParent } from '@smartsapp/sdk/parent';

const { data, error } = await schoolParent.getMyChildren();

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}
// data is typed as ParentChildResponse[]


Platform (shared)

These modules are available in both staff and parent SDKs.

Wallet (wallet)

Wallet

creditWallet()

Credit a student's Sika ID wallet

POST /api/wallet/credit

Parameters:

Name Type In Required Description
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Request Body: CreditWalletRequest

Field Type Required Description
studentId string (uuid) Yes ID of the student whose wallet is being credited
amount number Yes Amount to credit (positive)
currency string Yes ISO 4217 currency code

Response: void (200)

Example:

import { wallet, zCreditWalletRequest } from '@smartsapp/sdk/parent';
import type { CreditWalletRequest } from '@smartsapp/sdk/parent';

const input: CreditWalletRequest = {
  studentId: "00000000-0000-0000-0000-000000000001",
  amount: 150.0,
  currency: "GHS"
};

const parsed = zCreditWalletRequest.safeParse(input);
if (!parsed.success) {
  console.error(parsed.error.issues);
  // [{ path: ['fieldName'], message: 'Required', code: 'invalid_type' }, ...]
  return;
}

const { data, error } = await wallet.creditWallet({
  body: input
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}

Audit (audit)

Audit Logs

listAuditEntries()

List audit log entries with optional filters

GET /api/platform/audit-logs

Parameters:

Name Type In Required Description
entityType string query No
entityId string query No
actorId string query No
page integer (int32) query No
size integer (int32) query No
X-Request-Id string (uuid) header No Optional client-generated request ID for tracing. Auto-generated if omitted.

Response: PagedResponseAuditLogResponse (200)

Field Type Description Example
content AuditLogResponse[] Items on the current page
page integer (int32) Current page number (0-based) 0
size integer (int32) Page size 20
totalElements integer (int64) Total number of elements 42
totalPages integer (int32) Total number of pages 3
last boolean Whether this is the last page

AuditLogResponse fields:

Field Type Description Example
id string (uuid) Audit log entry ID "550e8400-..."
entityType string Type of the audited entity "CanteenOrder"
entityId string ID of the audited entity
action "CREATE" | "UPDATE" | "DELETE" Action performed "CREATE"
actorId string ID of the user who performed the action
beforeState string Entity state before the action (JSON)
afterState string Entity state after the action (JSON)
createdAt string (date-time) When the action occurred "2026-01-01T08:00:00Z"

Example:

import { audit } from '@smartsapp/sdk/parent';
import type { PagedResponseAuditLogResponse } from '@smartsapp/sdk/parent';

const { data: result, error } = await audit.listAuditEntries({
  query: { entityType: "...", entityId: "...", actorId: "..." }
});

if (error) {
  // error is typed as ProblemDetail (RFC 9457)
  // { type, title, status, detail }
  console.error(error.title, error.detail);
  return;
}

const auditLogs = result.content;           // AuditLogResponse[]
const { page, totalPages, totalElements, last } = result;

Auth (auth)

Not yet implemented

This module is planned but not yet available.

Chat (chat)

Not yet implemented

This module is planned but not yet available.

Engagement (engagement)

Not yet implemented

This module is planned but not yet available.

Notifications (notifications)

Not yet implemented

This module is planned but not yet available.