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": "6724fbc74f73a2cebf63780c",
"archived": false,
"created": "2024-11-01 16:03:19",
"file": "/douglas-court-brochure.w9sskv.pdf",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:19",
"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": "6724fbc74f73a2cebf63780a",
"file": "/account-brochure.ljiord.pdf",
"name": "Account brochure"
},
{
"_id": "6724fbc74f73a2cebf63780c",
"file": "/douglas-court-brochure.w9sskv.pdf",
"name": "Douglas Court brochure"
},
{
"_id": "6724fbc74f73a2cebf63780e",
"file": "/upton-house-brochure.z5cfkq.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": "6724fbc74f73a2cebf63780c",
"archived": false,
"created": "2024-11-01 16:03:19",
"file": "/douglas-court-brochure.w9sskv.pdf",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:19",
"name": "Douglas Court brochure",
"ref": "DCB"
}