curl -X GET https://your-domain.com/api/organizations \
-H "Authorization: Bearer YOUR_TOKEN"
{
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Forest Corp",
"rif": "J-123456789",
"countryId": "660e8400-e29b-41d4-a716-446655440001",
"createdAt": "2024-01-15T08:30:00.000Z"
},
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"name": "Green Timber Industries",
"rif": "J-987654321",
"countryId": "660e8400-e29b-41d4-a716-446655440001",
"createdAt": "2024-02-20T14:45:00.000Z"
}
]
}
Retrieve a list of all organizations
curl -X GET https://your-domain.com/api/organizations \
-H "Authorization: Bearer YOUR_TOKEN"
{
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Forest Corp",
"rif": "J-123456789",
"countryId": "660e8400-e29b-41d4-a716-446655440001",
"createdAt": "2024-01-15T08:30:00.000Z"
},
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"name": "Green Timber Industries",
"rif": "J-987654321",
"countryId": "660e8400-e29b-41d4-a716-446655440001",
"createdAt": "2024-02-20T14:45:00.000Z"
}
]
}
Show Organization Object
curl -X GET https://your-domain.com/api/organizations \
-H "Authorization: Bearer YOUR_TOKEN"
{
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Forest Corp",
"rif": "J-123456789",
"countryId": "660e8400-e29b-41d4-a716-446655440001",
"createdAt": "2024-01-15T08:30:00.000Z"
},
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"name": "Green Timber Industries",
"rif": "J-987654321",
"countryId": "660e8400-e29b-41d4-a716-446655440001",
"createdAt": "2024-02-20T14:45:00.000Z"
}
]
}
organizations:READ permissiondeletedAt is not null).
country relationship via Prisma’s include clause. Organizations are ordered by creation date in descending order (newest first).
The rif field is extracted from the organization’s settings JSON field.