Create a new organization
curl --request POST \
--url https://ledger.sandbox.lerian.net/v2/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"city": "New York",
"country": "US",
"line1": "123 Financial Avenue",
"line2": "Suite 1500",
"state": "NY",
"zipCode": "10001",
"description": "Home"
},
"doingBusinessAs": "Lerian FS",
"legalDocument": "123456789012345",
"legalName": "Lerian Financial Services Ltd.",
"metadata": {},
"parentOrganizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": {
"code": "ACTIVE",
"description": "Active status"
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"New York\",\n \"country\": \"US\",\n \"line1\": \"123 Financial Avenue\",\n \"line2\": \"Suite 1500\",\n \"state\": \"NY\",\n \"zipCode\": \"10001\",\n \"description\": \"Home\"\n },\n \"doingBusinessAs\": \"Lerian FS\",\n \"legalDocument\": \"123456789012345\",\n \"legalName\": \"Lerian Financial Services Ltd.\",\n \"metadata\": {},\n \"parentOrganizationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Active status\"\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({
address: {
city: 'New York',
country: 'US',
line1: '123 Financial Avenue',
line2: 'Suite 1500',
state: 'NY',
zipCode: '10001',
description: 'Home'
},
doingBusinessAs: 'Lerian FS',
legalDocument: '123456789012345',
legalName: 'Lerian Financial Services Ltd.',
metadata: {},
parentOrganizationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
status: {code: 'ACTIVE', description: 'Active status'}
})
};
fetch('https://ledger.sandbox.lerian.net/v2/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations"
payload = {
"address": {
"city": "New York",
"country": "US",
"line1": "123 Financial Avenue",
"line2": "Suite 1500",
"state": "NY",
"zipCode": "10001",
"description": "Home"
},
"doingBusinessAs": "Lerian FS",
"legalDocument": "123456789012345",
"legalName": "Lerian Financial Services Ltd.",
"metadata": {},
"parentOrganizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": {
"code": "ACTIVE",
"description": "Active status"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"address": {
"city": "New York",
"country": "US",
"line1": "123 Financial Avenue",
"line2": "Suite 1500",
"state": "NY",
"zipCode": "10001",
"description": "Home"
},
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"doingBusinessAs": "Lerian FS",
"id": "00000000-0000-0000-0000-000000000000",
"legalDocument": "123456789012345",
"legalName": "Lerian Financial Services Ltd.",
"parentOrganizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": {
"code": "ACTIVE",
"description": "Active status"
},
"updatedAt": "2021-01-01T00:00:00Z",
"metadata": {}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Create a new organization
POST
/
v2
/
organizations
Create a new organization
curl --request POST \
--url https://ledger.sandbox.lerian.net/v2/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"city": "New York",
"country": "US",
"line1": "123 Financial Avenue",
"line2": "Suite 1500",
"state": "NY",
"zipCode": "10001",
"description": "Home"
},
"doingBusinessAs": "Lerian FS",
"legalDocument": "123456789012345",
"legalName": "Lerian Financial Services Ltd.",
"metadata": {},
"parentOrganizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": {
"code": "ACTIVE",
"description": "Active status"
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"New York\",\n \"country\": \"US\",\n \"line1\": \"123 Financial Avenue\",\n \"line2\": \"Suite 1500\",\n \"state\": \"NY\",\n \"zipCode\": \"10001\",\n \"description\": \"Home\"\n },\n \"doingBusinessAs\": \"Lerian FS\",\n \"legalDocument\": \"123456789012345\",\n \"legalName\": \"Lerian Financial Services Ltd.\",\n \"metadata\": {},\n \"parentOrganizationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Active status\"\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({
address: {
city: 'New York',
country: 'US',
line1: '123 Financial Avenue',
line2: 'Suite 1500',
state: 'NY',
zipCode: '10001',
description: 'Home'
},
doingBusinessAs: 'Lerian FS',
legalDocument: '123456789012345',
legalName: 'Lerian Financial Services Ltd.',
metadata: {},
parentOrganizationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
status: {code: 'ACTIVE', description: 'Active status'}
})
};
fetch('https://ledger.sandbox.lerian.net/v2/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations"
payload = {
"address": {
"city": "New York",
"country": "US",
"line1": "123 Financial Avenue",
"line2": "Suite 1500",
"state": "NY",
"zipCode": "10001",
"description": "Home"
},
"doingBusinessAs": "Lerian FS",
"legalDocument": "123456789012345",
"legalName": "Lerian Financial Services Ltd.",
"metadata": {},
"parentOrganizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": {
"code": "ACTIVE",
"description": "Active status"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"address": {
"city": "New York",
"country": "US",
"line1": "123 Financial Avenue",
"line2": "Suite 1500",
"state": "NY",
"zipCode": "10001",
"description": "Home"
},
"createdAt": "2021-01-01T00:00:00Z",
"deletedAt": "2021-01-01T00:00:00Z",
"doingBusinessAs": "Lerian FS",
"id": "00000000-0000-0000-0000-000000000000",
"legalDocument": "123456789012345",
"legalName": "Lerian Financial Services Ltd.",
"parentOrganizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": {
"code": "ACTIVE",
"description": "Active status"
},
"updatedAt": "2021-01-01T00:00:00Z",
"metadata": {}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Authorizations
JWT bearer token issued by the identity provider.
Body
application/json
Show child attributes
Show child attributes
Maximum string length:
256Example:
"Lerian FS"
Maximum string length:
256Example:
"123456789012345"
Maximum string length:
256Example:
"Lerian Financial Services Ltd."
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
Example:
"2021-01-01T00:00:00Z"
Example:
"2021-01-01T00:00:00Z"
Maximum string length:
256Example:
"Lerian FS"
Example:
"00000000-0000-0000-0000-000000000000"
Maximum string length:
256Example:
"123456789012345"
Maximum string length:
256Example:
"Lerian Financial Services Ltd."
Show child attributes
Show child attributes
Example:
"2021-01-01T00:00:00Z"
Show child attributes
Show child attributes
Was this page helpful?

