Equity

The equity API allows you to manage share ownership for a company. You can issue new shares, transfer shares between shareholders, perform buybacks and retirements, and execute stock splits. The API also provides position tracking and cap table generation.

Endpoints

List Transaction Types

GET /api/v2/equity/transaction-types

Returns the available equity 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" }
  ]
}

List Share Classes

GET /api/v2/equity/share-classes

Returns the 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" }
  ]
}

List Transactions

GET /api/v2/equity/transactions

Retrieves a paginated list of equity transactions.

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)
transaction_type string No Filter by transaction type (e.g. ISSUANCE)
date_from date No Filter transactions from this date (inclusive)
date_to date No Filter transactions up to this date (inclusive)

Response

{
  "data": [
    {
      "id": 1,
      "created_at": "2024-06-01T10:00:00Z",
      "created_by_id": 7,
      "updated_at": null,
      "updated_by_id": null,
      "client_account_id": 7,
      "transaction_date": "2024-06-01",
      "transaction_type": "ISSUANCE",
      "transaction_group_id": "a1b2c3d4",
      "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
    }
  ],
  "meta": {
    "page": 1,
    "pages": 1,
    "per_page": 50,
    "records": 1
  }
}

Get Transaction

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

Retrieves a specific equity transaction by ID.

Response

Returns a single transaction object (same shape as the list response items).


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 the shares
share_class string Yes Share class (e.g. ORDINARY, PREFERRED)
quantity decimal Yes Number of shares to issue (must be positive)
price_per_share decimal No Price per share
transaction_date date No Date of the transaction
notes string No Transaction notes

Example Request

{
  "client_account_id": 7,
  "business_partner_id": 56,
  "share_class": "ORDINARY",
  "quantity": "1000",
  "price_per_share": "100",
  "transaction_date": "2024-06-01",
  "notes": "Initial share issuance"
}

Response

Returns the created transaction with status 201 Created.

Transfer Shares

POST /api/v2/equity/transactions/transfer

Transfers shares from one shareholder to another.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
from_business_partner_id integer Yes The shareholder selling/transferring shares
to_business_partner_id integer Yes The shareholder receiving shares
share_class string Yes Share class
quantity decimal Yes Number of shares to transfer (must be positive)
price_per_share decimal No Price per share
transaction_date date No Date of the transaction
notes string No Transaction notes

Example Request

{
  "client_account_id": 7,
  "from_business_partner_id": 56,
  "to_business_partner_id": 78,
  "share_class": "ORDINARY",
  "quantity": "200",
  "price_per_share": "150",
  "transaction_date": "2024-09-15"
}

Response

Returns the created transaction with status 201 Created.

Validation

  • from_business_partner_id and to_business_partner_id must be different
  • The seller must hold enough shares of the specified class (returns 400 with an insufficient shares error otherwise)

Buyback Shares

POST /api/v2/equity/transactions/buyback

Records a company buyback of its own shares from a shareholder.

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 back
company_business_partner_id integer Yes The company’s own business partner record
share_class string Yes Share class
quantity decimal Yes Number of shares to buy back (must be positive)
price_per_share decimal No Price per share
transaction_date date No Date of the transaction
notes string No Transaction notes

Response

Returns the created transaction with status 201 Created.

Validation

  • from_business_partner_id and company_business_partner_id must be different
  • The shareholder must hold enough shares of the specified class

Retire Shares

POST /api/v2/equity/transactions/retire

Retires (cancels) shares held by the company.

Request Body

Field Type Required Description
client_account_id integer Yes The client account ID
company_business_partner_id integer Yes The company’s own business partner record
share_class string Yes Share class
quantity decimal Yes Number of shares to retire (must be positive)
transaction_date date No Date of the transaction
notes string No Transaction notes

Response

Returns the created transaction with status 201 Created.

Validation

  • The company must hold enough shares of the specified class (typically acquired via buyback)

Stock Split

POST /api/v2/equity/transactions/split

Executes a stock split (forward or reverse) 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
old_quantity decimal Yes Current number of shares (must be positive)
new_quantity decimal Yes New number of shares after split (must be positive, must differ from old_quantity)
transaction_date date No Date of the transaction
notes string No Transaction notes

Example Request

A 2-for-1 forward split of 500 shares:

{
  "client_account_id": 7,
  "business_partner_id": 56,
  "share_class": "ORDINARY",
  "old_quantity": "500",
  "new_quantity": "1000",
  "transaction_date": "2024-12-01",
  "notes": "2:1 forward stock split"
}

Response

Returns the created transaction with status 201 Created.


Get Positions

GET /api/v2/equity/positions

Returns current equity positions (shareholdings) aggregated from all transactions.

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
include_void boolean No Include voided positions (default: false)

Response

[
  {
    "business_partner_id": 56,
    "share_class": "ORDINARY",
    "quantity": "800.000000",
    "cost_basis": "80000.000000",
    "average_price": "100.000000"
  }
]

Get Cap Table

GET /api/v2/equity/cap-table

Generates a capitalization table showing the ownership structure of the company.

Query Parameters

Parameter Type Required Description
client_account_id integer Yes The client account ID
company_business_partner_id integer Yes The company’s own business partner record

Response

Returns the generated cap table object.


Attributes

Transaction

Attribute Type Description
id integer Unique identifier (read-only)
created_at datetime Creation timestamp (read-only)
created_by_id integer ID of the creating user (read-only)
updated_at datetime Last update timestamp (read-only)
updated_by_id integer ID of the last updating user (read-only)
client_account_id integer ID of the client account
transaction_date date Date of the transaction
transaction_type string Type: ISSUANCE, TRANSFER, BUYBACK, RETIREMENT, SPLIT, CONVERSION
transaction_group_id string Groups related transactions (e.g. both sides of a transfer)
business_partner_id integer The shareholder involved
share_class string Share class: ORDINARY, CLASS_A, CLASS_B, CLASS_C, PREFERRED, OTHER
quantity decimal Number of shares (precision 19, scale 6)
price_per_share decimal Price per share (precision 19, scale 6)
notes string Transaction notes
split_ratio_numerator integer Split ratio numerator (for split transactions)
split_ratio_denominator integer Split ratio denominator (for split transactions)

Position

Attribute Type Description
business_partner_id integer The shareholder
share_class string Share class
quantity decimal Current number of shares held
cost_basis decimal Total cost basis
average_price decimal Weighted average price per share

Error Responses

Status Code Description
400 Invalid request (missing required fields, invalid share class, insufficient shares, invalid quantity)
403 Forbidden (no access to client account)
404 Transaction not found