Portfolio and plots
Create a portfolio, draw or import AOIs, load the portfolio in bulk.
Fuente del diagrama (mermaid)
flowchart LR
P[POST /v1/portfolios] --> A[POST /v1/aois]
P --> I[POST /v1/import/aois]
I --> J[/v1/jobs · polling/]
A --> D[GET /v1/aois/id]
J --> D
One plot at a time
curl -sS "$SBOX/v1/aois" -X POST \
-H "authorization: Bearer $TOKEN" \
-H "idempotency-key: aoi-demo-0001" \
-H "content-type: application/json" \
-d '{
"portfolioId": "<portfolioId>",
"name": "Lote Demo Norte",
"centroid": { "lat": -33.49, "lon": -63.49 },
"areaHectares": 4.1,
"perilProfile": ["hail"],
"aoiVersion": 1,
"ring": [[-63.5,-33.5],[-63.48,-33.5],[-63.48,-33.48],[-63.5,-33.48]]
}'The ring goes in GeoJSON [lng, lat] order, open (without repeating the
first point). The declared area must match what the ring measures: if they
differ, whoever compares the two will believe the bug is theirs.
aoiVersion is not decorative: it goes into the content hash of /v1/jobs.
Redrawing the plot IS a different computation, and without the version an old
footprint would be reused for a new geometry.
In bulk
See Batch import. The import uses the same geometry evaluator as the console: a plot the console rejects, the import rejects too, with the same reason.
What breaks
A ring that crosses itself is rejected with invalid_geometry because it
has no defined area: two different tools will give it two different areas,
and that area is the basis of the insured capital.
A file projected in meters (Web Mercator, Gauss-Krüger) is detected and rejected with "coordinates out of range": reproject it to WGS84.