Skip to content

Commit 097dd13

Browse files
committed
CMSNAV-747 - Changed order or list and removed alert triangle
1 parent b2b94db commit 097dd13

1 file changed

Lines changed: 55 additions & 56 deletions

File tree

specification/nhs-website-content-api.yaml

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ info:
88
## Overview
99
This API provides content from the [NHS website](https://www.nhs.uk) as JSON, to be consumed programmatically and used by your application.
1010
11-
⚠️ Before April 2025, many pages covering symptoms, tests or treatments were inappropriately included in the Conditions A to Z.
11+
Before April 2025, many pages covering symptoms, tests or treatments were inappropriately included in the Conditions A to Z.
1212
1313
The April 2025 update introduces two new endpoints for 'symptoms' and 'tests-and-treatments' that reflect the reallocation of these pages to new A to Z pages on the website.
1414
1515
You can reuse the content from the following sections of the NHS website:
1616
* Conditions A to Z ([Website](https://www.nhs.uk/conditions/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/conditions))
17-
* Medicines A to Z ([Website](https://www.nhs.uk/medicines/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/medicines))
1817
* Symptoms A to Z ([Website](https://www.nhs.uk/symptoms/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/symptoms))
1918
* Tests and treatments A to Z ([Website](https://www.nhs.uk/tests-and-treatments/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/tests-and-treatments))
19+
* Medicines A to Z ([Website](https://www.nhs.uk/medicines/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/medicines))
2020
* Mental health ([Website](https://www.nhs.uk/mental-health/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/mental-health))
2121
* Live Well ([Website](https://www.nhs.uk/live-well/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/live-well))
2222
* Pregnancy ([Website](https://www.nhs.uk/pregnancy/) | [API](https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/pregnancy))
@@ -467,7 +467,6 @@ paths:
467467
| 403 | ACCESS_DENIED | User cannot perform this action. |
468468
| 404 | RESOURCE_NOT_FOUND | Page not found. |
469469
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
470-
471470
/conditions:
472471
parameters:
473472
- $ref: "#/components/parameters/page"
@@ -558,7 +557,7 @@ paths:
558557
| 403 | ACCESS_DENIED | User cannot perform this action. |
559558
| 404 | RESOURCE_NOT_FOUND | Page not found. |
560559
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
561-
/medicines:
560+
/symptoms:
562561
parameters:
563562
- $ref: "#/components/parameters/page"
564563
- $ref: "#/components/parameters/category"
@@ -567,13 +566,13 @@ paths:
567566
- $ref: "#/components/parameters/endDate"
568567
- $ref: "#/components/parameters/order"
569568
get:
570-
summary: Get all pages in the Medicines A to Z
571-
operationId: get-medicines
569+
summary: Get all pages in the Symptoms A to Z
570+
operationId: get-symptoms
572571
description: |
573572
## Overview
574-
Use this endpoint to get details of pages in the [Medicines A to Z](https://www.nhs.uk/medicines).
573+
Use this endpoint to get details of pages in the [Symptoms A to Z](https://www.nhs.uk/symptoms).
575574
576-
Passing in no parameters returns all pages under 'medicines'.
575+
Passing in no parameters returns all pages under 'symptoms'.
577576
578577
The response is limited to 25 child pages and is paginated.
579578
@@ -585,18 +584,18 @@ paths:
585584
586585
However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format.
587586
588-
For example `https://api.service.nhs.uk/nhs-website-content/medicines?startDate=2022-01-01&orderBy=dateModified`
587+
For example `https://api.service.nhs.uk/nhs-website-content/symptoms?startDate=2022-01-01&orderBy=dateModified`
589588
590589
responses:
591590
"200":
592591
description: |
593-
A valid query for medicines.
592+
A valid query for symptoms.
594593
content:
595594
application/json:
596595
schema:
597596
$ref: components/schemas/WebPage.json
598597
example:
599-
$ref: components/examples/MedicinesAToZ.json
598+
$ref: components/examples/SymptomsAToZ.json
600599
"4XX":
601600
description: |
602601
An error occurred as follows:
@@ -607,36 +606,45 @@ paths:
607606
| 403 | ACCESS_DENIED | User cannot perform this action. |
608607
| 404 | RESOURCE_NOT_FOUND | Page not found. |
609608
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
610-
/medicines/*:
609+
/tests-and-treatments:
611610
parameters:
612-
- $ref: "#/components/parameters/modules"
611+
- $ref: "#/components/parameters/page"
612+
- $ref: "#/components/parameters/category"
613+
- $ref: "#/components/parameters/orderBy"
614+
- $ref: "#/components/parameters/startDate"
615+
- $ref: "#/components/parameters/endDate"
616+
- $ref: "#/components/parameters/order"
613617
get:
614-
summary: Get specific medicine page
615-
operationId: get-medicine-page
618+
summary: Get all pages in the Tests and Treatments A to Z
619+
operationId: get-tests-and-treatments
616620
description: |
617621
## Overview
618-
There is an endpoint for each page under the Medicines A to Z, for example https://www.nhs.uk/medicines/acrivastine.
622+
Use this endpoint to get details of pages in the [tests-and-treatments A to Z](https://www.nhs.uk/tests-and-treatments).
619623
620-
This can be used to get specific information about individual medicines.
624+
Passing in no parameters returns all pages under 'tests-and-treatments'.
621625
622-
There is only one query parameter for these pages:
626+
The response is limited to 25 child pages and is paginated.
623627
624-
| Query parameter | Description | Type |
625-
| ----------------- | ---------------------------------------------------------------------- | ----------- |
626-
| modules | If topic is modularised, only return these modules | boolean |
628+
There are a number of query parameters that filter the results.
629+
630+
## Ordering by dates
631+
632+
The `orderBy` parameter can be `dateModified`, `lastReviewed` and `nextReview`. By default if any of the `orderBy` parameters are chosen the results are sorted by newest first.
633+
634+
However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format.
635+
636+
For example `https://api.service.nhs.uk/nhs-website-content/tests-and-treatments?startDate=2022-01-01&orderBy=dateModified`
627637
628-
# Modularisation
629-
We modularise some of our content, meaning that individual parts of the page can be reused. If a page is modularised, content appears in the `hasPart` field.
630638
responses:
631639
"200":
632640
description: |
633-
A valid query for medicines.
641+
A valid query for tests-and-treatments.
634642
content:
635643
application/json:
636644
schema:
637645
$ref: components/schemas/WebPage.json
638646
example:
639-
$ref: components/examples/MedicinesContentPage.json
647+
$ref: components/examples/TestsAndTreatmentsAToZ.json
640648
"4XX":
641649
description: |
642650
An error occurred as follows:
@@ -647,7 +655,7 @@ paths:
647655
| 403 | ACCESS_DENIED | User cannot perform this action. |
648656
| 404 | RESOURCE_NOT_FOUND | Page not found. |
649657
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
650-
/symptoms:
658+
/medicines:
651659
parameters:
652660
- $ref: "#/components/parameters/page"
653661
- $ref: "#/components/parameters/category"
@@ -656,13 +664,13 @@ paths:
656664
- $ref: "#/components/parameters/endDate"
657665
- $ref: "#/components/parameters/order"
658666
get:
659-
summary: Get all pages in the Symptoms A to Z
660-
operationId: get-symptoms
667+
summary: Get all pages in the Medicines A to Z
668+
operationId: get-medicines
661669
description: |
662670
## Overview
663-
Use this endpoint to get details of pages in the [Symptoms A to Z](https://www.nhs.uk/symptoms).
671+
Use this endpoint to get details of pages in the [Medicines A to Z](https://www.nhs.uk/medicines).
664672
665-
Passing in no parameters returns all pages under 'symptoms'.
673+
Passing in no parameters returns all pages under 'medicines'.
666674
667675
The response is limited to 25 child pages and is paginated.
668676
@@ -674,18 +682,18 @@ paths:
674682
675683
However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format.
676684
677-
For example `https://api.service.nhs.uk/nhs-website-content/symptoms?startDate=2022-01-01&orderBy=dateModified`
685+
For example `https://api.service.nhs.uk/nhs-website-content/medicines?startDate=2022-01-01&orderBy=dateModified`
678686
679687
responses:
680688
"200":
681689
description: |
682-
A valid query for symptoms.
690+
A valid query for medicines.
683691
content:
684692
application/json:
685693
schema:
686694
$ref: components/schemas/WebPage.json
687695
example:
688-
$ref: components/examples/SymptomsAToZ.json
696+
$ref: components/examples/MedicinesAToZ.json
689697
"4XX":
690698
description: |
691699
An error occurred as follows:
@@ -696,45 +704,36 @@ paths:
696704
| 403 | ACCESS_DENIED | User cannot perform this action. |
697705
| 404 | RESOURCE_NOT_FOUND | Page not found. |
698706
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
699-
/tests-and-treatments:
707+
/medicines/*:
700708
parameters:
701-
- $ref: "#/components/parameters/page"
702-
- $ref: "#/components/parameters/category"
703-
- $ref: "#/components/parameters/orderBy"
704-
- $ref: "#/components/parameters/startDate"
705-
- $ref: "#/components/parameters/endDate"
706-
- $ref: "#/components/parameters/order"
709+
- $ref: "#/components/parameters/modules"
707710
get:
708-
summary: Get all pages in the Tests and Treatments A to Z
709-
operationId: get-tests-and-treatments
711+
summary: Get specific medicine page
712+
operationId: get-medicine-page
710713
description: |
711714
## Overview
712-
Use this endpoint to get details of pages in the [tests-and-treatments A to Z](https://www.nhs.uk/tests-and-treatments).
713-
714-
Passing in no parameters returns all pages under 'tests-and-treatments'.
715-
716-
The response is limited to 25 child pages and is paginated.
717-
718-
There are a number of query parameters that filter the results.
719-
720-
## Ordering by dates
715+
There is an endpoint for each page under the Medicines A to Z, for example https://www.nhs.uk/medicines/acrivastine.
721716
722-
The `orderBy` parameter can be `dateModified`, `lastReviewed` and `nextReview`. By default if any of the `orderBy` parameters are chosen the results are sorted by newest first.
717+
This can be used to get specific information about individual medicines.
723718
724-
However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format.
719+
There is only one query parameter for these pages:
725720
726-
For example `https://api.service.nhs.uk/nhs-website-content/tests-and-treatments?startDate=2022-01-01&orderBy=dateModified`
721+
| Query parameter | Description | Type |
722+
| ----------------- | ---------------------------------------------------------------------- | ----------- |
723+
| modules | If topic is modularised, only return these modules | boolean |
727724
725+
# Modularisation
726+
We modularise some of our content, meaning that individual parts of the page can be reused. If a page is modularised, content appears in the `hasPart` field.
728727
responses:
729728
"200":
730729
description: |
731-
A valid query for tests-and-treatments.
730+
A valid query for medicines.
732731
content:
733732
application/json:
734733
schema:
735734
$ref: components/schemas/WebPage.json
736735
example:
737-
$ref: components/examples/TestsAndTreatmentsAToZ.json
736+
$ref: components/examples/MedicinesContentPage.json
738737
"4XX":
739738
description: |
740739
An error occurred as follows:

0 commit comments

Comments
 (0)