Each entry in the change log represents a change to data within the CareHQ application and provides details on what changed, when and who made the change.
A unique Id for the billing contract.
The date/time the change was logged.
A dictionary containing details of the change.
A dictionary of field values added in the change.
A note in the change log.
A dictionary of values removed in the change.
A dictionary of values updated in the change.
A list of document types the change relates to. Note that the order of the document types field relates to the order of the documents field.
A list of document Ids the change relates to.
The type of change made; ADDED, DELETED, NOTE, UPDATED.
The Id of the user the change was made by. Note that if the change was made by the CareHQ application and not a directly by a user then user will be set as "CareHQ app".
{
"_id": "6724fbc74f73a2cebf6376fb",
"created": "2024-11-01 16:03:19",
"details": null,
"document_types": [
"AccountContact"
],
"documents": [
"6724fbc74f73a2cebf6376fa"
],
"type": "ADDED",
"user": "CareHQ demo builder"
}
Return a list of change log entries.
['_id']
A list of attributes to include for fetched objects.
A filter that accepts a date/time and filters the items returned to those created after the date/time.
A filter that accepts a date/time and filters the items returned to those created before the date/time.
A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.
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 change log entries.
var changeLogEntries = apiClient.Request(
HttpMethod.Get,
"change-log-entries",
new MultiValueDict()
.Add("attributes", "type", "document_types", "document_type")
.Add("sort_by", "created")
);
<?php
$change_log_entries = $api_client->request(
'GET',
'change-log-entries',
[
'attributes'=>['type', 'document_types', 'document_type'],
'sort_by'=>'created'
]
);
change_log_entries = api_client(
'GET',
'change-log-entries',
params={
'attributes': ['type', 'document_types', 'document_type'],
'sort_by': 'created'
}
)
change_log_entries = api_client.request(
'GET',
'change-log-entries',
params: {
'attributes' => ['type', 'document_types', 'document_type'],
'sort_by' => 'created'
}
)
{
"item_count": 3173,
"items": [
{
"_id": "6724fbc74f73a2cebf6376fb",
"document_types": [
"AccountContact"
],
"type": "ADDED"
},
{
"_id": "6724fbc74f73a2cebf6376fd",
"document_types": [
"APIKey"
],
"type": "ADDED"
},
{
"_id": "6724fbc74f73a2cebf6376ff",
"document_types": [
"CustomTemplate"
],
"type": "ADDED"
},
{
"_id": "6724fbc74f73a2cebf637701",
"document_types": [
"NominalCode"
],
"type": "ADDED"
},
{
"_id": "6724fbc74f73a2cebf637703",
"document_types": [
"NominalCode"
],
"type": "ADDED"
},
{
"_id": "6724fbc74f73a2cebf637705",
"document_types": [
"NominalCode"
],
"type": "ADDED"
},
{
"_id": "6724fbc74f73a2cebf637707",
"document_types": [
"NominalCode"
],
"type": "ADDED"
},
{
"_id": "6724fbc74f73a2cebf637709",
"document_types": [
"TaxRate"
],
"type": "ADDED"
},
{
"_id": "6724fbc74f73a2cebf63770b",
"document_types": [
"TaxRate"
],
"type": "ADDED"
},
{
"_id": "6724fbc74f73a2cebf63770d",
"document_types": [
"TaxRate"
],
"type": "ADDED"
}
],
"page": 1,
"page_count": 318,
"per_page": 10
}
var changeLogEntry = apiClient.Request(
HttpMethod.Get,
$"change-log-entries/{changeLogEntryId}"
)
<?php
$change_log_entry = $api_client->request(
'GET',
'change-log-entries/' . $change_log_entry_id
);
change_log_entry = api_client(
'GET',
f'change-log-entries/{change_log_entry_id}'
)
change_log_entry = api_client.request(
'GET',
"change-log-entries/#{change_log_entry_id}"
)
{
"_id": "6724fbc74f73a2cebf6376fb",
"created": "2024-11-01 16:03:19",
"details": null,
"document_types": [
"AccountContact"
],
"documents": [
"6724fbc74f73a2cebf6376fa"
],
"type": "ADDED",
"user": "CareHQ demo builder"
}