Skip to main content
End users must accept Squire’s Terms & Conditions before you can start recording a consultation. The SDK provides a dedicated method to check the acceptance status, retrieve the document URL, and programmatically record acceptance — so you can build this flow directly into your EHR’s login or onboarding screen.

Acceptance flow

1

Retrieve T&C document info

After initializing the SDK, fetch the current Terms & Conditions document for the authenticated user:
2

Check acceptance status

Check whether the user has already accepted the current version:
3

Display the document

Use terms.documentUrl to show the document to the user. You can open it in a new tab:
Alternatively, embed the document in an iframe for an in-app experience:
4

Record acceptance

When the user clicks your accept button, call terms.accept():

Handling T&C version updates

When Squire publishes a new version of the Terms & Conditions, getTermsAndConditionsDocumentInfo() automatically returns the new version with an updated documentUrl and isAccepted set to false. Users who accepted a previous version must accept the new one before they can record again. Run the same acceptance flow described above whenever isAccepted is false.

API reference

getTermsAndConditionsDocumentInfo()

Returns a promise that resolves with information about the current Terms & Conditions document.