Connect EarthCompliance API
Portfolios

Create or replace a portfolio snapshot

POST/portfolios

Uploads the holdings of a portfolio for one date. Sending the same identifier with a date in the same quarter replaces that snapshot. A date in another quarter adds a new snapshot. When the identifier already exists, only the holdings are replaced or added: name and currency are changed only with PUT /portfolios/{identifier}. Use the identifier in the response to update or delete the portfolio later. A snapshot_at in a future year fails with 400 and the message Snapshot date cannot be higher than actual date. A date that cannot be read fails with 400 and the message You are not using a valid date as snapshot parameter.

Authorization

apiKey
x-api-key<token>

Your Connect Earth API key.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://eco.datia.app/portfolios" \  -H "x-api-key: $CE_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "Pension fund A",    "identifier": "pension-fund-a",    "currency": "USD",    "snapshot_at": "2026-06-30",    "holdings": [      {        "name": "Apple Inc.",        "isin": "US0378331005",        "instrument_type": "stock",        "currency": "USD",        "weight": 30,        "market_value": 3000000      },      {        "name": "Microsoft Corp.",        "isin": "US5949181045",        "instrument_type": "stock",        "currency": "USD",        "weight": 25,        "market_value": 2500000      },      {        "name": "iShares Core MSCI World UCITS ETF",        "isin": "IE00B4L5Y983",        "instrument_type": "etf",        "currency": "USD",        "weight": 25,        "market_value": 2500000      },      {        "name": "Bund 2.6% 2033",        "isin": "DE000BU2Z015",        "instrument_type": "sovereign-bond",        "currency": "EUR",        "weight": 15,        "market_value": 1500000      },      {        "name": "Cash",        "isin": null,        "instrument_type": "cash",        "currency": "USD",        "weight": 5,        "market_value": 500000      }    ]  }'
{  "identifier": "datia-portfolio:12345_pension-fund-a",  "metadata": {    "message": "Fund created successfully at 2026-06-30"  }}