OpenScore Website Widget API Documentation

OpenScore Website Widget API Documentation

Overview

  • The widget is added to the ‘HTML’ code for your website.

  • The widget is tailored specifically to each of you care locations.

  • There are many ways to link - including by the Regulatory ID.

  • In England linking by CQC ID is simplest and is shown below.

Overview

  • The widget is added to the ‘HTML’ code for your website.

  • The widget is tailored specifically to each of you care locations.

  • There are many ways to link - including by the Regulatory ID.

  • In England linking by CQC ID is simplest and is shown below.

Adding the Website Widget

  • The widget can be added verbatim as shown below
    or by programmatically setting data-reg-id to the CQC ID.

  • Your specific data-api-key activates the widget,
    and this is issued separately by OpenScore to the account owner.

  • Shown below is the code to link on each of your locations’ pages.

  • Place the <script> tag exactly where you wish the widget to appear:

Adding the Website Widget

  • The widget can be added verbatim as shown below
    or by programmatically setting data-reg-id to the CQC ID.

  • Your specific data-api-key activates the widget,
    and this is issued separately by OpenScore to the account owner.

  • Shown below is the code to link on each of your locations’ pages.

  • Place the <script> tag exactly where you wish the widget to appear:

Location Example

    <script src="https://static.openscore.org.uk/openscore/files/static/js/widget.js"
            data-api-key="YOUR-API-KEY"
            data-reg-id="1-1">
    </script>

Advanced Options

The following options are useful for multiple widgets per page and extra customisation:

  • data-container-id may be set to the ID of <div> tag created to hold the widget,
    and this can be useful to apply specific styles to the widget container or where
    your website requires additional options to facilitate embedding the widget.

  • data-tag allows a widget instance to have specific customisation applied,
    e.g. display of special offers or time driven content such as seasonal menu offers.
    It is needed for multiple OpenScore widgets on a page, e.g. “sidebar1” or “footer”.

  • Here is an example where OpenScore widget is used in a sidebar:

    <script src="https://static.openscore.org.uk/openscore/files/static/js/widget.js"
            data-api-key="YOUR-API-KEY"
            data-reg-id="1-1"
            data-tag="sidebar1">
    </script>
  • In the above example, sidebar1 can be used to customise the widget in the OpenScore control panel.

Troubleshooting

To view the OpenScore widget standalone in its own page:

Version History

September 2024.

© 2024 OpenScore. All rights reserved.

© 2024 OpenScore. All rights reserved.

© 2024 OpenScore. All rights reserved.