Version 2 API: overview

Error

Error updating site page. We've logged the issue, please try again later.

Version 2 of our API is now available, and version 1 is retired. The new version differs from Version 1 in some important ways:

  • Version 2 offers a wider range of content, including stories, responses, tags, health services and treatment functions
  • Content is available in JSON and XML representations
  • API access is always in the context of a subscription on Care Opinion

As a result, use of the version 2 API is both time-bound and scoped to the same set of stories and responses as your subscription.

Update 17 April 2024

We have updated the v2 API and there are some small changes:

1. JSON is now the default representation. XML is still available. The desired representation can now be set in the query string using the format parameter, or in the HTTP Accept header.

2. Rate limiting is set to 5 requests per second.

3. Two new properties are available on the Opinion: submissionRoute and authorAgeGroup.

4. There is a breaking change for a response: the changeScore property now returns a text representation for both xml and json, and a new property changeInt returns the score as an integer value. This brings xml and json representations into line.

Entity relationship diagram

Here's an overview of the entities represented in our data, and how they relate to one another.

Entity relationship diagram

Note that healthservices are modelled as a single-parented hierarchy: a healthservice may have one parent and many children.

Healthservices provide treatment functions (specialties).

Opinions are posted about healthservices. An opinion may have tags, and a collection of responses.

The entities and relationships in the API correspond exactly to those visible and navigable via this website.

;