/BizTransaction/SetQuantity
When to Use
- Set account holdings to an exact specified quantity
- Process holdings restatements following registry corrections
- Correct account balances to absolute values (ignores previous balance)
- Record holdings adjustments that establish new baseline quantities
Prerequisites
- Valid authentication token (see Required Headers)
- Account record must exist in the system
- Investment record must exist and be active
- Transaction date must be provided (cannot be empty or default value)
Considerations
- SetQuantity sets holdings to the exact specified value (replaces current balance, does not add/subtract)
- Use AdjustQuantity for relative changes; use SetQuantity for absolute balance corrections
- Transaction records are permanent - corrections require new transactions
- AdjustmentReason field provides context for the restatement (optional, for record-keeping)
- ExternalBizTransactionId enables matching with external system records (dual-ID system)
Description
Creates a SetQuantity transaction that sets account holdings to an exact specified value. Unlike AdjustQuantity (which adds/subtracts), SetQuantity replaces the current balance with the provided quantity, ignoring the previous balance. Common use cases include holdings restatements, registry corrections, or establishing new baseline quantities.
The API validates that a transaction date is provided and returns the complete transaction record including system-generated identifiers (BizTransactionID) and external reference fields. The optional AdjustmentReason field allows documenting the purpose of the restatement for record-keeping.
Required Headers - See Authentication
| Header | Value | Description |
|---|---|---|
| Content-Type | application/json | Request content type |
| Authorization | {accessToken} | Bearer token for API access |
| Version | 2.0 | API version identifier |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
quantity |
number (double) | Absolute target quantity value replacing current holdings completely (ignores current balance, use 0 for account closures). | |
comment |
string | Optional |
Optional field to document the reason for setting the absolute quantity. Useful for internal record-keeping and appears on account statements. |
accountID |
integer (int32) | Account identifier for setting absolute quantity. Account must exist in the system. | |
externalAccountId |
string | External account identifier for dual-ID integration. Used to match with records in external systems. | |
externalBizTransactionId |
string | Optional |
External system reference for dual-ID integration. Optional field to match transactions with records in external systems. |
investmentID |
integer (int32) | Investment identifier for setting absolute quantity. Investment must exist and be active. | |
externalInvestmentId |
string | External investment identifier for cross-platform integration using security codes, ISIN, or APIR codes. | |
productID |
integer (int32) | Native product identifier validating investment and account belong to correct fund structure. | |
externalProductId |
string | External product identifier for cross-system product correlation (resolves to internal productID for validation). | |
transactionDate |
string (date) | Date of the SetQuantity transaction. Format: YYYY-MM-DD. Cannot be empty or default value. |
Example Requests
{
"quantity": 50000.00,
"comment": "Opening balance - system migration",
"accountID": 12345,
"externalAccountId": "",
"externalBizTransactionId": "SET-2024-001",
"investmentID": 25,
"externalInvestmentId": "",
"productID": 10,
"externalProductId": "",
"transactionDate": "2025-08-14"
}Response Examples
{
"result": true,
"message": "Quantity set successfully",
"recordCount": 1,
"data": {
"bizTransactionID": 5001,
"externalBizTransactionId": "SET-2024-001",
"bizTransactionTypeID": 7,
"typeName": "Set Quantity",
"movementReasonCode": "ABSOLUTE_SET",
"parentBizTransactionID": null,
"transactionDate": "2025-08-14T00:00:00Z",
"productID": 10,
"externalProductId": "FUND-001",
"accountID": 12345,
"externalAccountId": "ACC-12345",
"accountNumber": "ACC001234",
"bizEntityName": "Smith Family Trust",
"investmentID": 25,
"externalInvestmentId": "INV-GROWTH",
"securityCode": "GRW001",
"investmentName": "Growth Investment Class A",
"investmentPrice": 1.2500,
"comment": "Opening balance - system migration",
"corporateActionID": null,
"externalCorporateActionId": null,
"corporateActionName": null,
"amount": null,
"quantity": 50000.00,
"transactionClosingAmount": null,
"transactionClosingQuantity": null,
"accountClosingAmount": null,
"accountClosingQuantity": null,
"createdDate": "2025-08-14T10:30:15Z",
"updatedDate": null,
"bizTransactionStatusID": 1,
"statusName": "Complete"
}
}