EntityApproval Policy

Update

POST
Update an invoice approval policy associated with an entity

Path parameters

entityIdstringRequired
policyIdstringRequired

Request

This endpoint expects an object.
trigger
list of unionsOptional
rule
unionOptional
upstreamPolicyId
stringOptional

Response

This endpoint returns an object
id
string
trigger
list of unions
rule
union
upstreamPolicyId
string
POST
1curl -X POST https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/approval-policy/apvl_5ce50275-1789-42ea-bc60-bb7e6d03635c \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "trigger": [
6 {
7 "type": "amount",
8 "amount": 100,
9 "currency": "USD"
10 }
11 ],
12 "rule": {
13 "type": "approver",
14 "identifierList": {
15 "type": "rolesList",
16 "value": [
17 "Admin",
18 "Controller"
19 ]
20 },
21 "numApprovers": 2
22 },
23 "upstreamPolicyId": "root"
24}'
200Successful
1{
2 "id": "apvl_8545a84e-a45f-41bf-bdf1-33b42a55812c",
3 "trigger": [
4 {
5 "type": "amount",
6 "amount": 100,
7 "currency": "USD"
8 }
9 ],
10 "rule": {
11 "type": "approver",
12 "identifierList": {
13 "type": "rolesList",
14 "value": [
15 "Admin",
16 "Controller"
17 ]
18 },
19 "numApprovers": 2
20 },
21 "upstreamPolicyId": "root"
22}