curl --request GET \
--url http://localhost:8000/dashboard/operational-readinessimport requests
url = "http://localhost:8000/dashboard/operational-readiness"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/dashboard/operational-readiness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/dashboard/operational-readiness",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/dashboard/operational-readiness"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/dashboard/operational-readiness")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/dashboard/operational-readiness")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"readiness": {
"has_certificate": false,
"has_emission_point": false,
"has_establishment": false,
"has_issuer": false,
"is_operational": false
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get Operational Readiness
Get operational readiness status for the current tenant.
Checks if the tenant has all required entities configured and active:
- Principal issuer (oldest by created_at)
- Active certificate for that issuer
- Establishment (oldest by created_at)
- Emission point (oldest by created_at)
The environment is derived from the principal issuer or certificate. The tenant is considered operational if all four entities are present and active.
All database operations use async/await for non-blocking I/O.
Args: db: Async database session tenant_id: Active tenant ID from authentication context current_user: Current user context from authentication
Returns: OperationalReadinessResponse: Aggregated readiness status with entity details
curl --request GET \
--url http://localhost:8000/dashboard/operational-readinessimport requests
url = "http://localhost:8000/dashboard/operational-readiness"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/dashboard/operational-readiness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/dashboard/operational-readiness",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/dashboard/operational-readiness"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/dashboard/operational-readiness")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/dashboard/operational-readiness")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"readiness": {
"has_certificate": false,
"has_emission_point": false,
"has_establishment": false,
"has_issuer": false,
"is_operational": false
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Cookies
Response
Successful Response
Full operational readiness response for a tenant.
Schema for Issuer response.
Show child attributes
Show child attributes
{
"created_at": "2024-01-01T00:00:00Z",
"direccion_matriz": "Av. Principal 123 y Secundaria, Quito, Ecuador",
"id": "550e8400-e29b-41d4-a716-446655440000",
"is_active": true,
"legal_representative": "Jane Doe",
"nombre_comercial": "Ejemplo Corp",
"razon_social": "EMPRESA EJEMPLO S.A.",
"ruc": "1234567890001",
"sri_environment": "TEST",
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"tipo_contribuyente": "General",
"updated_at": "2024-01-01T00:00:00Z"
}
Schema for Certificate response (without sensitive data).
Show child attributes
Show child attributes
{
"created_at": "2024-01-01T00:00:00Z",
"id": "990e8400-e29b-41d4-a716-446655440000",
"issuer_id": "550e8400-e29b-41d4-a716-446655440000",
"serial_number": "1234567890ABCDEF",
"status": "active",
"subject_cn": "EMPRESA EJEMPLO S.A.",
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"updated_at": "2024-01-01T00:00:00Z",
"valid_from": "2024-01-01T00:00:00Z",
"valid_until": "2026-01-01T00:00:00Z"
}
Schema for Establishment response.
Show child attributes
Show child attributes
{
"address": "Av. Principal 123, Quito, Ecuador",
"code": "001",
"created_at": "2024-01-01T00:00:00Z",
"id": "770e8400-e29b-41d4-a716-446655440000",
"is_active": true,
"issuer_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Matriz",
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"updated_at": "2024-01-01T00:00:00Z"
}
Schema for EmissionPoint response.
Show child attributes
Show child attributes
{
"code": "001",
"created_at": "2024-01-01T00:00:00Z",
"establishment_id": "770e8400-e29b-41d4-a716-446655440000",
"id": "880e8400-e29b-41d4-a716-446655440000",
"initial_sequential": 0,
"is_active": true,
"tenant_id": "660e8400-e29b-41d4-a716-446655440000",
"updated_at": "2024-01-01T00:00:00Z"
}
SRI environment types.
TEST, PRODUCTION Boolean flags summarising operational readiness.
Show child attributes
Show child attributes
{
"has_certificate": true,
"has_emission_point": true,
"has_establishment": true,
"has_issuer": true,
"is_operational": true
}