Audit Trail Endpoint
/api/partner/1.0/{product}/documents/{documentId}/auditTrail/{DateFilter}/ (GET)
Endpoint authentication
When adopting OAuth 2.0 as an authentication method, the below security requirements are needed in order to trigger this endpoint:
-
The user must fulfill the below security roles requirements; if he fails to obtain access to all the necessary security roles, an error 403: Insufficient privileges to execute this request is returned:
-
The user must acquire access to at least one of the following security roles; he needs to have access to the security role corresponding to the product included in the URL:
-
Tax – Access T1 Product
-
Tax – Access T2 Product
-
Tax – Access T3 Product
-
Tax – Access Forms Product
-
-
In addition, the user cannot access the audit trail of a document if he does not have access to the below security role:
-
Tax – Returns – Audit trail – Access
-
-
-
This endpoint validates against the user’s contact security and document visibility. If the user does not have access to the document provided in the URL or the contact associated to this document, an error 404: Resource not found in the system is returned.
Endpoint description
Retrieves values entered or modified by a user, from the document specified in the URL (these are the values logged as “Data entered changed” in the Audit Trail). The product (T1, T2, T3 or TF), ID of the document (GUID) and DateFilter (All, Today, Since) must be included in the URL.
If All is selected as the DateFilter, all the values entered or modified by a user since the document was created, will be returned. If Today is selected, all the values that were entered or modified by a user today will be returned. If Since is selected and a date is provided via the sinceDate parameter, then all values entered or modified by a user since that date will be returned.
If the user provides the date without the time in the sinceDate parameter, then the data in the response body will be returned according to the date entered regardless of the user’s time zone. If the user provides the date and time, then the time has to be entered in the ISO-8601 format: YYYY-MM-DD HH:MM:SS +/-HH:MM where the “+/-HH:MM” indicates the time difference between the said time zone and the Coordinated Universal Time (UTC) zone.
If a userId parameter is provided, only the values entered or modified by this user will be returned. This parameter is optional and will default to all users when not included. The userId can be found from the URL of a user, accessed via Settings –> Users.
Model |
N/A |
Properties |
N/A |
Examples
Request URL |
https://mysite.cchifirm.ca/taxcan/api/partner/1.0/T1/documents/4382550f-f4fb-1c5f-d840-fff01957f57b/auditTrail/Since?sinceDate=2024-11-10%2008%3A00%3A00%20%2B2%3A00 |
Request body |
N/A |
Response body |
{ "result": [ { "userId": 1, "userName": "Mark", "formId": "RRSPForm", "cellPath": "RRSPSlip[1].Toarip3", "cellValue": "Royal bank of Canada", "timeStamp": "2024-11-23T14:44:02Z", "returnId": 0, "isRolledBack": true }, { "userId": 1, "userName": "Mark", "formId": "T4SlipForm", "cellPath": "T4Slip[1].Toatsc6", "cellValue": "148.14", "timeStamp": "2024-11-22T15:18:37Z", "returnId": 1000, "isRolledBack": false }, { "userId": 18, "userName": "Elizabeth", "formId": "Q69Form", "cellPath": "Q69[1].Toaqla172", "cellValue": "Yes", "timeStamp": "2024-11-11T19:46:41Z", "returnId": 1, "isRolledBack": false }, ], "errors": [] } |