Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hack4impact-umd/breastfeeding-center-gw/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Jane App does not provide a real-time API integration, so appointment and client data is imported by uploading exported spreadsheets. Once uploaded, appointments can be queried, deleted individually or in bulk, and analyzed for client retention patterns. All endpoints require a valid Firebase Auth ID token. Delete operations additionally require theADMIN or DIRECTOR role.
Base URL: https://us-east4-breastfeeding-center-gw.cloudfunctions.net/api
POST /jane/upload
Upload Jane appointment and client data exported from Jane App. Parses the files, resolves client records against existing Firestore data, and writes appointments and updated client profiles to Firestore. Auth required: YesContent-Type:
multipart/form-data
Accepted file formats for both fields are .csv and .xlsx.
Form fields
The Jane appointment export file (
.csv or .xlsx). This field is required. The file is parsed to extract appointment records and patient identifiers.The Jane client export file (
.csv or .xlsx). Optional. When omitted, existing Firestore client records are used for matching. When provided, the client list is rebuilt from the file and merged with existing Firestore records.Behavior
- Appointments are grouped by start time and clinician to resolve parent–baby relationships.
- Each appointment group is matched to a primary client using the Jane patient number and email address.
- Clients in the appointments file that cannot be matched to an existing Firestore record or the uploaded clients file are reported as missing — no data is written if any clients are unresolvable.
- Client records are merged (not overwritten) in Firestore using batched writes.
- Appointments are written to the
janeApptscollection with a reference to the resolved client ID.
Example
Response
Returns200 OK with an empty body on success.
Error codes
| Status | Reason |
|---|---|
400 | Missing appointments file, unsupported file format, or one or more clients could not be resolved |
403 | Missing or invalid auth token |
GET /jane/appointments
Query Jane appointments stored in Firestore by date range and optionally by client ID. Can optionally join each appointment with the full client profile. Auth required: YesQuery parameters
ISO 8601 start of the query window (inclusive). If omitted, no lower bound is applied.
ISO 8601 end of the query window (inclusive). If omitted, no upper bound is applied.
When
true, each appointment in the response is enriched with the matching Client object from Firestore. When false (default), only appointment data is returned. Cannot be combined with clientId filtering.Filter results to appointments belonging to a specific Firestore client ID. Only applied when
includeClient is false.Example
Response
Returns a JSON array ofJaneAppt objects (with an optional client field when includeClient=true).
Unique appointment ID from Jane.
Firestore client ID for the associated client.
Appointment start time in ISO 8601 format.
Appointment end time in ISO 8601 format.
Type of visit:
"HOMEVISIT", "OFFICE", or "TELEHEALTH".Name of the service or treatment provided.
Name of the clinician who provided the service.
Whether this was the client’s first visit.
Full client profile object. Present only when
includeClient=true.Error codes
| Status | Reason |
|---|---|
400 | Invalid date range or query error |
403 | Missing or invalid auth token |
500 | Internal error fetching appointments |
DELETE /jane/appointments/:id
Delete a single Jane appointment record from Firestore by its appointment ID. Auth required: Yes —ADMIN or DIRECTOR role required
Path parameters
The Jane appointment ID (
apptId) of the record to delete.Example
Response
Returns200 OK with an empty body on success.
Error codes
| Status | Reason |
|---|---|
400 | Missing appointment ID |
403 | Missing or invalid auth token, or insufficient role |
POST /jane/bulk/appointments/delete
Delete multiple Jane appointment records from Firestore in a single request. Deletions are processed in batches of up to 500 documents per Firestore batch write. Auth required: Yes —ADMIN or DIRECTOR role required
Body
Array of Jane appointment IDs (
apptId) to delete. Must contain at least one entry.Example
Response
Returns200 OK with an empty body on success.
Error codes
| Status | Reason |
|---|---|
400 | Missing or empty ids array |
403 | Missing or invalid auth token, or insufficient role |
GET /jane/retention
Returns a breakdown of first-visit clients grouped by total number of visits within the date range. Used to visualize client retention on the dashboard. Clients are bucketed 1–5 by visit count; clients with 6 or more visits are grouped into bucket6.
Appointments for "bra fitting" and "pump check" services are excluded from the first-visit filter.
Auth required: Yes
Query parameters
ISO 8601 start of the analysis window. If omitted, no lower bound is applied.
ISO 8601 end of the analysis window. If omitted, no upper bound is applied.
When
true, only clients who had a recent birth relative to their first visit date are included. Defaults to false.Example
Response
Returns a JSON object where each key is a visit count (1–6) and each value is an array ofClient objects who had that many visits in the window.
Error codes
| Status | Reason |
|---|---|
400 | Invalid date range |
403 | Missing or invalid auth token |
500 | Internal error fetching retention data |
