List settlement rules
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/settlement-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true,
"data": {
"rules": [
{
"id": "<string>",
"orgId": "<string>",
"version": 123,
"label": "<string>",
"description": "<string>",
"activeFrom": "2023-11-07T05:31:56Z",
"activeUntil": "2023-11-07T05:31:56Z",
"supersedesRuleId": "<string>",
"supersededByRuleId": "<string>",
"splits": [
{
"share": "<string>",
"ledgerAccountCode": "<string>",
"counterpartyId": "<string>",
"minimumCents": 123,
"maximumCents": 123
}
],
"targeting": {
"currency": "<string>",
"substrates": [
"<string>"
],
"counterpartyIds": [
"<string>"
],
"appliesToScope": "<string>",
"minimumAmountCents": 123,
"maximumAmountCents": 123
},
"taxConfig": {
"withholdingApplies": true,
"passThroughFeeLedgerCodes": [
"<string>"
],
"vatRate": "<string>"
},
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"approvedBy": "<string>",
"approvedAt": "2023-11-07T05:31:56Z",
"approvalNotes": "<string>"
}
],
"total": 123,
"effectiveRuleId": "<string>",
"defaultRule": {
"id": "<string>",
"orgId": "<string>",
"version": 123,
"label": "<string>",
"description": "<string>",
"activeFrom": "2023-11-07T05:31:56Z",
"activeUntil": "2023-11-07T05:31:56Z",
"supersedesRuleId": "<string>",
"supersededByRuleId": "<string>",
"splits": [
{
"share": "<string>",
"ledgerAccountCode": "<string>",
"counterpartyId": "<string>",
"minimumCents": 123,
"maximumCents": 123
}
],
"targeting": {
"currency": "<string>",
"substrates": [
"<string>"
],
"counterpartyIds": [
"<string>"
],
"appliesToScope": "<string>",
"minimumAmountCents": 123,
"maximumAmountCents": 123
},
"taxConfig": {
"withholdingApplies": true,
"passThroughFeeLedgerCodes": [
"<string>"
],
"vatRate": "<string>"
},
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"approvedBy": "<string>",
"approvedAt": "2023-11-07T05:31:56Z",
"approvalNotes": "<string>"
}
},
"contractVersion": "<string>"
}Settlement config
List settlement rules
List the caller’s settlement rules plus the platform default and the id of the effective rule. Requires scope settlement:read.
GET
/
v1
/
settlement-rules
List settlement rules
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/settlement-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true,
"data": {
"rules": [
{
"id": "<string>",
"orgId": "<string>",
"version": 123,
"label": "<string>",
"description": "<string>",
"activeFrom": "2023-11-07T05:31:56Z",
"activeUntil": "2023-11-07T05:31:56Z",
"supersedesRuleId": "<string>",
"supersededByRuleId": "<string>",
"splits": [
{
"share": "<string>",
"ledgerAccountCode": "<string>",
"counterpartyId": "<string>",
"minimumCents": 123,
"maximumCents": 123
}
],
"targeting": {
"currency": "<string>",
"substrates": [
"<string>"
],
"counterpartyIds": [
"<string>"
],
"appliesToScope": "<string>",
"minimumAmountCents": 123,
"maximumAmountCents": 123
},
"taxConfig": {
"withholdingApplies": true,
"passThroughFeeLedgerCodes": [
"<string>"
],
"vatRate": "<string>"
},
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"approvedBy": "<string>",
"approvedAt": "2023-11-07T05:31:56Z",
"approvalNotes": "<string>"
}
],
"total": 123,
"effectiveRuleId": "<string>",
"defaultRule": {
"id": "<string>",
"orgId": "<string>",
"version": 123,
"label": "<string>",
"description": "<string>",
"activeFrom": "2023-11-07T05:31:56Z",
"activeUntil": "2023-11-07T05:31:56Z",
"supersedesRuleId": "<string>",
"supersededByRuleId": "<string>",
"splits": [
{
"share": "<string>",
"ledgerAccountCode": "<string>",
"counterpartyId": "<string>",
"minimumCents": 123,
"maximumCents": 123
}
],
"targeting": {
"currency": "<string>",
"substrates": [
"<string>"
],
"counterpartyIds": [
"<string>"
],
"appliesToScope": "<string>",
"minimumAmountCents": 123,
"maximumAmountCents": 123
},
"taxConfig": {
"withholdingApplies": true,
"passThroughFeeLedgerCodes": [
"<string>"
],
"vatRate": "<string>"
},
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"approvedBy": "<string>",
"approvedAt": "2023-11-07T05:31:56Z",
"approvalNotes": "<string>"
}
},
"contractVersion": "<string>"
}Authorizations
API key sent as Authorization: Bearer <api-key>.
⌘I