About ApprovalPolicy
This API creates and manages an organization's custom approval policies. Approval policies are defined by a dollar amount threshold that requires bills or vendor credits to be reviewed by a minimum number of approvers, one or more specific approvers, or a combination of both. To assign mandatory approvers to an Approval Policy, use the ApprovalPolicyApprover API.
For example,
amountThreshold : 1000.00
andminNumApprovers : 1
(bills or vendor credits above $1,000 require 1 approver)amountThreshold : 4000.00
andminNumApprovers : 2
(bills or vendor credits above $4,000 require 2 approver)
Before the policy is set, determine the policy configuration.
- Number of approval levels based on the complexity of your business
- Approval level ranges
- Number of approvers at each level
- Mandatory approvers (with approval permissions) who must review and approve (see ApprovalPolicyApprover API)
On the Bill.com UI, when bills or vendor credits are entered, Smart Entry remembers and auto assigns approvers assigned to previous bills or vendor credits. For Recurring Bills, or Bills created via API, these approvers are assigned for newly created bills or vendor credits.
The SetApprovers API can add approvers:
- When approval policy requires approvers, and no mandatory approvers are specified
- Assign approvers even if an approval policy does not apply
- If needed, add additional approvers than specified by the approval policy
When an approval policy is applied to a bill or vendor credit, use SetApprovers to designate which approvers (and the sequence) review and approve/deny the bill or vendor credit.
Note: Any user with permission to pay unapproved bills can ignore Approval Policy Requirements and process payments regardless of the Bill's Approval Status.
Create
Request
<API_URL_EndPoint>/Crud/Create/ApprovalPolicy.json
data={
"obj" : {
"entity" : "ApprovalPolicy",
"type" : "0",
"amountThreshold" : 4000.00,
"minNumApprovers" : 2,
"isActive" : "1"
}
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "ApprovalPolicy",
"id" : "app01IVEVRADCRIJ3o68",
"name" : "Bills of $4000.00 or more require at least 2 approvers",
"type" : "0",
"amountThreshold" : 4000.00,
"minNumApprovers" : 2,
"isActive" : "1",
"createdTime" : "2016-12-08T21:59:18.000+0000",
"updatedTime" : "2016-12-08T21:59:18.000+0000"
}
}
Read
Request
<API_URL_EndPoint>/Crud/Read/ApprovalPolicy.json
data={
"id" : "app01IVEVRADCRIJ3o68"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "ApprovalPolicy",
"id" : "app01IVEVRADCRIJ3o68",
"name" : "Bills of $4000.00 or more require at least 2 approvers",
"type" : "0",
"amountThreshold" : 4000.00,
"minNumApprovers" : 2,
"isActive" : "1",
"createdTime" : "2016-12-08T21:59:18.000+0000",
"updatedTime" : "2016-12-08T21:59:18.000+0000"
}
}
Update
Request
<API_URL_EndPoint>/Crud/Update/ApprovalPolicy.json
data={
"obj" : {
"entity" : "ApprovalPolicy",
"id" : "app01IVEVRADCRIJ3o68",
"amountThreshold" : 4500.00
}
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "ApprovalPolicy",
"id" : "app01IVEVRADCRIJ3o68",
"name" : "Bills of $4500.00 or more require at least 2 approvers",
"type" : "0",
"amountThreshold" : 4500.00,
"minNumApprovers" : 2,
"isActive" : "2",
"createdTime" : "2016-12-08T21:59:18.000+0000",
"updatedTime" : "2016-12-08T22:09:49.000+0000"
}
}
Delete
Once the Approval Policy is deleted, it is marked as inactive ["isActive"
: "2"
].
Request
<API_URL_EndPoint>/Crud/Delete/ApprovalPolicy.json
data={
"id" : "app01IVEVRADCRIJ3o68"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "ApprovalPolicy",
"id" : "app01IVEVRADCRIJ3o68",
"name" : "Bills of $4000.00 or more require at least 2 approvers",
"type" : "0",
"amountThreshold" : 4000.00,
"minNumApprovers" : 2,
"isActive" : "2",
"createdTime" : "2016-12-08T21:59:18.000+0000",
"updatedTime" : "2016-12-08T22:06:38.000+0000"
}
}
Undelete
Once the Approval Policy is deleted, it is marked as active ["isActive" :
"1"
].
Request
<API_URL_EndPoint>/Crud/Undelete/ApprovalPolicy.json
data={
"id" : "app01IVEVRADCRIJ3o68"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "ApprovalPolicy",
"id" : "app01IVEVRADCRIJ3o68",
"name" : "Bills of $4000.00 or more require at least 2 approvers",
"type" : "0",
"amountThreshold" : 4000.00,
"minNumApprovers" : 2,
"isActive" : "1",
"createdTime" : "2016-12-08T21:59:18.000+0000",
"updatedTime" : "2016-12-08T22:06:38.000+0000"
}
}
Resources
Parameters