Overview
Whenever the auditor takes any action on your expense report, the Audit Action API pushes out this information to your system. This event and the associated data will be sent as shown below:
- AppZen posts the auditor's action to your system.
- AppZen tries to send the webhook up to three times.
- The following audit workflow events are supported:
- Automatic Approved
- Automatic Reject
- Manual Approved
- Manual Reject
Webhook Details
The webhook details are as follows :
- Before any report-related actions, the webhook sends out test events to verify the connection. This ensures reduced communication errors during live workflows.
- Only on receiving a response with HTTP Status Code 200 is the communication considered successful.
AppZen supports multiple Authentication mechanisms:
1. API Key-based Authentication - In this case, the webhook configuration is as follows:
{
"customerId" : xx32,
"appzenProduct" : "EXPENSE",
"externalPlatform" : "WEBHOOK",
"baseUrl" : "<ExternalSystemURL>",
"authnType" : "ApiKey",
"authnConfigName" : "identifierName",
"credentialsJson" : {
"x-api-key" : "providedAPIKey"
}
}
2. OAuth 2.0 Support - In this case, the webhook configuration is as follows:
{
"customerId" : xx32,
"appzenProduct" : "EXPENSE",
"externalPlatform" : "WEBHOOK",
"baseUrl" : "<ExternalSystemURL>",
"authnType" : "OAuth2.0",
"authnConfigName" : "identifierName",
"credentialsJson" :
{
"client_id" : "id",
"client_secret" : "secret",
"scopes" : <optional>,
"token_url" : <URL which needs to be called for getting the token>
"token" : {<store actual Client Auth Token to be used for API calls>}
}
}
Sample Webhook Payload
{
"report_Id" : "XYZ",
"audit_status" : "MANUAL_AUDIT_APPROVED",
"auditor_comments" : "{comments}",
"actioned_by" : "{auditor_email}",
"event" : "report_status_change",
}
See Also
Comments
Article is closed for comments.