Skip to main content
POST
/
v1
/
organizations
/
{organization_id}
/
holders
Create a Holder
curl --request POST \
  --url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/holders \
  --header 'Content-Type: application/json' \
  --data '
{
  "createdAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "addresses": {},
  "contact": {
    "mobilePhone": "<string>",
    "otherPhone": "<string>",
    "primaryEmail": "<string>",
    "secondaryEmail": "<string>"
  },
  "document": "<string>",
  "externalId": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "legalPerson": {
    "activity": "<string>",
    "foundingDate": "2023-12-25",
    "representative": {
      "document": "<string>",
      "email": "<string>",
      "name": "<string>",
      "role": "<string>"
    },
    "size": "<string>",
    "status": "<string>",
    "tradeName": "<string>",
    "type": "<string>"
  },
  "metadata": {},
  "name": "<string>",
  "naturalPerson": {
    "birthDate": "2023-12-25",
    "civilStatus": "<string>",
    "fatherName": "<string>",
    "favoriteName": "<string>",
    "gender": "<string>",
    "motherName": "<string>",
    "nationality": "<string>",
    "socialName": "<string>",
    "status": "<string>"
  },
  "type": "<string>"
}
'
import requests

url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/holders"

payload = {
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"addresses": {},
"contact": {
"mobilePhone": "<string>",
"otherPhone": "<string>",
"primaryEmail": "<string>",
"secondaryEmail": "<string>"
},
"document": "<string>",
"externalId": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legalPerson": {
"activity": "<string>",
"foundingDate": "2023-12-25",
"representative": {
"document": "<string>",
"email": "<string>",
"name": "<string>",
"role": "<string>"
},
"size": "<string>",
"status": "<string>",
"tradeName": "<string>",
"type": "<string>"
},
"metadata": {},
"name": "<string>",
"naturalPerson": {
"birthDate": "2023-12-25",
"civilStatus": "<string>",
"fatherName": "<string>",
"favoriteName": "<string>",
"gender": "<string>",
"motherName": "<string>",
"nationality": "<string>",
"socialName": "<string>",
"status": "<string>"
},
"type": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
createdAt: '2023-11-07T05:31:56Z',
deletedAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
addresses: {},
contact: {
mobilePhone: '<string>',
otherPhone: '<string>',
primaryEmail: '<string>',
secondaryEmail: '<string>'
},
document: '<string>',
externalId: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
legalPerson: {
activity: '<string>',
foundingDate: '2023-12-25',
representative: {document: '<string>', email: '<string>', name: '<string>', role: '<string>'},
size: '<string>',
status: '<string>',
tradeName: '<string>',
type: '<string>'
},
metadata: {},
name: '<string>',
naturalPerson: {
birthDate: '2023-12-25',
civilStatus: '<string>',
fatherName: '<string>',
favoriteName: '<string>',
gender: '<string>',
motherName: '<string>',
nationality: '<string>',
socialName: '<string>',
status: '<string>'
},
type: '<string>'
})
};

fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/holders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/holders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'createdAt' => '2023-11-07T05:31:56Z',
'deletedAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'addresses' => [

],
'contact' => [
'mobilePhone' => '<string>',
'otherPhone' => '<string>',
'primaryEmail' => '<string>',
'secondaryEmail' => '<string>'
],
'document' => '<string>',
'externalId' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'legalPerson' => [
'activity' => '<string>',
'foundingDate' => '2023-12-25',
'representative' => [
'document' => '<string>',
'email' => '<string>',
'name' => '<string>',
'role' => '<string>'
],
'size' => '<string>',
'status' => '<string>',
'tradeName' => '<string>',
'type' => '<string>'
],
'metadata' => [

],
'name' => '<string>',
'naturalPerson' => [
'birthDate' => '2023-12-25',
'civilStatus' => '<string>',
'fatherName' => '<string>',
'favoriteName' => '<string>',
'gender' => '<string>',
'motherName' => '<string>',
'nationality' => '<string>',
'socialName' => '<string>',
'status' => '<string>'
],
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/holders"

payload := strings.NewReader("{\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"addresses\": {},\n \"contact\": {\n \"mobilePhone\": \"<string>\",\n \"otherPhone\": \"<string>\",\n \"primaryEmail\": \"<string>\",\n \"secondaryEmail\": \"<string>\"\n },\n \"document\": \"<string>\",\n \"externalId\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"legalPerson\": {\n \"activity\": \"<string>\",\n \"foundingDate\": \"2023-12-25\",\n \"representative\": {\n \"document\": \"<string>\",\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\"\n },\n \"size\": \"<string>\",\n \"status\": \"<string>\",\n \"tradeName\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"naturalPerson\": {\n \"birthDate\": \"2023-12-25\",\n \"civilStatus\": \"<string>\",\n \"fatherName\": \"<string>\",\n \"favoriteName\": \"<string>\",\n \"gender\": \"<string>\",\n \"motherName\": \"<string>\",\n \"nationality\": \"<string>\",\n \"socialName\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"type\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

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))

}
HttpResponse<String> response = Unirest.post("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/holders")
.header("Content-Type", "application/json")
.body("{\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"addresses\": {},\n \"contact\": {\n \"mobilePhone\": \"<string>\",\n \"otherPhone\": \"<string>\",\n \"primaryEmail\": \"<string>\",\n \"secondaryEmail\": \"<string>\"\n },\n \"document\": \"<string>\",\n \"externalId\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"legalPerson\": {\n \"activity\": \"<string>\",\n \"foundingDate\": \"2023-12-25\",\n \"representative\": {\n \"document\": \"<string>\",\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\"\n },\n \"size\": \"<string>\",\n \"status\": \"<string>\",\n \"tradeName\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"naturalPerson\": {\n \"birthDate\": \"2023-12-25\",\n \"civilStatus\": \"<string>\",\n \"fatherName\": \"<string>\",\n \"favoriteName\": \"<string>\",\n \"gender\": \"<string>\",\n \"motherName\": \"<string>\",\n \"nationality\": \"<string>\",\n \"socialName\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"type\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/holders")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"addresses\": {},\n \"contact\": {\n \"mobilePhone\": \"<string>\",\n \"otherPhone\": \"<string>\",\n \"primaryEmail\": \"<string>\",\n \"secondaryEmail\": \"<string>\"\n },\n \"document\": \"<string>\",\n \"externalId\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"legalPerson\": {\n \"activity\": \"<string>\",\n \"foundingDate\": \"2023-12-25\",\n \"representative\": {\n \"document\": \"<string>\",\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"role\": \"<string>\"\n },\n \"size\": \"<string>\",\n \"status\": \"<string>\",\n \"tradeName\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"naturalPerson\": {\n \"birthDate\": \"2023-12-25\",\n \"civilStatus\": \"<string>\",\n \"fatherName\": \"<string>\",\n \"favoriteName\": \"<string>\",\n \"gender\": \"<string>\",\n \"motherName\": \"<string>\",\n \"nationality\": \"<string>\",\n \"socialName\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"type\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "createdAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "addresses": {
    "additional1": {
      "city": "<string>",
      "country": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "state": "<string>",
      "zipCode": "<string>",
      "description": "<string>"
    },
    "additional2": {
      "city": "<string>",
      "country": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "state": "<string>",
      "zipCode": "<string>",
      "description": "<string>"
    },
    "primary": {
      "city": "<string>",
      "country": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "state": "<string>",
      "zipCode": "<string>",
      "description": "<string>"
    }
  },
  "contact": {
    "mobilePhone": "<string>",
    "otherPhone": "<string>",
    "primaryEmail": "<string>",
    "secondaryEmail": "<string>"
  },
  "document": "<string>",
  "externalId": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "legalPerson": {
    "activity": "<string>",
    "foundingDate": "2023-12-25",
    "representative": {
      "document": "<string>",
      "email": "<string>",
      "name": "<string>",
      "role": "<string>"
    },
    "size": "<string>",
    "status": "<string>",
    "tradeName": "<string>",
    "type": "<string>"
  },
  "metadata": {},
  "name": "<string>",
  "naturalPerson": {
    "birthDate": "2023-12-25",
    "civilStatus": "<string>",
    "fatherName": "<string>",
    "favoriteName": "<string>",
    "gender": "<string>",
    "motherName": "<string>",
    "nationality": "<string>",
    "socialName": "<string>",
    "status": "<string>"
  },
  "type": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Headers

Content-Type
string

The type of media of the resource. Recommended value is application/json.

X-Request-Id
string<uuid>

A unique identifier used to trace and track each request.

Authorization
string

Bearer JWT token for authentication. Required when PLUGIN_AUTH_ENABLED=true (enforced in multi-tenant deployments). Optional in default OSS single-tenant mode. Format: Bearer <token>

X-Idempotency
string

A unique key that ensures transaction idempotency. If not provided, the system automatically generates a SHA-256 hash based on the request body. Keys are scoped per organization and ledger.

Always validate the X-Idempotency-Replayed response header to distinguish new transactions from cached replays.

See Retries and idempotency for best practices.

X-TTL
integer

The time-to-live for the idempotency key, defined in seconds. Defaults to 300 seconds (5 minutes) if not provided. Only the TTL from the first request is used; changing it on retries has no effect.

See Retries and idempotency for details.

Path Parameters

organization_id
string<uuid>
required

The unique identifier of the Organization associated with the Ledger.

Body

application/json
createdAt
string<date-time>
required
Example:

"2025-01-01T00:00:00Z"

deletedAt
string<date-time> | null
required
Example:

"2025-01-01T00:00:00Z"

updatedAt
string<date-time>
required
Example:

"2025-01-01T00:00:00Z"

addresses
object
contact
object
document
string
Maximum string length: 100
Example:

"91315026015"

externalId
string
Maximum string length: 256
Example:

"G4K7N8M2"

id
string<uuid>
Example:

"00000000-0000-0000-0000-000000000000"

metadata
object
name
string
Maximum string length: 256
Example:

"John Doe"

naturalPerson
object
type
string
Maximum string length: 100
Example:

"NATURAL_PERSON"

Response

OK

createdAt
string<date-time>
required
Example:

"2025-01-01T00:00:00Z"

deletedAt
string<date-time> | null
required
Example:

"2025-01-01T00:00:00Z"

updatedAt
string<date-time>
required
Example:

"2025-01-01T00:00:00Z"

addresses
object
contact
object
document
string
Maximum string length: 100
Example:

"91315026015"

externalId
string
Maximum string length: 256
Example:

"G4K7N8M2"

id
string<uuid>
Example:

"00000000-0000-0000-0000-000000000000"

metadata
object
name
string
Maximum string length: 256
Example:

"John Doe"

naturalPerson
object
type
string
Maximum string length: 100
Example:

"NATURAL_PERSON"