DotsDocs
Accounts payable

Create an approval policy

Create an approval policy that will apply approval steps to payables in your app. It will only apply to policies that match the `approval_conditions` and are in state `submitted_for_approval`. Policies that already have approval steps will not be overwritten.

POST
/v2/accounts-payable/approval-policies

Create an approval policy that will apply approval steps to payables in your app. It will only apply to policies that match the approval_conditions and are in state submitted_for_approval. Policies that already have approval steps will not be overwritten.

Authorization

api_key
headerAuthorizationBasic <token>

Request Body

application/json
  1. body
description?string
payable_conditions*array<|>
Items1 <= items
approval_conditions*array<>
Items1 <= items

Response Body

Created

application/json
  1. response
active?boolean
api_app_id?string
Formatuuid
approval_conditions?array<>
payable_conditions?array<>
created?string
Formatdate-time
description?string
id?string
Formatuuid
priority?integer
Example Request
curl -X POST 'https://api.dots.dev/api/v2/accounts-payable/approval-policies' \  -H 'Content-Type: application/json' \  -d '{  "payable_conditions": [    {      "type": "amount",      "value": 0,      "comparator": "<="    }  ],  "approval_conditions": [    {      "approver_list": [        0      ],      "num_approvals_required": 1    }  ]}'
Example Response
{  "active": true,  "api_app_id": "ad6a2ad4-d593-4e3e-bfd5-50592ed119ca",  "approval_conditions": [    {      "approver_list": [        {          "id": 0,          "name": "string"        }      ],      "num_approvals_required": 0    }  ],  "payable_conditions": [    {      "comparator": "string",      "type": null,      "value": 0    }  ],  "created": "2019-08-24T14:15:22Z",  "description": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "priority": 0}