Holdings

The holdings API records the shares and units a company holds in other companies and funds: the second ledger of the equity module, beside the company’s own shareholders. A holding is one issuer and share class; its transactions say what happened to it. What a holding is on a date is worked out from its transactions in date order, the oldest shares sold first (skatteloven § 10-36).

The year-end compares each holding’s cost with the balance account it names (account_code), and the tax on securities will read the ledger.

Endpoints

List Holdings

GET /api/v2/equity/holdings

Returns the company’s holdings by issuer name, in the paginated envelope. with=transactions adds each one’s transactions.

Query Parameters

Parameter Type Required Description
client_account_id integer Yes The client account ID
issuer_organization_number string No Only holdings in this issuer
account_code string No Only holdings on this balance account
with string No transactions
page integer No Page number (default: 1)
per_page integer No Items per page (default: 50)

Get Holding

GET /api/v2/equity/holdings/{id}

Create Holding

POST /api/v2/equity/holdings

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
issuer_name string Yes The issuer’s name
issuer_country_code string Yes ISO 3166-1 alpha-2, such as NO
issuer_organization_number string For a Norwegian issuer Nine digits
isin string For a foreign issuer, or issuer_foreign_id 12 characters
issuer_foreign_id string For a foreign issuer, or isin The issuer’s id in its own country’s register
security_type string Yes SHARE, FUND_UNIT, PARTNERSHIP_INTEREST (an ANS, DA, KS or the like) or OTHER
share_class string No ORDINARY (default), CLASS_A, CLASS_B, CLASS_C, PREFERRED or OTHER
account_code string No The balance account the books carry the holding’s cost on, such as 1350
currency_code string No ISO 4217 code of its transactions; defaults to the accounting currency, and can’t change once it has transactions
notes string No Up to 500 characters

Example Request

{
  "client_account_id": 7,
  "issuer_name": "Vyzr AS",
  "issuer_organization_number": "840216772",
  "issuer_country_code": "NO",
  "security_type": "SHARE",
  "share_class": "CLASS_A",
  "account_code": "1350"
}

Response

201 with the holding. A company has one holding per issuer and share class (409 equity.duplicate_holding), by organisation number or ISIN.

Update Holding

PUT /api/v2/equity/holdings/{id}

Takes the fields of Create Holding except client_account_id; fields left out keep their value. Returns 200 with the holding.

Delete Holding

DELETE /api/v2/equity/holdings/{id}

Deletes the holding with its transactions. Returns 204 with no body.

List Holding Transactions

GET /api/v2/equity/holding-transactions

Returns the company’s holding transactions in date order, in the paginated envelope.

Parameter Type Required Description
client_account_id integer Yes The client account ID
holding_id integer No Only this holding’s

Get Holding Transaction

GET /api/v2/equity/holding-transactions/{id}

Create Holding Transaction

POST /api/v2/equity/holding-transactions

Request Body

Field Type Required Description
holding_id integer Yes The holding it belongs to
transaction_date date Yes When it happened
transaction_type string Yes See below
quantity decimal See below Shares received (positive) or given up (negative)
amount decimal See below What was paid for shares received, or received for shares given up, a dividend or a repayment; leave it out when not known
costs decimal No Fees on top, on a purchase, an opening or a sale
cost_basis decimal No On a sale: the cost of the shares sold, as a broker states it. Kept as stated; the position uses the oldest lots
currency_code string No Must be the holding’s; defaults to it
split_ratio_numerator integer For a split or bonus issue New shares per old: 2 and 1 doubles them
split_ratio_denominator integer For a split or bonus issue  
journal_entry_id integer No The company’s journal entry that books it
notes string No Up to 500 characters
Type Quantity Amount
OPENING positive the cost, if known: shares held when the ledger starts
PURCHASE positive what was paid, if known: bought, or subscribed for in an issue
SALE negative what was received
SPLIT none none: a split or reverse split, by the ratio
BONUS_ISSUE none none: fondsemisjon, new shares at no cost (skatteloven § 10-34)
CAPITAL_REPAYMENT none required: paid-in capital repaid, which lowers the cost of every share alike (skatteloven § 10-35), a lot’s to nothing at most
DIVIDEND none required

Response

201 with the transaction. Its source is MANUAL. A transaction that leaves the holding selling more than it has then is refused (400 equity.insufficient_shares). Transactions on one date replay in the order they were recorded.

Update Holding Transaction

PUT /api/v2/equity/holding-transactions/{id}

Takes the fields of Create Holding Transaction except holding_id. An edit makes the transaction the company’s own (source MANUAL), so the prefill leaves its holding alone. Returns 200.

Delete Holding Transaction

DELETE /api/v2/equity/holding-transactions/{id}

Refused when a later sale needs the shares it gave (400 equity.insufficient_shares). Returns 204 with no body.

Get Holding Positions

GET /api/v2/equity/holding-positions

What each holding is on a date: its shares, and their cost by lot, oldest first.

Parameter Type Required Description
client_account_id integer Yes The client account ID
as_of date No Default today

Response

[
  {
    "holding_id": 12,
    "as_of": "2025-12-31",
    "quantity": 118,
    "cost": 2549200.0,
    "currency_code": "NOK",
    "lots": [
      {"acquired_on": "2024-03-01", "quantity": 58, "cost": 49200.0},
      {"acquired_on": "2025-12-31", "quantity": 60, "cost": 2500000.0}
    ]
  }
]

cost is null when a lot’s cost isn’t known, as for a holding taken from the public aksjeeiebok.

Prefill Holdings

POST /api/v2/equity/holdings/prefill

Fills the holdings from what others record of the company’s shares, by the company’s organisation number:

  1. The issuer’s own shareholder ledger, where the issuer keeps it in Snapbooks and the user running the prefill keeps the issuer’s books (as a member, or through an accounting firm’s contract; an admin’s access to every company doesn’t count): its transactions where the company is the holder, with their dates and prices. Only those rows are read, with the issuer’s name, organisation number and currency; nothing else of the issuer. An issuer’s split counts once, and a transaction the ledger has no price for leaves the cost unknown.
  2. Otherwise Skatteetaten’s public aksjeeiebok: the shares held at 31 December of its newest year, a year behind, as an OPENING with no cost. A company that isn’t in that year held nothing then.

The company’s own shares, which the aksjeeiebok lists as held by the company itself, aren’t a holding. A holding the company has entered or edited transactions in itself is left alone, and so is one filled from an issuer’s ledger when the user running the prefill can’t open that issuer, or its ledger can’t be used. One whose ledger the user can open but no longer names the company is taken from the aksjeeiebok instead. Running it again replaces what it filled before, so a newer source takes over: a prefilled transaction deleted by hand comes back, so to change one for good, edit it. One prefill runs at a time per company.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID

Response

{ "filled": [12, 13], "emptied": [], "kept": [14], "not_taken": [] }

filled are the holdings whose transactions now come from a source, emptied those no source has any more, whose prefilled transactions went, kept those left alone, and not_taken the issuers whose ledger holds what the prefill can’t read, which are taken from the aksjeeiebok instead: a conversion between classes, a split its whole-share ratio doesn’t give, or rows the holder’s replay can’t follow, such as a transfer out dated before the shares came in.

Attributes

Holding

Attribute Type Description
id integer Unique identifier (read-only)
client_account_id integer ID of the client account (read-only)
issuer_name string The issuer’s name
issuer_organization_number string Its Norwegian organisation number, or null
issuer_country_code string ISO 3166-1 alpha-2
isin string Or null
issuer_foreign_id string Or null
security_type string SHARE, FUND_UNIT, PARTNERSHIP_INTEREST or OTHER
share_class string The share class
account_code string The balance account its cost is on, or null
currency_code string ISO 4217 currency of its transactions
notes string Notes
transactions array With with=transactions

Holding Transaction

Attribute Type Description
id integer Unique identifier (read-only)
holding_id integer The holding (read-only)
transaction_date date When it happened
transaction_type string See Create Holding Transaction
quantity decimal Shares received (+) or given up (-), or null
amount decimal Paid or received, or null
costs decimal Fees, or null
cost_basis decimal A broker’s stated cost of the shares sold, or null
currency_code string ISO 4217
split_ratio_numerator, split_ratio_denominator integer A split’s or bonus issue’s ratio
source string MANUAL, PUBLIC_REGISTER (the aksjeeiebok), ISSUER_LEDGER or BROKER_STATEMENT (read-only)
source_reference string What the source it first came from calls it: the issuer’s transaction, or the register’s year (read-only; kept when an edit makes it MANUAL)
journal_entry_id integer The journal entry that books it, or null
notes string Notes

Error Responses

Status Code Description
400 equity.invalid_holding A missing or invalid holding field, or a currency change on a holding with transactions
400 equity.invalid_holding_transaction A missing or invalid transaction field, or a capital repayment when no shares are held
400 equity.insufficient_shares A sale of more shares than the holding has on its date, as the transactions stand
400 equity.prefill_needs_organization_number The company has no organisation number to find its holdings by
403 equity.access_denied client_account_id is missing or not yours, or the holding is another company’s
404 equity.holding_not_found Holding not found
404 equity.holding_transaction_not_found Holding transaction not found
409 equity.duplicate_holding The company already holds this issuer’s class
  • Equity — the company’s own shareholders and dividends