Audit Trail

The Audit Trail API is used to access the records of changes made to the appointment, client, and class schedule objects on your business' account. The Audit Trail API is thus connected to the Appointments, Clients, and Class Schedule APIs.

On this page





Audit Trail API Endpoints

These are the endpoints that are available under the /auditTrail path, which lists all the different audit trails on your business' account.

EndpointDescription
GET/auditTrail/client/{clientId} Returns all objects documenting changes made to a client object in array format.
GET /auditTrail/calendar/{calendarId}Returns all objects documenting changes made to an appointment or time off object in array format.
GET /auditTrail/class_schedule/{classscheduleId}Returns all objects documenting changes made to a class schedule object in array format.




Audit Trail API Parameters

There are no parameters included with auditTrail calls.




Audit Trail API Responses

GET /auditTrail/client/{clientId}
[{
    "auditTrailId": 858727078,
    "businessId": 43111,
    "changedAge": "4 weeks ago",
    "changedUser": "StripeService",
    "columnName": "modifieddate",
    "dateChanged": 1536264941377,
    "description": "modifieddate was changed from '2018-08-28 17:29:08.911' to '2018-09-06 20:15:41.373',
    "newValue": "2018-09-06 20:15:41.373",
    "oldValue": "2018-08-28 17:29:08.911",
    "tableId": 5143212,
    "tableName": "client"
}]
GET /auditTrail/calendar/{calendarId}
[{
    "auditTrailId": 854138754,
    "businessId": 43111,
    "changedAge": "2 weeks ago",
    "changedUser": "JoeSchmo",
    "columnName": "updatesequence",
    "dateChanged": 1534517813751,
    "description": "updatesequence was changed from '0' to '1'",
    "newValue": "1",
    "oldValue": "0",
    "tableId": 17366108,
    "tableName": "calendar"
}]
GET /auditTrail/class_schedule/{classscheduleId}
[{
    "auditTrailId": 854745082,
    "businessId": 43111,
    "changedAge": "1 month ago",
    "changedUser": "JoeSchmo",
    "columnName": "currentcapacity",
    "dateChanged": 1534867163579,
    "description": "currentcapacity was changed from '0' to '1'",
    "newValue": "1",
    "oldValue": "0",
    "tableId": 33830164,
    "tableName": "class_schedule"
}]




Audit Trail Object Values

Property NameTypeDescription
auditTrailIdintegerProvides unique numeric ID for specified audit trail.
businessIdintegerProvides unique numeric ID for the business to which specified audit trail belongs.
changedAgestringDisplays as how long ago-in weeks or months-specified audit trail change took place.
changedUserstringDisplays as name of user or entity that made specified audit trail change. If change was made from scheduler will display as "WebClient".
columnNamestringDisplays as the name of the object value that was changed.
dateChangedintegerDisplays as date specified audit trail change took place in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
descriptionstringDisplays as description of what was changed-appointment, client, or class schedule-from what value to what value.
newValuestringDisplays as the new value that columnName was changed to.
oldValuestringDisplays as the old value that columnName was changed from.
tableIdintegerProvides unique numeric ID for table from which specified audit change was taken (clientId, calendarId, classscheduleId).. 
tableNamestringDisplays as the type of object-appointment, client, or class schedule-that was changed.