View as Markdown

Imports

An import is one file a bank delivered: the nightly files the platform collects from each bank, and the files you upload yourself. Each import shows how far the platform got with the file and how many of its rows it took in; the rows it could not take in are import issues. A file's path, hash and internal error text are never shown. Reads need ingestion:read, uploads ingestion:write; both are operations work. Uploads take ?dry_run=true and an Idempotency-Key header and are logged in the change history.

Data model

idstring

A UUID.

custodian_idstring

The bank that delivered the file.

as_of_datedate

The day the file is for.

received_attimestamp

When the platform received the file. RFC 3339, UTC.

sourcestring

custodian_feed for a file the platform collected, manual_upload for a file posted to POST /v1/imports.

file_typestring or null

The file's type, e.g. holding, balance, transaction, time_data; null until the platform has read the file.

file_namestring or null

The file's name, without any path.

statusstring

pending (waiting for the platform), processing, succeeded or failed. An upload takes the status of the platform's run on its bytes.

row_count, valid_count, invalid_countinteger or null

The file's data rows, the rows taken in and the rows rejected, over all its parts; null until the platform has counted them. Valid and invalid can add up to less than the rows: duplicates and rows the mapping drops count as neither.

completed_attimestamp or null

When the platform finished the file.

open_issue_countinteger

The file's open import issues that you can see.


GET/v1/imports

List imports

Returns the imports you can see, newest first, as a cursor list. An admin or Aleta sees every import; a user sees the files of a bank they hold a custody account at and the files they uploaded. A file you uploaded is listed once, however the platform picked it up. An unknown parameter is a 400.

Query parameters

custodian_idstring

One bank's files.

as_of_datedate

One day's files, YYYY-MM-DD.

cursor, limitstring, integer

Paging.

Request
GET/v1/imports
curl -G https://api.aleta.ai/v1/imports \
  -H "Authorization: Bearer {access_token}" \
  -d as_of_date=2026-10-07
Response
{
  "data": [
    {
      "id": "019f95f0-2d40-7b58-8f6e-9a3c1d7e5b01",
      "custodian_id": "5b0c3e2a-1f4d-4a6b-9c8e-7d6f5e4a3b21",
      "as_of_date": "2026-10-07",
      "received_at": "2026-10-07T06:00:12.000000Z",
      "source": "custodian_feed",
      "file_type": "holding",
      "file_name": "holdings_20261007.csv",
      "status": "succeeded",
      "row_count": 412,
      "valid_count": 409,
      "invalid_count": 3,
      "completed_at": "2026-10-07T06:01:40.000000Z",
      "open_issue_count": 3
    }
  ],
  "next_cursor": null,
  "limit": 100
}

GET/v1/imports/{id}

Retrieve an import

Returns one import. An import you cannot see, or an id that is not a UUID, is a 404.

Request
GET/v1/imports/{id}
curl https://api.aleta.ai/v1/imports/019f95f0-2d40-7b58-8f6e-9a3c1d7e5b01 \
  -H "Authorization: Bearer {access_token}"

POST/v1/imports

Upload a file

Uploads one bank file as multipart/form-data. The platform picks the file up and the import moves from pending to succeeded or failed. Answers 201 with the new import, or 200 with the earlier import when the same bytes were already uploaded as the same file type for the bank and day. Before your tenant has moved, an upload is a 409 legacy_managed, a dry run too.

Form fields

custodian_idstring

Required: the bank, a UUID. A bank you cannot see is a 404.

file_typestring

Required: time_data, balance, holding, transaction, private_asset_holding, custodian_asset_identifier or bond_analytics.

file_datedate

Optional, YYYY-MM-DD; today when left out.

filefile

Required: one file part with a filename.

Request
POST/v1/imports
curl -X POST https://api.aleta.ai/v1/imports \
  -H "Authorization: Bearer {access_token}" \
  -H "Idempotency-Key: 6b0f9c1e-upload-1" \
  -F custodian_id=5b0c3e2a-1f4d-4a6b-9c8e-7d6f5e4a3b21 \
  -F file_type=holding \
  -F file_date=2026-10-07 \
  -F file=@holdings_20261007.csv

Errors

400bad_request

A missing or invalid form field, no file part, or, on the list, an unknown query parameter, an as_of_date that is not a date or a bad cursor.

403forbidden

Your key lacks ingestion:read (reads) or ingestion:write (uploads), or your groups do not give you operations work (read for reads, read and write for uploads).

404not_found

The import or the bank does not exist or you cannot see it.

409legacy_managed

The legacy platform is still master for your tenant.

503service_unavailable

File uploads are not configured for this deployment.