To Fetch the Audit Results in bulk. You will get paginated audit-results.
For calling the API, you will need the access token.
Request URI
POST https://api.appzen.com/expense-audit-results/v2/reports/
Header Parameters
Name | Type | Description | Required |
---|---|---|---|
Authorization | String | The valid token to authorize the request. | Yes |
Body Parameters
Name | Type | Description | Required |
---|---|---|---|
from_submission_date | String | The submission start date from which the results need to be fetched. It is included in the results. Allowed formats: yyyy-MM-dd'T'HH:mm:ss, yyyy-MM-dd'T'HH:mm:ss.SSS, yyyy-MM-dd'T'HH:mm:ss.SSSZ, yyyy-MM-dd hh:mm:ss, yyyy-MM-dd hh:mm:ss.SSS, yyyy-MM-dd hh:mm:ss.SSSZ eg:2022-12-26T23:04:00 |
No |
to_submission_date | String | The submission end date till which the results need to be fetched. It is included in the results. Allowed formats: yyyy-MM-dd'T'HH:mm:ss, yyyy-MM-dd'T'HH:mm:ss.SSS, yyyy-MM-dd'T'HH:mm:ss.SSSZ, yyyy-MM-dd hh:mm:ss, yyyy-MM-dd hh:mm:ss.SSS, yyyy-MM-dd hh:mm:ss.SSSZ Example:2022-12-26T23:04:00 |
No |
from_audit_date | String | The audit start date from which the results need to be fetched. It is included in the results. Allowed formats: yyyy-MM-dd'T'HH:mm:ss, yyyy-MM-dd'T'HH:mm:ss.SSS, yyyy-MM-dd'T'HH:mm:ss.SSSZ, yyyy-MM-dd hh:mm:ss, yyyy-MM-dd hh:mm:ss.SSS, yyyy-MM-dd hh:mm:ss.SSSZ Example:2022-12-26T23:04:00 |
Yes |
to_audit_date | String | The audit end date to which the results need to be fetched. It is included in the results. Allowed formats: yyyy-MM-dd'T'HH:mm:ss, yyyy-MM-dd'T'HH:mm:ss.SSS, yyyy-MM-dd'T'HH:mm:ss.SSSZ, yyyy-MM-dd hh:mm:ss, yyyy-MM-dd hh:mm:ss.SSS, yyyy-MM-dd hh:mm:ss.SSSZ Example:2022-12-26T23:04:00 |
Yes |
report_id_in | String | The external_report_ids for which you want to fetch the audit results. The external_report_id must be a comma-separated list. | No |
report_id_not_in | String | The external_report_ids for which you do not want to fetch the audit results. The external_report_id must be a comma-separated list. | No |
page_number | Number | Zero-based page index, for which you want to fetch the audit results. | No |
page_size | Number | The Number of results per page. The maximum limit is 200. The Default value is 200. |
No |
sort_field | String | The field name on which the results are sorted upon.
|
No |
Sort_direction | String | The order in which the results are sorted. ASC, for ascending sort order DESC, for descending sort order |
No |
Sample Request
curl -L -X POST 'https://api.appzen.com/expense-audit-results/v2/reports/' \
-H 'Authorization: Bearer eyJrxxxx' \
-H 'Cookie: JSESSIONID=7D4120C01A02DBDC70E6785E4044B141' \
--data-raw '{
"from_audit_date":"2022-12-25T01:12:00",
"to_audit_date":"2022-12-26T23:04:00"
}'
Sample Response
Success
{
"content": [
{
"customer_id": 100439,
"external_report_id": "TestAPIReport5",
"current_risk_level": "HIGH",
"original_risk_level": "HIGH",
"computed_risk_level": "HIGH",
"audit_result_created_at": "2022-12-26 06:37:38.408",
"header_level_risk_details": [
{
"rule_name": "Report Unauthorized Expenses",
"current_risk_level": "LOW",
"original_risk_level": "LOW",
"computed_risk_level": "LOW",
"risk_message": "No unauthorized items were detected in report.",
"parameters": null
},
{
"rule_name": "Daily meal limit check",
"current_risk_level": "LOW",
"original_risk_level": "LOW",
"computed_risk_level": "LOW",
"risk_message": "Meal expenses are within threshold",
"parameters": null
}
],
"line_level_results": [
{
"external_exp_line_id": "352549197",
"line_level_risk_details": [
{
"rule_name": "Expense Age",
"current_risk_level": "MEDIUM",
"original_risk_level": "MEDIUM",
"computed_risk_level": "MEDIUM",
"risk_message": "The transaction date exceeds the expense age threshold but has low confidence.",
"parameters": null
},
{
"rule_name": "Weekend Expense",
"current_risk_level": "LOW",
"original_risk_level": "LOW",
"computed_risk_level": "LOW",
"risk_message": "This expense is incurred during weekend days but the expense type is not applicable to apply this rule.",
"parameters": null
},
{
"rule_name": "Non-Conforming Receipt",
"current_risk_level": "LOW",
"original_risk_level": "LOW",
"computed_risk_level": "LOW",
"risk_message": "No evidence of a non-conforming receipt was detected",
"parameters": null
},
{
"rule_name": "Amount Verification",
"current_risk_level": "HIGH",
"original_risk_level": "HIGH",
"computed_risk_level": "HIGH",
"risk_message": "Amount for this line is above threshold of 20",
"parameters": null
},
{
"rule_name": "Amount Verification By Expense Type",
"current_risk_level": "LOW",
"original_risk_level": "LOW",
"computed_risk_level": "LOW",
"risk_message": "No Configuration in Expense Type found.",
"parameters": null
},
{
"rule_name": "Receipt Verification",
"current_risk_level": "HIGH",
"original_risk_level": "HIGH",
"computed_risk_level": "HIGH",
"risk_message": "User entered expense type is verified. Amount (USD 1200.00) and date (01-DEC-20) could not be verified.",
"parameters": null
},
{
"rule_name": "Merchant Price Check",
"current_risk_level": "LOW",
"original_risk_level": "LOW",
"computed_risk_level": "LOW",
"risk_message": "Expense type is not in applicable categories for Price Audit.",
"parameters": null
},
{
"rule_name": "Unauthorized Expenses",
"current_risk_level": "HIGH",
"original_risk_level": "HIGH",
"computed_risk_level": "HIGH",
"risk_message": " Alcohol was/were detected on receipt.",
"parameters": null
},
{
"rule_name": "Duplicate Across Reports",
"current_risk_level": "MEDIUM",
"original_risk_level": "MEDIUM",
"computed_risk_level": "MEDIUM",
"risk_message": "Duplicate expense line was detected but the expense types of these lines were not added in audit configuration.",
"parameters": null
},
{
"rule_name": "Duplicate Within A Report",
"current_risk_level": "LOW",
"original_risk_level": "LOW",
"computed_risk_level": "LOW",
"risk_message": "No duplicate expense line was detected within the same report",
"parameters": null
},
{
"rule_name": "Itemization Verification",
"current_risk_level": "LOW",
"original_risk_level": "LOW",
"computed_risk_level": "LOW",
"risk_message": "N/A: Type of Receipt not Applicable",
"parameters": null
},
{
"rule_name": "Merchant Category Check",
"current_risk_level": "LOW",
"original_risk_level": "LOW",
"computed_risk_level": "LOW",
"risk_message": "Merchant was not detected as anything suspicious, could not find merchant info",
"parameters": null
}
]
}
]
}
],
"pageable": {
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"pageNumber": 0,
"pageSize": 200,
"offset": 0,
"unpaged": false,
"paged": true
},
"last": true,
"totalPages": 1,
"totalElements": 1,
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"first": true,
"numberOfElements": 1,
"size": 200,
"number": 0,
"empty": false
}
Failure
The request fails if you enter an invalid token.
{
"timestamp": "2023-01-02T10:36:09.022+00:00",
"status": 401,
"error": "Unauthorized",
"message":"Invalid unsecured/JWS/JWE header: Invalid JSON: Unexpected token Ț�Y\b����ٓ�[ZÐ�՛\f�]�Ә\\N����N���Z at position 41.",
"path": "/v2/exp-audit-results/reports"
}
Response Code
Response Code | Description |
200 | The request is successful. |
500 | The request failed. |
See Also
Comments
Article is closed for comments.