Skip to content

Update bill approval workflow

Request

Security
oauth2ClientCredentials(Required scopes: bills:write)
Path
workflowIdstringrequired
Headers
org_wallet_refstring
business_idstringrequired
Bodyapplication/jsonrequired
namestringrequired
Example:"Bill vendor invoice payments"
descriptionstring
Example:"Vendor bill payment approval workflow"
action_typenumber
Example:5
auto_approvalboolean
Example:false
requester_can_approveboolean
Example:true
statusstring
Enum:"active""inactive""archived"
typestring
Enum:"business""team"
businessstring

Business ObjectId the workflow belongs to. Upstream stores and queries workflows by business, so it must be forwarded or the workflow is saved unattached and never listed.

Example:"699f07c39420ef9b3cb0d667"
currencystring
Example:"KES"
wallet_currencystring
Example:"KES"
original_currencystring
Example:"KES"
currency_codestring
Example:"KES"
teamsArray of strings
Example:
[]
requester_approval_conditionsArray of strings
Example:
[]
stepsArray of objects(BillWorkflowStepDto)required
curl -i -X PATCH \
  'https://developer.boyahq.com/_mock/v2/openapi/bills/workflow/{workflowId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -H 'org_wallet_ref: string' \
  -d '{
    "name": "Bill vendor invoice payments",
    "description": "Vendor bill payment approval workflow",
    "action_type": 5,
    "auto_approval": false,
    "requester_can_approve": true,
    "status": "active",
    "type": "business",
    "business": "699f07c39420ef9b3cb0d667",
    "currency": "KES",
    "wallet_currency": "KES",
    "original_currency": "KES",
    "currency_code": "KES",
    "teams": [],
    "requester_approval_conditions": [],
    "steps": [
      {
        "approval_mandate": "all",
        "minimum_approvers": 1,
        "is_auto_approval": false,
        "daily_limit": 200,
        "transaction_limit": 5000,
        "amount_approval_condition": {
          "type": "under",
          "amount": 250000,
          "amount_range": [
            1,
            250000
          ],
          "values": []
        },
        "approvers": [
          {
            "employee": "65fbf2f42a5d67f03a764111",
            "level": 1,
            "must_approve": false,
            "amount_approval_condition": {
              "type": "under",
              "amount": 250000,
              "amount_range": [
                1,
                250000
              ],
              "values": []
            },
            "non_amount_approval_conditions": [
              "string"
            ]
          }
        ]
      }
    ]
  }'

Responses