Activate a settlement rule
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request POST \
--url https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"rule": {
"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>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Settlement config
Activate a settlement rule
Activate a DRAFT (or SCHEDULED, or already-ACTIVE) settlement rule — the explicit money-moving sign-off step. Flips to ACTIVE, or SCHEDULED if activeFrom is in the future. Idempotent on an already-ACTIVE rule. SUPERSEDED / CANCELLED rules are terminal (409). Does not deactivate sibling rules. Requires scope settlement:write. Request body is ignored.
POST
/
v1
/
settlement-rules
/
{ruleId}
/
activate
Activate a settlement rule
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request POST \
--url https://sandbox.api.enfinitos.com/v1/settlement-rules/{ruleId}/activate \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"rule": {
"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>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Authorizations
API key sent as Authorization: Bearer <api-key>.
Path Parameters
⌘I