Skip to main content
POST
/
api
/
v1
/
siloc
/
certificates
Register a certificate reference
curl --request POST \
  --url https://siloc.sandbox.lerian.net/api/v1/siloc/certificates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "custodyReference": "<string>",
  "publicCertificatePem": "<string>"
}
'
import requests

url = "https://siloc.sandbox.lerian.net/api/v1/siloc/certificates"

payload = {
"custodyReference": "<string>",
"publicCertificatePem": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({custodyReference: '<string>', publicCertificatePem: '<string>'})
};

fetch('https://siloc.sandbox.lerian.net/api/v1/siloc/certificates', 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://siloc.sandbox.lerian.net/api/v1/siloc/certificates",
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([
'custodyReference' => '<string>',
'publicCertificatePem' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://siloc.sandbox.lerian.net/api/v1/siloc/certificates"

payload := strings.NewReader("{\n \"custodyReference\": \"<string>\",\n \"publicCertificatePem\": \"<string>\"\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))

}
HttpResponse<String> response = Unirest.post("https://siloc.sandbox.lerian.net/api/v1/siloc/certificates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"custodyReference\": \"<string>\",\n \"publicCertificatePem\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://siloc.sandbox.lerian.net/api/v1/siloc/certificates")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"custodyReference\": \"<string>\",\n \"publicCertificatePem\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "daysToExpiry": 123,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "notAfter": "2023-11-07T05:31:56Z",
  "subject": "<string>",
  "custodyReference": "<string>",
  "notBefore": "2023-11-07T05:31:56Z",
  "revokedAt": "2023-11-07T05:31:56Z",
  "serialNumber": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

Idempotency-Key
string

Idempotency key, max 255 characters.

Maximum string length: 255

Body

application/json
custodyReference
string
required

Reference locating the private key in the FI's custody (HSM/KMIP).

publicCertificatePem
string
required

PEM-encoded public certificate. The private key is NOT transmitted.

Response

Created

daysToExpiry
integer<int64>
required

Whole days until expiry (0 the day it lapses, negative once expired). Always present — a real 0 is the most urgent operator signal.

id
string<uuid>
required

Certificate id.

notAfter
string<date-time>
required

Validity end (expiry).

subject
string
required

Certificate subject DN.

Example:

"CN=46026562, OU=SILOC"

custodyReference
string

Opaque reference to the private key in the FI's custody; the key itself is never stored here.

notBefore
string<date-time>

Validity start.

revokedAt
string<date-time>

Revocation time. Omitted while the certificate is active.

serialNumber
string

Certificate serial number.