curl --request POST \
--url https://api.example.com/api/forest/biological-assets/import \
--header 'Content-Type: application/json' \
--data '
{
"level4Id": "<string>",
"accountingKey / clavecontable": "<string>",
"assetType / tipoactivo / tipo": "<string>",
"establishmentDate / fechaestablecimiento": "<string>",
"plantingYear / anoplantacion / añoplantación": 123,
"inventoryCode / inventariocodigo": "<string>",
"inventoryType / inventariotipo": "<string>",
"inventoryDate / fechainventario": "<string>",
"isActive / estado / estatus": true
}
'{
"created": 123,
"updated": 123,
"skipped": 123,
"errors": [
{
"row": 123,
"key": "<string>",
"error": "<string>"
}
]
}Bulk import biological assets from Excel or CSV files
curl --request POST \
--url https://api.example.com/api/forest/biological-assets/import \
--header 'Content-Type: application/json' \
--data '
{
"level4Id": "<string>",
"accountingKey / clavecontable": "<string>",
"assetType / tipoactivo / tipo": "<string>",
"establishmentDate / fechaestablecimiento": "<string>",
"plantingYear / anoplantacion / añoplantación": 123,
"inventoryCode / inventariocodigo": "<string>",
"inventoryType / inventariotipo": "<string>",
"inventoryDate / fechainventario": "<string>",
"isActive / estado / estatus": true
}
'{
"created": 123,
"updated": 123,
"skipped": 123,
"errors": [
{
"row": 123,
"key": "<string>",
"error": "<string>"
}
]
}forest-biological-asset CREATE or UPDATE permissions. SUPER_ADMIN role has full access.
COMERCIAL or INVESTIGACION1, true, si, sí, yes, activo, activa (for true) or 0, false, no, inactivo, inactiva (for false)curl -X POST "https://api.example.com/api/forest/biological-assets/import" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@biological_assets.xlsx" \
-F "level4Id=123e4567-e89b-12d3-a456-426614174000"
| biologicalAssetKey | accountingKey | assetType | plantingYear | inventoryCode | isActive |
|---|---|---|---|---|---|
| BA-PINE-001 | ACC-001 | COMERCIAL | 2020 | INV-2023-001 | true |
| BA-PINE-002 | ACC-002 | COMERCIAL | 2021 | INV-2023-002 | true |
| BA-EUC-001 | ACC-003 | INVESTIGACION | 2019 | INV-2023-003 | false |
biologicalAssetKey,accountingKey,assetType,plantingYear,inventoryCode,isActive
BA-PINE-001,ACC-001,COMERCIAL,2020,INV-2023-001,true
BA-PINE-002,ACC-002,COMERCIAL,2021,INV-2023-002,true
BA-EUC-001,ACC-003,INVESTIGACION,2019,INV-2023-003,false
{
"created": 2,
"updated": 1,
"skipped": 0,
"errors": []
}
{
"created": 5,
"updated": 3,
"skipped": 2,
"errors": [
{
"row": 4,
"key": "BA-INVALID",
"error": "biologicalAssetKey es obligatorio"
},
{
"row": 7,
"key": "BA-ERROR",
"error": "Invalid foreign key constraint"
}
]
}