### Create and Manage Portfolios (Bash) Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt This section shows how to create portfolios under existing accounts and manage their mandate types (e.g., Discretionary). It includes examples for creating a portfolio with a specific model and updating the portfolio's mandate. ```bash curl -X POST "https://api.wealthkernel.com/portfolios" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "accountId": "acc-xyz789", "mandate": { "type": "Discretionary", "modelId": "mod-growth123" } }' # Response { "id": "prt-def456", "accountId": "acc-xyz789", "currency": "GBP", "status": "Created", "mandate": { "type": "Discretionary", "modelId": "mod-growth123" } } # Change portfolio mandate/model curl -X PATCH "https://api.wealthkernel.com/portfolios/prt-def456/mandate" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "modelId": "mod-conservative456" }' ``` -------------------------------- ### Get Portfolio Valuations Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Retrieves historical portfolio valuations on a T+1 basis. Requires the portfolio ID and a start date. Returns a breakdown of cash and holdings for each specified date. ```bash curl -X GET "https://api.wealthkernel.com/valuations?portfolioId=prt-def456&startDate=2025-01-01" \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### Create Deposit Expectations (Bash) Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt This section provides examples for creating deposit expectations to fund portfolios. It covers specifying a bank account and consideration amount, as well as using a default bank account for the deposit. The response includes the deposit ID and its status. ```bash curl -X POST "https://api.wealthkernel.com/deposits" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "portfolioId": "prt-def456", "bankAccountId": "bnk-ghi789", "consideration": { "amount": 10000.00, "currency": "GBP" }, "reference": "INVEST-001" }' # Response { "id": "dep-jkl012", "portfolioId": "prt-def456", "bankAccountId": "bnk-ghi789", "consideration": { "amount": 10000.00, "currency": "GBP" }, "reference": "INVEST-001", "status": "Pending" } # Using default bank account curl -X POST "https://api.wealthkernel.com/deposits" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "portfolioId": "prt-def456", "useDefaultBankAccount": true, "consideration": { "amount": 5000.00, "currency": "GBP" }, "reference": "INVEST-002" }' ``` -------------------------------- ### Get Total Portfolio Balance Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Retrieves the total current value of a specified portfolio. Requires the portfolio ID and an authorization token. Returns the total value in the portfolio's base currency. ```bash curl -X GET "https://api.wealthkernel.com/balances/total?portfolioId=prt-def456" \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### Get Cash Balances Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Retrieves the breakdown of cash holdings within a portfolio by currency. Requires the portfolio ID and an authorization token. Includes amounts, values, and FX rates if applicable. ```bash curl -X GET "https://api.wealthkernel.com/balances/cash?portfolioId=prt-def456" \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### Get Holding Balances Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Retrieves the details of security holdings within a portfolio, including quantity, price, and value. Requires the portfolio ID and an authorization token. Returns a list of holdings with their current market data. ```bash curl -X GET "https://api.wealthkernel.com/balances/holdings?portfolioId=prt-def456" \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### GET /transactions Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/deposits/Basics.md Retrieves a list of transactions associated with a portfolio. ```APIDOC ## GET /transactions ### Description Retrieves a list of transactions for a specified portfolio. ### Method GET ### Endpoint /transactions ### Parameters #### Query Parameters - **portfolioId** (string) - Required - The identifier of the portfolio for which to retrieve transactions. ### Response #### Success Response (200 OK) - **transactions** (array) - An array of transaction objects. - **transactionId** (string) - The unique identifier for the transaction. - **type** (string) - The type of transaction (e.g., 'DEPOSIT', 'WITHDRAWAL', 'TRADE'). - **status** (string) - The status of the transaction (e.g., 'SETTLED', 'PENDING'). - **amount** (object) - The amount of the transaction. - **amount** (string) - The numerical value of the amount. - **currency** (string) - The currency of the amount. - **timestamp** (string) - The date and time the transaction occurred (ISO 8601 format). #### Response Example ```json { "transactions": [ { "transactionId": "txn-abc", "type": "DEPOSIT", "status": "SETTLED", "amount": { "amount": "100.00", "currency": "GBP" }, "timestamp": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Create and Manage Investment Accounts (Bash) Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt This snippet demonstrates how to create different types of investment accounts (GIA, ISA, JISA, SIA, SIPP) and retrieve their status using cURL. It shows the request payload for creating an account and the response, including the account ID and status. ```bash curl -X POST "https://api.wealthkernel.com/accounts" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "type": "GIA", "partyId": "pty-abc123", "currency": "GBP" }' # Response { "id": "acc-xyz789", "type": "GIA", "partyId": "pty-abc123", "currency": "GBP", "status": "Pending" } # Get account status curl -X GET "https://api.wealthkernel.com/accounts/acc-xyz789" \ -H "Authorization: Bearer YOUR_TOKEN" # Response after activation { "id": "acc-xyz789", "type": "GIA", "partyId": "pty-abc123", "currency": "GBP", "status": "Active" } ``` -------------------------------- ### GET /balances/cash Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/deposits/Basics.md Retrieves the cash balances for a specified portfolio. ```APIDOC ## GET /balances/cash ### Description Retrieves the current cash balances for a given portfolio. ### Method GET ### Endpoint /balances/cash ### Parameters #### Query Parameters - **portfolioId** (string) - Required - The identifier of the portfolio for which to retrieve cash balances. ### Response #### Success Response (200 OK) - **portfolioId** (string) - The identifier of the portfolio. - **balances** (array) - An array of cash balance objects. - **currency** (string) - The currency of the balance. - **available** (string) - The available cash amount. - **total** (string) - The total cash amount. #### Response Example ```json { "portfolioId": "prt-abc", "balances": [ { "currency": "GBP", "available": "1000.50", "total": "1000.50" } ] } ``` ``` -------------------------------- ### GET /deposits/{depositId} Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/deposits/Basics.md Retrieves the details of a specific deposit, including its current status. ```APIDOC ## GET /deposits/{depositId} ### Description Retrieves the details and current status of a specific deposit. ### Method GET ### Endpoint /deposits/{depositId} ### Parameters #### Path Parameters - **depositId** (string) - Required - The unique identifier of the deposit to retrieve. ### Response #### Success Response (200 OK) - **depositId** (string) - The unique identifier for the deposit. - **portfolioId** (string) - The identifier of the destination portfolio. - **status** (string) - The current status of the deposit (e.g., 'Pending', 'Settled', 'Failed'). - **consideration** (object) - The expected amount of the deposit. - **reference** (string) - The reference used for the deposit. - **bankAccountId** (string) - The identifier of the bank account the deposit originated from. #### Response Example ```json { "depositId": "dep-123", "portfolioId": "prt-abc", "status": "Settled", "consideration": { "amount": "100.00", "currency": "GBP" }, "reference": "INV-12345", "bankAccountId": "bacc-xyz" } ``` ``` -------------------------------- ### Create Direct Debit Subscription Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Configures a recurring direct debit subscription for portfolio funding. Supports monthly or yearly intervals with a specified day of the month. Returns subscription details. ```bash curl -X POST "https://api.wealthkernel.com/direct-debits/subscriptions" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "mandateId": "mnd-pqr678", "portfolioId": "prt-def456", "amount": 250.00, "interval": "Monthly", "dayOfMonth": 15 }' ``` -------------------------------- ### GET /valuations Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/valuations/Basics.md Retrieve a list of portfolio valuations, optionally filtered by date or update timestamp. ```APIDOC ## GET /valuations ### Description Retrieves a collection of portfolio valuations. Valuations are generated on a T+1 basis and represent the value at the close of the specified date. ### Method GET ### Endpoint /valuations ### Parameters #### Query Parameters - **startDate** (string) - Optional - Filter valuations from this date onwards. - **updatedSince** (string) - Optional - Filter valuations updated after the provided timestamp (ISO 8601) to keep data in sync. ### Request Example GET /valuations?updatedSince=2025-01-02T00:00:00Z ### Response #### Success Response (200) - **valuations** (array) - A list of valuation objects. - **changedAt** (string) - The timestamp of the most recent update to the valuation. #### Response Example { "valuations": [ { "id": "prt-1-20250101", "portfolioId": "prt-1", "date": "2025-01-01", "totalValue": 10500.50, "changedAt": "2025-01-03T10:00:00Z" } ] } ``` -------------------------------- ### Register and Manage Bank Accounts (Bash) Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt This snippet illustrates how to register bank accounts for parties, supporting both UK (account number and sort code) and international (BIC and IBAN) formats. It shows the request payload and the response, including the bank account ID and its initial status. ```bash curl -X POST "https://api.wealthkernel.com/bank-accounts" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "partyId": "pty-abc123", "accountNumber": "55779911", "sortCode": "20-00-00" }' # Response { "id": "bnk-ghi789", "partyId": "pty-abc123", "accountNumber": "55779911", "sortCode": "200000", "status": "Pending" } # Add an international bank account (BIC/IBAN) curl -X POST "https://api.wealthkernel.com/bank-accounts" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "partyId": "pty-abc123", "bic": "DEUTDEFF", "iban": "DE89370400440532013000" }' ``` -------------------------------- ### Get Payment Details API Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/direct-debits/How-To-Request-Payments.md Retrieves the details of a specific payment, including information about payment failures. ```APIDOC ## GET /direct-debits/payments/{paymentId} ### Description Retrieves the details of a specific payment. If the payment failed, this endpoint will return the reason for the failure. ### Method GET ### Endpoint /direct-debits/payments/{paymentId} ### Parameters #### Path Parameters - **paymentId** (string) - Required - The ID of the payment to retrieve. #### Query Parameters None #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200 OK) - **paymentId** (string) - The ID of the payment. - **status** (string) - The status of the payment (e.g., 'Paid', 'Failed'). - **failureReason** (string) - If the status is 'Failed', this field contains the reason for the failure. #### Response Example ```json { "paymentId": "pay_abcdef123", "status": "Failed", "failureReason": "Insufficient funds" } ``` ``` -------------------------------- ### ISA Subscription Logic Overview Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/isa-subscriptions/Basics.md Conceptual overview of how ISA subscriptions are calculated, specifically regarding flexible ISA rules and replaceable amounts. ```APIDOC ## ISA Subscription Calculation ### Description This logic defines how to calculate the total allowed contribution for a client in a flexible ISA account. ### Calculation Formula Total Allowed Contribution = allowance - subscription + replaceableAmount ### Parameters - **allowance** (number) - The annual ISA contribution limit. - **subscription** (number) - The amount already contributed in the current tax year. - **replaceableAmount** (number) - The amount withdrawn from a flexible ISA that can be re-contributed without affecting the annual allowance. ### Notes - Only transactions of type `Withdrawal` and `InternalCashTransferOut` contribute to the `replaceableAmount`. - Replaceable amounts are not transferable to other providers. - JISAs are not eligible for flexible ISA rules. ``` -------------------------------- ### Create Direct Debit Payment Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Sets up a single direct debit payment for a portfolio. Requires mandate ID, portfolio ID, amount, and collection date. Returns payment details. ```bash curl -X POST "https://api.wealthkernel.com/direct-debits/payments" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "mandateId": "mnd-pqr678", "portfolioId": "prt-def456", "amount": 500.00, "collectionDate": "2025-02-15" }' ``` -------------------------------- ### Get Next Possible Collection Date API Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/direct-debits/How-To-Request-Payments.md Retrieves the next potential date for payment collection associated with a mandate. ```APIDOC ## GET /direct-debits/mandates/{mandateId}/next-possible-collection-date ### Description Fetches the earliest possible date a payment can be collected for a given mandate. This is useful for predicting when a subscription's first payment will occur. ### Method GET ### Endpoint /direct-debits/mandates/{mandateId}/next-possible-collection-date ### Parameters #### Path Parameters - **mandateId** (string) - Required - The ID of the mandate. #### Query Parameters None #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200 OK) - **nextCollectionDate** (string) - The next available date for payment collection. Format: YYYY-MM-DD. #### Response Example ```json { "nextCollectionDate": "2024-07-20" } ``` ``` -------------------------------- ### IP Allow Listing Configuration Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/ip-allow-listing/Basics.md Information on how to request and configure IP allow listing for your WealthKernel environment. ```APIDOC ## IP Allow Listing Configuration ### Description Configure IP allow listing to restrict access to your API and Dashboard to specific IP addresses or ranges (IPv4 and IPv6). ### Method POST (Contact Tenant Manager) ### Endpoint N/A (Manual configuration via Tenant Manager) ### Parameters #### Request Body - **environments** (array) - Required - The list of environments (e.g., sandbox, production) to apply the restriction. - **ip_ranges** (array) - Required - The set of static IPs or CIDR blocks to be allow listed. - **target_services** (string) - Required - Specify if the restriction applies to 'API', 'Dashboard', or 'Both'. ### Pre-requisites - Ensure IP addresses are static to avoid service disruption. - Verify the public IP address used for outgoing traffic. - Prepare for potential downtime during the transition if the configuration is incorrect. ### Response #### Success Response (200) - **status** (string) - Confirmation that the IP allow list request has been processed. #### Response Example { "status": "success", "message": "IP allow list configuration applied to requested environments." } ``` -------------------------------- ### Test Event JSON Structure Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/webhooks/Testing.md This JSON structure represents a test event that can be triggered via API to verify webhook setup. It includes event ID, type, and a payload. ```json { "eventId": "whevt-abc123", "eventType": { "name": "webhooks.test", "version": 1 }, "payload": { } } ``` -------------------------------- ### Portfolio Basics and Structure Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/portfolios/Basics.md Understanding portfolios as containers for investor assets and their relationship with accounts. ```APIDOC ## Portfolio Basics ### Description Portfolios are containers for an investor's cash and holdings. All investment activity on the WealthKernel platform is tied to a portfolio. Portfolios inherit the currency of the account they are created under. Multiple portfolios can exist under a single account for different investment strategies. ### Account and Portfolio Structure Example ```mermaid flowchart TD A(Party - Person) --> B(GIA GBP) --> G(Portfolio GBP) B(GIA GBP) --> H(Portfolio GBP) A(Party - Person) --> C(GIA EUR) --> I(Portfolio EUR) A(Party - Person) --> D(GIA USD) --> J(Portfolio USD) A(Party - Person) --> E(ISA GBP) --> K(Portfolio GBP) A(Party - Person) --> F(SIPP GBP) --> L(Portfolio GBP) F(SIPP GBP) --> M(Portfolio GBP) ``` ``` -------------------------------- ### Get Next Possible Collection Date Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Determines the next available date for a direct debit collection. Requires the mandate ID and an authorization token. Returns the calculated next collection date. ```bash curl -X GET "https://api.wealthkernel.com/direct-debits/mandates/mnd-pqr678/next-possible-collection-date" \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### Default Behavior Without an Allow List Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/ip-allow-listing/FAQs.md Explains the system's behavior when no IP allow list is configured. ```APIDOC ## Default Behavior Without an Allow List ### Description If no IP allow list is configured for your account, the system will permit requests from any remote IP address, provided that the request is accompanied by a valid access token. This means that IP filtering is effectively disabled by default when no allow list is set up. ### Method N/A (Informational) ### Endpoint N/A (Configuration related) ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### POST /accounts Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Create a new investment account such as GIA, ISA, or SIPP for a specific party. ```APIDOC ## POST /accounts ### Description Creates a new investment account linked to a party. The account will transition through lifecycle states from Pending to Active. ### Method POST ### Endpoint https://api.wealthkernel.com/accounts ### Parameters #### Request Body - **type** (string) - Required - Account type (e.g., GIA, ISA, JISA, SIA, SIPP) - **partyId** (string) - Required - Unique identifier for the party - **currency** (string) - Required - Currency code (e.g., GBP, EUR, USD) ### Request Example { "type": "GIA", "partyId": "pty-abc123", "currency": "GBP" } ### Response #### Success Response (200) - **id** (string) - Account identifier - **status** (string) - Current account status #### Response Example { "id": "acc-xyz789", "type": "GIA", "partyId": "pty-abc123", "currency": "GBP", "status": "Pending" } ``` -------------------------------- ### Manage Due Diligence and KYC Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Handles the submission of KYC check outcomes, evidence, and final compliance submission for party onboarding. Requires multiple steps including record creation, evidence attachment, and status submission. ```bash curl -X POST "https://api.wealthkernel.com/due-diligence-update/person" -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" -d '{"partyId": "pty-abc123", "updatedBy": "compliance@yourcompany.com", "level": "Standard", "identity": {"status": "Verified", "verifiedOn": "2025-01-10"}, "sanctions": {"status": "NotSanctioned", "checkedOn": "2025-01-10", "continuousCheckStartedOn": "2025-01-10", "continuousCheckStatus": "Active"}, "politicalExposure": {"status": "NotPoliticallyExposed", "checkedOn": "2025-01-10", "continuousCheckStartedOn": "2025-01-10", "continuousCheckStatus": "Active"}}' curl -X POST "https://api.wealthkernel.com/due-diligence-update/person/perddu-xyz789/evidence" -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" -d '{"source": "IDVerifyProvider", "reference": "CHECK-12345", "fileName": "identity-check.pdf"}' curl -X POST "https://api.wealthkernel.com/due-diligence-update/person/evidence/perdduevi-111/contents" -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/pdf" --data-binary @identity-check.pdf curl -X POST "https://api.wealthkernel.com/due-diligence-update/person/perddu-xyz789/actions/submit" -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### Clear Continuous Monitoring Fields Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/due-diligence/Basics.md Demonstrates how to clear a continuous check start date using a null value while updating the status. This illustrates how the API handles null values in nullable fields during partial updates. ```json { "partyId": "pty-123", "updatedBy": "employee@company.com", "politicalExposure": { "continuousCheckStartedOn": null, "continuousCheckStatus": "Inactive" } } ``` -------------------------------- ### Webhooks Configuration API Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Set up webhook subscriptions to receive real-time notifications for various account and financial events. ```APIDOC ## POST /webhook-subscriptions ### Description Subscribes to webhook events to receive real-time notifications. ### Method POST ### Endpoint https://api.wealthkernel.com/webhook-subscriptions ### Parameters #### Request Body - **url** (string) - Required - The URL to receive webhook notifications. - **eventTypes** (array) - Required - A list of event types to subscribe to. - (string) - The name of the event type (e.g., "accounts.account_activated"). ### Request Example ```json { "url": "https://yourapp.com/webhooks", "eventTypes": [ "accounts.account_activated", "accounts.account_suspended", "deposits.deposit_settled", "withdrawals.withdrawal_settled", "inbound_transfers.inbound_transfer_completed" ] } ``` ### Response (Details of the subscription creation, typically includes a subscription ID) ### Webhook Signature Verification (Pseudocode) #### Header Example `Webhook-Signature: t=1648555200,v1=d7021975861ff5baf2ca05913dce24ff7d03a51be8cb2fdd11c2e761b95650c4` #### Verification Logic 1. Extract timestamp and HMAC signature from the header. 2. Concatenate the request body with the timestamp. 3. Decode your webhook secret. 4. Compute the HMAC-SHA256 hash of the concatenated content using the decoded secret. 5. Compare the computed HMAC with the received HMAC using a constant-time comparison. 6. Verify that the timestamp is within an acceptable tolerance (e.g., 5 minutes). ``` -------------------------------- ### Balance vs. Valuations Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/balances/FAQs.md Explains the fundamental differences between portfolio balances and valuations, including how they handle transaction data and pricing. ```APIDOC ## Balance vs. Valuations ### Description Valuations provide a historical view of a portfolio's value, while balances offer an indicative current value based on the previous day's closing prices and FX rates. Valuations are date-sensitive, reflecting transactions up to a specific date. Balances are continuously updated and reflect all transactions as they occur. ### Key Differences: - **Valuations**: Dated, historical, reflect transactions up to a specific date. - **Balances**: Continuously updated, reflect all transactions as they occur, based on previous day's closing prices. ``` -------------------------------- ### Example JSON Webhook Payload with Event Type Source: https://github.com/wealthkernel/api-documentation-guides/blob/main/docs/webhooks/Event-Types.md This JSON snippet demonstrates how an event type is represented within a webhook request payload. It includes the event's name and version, which are crucial for identifying and processing specific events. ```json { [...] , "eventType": { "name": "webhooks.test", "version": 1 }, [...] } ``` -------------------------------- ### POST /portfolios Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Create a portfolio within an account to hold cash and securities with a specific mandate. ```APIDOC ## POST /portfolios ### Description Initializes a new portfolio under an existing account. Portfolios support various mandate types like Discretionary or Execution Only. ### Method POST ### Endpoint https://api.wealthkernel.com/portfolios ### Parameters #### Request Body - **accountId** (string) - Required - Parent account ID - **mandate** (object) - Required - Investment strategy details including type and modelId ### Request Example { "accountId": "acc-xyz789", "mandate": { "type": "Discretionary", "modelId": "mod-growth123" } } ### Response #### Success Response (200) - **id** (string) - Portfolio identifier - **status** (string) - Current portfolio status #### Response Example { "id": "prt-def456", "accountId": "acc-xyz789", "currency": "GBP", "status": "Created", "mandate": { "type": "Discretionary", "modelId": "mod-growth123" } } ``` -------------------------------- ### POST /deposits Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Create a deposit expectation to fund a portfolio via bank transfer. ```APIDOC ## POST /deposits ### Description Creates a deposit expectation. This allows the system to match incoming bank transfers to the correct portfolio. ### Method POST ### Endpoint https://api.wealthkernel.com/deposits ### Parameters #### Request Body - **portfolioId** (string) - Required - Target portfolio ID - **bankAccountId** (string) - Optional - Source bank account ID - **consideration** (object) - Required - Amount and currency - **reference** (string) - Required - Payment reference ### Request Example { "portfolioId": "prt-def456", "bankAccountId": "bnk-ghi789", "consideration": { "amount": 10000.00, "currency": "GBP" }, "reference": "INVEST-001" } ### Response #### Success Response (200) - **id** (string) - Deposit identifier - **status** (string) - Current status #### Response Example { "id": "dep-jkl012", "portfolioId": "prt-def456", "status": "Pending" } ``` -------------------------------- ### Configure and Verify Webhook Subscriptions Source: https://context7.com/wealthkernel/api-documentation-guides/llms.txt Subscribe to portfolio and account events and implement HMAC signature verification to ensure payload integrity. The verification process involves decoding the secret and comparing the computed HMAC with the header signature. ```bash curl -X POST "https://api.wealthkernel.com/webhook-subscriptions" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"url": "https://yourapp.com/webhooks", "eventTypes": ["accounts.account_activated", "accounts.account_suspended", "deposits.deposit_settled", "withdrawals.withdrawal_settled", "inbound_transfers.inbound_transfer_completed"]}' ``` ```pseudocode signature = request.headers["Webhook-Signature"] timestamp = signature.split(",")[0].split("t=")[1] hmac_received = signature.split(",")[1].split("v1=")[1] content = request.body + timestamp secret_decoded = base64_decode(your_webhook_secret) computed_hmac = hmac_sha256(content, secret_decoded).hex() is_valid = constant_time_compare(hmac_received, computed_hmac) ```