Create a new ledger
curl --request POST \
--url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {},
"name": "<string>",
"status": {
"code": "ACTIVE",
"description": "Active status"
},
"settings": {
"accounting": {
"requireHolder": false,
"validateAccountType": false,
"validateRoutes": false
},
"crossLedger": {
"enabled": false
},
"overrides": {
"allowFeeSkip": false,
"allowHolderSkip": false,
"allowTracerSkip": false
},
"tracer": {
"failPosture": "open",
"mode": "off",
"timeoutMs": 250
}
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers"
payload := strings.NewReader("{\n \"metadata\": {},\n \"name\": \"<string>\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Active status\"\n },\n \"settings\": {\n \"accounting\": {\n \"requireHolder\": false,\n \"validateAccountType\": false,\n \"validateRoutes\": false\n },\n \"crossLedger\": {\n \"enabled\": false\n },\n \"overrides\": {\n \"allowFeeSkip\": false,\n \"allowHolderSkip\": false,\n \"allowTracerSkip\": false\n },\n \"tracer\": {\n \"failPosture\": \"open\",\n \"mode\": \"off\",\n \"timeoutMs\": 250\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {},
name: '<string>',
status: {code: 'ACTIVE', description: 'Active status'},
settings: {
accounting: {requireHolder: false, validateAccountType: false, validateRoutes: false},
crossLedger: {enabled: false},
overrides: {allowFeeSkip: false, allowHolderSkip: false, allowTracerSkip: false},
tracer: {failPosture: 'open', mode: 'off', timeoutMs: 250}
}
})
};
fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers"
payload = {
"metadata": {},
"name": "<string>",
"status": {
"code": "ACTIVE",
"description": "Active status"
},
"settings": {
"accounting": {
"requireHolder": False,
"validateAccountType": False,
"validateRoutes": False
},
"crossLedger": { "enabled": False },
"overrides": {
"allowFeeSkip": False,
"allowHolderSkip": False,
"allowTracerSkip": False
},
"tracer": {
"failPosture": "open",
"mode": "off",
"timeoutMs": 250
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"name": "Treasury Operations",
"organizationId": "00000000-0000-0000-0000-000000000000",
"status": {
"code": "ACTIVE",
"description": "Active status"
},
"updatedAt": "2021-01-01T00:00:00Z",
"metadata": {},
"settings": {
"accounting": {
"requireHolder": false,
"validateAccountType": false,
"validateRoutes": false
},
"crossLedger": {
"enabled": false
},
"overrides": {
"allowFeeSkip": false,
"allowHolderSkip": false,
"allowTracerSkip": false
},
"tracer": {
"failPosture": "open",
"mode": "off",
"timeoutMs": 250
}
}
}{
"code": "0065",
"message": "<string>",
"title": "Invalid Path Parameter",
"entityType": "Account",
"fields": {}
}{
"code": "0065",
"message": "<string>",
"title": "Invalid Path Parameter",
"entityType": "Account",
"fields": {}
}{
"code": "0065",
"message": "<string>",
"title": "Invalid Path Parameter",
"entityType": "Account",
"fields": {}
}Create a new ledger
deprecated
POST
/
v1
/
organizations
/
{organization_id}
/
ledgers
Create a new ledger
curl --request POST \
--url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {},
"name": "<string>",
"status": {
"code": "ACTIVE",
"description": "Active status"
},
"settings": {
"accounting": {
"requireHolder": false,
"validateAccountType": false,
"validateRoutes": false
},
"crossLedger": {
"enabled": false
},
"overrides": {
"allowFeeSkip": false,
"allowHolderSkip": false,
"allowTracerSkip": false
},
"tracer": {
"failPosture": "open",
"mode": "off",
"timeoutMs": 250
}
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers"
payload := strings.NewReader("{\n \"metadata\": {},\n \"name\": \"<string>\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Active status\"\n },\n \"settings\": {\n \"accounting\": {\n \"requireHolder\": false,\n \"validateAccountType\": false,\n \"validateRoutes\": false\n },\n \"crossLedger\": {\n \"enabled\": false\n },\n \"overrides\": {\n \"allowFeeSkip\": false,\n \"allowHolderSkip\": false,\n \"allowTracerSkip\": false\n },\n \"tracer\": {\n \"failPosture\": \"open\",\n \"mode\": \"off\",\n \"timeoutMs\": 250\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {},
name: '<string>',
status: {code: 'ACTIVE', description: 'Active status'},
settings: {
accounting: {requireHolder: false, validateAccountType: false, validateRoutes: false},
crossLedger: {enabled: false},
overrides: {allowFeeSkip: false, allowHolderSkip: false, allowTracerSkip: false},
tracer: {failPosture: 'open', mode: 'off', timeoutMs: 250}
}
})
};
fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers"
payload = {
"metadata": {},
"name": "<string>",
"status": {
"code": "ACTIVE",
"description": "Active status"
},
"settings": {
"accounting": {
"requireHolder": False,
"validateAccountType": False,
"validateRoutes": False
},
"crossLedger": { "enabled": False },
"overrides": {
"allowFeeSkip": False,
"allowHolderSkip": False,
"allowTracerSkip": False
},
"tracer": {
"failPosture": "open",
"mode": "off",
"timeoutMs": 250
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"name": "Treasury Operations",
"organizationId": "00000000-0000-0000-0000-000000000000",
"status": {
"code": "ACTIVE",
"description": "Active status"
},
"updatedAt": "2021-01-01T00:00:00Z",
"metadata": {},
"settings": {
"accounting": {
"requireHolder": false,
"validateAccountType": false,
"validateRoutes": false
},
"crossLedger": {
"enabled": false
},
"overrides": {
"allowFeeSkip": false,
"allowHolderSkip": false,
"allowTracerSkip": false
},
"tracer": {
"failPosture": "open",
"mode": "off",
"timeoutMs": 250
}
}
}{
"code": "0065",
"message": "<string>",
"title": "Invalid Path Parameter",
"entityType": "Account",
"fields": {}
}{
"code": "0065",
"message": "<string>",
"title": "Invalid Path Parameter",
"entityType": "Account",
"fields": {}
}{
"code": "0065",
"message": "<string>",
"title": "Invalid Path Parameter",
"entityType": "Account",
"fields": {}
}Authorizations
JWT bearer token issued by the identity provider.
Path Parameters
Organization ID (UUID)
Body
application/json
Response
Created
Example:
"2021-01-01T00:00:00Z"
Example:
"2021-01-01T00:00:00Z"
Example:
"00000000-0000-0000-0000-000000000000"
Maximum string length:
256Example:
"Treasury Operations"
Example:
"00000000-0000-0000-0000-000000000000"
Show child attributes
Show child attributes
Example:
"2021-01-01T00:00:00Z"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

