List defendants
curl --request GET \
--url https://api.legal.usecroma.com/v1/defendants \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.legal.usecroma.com/v1/defendants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.legal.usecroma.com/v1/defendants', 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://api.legal.usecroma.com/v1/defendants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "https://api.legal.usecroma.com/v1/defendants"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.legal.usecroma.com/v1/defendants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.legal.usecroma.com/v1/defendants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"identification_number": "1234567890",
"name": "CLIENTE DE EJEMPLO",
"metadata": {
"valor_acumulado": 18500000
},
"process_count": 2,
"created_at": "2024-04-02T15:21:07.000Z"
}
],
"next_cursor": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"has_more": true
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid or missing API key."
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Rate limit exceeded. Try again in 42 seconds."
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "Internal error. Contact support with the X-Request-Id if it persists."
}
}Listar demandados
Your organization’s defendants (demandados) with their case counts and any data you imported about them. Newest first. Cursor-paginated.
GET
/
v1
/
defendants
List defendants
curl --request GET \
--url https://api.legal.usecroma.com/v1/defendants \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.legal.usecroma.com/v1/defendants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.legal.usecroma.com/v1/defendants', 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://api.legal.usecroma.com/v1/defendants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "https://api.legal.usecroma.com/v1/defendants"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.legal.usecroma.com/v1/defendants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.legal.usecroma.com/v1/defendants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"identification_number": "1234567890",
"name": "CLIENTE DE EJEMPLO",
"metadata": {
"valor_acumulado": 18500000
},
"process_count": 2,
"created_at": "2024-04-02T15:21:07.000Z"
}
],
"next_cursor": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"has_more": true
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid or missing API key."
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Rate limit exceeded. Try again in 42 seconds."
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "Internal error. Contact support with the X-Request-Id if it persists."
}
}Autorizaciones
Use Authorization: Bearer YOUR_API_KEY
Parámetros de consulta
Partial match on the identification number (cédula or NIT).
Partial, case-insensitive match on the name.
Opaque pagination cursor from a previous response's next_cursor. Omit for the first page.
Rows per page (default 25, max 100).
Rango requerido:
1 <= x <= 100⌘I