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 in 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 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.

An optional sinceDate parameter can also be provided (YYYY-MM-DD) to return only the values entered or modified by a user since a specific date. This parameter will only be considered when Since option is selected in DateFilter.

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/All

Request body

N/A

Response body

{

"result": [

{

"userId": 1,

"userName": "Mark",

"formId": "RRSPForm",

"cellPath": "RRSPSlip[1].Toarip3",

"cellValue": "Royal bank of Canada",

"timeStamp": "2022-11-23T14:44:02Z",

"returnId": 0,

"isRolledBack": true

},

{

"userId": 1,

"userName": "Mark",

"formId": "T4SlipForm",

"cellPath": "T4Slip[1].Toatsc6",

"cellValue": "148.14",

"timeStamp": "2022-11-22T15:18:37Z",

"returnId": 1000,

"isRolledBack": false

},

{

"userId": 18,

"userName": "Elizabeth",

"formId": "Q69Form",

"cellPath": "Q69[1].Toaqla172",

"cellValue": "Yes",

"timeStamp": "2022-09-09T19:46:41Z",

"returnId": 1,

"isRolledBack": false

},

],

"errors": []

}