Skip to main content
GET
/
api
/
forest
/
patrimony
curl -X GET "https://api.confor.app/api/forest/patrimony?level=4&parentId=660e8400-e29b-41d4-a716-446655440001" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "items": [
    {
      "id": "770e8400-e29b-41d4-a716-446655440002",
      "level3Id": "660e8400-e29b-41d4-a716-446655440001",
      "code": "RODAL-01",
      "name": "Rodal Pino Caribe",
      "type": "RODAL",
      "fscCertificateStatus": "SI",
      "currentLandUseName": "Plantación comercial",
      "previousLandUseName": "Pastizal",
      "landUseChangeDate": "2020-03-15T00:00:00Z",
      "totalAreaHa": 120.75,
      "plantableAreaHa": 115.50,
      "rotationPhase": "Fase de crecimiento",
      "previousUse": "Ganadería extensiva",
      "centroidLatitude": 10.525,
      "centroidLongitude": -66.875,
      "lastInfoDate": "2024-01-10T00:00:00Z",
      "isActive": true,
      "createdAt": "2024-01-15T10:40:00Z",
      "updatedAt": "2024-01-15T10:40:00Z",
      "level3": {
        "id": "660e8400-e29b-41d4-a716-446655440001",
        "code": "COMP-A",
        "name": "Compartimiento Norte"
      },
      "_count": {
        "level6Assets": 3
      }
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "limit": 25,
    "totalPages": 1
  }
}

Overview

Level 4 represents stands, parcels, or management units within Level 3 compartments. These are the primary operational units for forest management and contain detailed information about land use and plantable areas.

Hierarchy

Level 2 (FINCA, PREDIO, etc.)
  └─ Level 3 (Compartments, Blocks, Sections)
      └─ Level 4 (RODAL, PARCELA, etc.) ← You are here
          └─ Level 5 (Reference Units, Sub-parcels)
Parent Relationship: Each Level 4 unit must belong to a Level 3 unit via level3Id.

List Level 4 Units

level
string
required
Must be set to "4" to retrieve Level 4 units
page
number
default:"1"
Page number for pagination
limit
number
default:"25"
Number of items per page
parentId
string
Filter by Level 3 parent ID (UUID)
Search by code or name (case-insensitive)

Response

items
array
id
string
Unique identifier (UUID)
level3Id
string
Parent Level 3 unit ID (UUID)
code
string
Unique code for the unit (max 80 characters, unique within parent)
name
string
Name of the stand or parcel
type
enum
Type of management unit. Possible values:
  • RODAL - Stand
  • PARCELA - Parcel
  • ENUMERATION - Enumeration
  • UNIDAD_DE_MANEJO - Management Unit
  • CONUCO - Small farm plot
  • OTRO_USO - Other use
fscCertificateStatus
enum
required
FSC certification status: SI (yes) or NO (no)
currentLandUseName
string
Current land use name (max 255 characters)
previousLandUseName
string
Previous land use name (max 255 characters)
landUseChangeDate
date
Date when land use changed
totalAreaHa
number
Total area in hectares
plantableAreaHa
number
Plantable area in hectares
rotationPhase
string
Rotation phase description (max 120 characters)
previousUse
string
Description of previous use (max 255 characters)
centroidLatitude
number
Latitude of centroid (-90 to 90)
centroidLongitude
number
Longitude of centroid (-180 to 180)
lastInfoDate
date
Date of last information update
isActive
boolean
default:"true"
Whether the unit is active
createdAt
datetime
Creation timestamp
updatedAt
datetime
Last update timestamp
level3
object
Parent Level 3 unit information
id
string
Level 3 ID
code
string
Level 3 code
name
string
Level 3 name
_count
object
Related counts
level6Assets
number
Number of biological assets (Level 6) associated with this unit
pagination
object
total
number
Total number of items
page
number
Current page number
limit
number
Items per page
totalPages
number
Total number of pages
curl -X GET "https://api.confor.app/api/forest/patrimony?level=4&parentId=660e8400-e29b-41d4-a716-446655440001" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "items": [
    {
      "id": "770e8400-e29b-41d4-a716-446655440002",
      "level3Id": "660e8400-e29b-41d4-a716-446655440001",
      "code": "RODAL-01",
      "name": "Rodal Pino Caribe",
      "type": "RODAL",
      "fscCertificateStatus": "SI",
      "currentLandUseName": "Plantación comercial",
      "previousLandUseName": "Pastizal",
      "landUseChangeDate": "2020-03-15T00:00:00Z",
      "totalAreaHa": 120.75,
      "plantableAreaHa": 115.50,
      "rotationPhase": "Fase de crecimiento",
      "previousUse": "Ganadería extensiva",
      "centroidLatitude": 10.525,
      "centroidLongitude": -66.875,
      "lastInfoDate": "2024-01-10T00:00:00Z",
      "isActive": true,
      "createdAt": "2024-01-15T10:40:00Z",
      "updatedAt": "2024-01-15T10:40:00Z",
      "level3": {
        "id": "660e8400-e29b-41d4-a716-446655440001",
        "code": "COMP-A",
        "name": "Compartimiento Norte"
      },
      "_count": {
        "level6Assets": 3
      }
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "limit": 25,
    "totalPages": 1
  }
}

Create Level 4 Unit

Creating a Level 4 unit will automatically enqueue a geometry recalculation job to update spatial data.

Request Body

level
string
required
Must be set to "4" to create a Level 4 unit
data
object
required
level3Id
string
required
Parent Level 3 unit ID (UUID)
code
string
required
Unique code within parent (1-80 characters)
name
string
required
Name of the stand or parcel (2-255 characters)
type
enum
required
Type: RODAL, PARCELA, ENUMERATION, UNIDAD_DE_MANEJO, CONUCO, OTRO_USO
fscCertificateStatus
enum
required
FSC certification: SI or NO
currentLandUseName
string
Current land use name (max 255 characters)
previousLandUseName
string
Previous land use name (max 255 characters)
totalAreaHa
number
required
Total area in hectares (must be non-negative)
plantableAreaHa
number
Plantable area in hectares (must be non-negative)
rotationPhase
string
Rotation phase description (max 120 characters)
previousUse
string
Description of previous use (max 255 characters)
centroidLatitude
number
Latitude of centroid (-90 to 90)
centroidLongitude
number
Longitude of centroid (-180 to 180)
lastInfoDate
date
Date of last information update
isActive
boolean
default:"true"
Whether the unit is active

Response

Returns the created Level 4 unit with status code 201, including the parent Level 3 information.
curl -X POST "https://api.confor.app/api/forest/patrimony" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "level": "4",
    "data": {
      "level3Id": "660e8400-e29b-41d4-a716-446655440001",
      "code": "RODAL-01",
      "name": "Rodal Pino Caribe",
      "type": "RODAL",
      "fscCertificateStatus": "SI",
      "currentLandUseName": "Plantación comercial",
      "previousLandUseName": "Pastizal",
      "totalAreaHa": 120.75,
      "plantableAreaHa": 115.50,
      "rotationPhase": "Fase de crecimiento"
    }
  }'
{
  "id": "770e8400-e29b-41d4-a716-446655440002",
  "level3Id": "660e8400-e29b-41d4-a716-446655440001",
  "code": "RODAL-01",
  "name": "Rodal Pino Caribe",
  "type": "RODAL",
  "fscCertificateStatus": "SI",
  "currentLandUseName": "Plantación comercial",
  "previousLandUseName": "Pastizal",
  "landUseChangeDate": null,
  "totalAreaHa": 120.75,
  "plantableAreaHa": 115.50,
  "rotationPhase": "Fase de crecimiento",
  "previousUse": null,
  "centroidLatitude": null,
  "centroidLongitude": null,
  "lastInfoDate": null,
  "isActive": true,
  "createdAt": "2024-01-15T10:40:00Z",
  "updatedAt": "2024-01-15T10:40:00Z",
  "level3": {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "code": "COMP-A",
    "name": "Compartimiento Norte"
  }
}

Build docs developers (and LLMs) love