You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [find services near you](https://www.nhs.uk/nhs-services/services-near-you/)
22
+
* get Ratings and Reviews of NHS services.
22
23
23
24
## Who can use this API
24
-
Anyone can use this API. Users need to agree to our [terms and conditions](https://developer.api.nhs.uk/about/terms)
25
+
Anyone can use this API for any purpose, so long as they include an attribution as per our [terms and conditions](https://developer.api.nhs.uk/about/terms).
25
26
26
-
## API status and roadmap
27
-
This API has moved from the [NHS website developer portal](https://developer.api.nhs.uk/). It is currently [in development](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).
27
+
## API status
28
+
This API has moved from the [NHS website developer portal](https://developer.api.nhs.uk/).
29
+
It is currently [in development](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).
28
30
29
31
## Service level
30
-
31
-
This API is a [gold service](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels), meaning that it is operational and supported 24 x 7 x 365
32
+
This API is a [gold service](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels), meaning that it is operational and supported 24 hours a day, 365 days a year.
32
33
33
34
## Technology
34
35
This API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest).
@@ -47,35 +48,26 @@ info:
47
48
This access mode is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis), meaning we authenticate the calling application but not the end user.
48
49
49
50
To use this access mode, use the following security pattern:
50
-
* [Application-restricted RESTful API - API key authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-api-key-authentication)
51
+
* [Application-restricted RESTful API - API key authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-api-key-authentication).
52
+
53
+
## Errors
54
+
We use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:
55
+
* 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action
56
+
* 400 to 499 if it failed because of a client error by your application
57
+
* 500 to 599 if it failed because of an error on our server.
58
+
59
+
Errors specific to each endpoint are shown in the endpoints section, under response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.
| Integration test | `https://int.api.service.nhs.uk/nhs-website-content/` |
56
65
| Production | Not available yet |
57
66
58
-
## Integration testing
59
-
Our integration test environment:
60
-
61
-
* is for formal integration testing.
62
-
* includes application authentication
63
-
* contains a replica of our live data, but has a [reduced call rate](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits)
64
-
65
67
## Onboarding
66
68
The onboarding journey for this API is currently in development.
67
69
68
-
Additional onboarding information exists on the [developer hub](https://digital.nhs.uk//developer/api-catalogue/nhs-syndicated-content/onboarding-support-information)
69
-
70
-
## Errors
71
-
We use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:
72
-
73
-
200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action
74
-
400 to 499 if it failed because of a client error by your application
75
-
500 to 599 if it failed because of an error on our server
76
-
For details of 2xx and 4xx responses for a specific API, see its API specification.
77
-
78
-
Errors specific to each endpoint are shown in the endpoints section, under response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.
70
+
Additional onboarding information exists on the [developer hub](https://digital.nhs.uk//developer/api-catalogue/nhs-syndicated-content/onboarding-support-information).
79
71
80
72
contact:
81
73
name: "nhs-website-content-api API Support"
@@ -89,7 +81,7 @@ servers:
89
81
paths:
90
82
/conditions:
91
83
parameters:
92
-
- $ref: "#/components/parameters/apiKey"
84
+
- $ref: "#/components/parameters/apikey"
93
85
- $ref: "#/components/parameters/order"
94
86
- $ref: "#/components/parameters/page"
95
87
- $ref: "#/components/parameters/category"
@@ -109,22 +101,10 @@ paths:
109
101
110
102
There are a number of query parameters that filter the output.
| synonyms | Include multiple listings for pages with more than one name | boolean |
118
-
| childArticles | Include child pages of a topic within results under property subjectOf | boolean |
119
-
| status | Filter by "published" or "unpublished" | string |
120
-
121
104
responses:
122
105
"200":
123
106
description: |
124
107
A valid query for the conditions.
125
-
headers:
126
-
apikey:
127
-
$ref: "#/components/headers/apiKey"
128
108
content:
129
109
application/schema+json:
130
110
schema:
@@ -143,7 +123,7 @@ paths:
143
123
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
144
124
/conditions/*:
145
125
parameters:
146
-
- $ref: "#/components/parameters/apiKey"
126
+
- $ref: "#/components/parameters/apikey"
147
127
- $ref: "#/components/parameters/modules"
148
128
get:
149
129
summary: Get details of a condition page
@@ -166,9 +146,6 @@ paths:
166
146
"200":
167
147
description: |
168
148
A valid query which returns a page object for the chosen page
169
-
headers:
170
-
apiKey:
171
-
$ref: "#/components/headers/apiKey"
172
149
content:
173
150
application/schema+json:
174
151
schema:
@@ -187,7 +164,7 @@ paths:
187
164
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
188
165
/medicines:
189
166
parameters:
190
-
- $ref: "#/components/parameters/apiKey"
167
+
- $ref: "#/components/parameters/apikey"
191
168
- $ref: "#/components/parameters/startDate"
192
169
- $ref: "#/components/parameters/endDate"
193
170
- $ref: "#/components/parameters/order"
@@ -207,30 +184,18 @@ paths:
207
184
208
185
There are a number of query parameters that filter the output.
| orderBy | works alongside startDate and endDate (details below) | string |
218
-
219
187
## Ordering by dates
220
188
221
189
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.
222
190
223
191
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.
224
192
225
-
For example `https://api.nhs.uk/medicines?apiKey=xxx&startDate=2022-01-01&orderBy=dateModified`
193
+
For example `https://api.nhs.uk/medicines?apikey=xxx&startDate=2022-01-01&orderBy=dateModified`
226
194
227
195
responses:
228
196
"200":
229
197
description: |
230
198
A valid query for medicines.
231
-
headers:
232
-
apiKey:
233
-
$ref: "#/components/headers/apiKey"
234
199
content:
235
200
application/schema+json:
236
201
schema:
@@ -249,22 +214,19 @@ paths:
249
214
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
250
215
/medicines/*:
251
216
parameters:
252
-
- $ref: "#/components/parameters/apiKey"
217
+
- $ref: "#/components/parameters/apikey"
253
218
get:
254
-
summary: Get specific medicines pages
219
+
summary: Get specific medicine page
255
220
operationId: get-medicine-page
256
221
description: |
257
222
## Overview
258
-
There is an endpoint for each page under the Medicines A to Z, for example https://www.nhs.uk/medicines/amoxicillin
223
+
There is an endpoint for each page under the Medicines A to Z, for example https://www.nhs.uk/medicines/amoxicillin.
259
224
260
225
This can be used to get specific information about individual medicines.
261
226
responses:
262
227
"200":
263
228
description: |
264
229
A valid query for medicines.
265
-
headers:
266
-
apiKey:
267
-
$ref: "#/components/headers/apiKey"
268
230
content:
269
231
application/schema+json:
270
232
schema:
@@ -283,7 +245,7 @@ paths:
283
245
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
284
246
/mental-health:
285
247
parameters:
286
-
- $ref: "#/components/parameters/apiKey"
248
+
- $ref: "#/components/parameters/apikey"
287
249
get:
288
250
summary: Get content from the mental health hub
289
251
operationId: get-mental-health
@@ -300,9 +262,6 @@ paths:
300
262
"200":
301
263
description: |
302
264
A valid query for the mental health hub.
303
-
headers:
304
-
apiKey:
305
-
$ref: "#/components/headers/apiKey"
306
265
content:
307
266
application/schema+json:
308
267
schema:
@@ -321,14 +280,14 @@ paths:
321
280
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
322
281
/pregnancy:
323
282
parameters:
324
-
- $ref: "#/components/parameters/apiKey"
283
+
- $ref: "#/components/parameters/apikey"
325
284
get:
326
285
summary: Get content from the pregnancy hub
327
286
operationId: get-pregnancy
328
287
description: |
329
288
## Overview
330
289
331
-
The pregnancy hub contains a number of navigational and content pages.
290
+
The [pregnancy hub](https://www.nhs.uk/pregnancy/) contains a number of navigational and content pages.
332
291
333
292
The content of the page can be taken from `mainEntityOfPage`. This includes the navigational patterns to child pages.
334
293
@@ -338,9 +297,6 @@ paths:
338
297
"200":
339
298
description: |
340
299
A valid query for the pregnancy hub.
341
-
headers:
342
-
apiKey:
343
-
$ref: "#/components/headers/apiKey"
344
300
content:
345
301
application/schema+json:
346
302
schema:
@@ -359,14 +315,14 @@ paths:
359
315
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
360
316
/common-health-questions:
361
317
parameters:
362
-
- $ref: "#/components/parameters/apiKey"
318
+
- $ref: "#/components/parameters/apikey"
363
319
get:
364
320
summary: Get content from the common health questions hub
365
321
operationId: get-common-health-questions
366
322
description: |
367
323
## Overview
368
324
369
-
The [Common health questions hub](https://www.nhs.uk/common-health-questions/) contains a number of navigational and content pages.
325
+
The [common health questions hub](https://www.nhs.uk/common-health-questions/) contains a number of navigational and content pages.
370
326
371
327
The main page contains significant links to topic pages, which then contain significant links to the content pages.
372
328
@@ -376,9 +332,6 @@ paths:
376
332
"200":
377
333
description: |
378
334
A valid query for the common health questions pages.
379
-
headers:
380
-
apiKey:
381
-
$ref: "#/components/headers/apiKey"
382
335
content:
383
336
application/schema+json:
384
337
schema:
@@ -397,7 +350,7 @@ paths:
397
350
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
398
351
/live-well:
399
352
parameters:
400
-
- $ref: "#/components/parameters/apiKey"
353
+
- $ref: "#/components/parameters/apikey"
401
354
get:
402
355
summary: Get content from the Live Well hub.
403
356
operationId: get-live-well
@@ -413,9 +366,6 @@ paths:
413
366
"200":
414
367
description: |
415
368
A valid query for the Live Well pages.
416
-
headers:
417
-
apiKey:
418
-
$ref: "#/components/headers/apiKey"
419
369
content:
420
370
application/schema+json:
421
371
schema:
@@ -434,27 +384,27 @@ paths:
434
384
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
435
385
components:
436
386
headers:
437
-
apiKey:
387
+
apikey:
438
388
$ref: components/schemas/ApiKey.yaml
439
389
parameters:
440
-
apiKey:
441
-
name: api_key
390
+
apikey:
391
+
name: apikey
442
392
in: query
443
393
description: The API key required to send a successful request.
444
394
required: true
445
395
schema:
446
396
type: string
447
397
example: "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA"
448
398
startDate:
449
-
name: start_date
399
+
name: startDate
450
400
in: query
451
401
description: Earliest date filter, works with orderBy.
452
402
required: false
453
403
schema:
454
404
type: string
455
405
example: "2020-01-01"
456
406
endDate:
457
-
name: end_date
407
+
name: endDate
458
408
in: query
459
409
description: Latest date filter, works with orderBy.
460
410
required: false
@@ -464,7 +414,7 @@ components:
464
414
order:
465
415
name: order
466
416
in: query
467
-
description: Order by newest or oldest.
417
+
description: Order by "newest" or "oldest".
468
418
required: false
469
419
schema:
470
420
type: string
@@ -480,15 +430,15 @@ components:
480
430
category:
481
431
name: category
482
432
in: query
483
-
description: Filters child pages by letters A-Z.
433
+
description: Filters child pages by letters "A" to "Z".
484
434
required: false
485
435
schema:
486
436
type: string
487
437
example: "A"
488
438
orderBy:
489
-
name: order_by
439
+
name: orderBy
490
440
in: query
491
-
description: works alongside startDate and endDate. Options are `dateModified`, `lastReviewed` and `nextReview`.
441
+
description: works alongside startDate and endDate. Options are "dateModified", "lastReviewed" and "nextReview".
492
442
required: false
493
443
schema:
494
444
type: string
@@ -502,7 +452,7 @@ components:
502
452
type: boolean
503
453
example: true
504
454
childArticles:
505
-
name: child_articles
455
+
name: childArticles
506
456
in: query
507
457
description: Include child pages of a topic within results under property subjectOf.
0 commit comments