Skip to main content
POST
/
api
/
forest
/
biological-assets
Create Biological Asset
curl --request POST \
  --url https://api.example.com/api/forest/biological-assets \
  --header 'Content-Type: application/json' \
  --data '
{
  "level4Id": "<string>",
  "biologicalAssetKey": "<string>",
  "accountingKey": "<string>",
  "establishmentDate": "<string>",
  "plantingYear": 123,
  "geneticMaterialCode": "<string>",
  "geneticMaterialName": "<string>",
  "assetType": "<string>",
  "managementSchemeCode": "<string>",
  "managementSchemeName": "<string>",
  "inventoryCode": "<string>",
  "inventoryType": "<string>",
  "inventoryDate": "<string>",
  "inventoryAgeYears": 123,
  "level5UnitCount": 123,
  "spacingCode": "<string>",
  "spacingDescription": "<string>",
  "spacingBetweenRowsM": 123,
  "spacingBetweenTreesM": 123,
  "treeDensityPerHa": 123,
  "survivalRate": 123,
  "dominantHeightM": 123,
  "meanHeightM": 123,
  "quadraticDiameterM": 123,
  "basalAreaM2": 123,
  "unitVolumeM3NoBarkPerHa": 123,
  "unitVolumeM3WithBarkPerHa": 123,
  "totalVolumeM3NoBark": 123,
  "totalVolumeM3WithBark": 123,
  "adjustedVolumeM3NoBarkPerHa": 123,
  "adjustedVolumeM3WithBarkPerHa": 123,
  "imaClassCode": "<string>",
  "imaClassName": "<string>",
  "actualCostUsd": 123,
  "isActive": true
}
'
{
  "id": "<string>",
  "level4": {
    "id": "<string>",
    "code": "<string>",
    "name": "<string>"
  },
  "createdAt": {},
  "updatedAt": {}
}
Creates a new biological asset (Level 6) record associated with a Level 4 patrimony unit. This endpoint allows you to register detailed information about forest biological assets including planting details, inventory data, measurements, and costs.

Authentication

Requires authentication with valid session token. Users must have forest-biological-asset CREATE permission. SUPER_ADMIN role has full access.

Request Body

level4Id
string
required
ID of the Level 4 patrimony unit (UUID format). Must exist and belong to the user’s organization.
biologicalAssetKey
string
required
Unique biological asset identifier (1-220 characters). Must be unique across all biological assets.
accountingKey
string
Accounting key for financial tracking (max 220 characters)
establishmentDate
date
Date when the biological asset was established. Accepts ISO 8601 date format or YYYY-MM-DD.
plantingYear
number
Year of planting (integer)
geneticMaterialCode
string
Code identifying the genetic material (max 80 characters)
geneticMaterialName
string
Name of the genetic material or species (max 255 characters)
assetType
string
default:"COMERCIAL"
Type of biological asset. Options: COMERCIAL, INVESTIGACION
managementSchemeCode
string
Code for the management scheme (max 80 characters)
managementSchemeName
string
Name of the management scheme (max 255 characters)
inventoryCode
string
Unique inventory code (max 80 characters)
inventoryType
string
Type of inventory conducted (max 120 characters)
inventoryDate
date
Date when inventory was conducted
inventoryAgeYears
number
Age of the asset at inventory time in years (integer)
level5UnitCount
number
Number of Level 5 units associated (integer)
spacingCode
string
Code for spacing configuration (max 80 characters)
spacingDescription
string
Description of spacing pattern (max 255 characters)
spacingBetweenRowsM
number
Distance between rows in meters (decimal)
spacingBetweenTreesM
number
Distance between trees in meters (decimal)
treeDensityPerHa
number
Number of trees per hectare (decimal)
survivalRate
number
Survival rate as percentage (decimal, 0-100)
dominantHeightM
number
Dominant height in meters (decimal)
meanHeightM
number
Mean height in meters (decimal)
quadraticDiameterM
number
Quadratic mean diameter in meters (decimal)
basalAreaM2
number
Basal area in square meters (decimal)
unitVolumeM3NoBarkPerHa
number
Volume without bark per hectare in cubic meters (decimal)
unitVolumeM3WithBarkPerHa
number
Volume with bark per hectare in cubic meters (decimal)
totalVolumeM3NoBark
number
Total volume without bark in cubic meters (decimal)
totalVolumeM3WithBark
number
Total volume with bark in cubic meters (decimal)
adjustedVolumeM3NoBarkPerHa
number
Adjusted volume without bark per hectare in cubic meters (decimal)
adjustedVolumeM3WithBarkPerHa
number
Adjusted volume with bark per hectare in cubic meters (decimal)
imaClassCode
string
IMA (Mean Annual Increment) classification code (max 80 characters)
imaClassName
string
IMA classification name (max 120 characters)
actualCostUsd
number
Actual cost in USD (decimal with up to 2 decimal places)
isActive
boolean
default:"true"
Whether the asset is active

Response

Returns the created biological asset object with all fields, including the generated id and timestamps. Status code: 201 Created
id
string
Newly created unique identifier (UUID)
level4
object
Associated Level 4 patrimony unit details
createdAt
datetime
Creation timestamp
updatedAt
datetime
Last update timestamp
All other fields from the request body are returned in the response.

Error Responses

  • 400: Invalid data or validation errors
    • Duplicate biological asset key
    • Missing required fields
    • Invalid foreign key relationships
  • 401: Unauthorized (not authenticated)
  • 403: Forbidden (user lacks CREATE permission or organization)
  • 404: Level 4 unit not found or not accessible
  • 409: Biological asset key already exists
  • 500: Server error

Example Request

curl -X POST "https://api.example.com/api/forest/biological-assets" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "level4Id": "123e4567-e89b-12d3-a456-426614174000",
    "biologicalAssetKey": "BA-PINE-002",
    "accountingKey": "ACC-002",
    "establishmentDate": "2021-04-20",
    "plantingYear": 2021,
    "geneticMaterialCode": "GM-002",
    "geneticMaterialName": "Pinus oocarpa",
    "assetType": "COMERCIAL",
    "treeDensityPerHa": 1250,
    "survivalRate": 98.0,
    "actualCostUsd": 18500.00,
    "isActive": true
  }'

Example Response

{
  "id": "a8b7c9d0-1234-5678-9abc-def012345678",
  "level4Id": "123e4567-e89b-12d3-a456-426614174000",
  "biologicalAssetKey": "BA-PINE-002",
  "accountingKey": "ACC-002",
  "establishmentDate": "2021-04-20T00:00:00Z",
  "plantingYear": 2021,
  "geneticMaterialCode": "GM-002",
  "geneticMaterialName": "Pinus oocarpa",
  "assetType": "COMERCIAL",
  "managementSchemeCode": null,
  "managementSchemeName": null,
  "inventoryCode": null,
  "inventoryType": null,
  "inventoryDate": null,
  "inventoryAgeYears": null,
  "level5UnitCount": null,
  "spacingCode": null,
  "spacingDescription": null,
  "spacingBetweenRowsM": null,
  "spacingBetweenTreesM": null,
  "treeDensityPerHa": "1250",
  "survivalRate": "98.00",
  "dominantHeightM": null,
  "meanHeightM": null,
  "quadraticDiameterM": null,
  "basalAreaM2": null,
  "unitVolumeM3NoBarkPerHa": null,
  "unitVolumeM3WithBarkPerHa": null,
  "totalVolumeM3NoBark": null,
  "totalVolumeM3WithBark": null,
  "adjustedVolumeM3NoBarkPerHa": null,
  "adjustedVolumeM3WithBarkPerHa": null,
  "imaClassCode": null,
  "imaClassName": null,
  "actualCostUsd": "18500.00",
  "isActive": true,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "level4": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "code": "L4-001",
    "name": "Rodal Norte"
  }
}

Audit Log

This operation creates an audit log entry with:
  • Action: CREATE
  • Entity Type: ForestBiologicalAssetLevel6
  • Entity ID: The new biological asset ID
  • New Values: All submitted data

Build docs developers (and LLMs) love