An item of literature that can be sent/shared with care seekers, service users or service user contacts.
A unique Id for the literature item.
Flag indicating if the item of literature is archived.
The date/time the literature item was created.
A URL for the literature item's file (e.g. a PDF).
Literature can be added to the account and available to select for all locations (e.g. a brand brochure), or it can be added against a location so that it is only available to select for just that location (e.g. a care home brochure).
The date/time the literature item was modified.
A name for the item of literature.
A unique human friendly reference for the item of literature.
{
"_id": "66bfb4bc9ab4e3d6eb734912",
"archived": false,
"created": "2024-08-16 20:21:16",
"file": "/douglas-court-brochure.213lp9.pdf",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:16",
"name": "Douglas Court brochure",
"ref": "DCB"
}
Return a list of literature items for your account on CareHQ.
['_id']
A list of attributes to include for fetched objects.
unset
A filter that allows literature items to be filtered by whether they are available at account level or not.
no
A filter that allows literature items that are currently archived to be included or excluded.
A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.
A filter that accepts a list of location Ids and filters literature items by the location they relate to.
A filter that accepts a date/time and filters the items returned to those modified after the date/time.
A filter that accepts a date/time and filters the items returned to those modified before the date/time.
A case insensitive keyword filter applied to the following fields; name, ref.
1
The page number to fetch.
10
The number of items to return per page.
_id
A list of fields the returned items can be sorted by. Fields prefixed with minus (-) sign are sorted in descending order.
Returns a page of literature items.
var literatureItems = apiClient.Request(
HttpMethod.Get,
"literature-items",
new MultiValueDict()
.Add("attributes", "name")
);
<?php
$literature_items = $api_client->request(
'GET',
'literature-items',
[
'attributes'=>['name']
]
);
literature_items = api_client(
'GET',
'literature-items',
params={
'attributes': ['name', 'file']
}
)
literature_items = api_client.request(
'GET',
'literature-items',
params: {
'attributes' => ['name']
}
)
{
"item_count": 3,
"items": [
{
"_id": "66bfb4bc9ab4e3d6eb734910",
"file": "/account-brochure.pa78bl.pdf",
"name": "Account brochure"
},
{
"_id": "66bfb4bc9ab4e3d6eb734912",
"file": "/douglas-court-brochure.213lp9.pdf",
"name": "Douglas Court brochure"
},
{
"_id": "66bfb4bc9ab4e3d6eb734914",
"file": "/upton-house-brochure.danbmi.pdf",
"name": "Upton House brochure"
}
],
"page": 1,
"page_count": 1,
"per_page": 10
}
Retrieve a literature item object.
Returns a literature item object.
var literatureItem = apiClient.Request(
HttpMethod.Get,
$"literature-items/{literatureItemId}"
);
<?php
$literature_item = $api_client->request(
'GET',
'literature-items/' . $literature_item_id
);
literature_item = api_client(
'GET',
f'literature-items/{literature_item_id}'
)
literature_item = api_client.request(
'GET',
"literature-items/#{literature_item_id}"
)
{
"_id": "66bfb4bc9ab4e3d6eb734912",
"archived": false,
"created": "2024-08-16 20:21:16",
"file": "/douglas-court-brochure.213lp9.pdf",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:16",
"name": "Douglas Court brochure",
"ref": "DCB"
}