Skip to main content

Queries overview

📄️invoices

This query fetches a collection of invoices where the invoice date falls within the requested range. The query can be further refined through the use of QueryOptions to only fetch invoices that were created or modified (or both) within specified dates. Use filters.metadata to filter by stored customerMetadata entries. Optional filters.invoiceNumbers allows filtering by invoice numbers. Use filters.submittedToHealthcode to return only invoices submitted to Healthcode (or only those not submitted). Use filters.healthcodeStatus to match or exclude specific Healthcode statuses, for example healthcodeStatus [Validated, AwaitingCollection] } or healthcodeStatus [AwaitingCorrection, Cancelled] }. Prefer cursorPagination for large result sets (for example sync/export); deep offset pages remain expensive even with indexes. Existing pagination: { page, pageSize } behaviour is unchanged. Do not provide pagination and cursorPagination together.

📄️prescriptions

This query fetches a collection of prescriptions that were issued within the specified DateRange. The query can be further refined through the use of QueryOptions to include records that have been deleted, it should be noted that createdAt and updatedAt are not applicable to prescriptions. Prefer cursorPagination for large result sets (for example sync/export); deep offset pages remain expensive even with indexes. Existing pagination: { page, pageSize } behaviour is unchanged. Do not provide pagination and cursorPagination together.

📄️products

This query returns a collection of products that match the requested filters. Optional free-text search is compared against the product code or product name. Custom metadata is not included in search; use filters.metadata to filter by stored customerMetadata entries (same sanitisation rules as updateProductMetadata). Prefer cursorPagination for large result sets (for example sync/export); deep offset pages remain expensive even with indexes. Existing pagination: { page, pageSize } behaviour is unchanged. Do not provide pagination and cursorPagination together.

📄️users

This query fetches a collection of users that belong to the same practice as the API user making the request. The results are paginated depending on the requested paging parameters. The query can be further refined through the use of UsersQueryOptions to filter users by their creation date or last update date, search by name, email, or metadata values, or set includeDeleted to true to include users who have been deleted in Semble. Use filters.isClinician to filter clinicians, filters.metadata to filter by stored customerMetadata entries. options.cliniciansOnly is deprecated; use filters.isClinician instead.