Equity Transactions

Equity transactions track ownership changes in company shares. The API uses double-entry bookkeeping: each transaction creates balanced entries where shares move from one party to another (or from/to a void pool for issuances and retirements).

Endpoints

List Transactions

GET /api/v2/equity/transactions

Retrieves a list of equity transactions in the paginated envelope.

Query Parameters

Parameter Type Required Description
client_account_id integer Yes Filter by client account
business_partner_id integer No Filter by shareholder
share_class string No Filter by share class (e.g., ORDINARY, PREFERRED)
transaction_type string No Filter by transaction type (e.g., ISSUANCE, TRANSFER)
date_from date No Filter transactions from this date
date_to date No Filter transactions to this date
with string No Include related resources (supported: business_partner, created_by, updated_by)

page and per_page are not currently accepted by this endpoint — it always returns the first 100 matching transactions. Narrow results with the filters above if you have more than 100 transactions for a client account.

Response

{
  "data": [
    {
      "id": 1,
      "client_account_id": 7,
      "transaction_date": "2024-03-15",
      "transaction_type": "ISSUANCE",
      "transaction_group_id": "550e8400-e29b-41d4-a716-446655440000",
      "business_partner_id": 56,
      "share_class": "ORDINARY",
      "quantity": "1000.000000",
      "price_per_share": "100.000000",
      "notes": "Initial share issuance",
      "split_ratio_numerator": null,
      "split_ratio_denominator": null,
      "created_at": "2024-03-15T10:00:00Z",
      "created_by_id": 7,
      "updated_at": "2024-03-15T10:00:00Z",
      "updated_by_id": null
    }
  ],
  "meta": {
    "page": 1,
    "pages": 1,
    "per_page": 100,
    "records": 1
  }
}

Get Transaction

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

Retrieves a specific equity transaction by ID.

Query Parameters

Parameter Type Required Description
with string No Include related resources (supported: business_partner, created_by, updated_by)

Response

{
  "id": 1,
  "client_account_id": 7,
  "transaction_date": "2024-03-15",
  "transaction_type": "ISSUANCE",
  "transaction_group_id": "550e8400-e29b-41d4-a716-446655440000",
  "business_partner_id": 56,
  "share_class": "ORDINARY",
  "quantity": "1000.000000",
  "price_per_share": "100.000000",
  "notes": "Initial share issuance",
  "split_ratio_numerator": null,
  "split_ratio_denominator": null,
  "created_at": "2024-03-15T10:00:00Z",
  "created_by_id": 7,
  "updated_at": "2024-03-15T10:00:00Z",
  "updated_by_id": null
}

Issue Shares

POST /api/v2/equity/transactions/issue

Issues new shares to a shareholder.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
business_partner_id integer Yes The shareholder receiving shares
share_class string Yes Share class (see Share Classes)
quantity decimal Yes Number of shares to issue (must be positive)
price_per_share decimal No Price per share
transaction_date date No Transaction date (defaults to today)
notes string No Additional notes

Example Request

{
  "client_account_id": 7,
  "business_partner_id": 56,
  "share_class": "ORDINARY",
  "quantity": "1000",
  "price_per_share": "100",
  "transaction_date": "2024-03-15",
  "notes": "Series A funding round"
}

Response

Returns the shareholder’s transaction entry with status 201 Created.

Transfer Shares

POST /api/v2/equity/transactions/transfer

Transfers shares between shareholders.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
from_business_partner_id integer Yes The shareholder transferring shares
to_business_partner_id integer Yes The shareholder receiving shares
share_class string Yes Share class being transferred
quantity decimal Yes Number of shares to transfer (must be positive)
price_per_share decimal No Transfer price per share
transaction_date date No Transaction date (defaults to today)
notes string No Additional notes

Example Request

{
  "client_account_id": 7,
  "from_business_partner_id": 56,
  "to_business_partner_id": 57,
  "share_class": "ORDINARY",
  "quantity": "500",
  "price_per_share": "150",
  "transaction_date": "2024-06-01",
  "notes": "Secondary sale"
}

Response

Returns the recipient’s transaction entry with status 201 Created.

Buyback Shares

POST /api/v2/equity/transactions/buyback

Company buys back shares from a shareholder. The shares become treasury stock held by the company.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
from_business_partner_id integer Yes The shareholder selling shares
company_business_partner_id integer Yes The company entity receiving treasury stock
share_class string Yes Share class being bought back
quantity decimal Yes Number of shares to buy back (must be positive)
price_per_share decimal No Buyback price per share
transaction_date date No Transaction date (defaults to today)
notes string No Additional notes

Example Request

{
  "client_account_id": 7,
  "from_business_partner_id": 56,
  "company_business_partner_id": 58,
  "share_class": "ORDINARY",
  "quantity": "200",
  "price_per_share": "120",
  "notes": "Share buyback program"
}

Response

Returns the company’s transaction entry with status 201 Created.

Retire Shares

POST /api/v2/equity/transactions/retire

Retires treasury shares, permanently reducing total outstanding shares.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
company_business_partner_id integer Yes The company entity holding treasury stock
share_class string Yes Share class being retired
quantity decimal Yes Number of shares to retire (must be positive)
transaction_date date No Transaction date (defaults to today)
notes string No Additional notes

Example Request

{
  "client_account_id": 7,
  "company_business_partner_id": 58,
  "share_class": "ORDINARY",
  "quantity": "100",
  "notes": "Treasury share cancellation"
}

Response

Returns the company’s transaction entry with status 201 Created.

Split Shares

POST /api/v2/equity/transactions/split

Performs a stock split or reverse split for a shareholder’s position.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
business_partner_id integer Yes The shareholder whose shares are being split
share_class string Yes Share class being split
old_quantity decimal Yes Current number of shares (must match actual position)
new_quantity decimal Yes New number of shares after split
transaction_date date No Transaction date (defaults to today)
notes string No Additional notes

Example Request (2-for-1 Split)

{
  "client_account_id": 7,
  "business_partner_id": 56,
  "share_class": "ORDINARY",
  "old_quantity": "1000",
  "new_quantity": "2000",
  "notes": "2-for-1 stock split"
}

Example Request (Reverse Split 1-for-10)

{
  "client_account_id": 7,
  "business_partner_id": 56,
  "share_class": "ORDINARY",
  "old_quantity": "1000",
  "new_quantity": "100",
  "notes": "1-for-10 reverse split"
}

Response

Returns the resulting transaction entry with status 201 Created.

Get Positions

GET /api/v2/equity/positions

Retrieves current share positions (holdings) per shareholder and share class.

Query Parameters

Parameter Type Required Description
client_account_id integer Yes Filter by client account
business_partner_id integer No Filter by specific shareholder
share_class string No Filter by share class
include_void boolean No Include the void side of each double entry (rows with no business partner). Positions with a quantity of 0 or less are always dropped, and the void side nets to minus the shares outstanding, so in practice this adds no rows (default: false)
with string No Include related resources (supported: business_partner)

Response

[
  {
    "business_partner_id": 56,
    "share_class": "ORDINARY",
    "quantity": "1500.000000",
    "cost_basis": "150000.000000",
    "average_price": "100.000000"
  },
  {
    "business_partner_id": 57,
    "share_class": "ORDINARY",
    "quantity": "500.000000",
    "cost_basis": "75000.000000",
    "average_price": "150.000000"
  }
]

Get Cap Table

GET /api/v2/equity/cap-table

Generates a capitalization table showing ownership distribution.

Query Parameters

Parameter Type Required Description
client_account_id integer Yes The client account ID
company_business_partner_id integer Yes The company entity (excluded from shareholder list)

Response

{
  "share_classes": [
    {
      "share_class": "ORDINARY",
      "total_shares": "2000.000000",
      "treasury_shares": 0,
      "percentage_of_total": "100.00",
      "shareholders": [
        {
          "business_partner_id": 56,
          "name": "Investor A",
          "quantity": "1500.000000",
          "average_price": "100.000000",
          "percentage_of_class": "75.00",
          "percentage_of_total": "75.00"
        },
        {
          "business_partner_id": 57,
          "name": "Investor B",
          "quantity": "500.000000",
          "average_price": "150.000000",
          "percentage_of_class": "25.00",
          "percentage_of_total": "25.00"
        }
      ]
    }
  ],
  "total_outstanding": "2000.000000",
  "total_treasury": 0
}

Get Share Classes

GET /api/v2/equity/share-classes

Returns available share class types.

Response

{
  "share_classes": [
    {"value": "ORDINARY", "label": "ORDINARY"},
    {"value": "CLASS_A", "label": "CLASS_A"},
    {"value": "CLASS_B", "label": "CLASS_B"},
    {"value": "CLASS_C", "label": "CLASS_C"},
    {"value": "PREFERRED", "label": "PREFERRED"},
    {"value": "OTHER", "label": "OTHER"}
  ]
}

Get Transaction Types

GET /api/v2/equity/transaction-types

Returns available transaction types.

Response

{
  "transaction_types": [
    {"value": "ISSUANCE", "label": "ISSUANCE"},
    {"value": "TRANSFER", "label": "TRANSFER"},
    {"value": "BUYBACK", "label": "BUYBACK"},
    {"value": "RETIREMENT", "label": "RETIREMENT"},
    {"value": "SPLIT", "label": "SPLIT"},
    {"value": "CONVERSION", "label": "CONVERSION"}
  ]
}

Share Classes

Value Description
ORDINARY Ordinære aksjer — common/ordinary shares
CLASS_A A-aksjer — typically with voting rights
CLASS_B B-aksjer — typically limited/no voting rights
CLASS_C C-aksjer
PREFERRED Preferanseaksjer — preferred shares with priority dividends
OTHER Other share classes (D-J aksjer, etc.)

Transaction Types

Value Description
ISSUANCE New shares issued to a shareholder
TRANSFER Shares transferred between shareholders
BUYBACK Company buys back shares from shareholder
RETIREMENT Company retires treasury stock
SPLIT Stock split or reverse split
CONVERSION Convert shares from one class to another

Error Responses

Code HTTP Status Description
equity.invalid_transaction_data 400 Missing JSON body or required field, a quantity that isn’t positive, an unknown share_class, a transfer or buyback to the same business partner, a split where new_quantity equals old_quantity, or a cap table request without company_business_partner_id
equity.business_partner_mismatch 400 A business partner in the request doesn’t exist or belongs to another client account
equity.insufficient_shares 400 The shareholder or company doesn’t hold enough shares for a transfer, buyback or retirement, or doesn’t hold exactly old_quantity for a split
equity.access_denied 403 Missing client_account_id, or no access to the client account
equity.not_found 404 Transaction not found

Insufficient Shares Error

{
  "error": {
    "code": "equity.insufficient_shares",
    "message": "Insufficient shares for transfer. Available: 500.000000, requested: 1000.000000",
    "request_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
  }
}

The message varies by transaction type:

  • Transfer: "Insufficient shares for transfer. Available: X, requested: Y"
  • Buyback: "Insufficient shares for buyback. Available: X, requested: Y"
  • Retirement: "Insufficient treasury shares for retirement. Available: X, requested: Y"
  • Split: "Shareholder must have exactly Y shares for the split. Current position: X"

Business Rules

  1. Double-entry bookkeeping: Every transaction creates balanced entries (shares received = shares given)
  2. Quantity must be positive: All quantity parameters must be greater than zero
  3. Balance validation: Transfers, buybacks, retirements, and splits validate sufficient shares before proceeding
  4. Row-level locking: Concurrent transactions are prevented using database locks
  5. Cost basis tracking: Weighted average cost method is used when shares are sold
  6. Self-transfer prevention: Cannot transfer or buyback shares to/from the same entity
  7. Split validation: The old_quantity must exactly match the shareholder’s current position

Common Use Cases

  1. Company formation: Issue initial shares to founders
  2. Funding rounds: Issue new shares to investors (Series A, B, C)
  3. Secondary transactions: Transfer shares between existing shareholders
  4. Employee equity: Issue shares or options to employees
  5. Share buybacks: Company repurchases shares from shareholders
  6. Share cancellation: Retire treasury shares to reduce outstanding stock
  7. Stock splits: Adjust share count while maintaining ownership percentages