bill-approvals

Create a bill approval policy

Changed on

Create a new bill approval policy.

In your request, set rules and approvers in the specified format. For example, to create a bill approval policy for all bills greater than or equal to $1000, set rules for BILL_AMOUNT.

{
  "policyName": "Approval policy for bills >= $1000",
  "rules": [
    {
      "key": "BILL_AMOUNT",
      "op": "gte",
      "values": [
        "1000"
      ]
    }
  ],
  "approvers": [
    "{approver_user_id}"
  ]
}
post/v3/bill-approvals/policies

Request

  • Base URL
    https://gateway.stage.bill.com/connect
  • URL
    https://gateway.stage.bill.com/connect/v3/bill-approvals/policies
  • Auth
    none declared

Headers

sessionIdstring nullable

API session ID generated with /v3/login

Example:{{session_id}}
devKeystring nullable

Developer key generated with your BILL developer account

Example:{{developer_key}}

Request body

policyNamestring required

Bill approval policy name

approversstring[] required

List of approvers. For each approver, set the BILL-generated ID of the user. The value begins with 006.

Note: BILL requests approvals in the specified order.

Example request

{
  "policyName": "Approval policy for bills >= $1000",
  "rules": [
    {
      "key": "BILL_AMOUNT",
      "op": "gte",
      "values": [
        "1000"
      ]
    }
  ],
  "approvers": [
    "{{bill_approver_user_id}}"
  ]
}

Response

Create a bill approval policy response

idstring

BILL-generated ID of the approval policy. The value is in the {organization_id}-{unique_id} format.

policyNamestring

Bill approval policy name

statusstring

Bill approval policy status

Changes