Sign inBook a demo
HomeGuidesAPI ReferenceGlossary
HomeGuidesAPI ReferenceGlossary
  • API Reference
Logo
Sign inBook a demo
API ReferenceEntityApproval Policy

Restore

POST
https://api.mercoa.com/entity/:entityId/approval-policies/history/:approvalPolicyHistoryId/restore
POST
/entity/:entityId/approval-policies/history/:approvalPolicyHistoryId/restore
1curl -X POST https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/approval-policies/history/hist_21661ac1-a2a8-4465-a6c0-64474ba8181d/restore \
2 -H "Authorization: Bearer <token>"
Try it
200RestoreFromHistory
1[
2 {
3 "id": "apvl_21661ac1-a2a8-4465-a6c0-64474ba8181d",
4 "trigger": [],
5 "rule": {
6 "type": "approver",
7 "identifierList": {
8 "type": "userList",
9 "value": [
10 "usr_8545a84e-a45f-41bf-bdf1-33b42a55812c",
11 "usr_21661ac1-a2a8-4465-a6c0-64474ba8181d"
12 ]
13 },
14 "numApprovers": 2
15 },
16 "upstreamPolicyId": "root",
17 "createdAt": "2024-01-01T00:00:00Z",
18 "updatedAt": "2024-01-02T00:00:00Z"
19 },
20 {
21 "id": "apvl_8545a84e-a45f-41bf-bdf1-33b42a55812c",
22 "trigger": [
23 {
24 "type": "amount",
25 "amount": 100,
26 "currency": "USD"
27 }
28 ],
29 "rule": {
30 "type": "approver",
31 "identifierList": {
32 "type": "rolesList",
33 "value": [
34 "Admin",
35 "Controller"
36 ]
37 },
38 "numApprovers": 2
39 },
40 "upstreamPolicyId": "root",
41 "createdAt": "2024-01-01T00:00:00Z",
42 "updatedAt": "2024-01-02T00:00:00Z"
43 }
44]
Restore approval policies from a history entry.
Was this page helpful?
Previous

Get Entity BNPL Loans

Next
Built with
Get Entity BNPL Loans
Restore approval policies from a history entry.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

entityIdstringRequired
Entity ID or Entity ForeignID
approvalPolicyHistoryIdstringRequired

Response

This endpoint returns a list of objects.
idstring
triggerlist of objects
ruleobject
upstreamPolicyIdstring
createdAtdatetime
updatedAtdatetime

Errors