# Fondo Partner API # Overview This API is intended for registered partners in agreement with Fondo. The API is subject to change. Version: 2.0.0 License: Proprietary ## Servers Production ``` https://api.fondo.se ``` Sandbox ``` https://api.sandbox.fondo.se ``` ## Security ### oAuth You authenticate by using `client_id` and `client_secret` as parameters in the _authorization_ request. This creates an `access_token` you will use in request for users resources. The token is valid for a set time. More detaids in in auth request Type: http Scheme: bearer Bearer Format: Token ## Download OpenAPI description [Fondo Partner API](https://fondo-api-docs.redocly.app/_bundle/openapi/api_3.0.3.yaml) ## Authorization Obtain and manage access tokens via **OAuth 2.0 Client Credentials**. Send `grant_type=client_credentials` with your `client_id` and `client_secret`. Use the returned `access_token` in `Authorization: Bearer `. Tokens are short-lived—reuse during validity and renew on expiry. ### Obtain access token - [POST /v2/partner/auth/token](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/authorization/authtoken.md): Issues a short-lived bearer token using OAuth 2.0 Client Credentials. Send grant_type=client_credentials with your client_id and client_secret (optionally scope, state). Use the returned access_token in the Authorization: Bearer header on subsequent requests. The response also includes expires_in (seconds) and echoes state when provided. ## Accounts **Accounts** hold investor positions, balances, and cash movements under a client. Endpoints let you **list accounts**, **fetch details**, and **close accounts**. Responses include status, owner info, currency, linked bank accounts, positions, and timestamps. ### List client's accounts - [GET /v2/partner/client/{client_id}/account](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/account/getaccounts.md): Returns every investment account linked to client_id, including identifiers, type, status, balances, positions, linked bank accounts, currency, and timestamps. Use this to display or manage the client's full account set. ### Get kyc status - [GET /v2/partner/client/{client_id}/kycstatus/account/{account_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/account/getkycstatusbyaccount.md): Get status of kyc ### Get account - [GET /v2/partner/client/{client_id}/account/{account_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/account/getaccountbyid.md): Returns the full record for account_id under client_id, including identifiers, status, account and service type, owner details, balances and cumulative amounts, current positions, linked bank accounts, currency, and timestamps. Use this to display or verify a single investment account and its latest state. ### Close client account - [DELETE /v2/partner/client/{client_id}/account/{account_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/account/deleteaccount.md): Marks the account account_id (under client_id) as closed so no new activity can occur. The response echoes the account record including deleted/closed state. Historical data remains available for regulatory/reporting needs. ### List cash transactions - [GET /v2/partner/client/{client_id}/account/{account_id}/transaction/cash](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/account/getaccountcashtransactions.md): Returns the cash ledger for account_id (under client_id), including transaction type (e.g., deposit/withdrawal/settlement/fee), references, accounts debited/credited, amount/currency, dates (createdDate, modifiedDate, settlementDate), and optional client/executor references. Use for cash reconciliation and statements. ### List fund transactions - [GET /v2/partner/client/{client_id}/account/{account_id}/transaction/fund](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/account/getaccountfundtransactions.md): Returns fund activity for account_id (under client_id) such as subscriptions/redemptions with instrument identifiers, units, price, currency, references, and key dates (tradeDate, settlementDate). Use to build position histories and confirm settled/unspecified units. ### Create withdrawal - [POST /v2/partner/client/{client_id}/account/{account_id}/withdrawal](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/account/createwithdrawal.md): Initiates a payout from account_id (under client_id). Provide withdrawal details (e.g., withdrawalType, target bankAccount) in the request body. The response returns the created transaction with identifiers, amounts, and settlement metadata for tracking. ### Get Swish deposit status - [GET /v2/partner/deposit/swish/{swish_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/account/pollswishdeposit.md): Returns the current status of a previously initiated Swish deposit session. Use to confirm whether the deposit is pending or successfully paid; errorCode provides additional context if applicable. ### Create Swish deposit - [POST /v2/partner/client/{client_id}/account/{account_id}/deposit/swish](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/account/createswishdeposit.md): Starts a new Swish payment session for account_id (under client_id). Send details like type (e.g., same_device), amount, and optional qrFormat. The response includes a session id, token, optional qrImage, and a paymentId to track the flow through status checks. ## Agreements Retrieve account agreements and generate PDF documents for account-related contracts. ### Get agreement types - [GET /v2/partner/client/{client_id}/account/{account_id}/agreement-types](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/agreement/getaccountagreementtypes.md): Get available agreement types for an account. ### Get agreement PDF - [GET /v2/partner/client/{client_id}/account/{account_id}/agreement/{agreement_type_key}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/agreement/getaccountagreementpdf.md): Get agreement document in PDF format. ## AllocationPlan Allocation plans ### Get allocation plans - [GET /v2/partner/client/{client_id}/allocationplan](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/allocationplan/getallocationplans.md): Get allocation plans for client ### Get allocation plan - [GET /v2/partner/client/{client_id}/allocationplan/{allocation_plan_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/allocationplan/getallocationplanbyid.md): Get allocation plan by client and allocation plan ID ### Update allocation plan - [PATCH /v2/partner/client/{client_id}/allocationplan/{allocation_plan_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/allocationplan/patchallocationplan.md): Update allocation plan by client and allocation plan ID ### Get allocation plan by account ID - [GET /v2/partner/client/{client_id}/allocationplan/account/{account_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/allocationplan/getallocationplanbyaccountid.md): Get allocation plan by client and account ID ## Clients A **client** is your legal entity (B2B) or grouping for end-investor accounts. Use these endpoints to **list, create, read, and update** clients, manage bank accounts and service types, and fetch client-specific resources (instruments, custodians). ### List clients - [GET /v2/partner/client](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/client/getclients.md): Returns all clients associated with the authenticated partner, including IDs, display names, bank account info for fees/settlements, service types, registration/country details, and timestamps. Use to show or manage your client portfolio. ### Create client - [POST /v2/partner/client](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/client/createclient.md): Creates a client record (company or individual) with identifiers (name, displayName, optional id), regulatory and operational details (crn, country), optional bank accounts for fee handling, and service types. The response returns the full persisted client including sortedId and timestamps. ### Get client - [GET /v2/partner/client/{client_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/client/getclientbyid.md): Returns the full client object for client_id, including names, service types (with any assigned codes), bank accounts, and timestamps. Use to display or verify a single client's profile. ### Update client - [PATCH /v2/partner/client/{client_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/client/updateclient.md): Partially updates the client identified by client_id. Provide only the fields to change (e.g., displayName, bank accounts, service types, country). The response returns the updated client with refreshed timestamps. ### List client's instrument universe - [GET /v2/partner/client/{client_id}/instrument](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/client/getclientinstrumentuniverse.md): Returns instruments available for the given client_id, including identifiers (id, isincode), name, currency, latest price (closePrice, priceDate), KIID links, trade flags (isBuyable, isSellable, isTradable), cost breakdowns, rebates, and rules (unit decimals, minimum investment). Use to power search, eligibility checks, and order tickets for that client. ## Custodians Fetch **custodians** linked to a client—useful for transfer instructions and operational routing. Returns identifiers and names for display and validation. ### List client custodians - [GET /v2/partner/client/{client_id}/custodian](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/custodian/getcustodians.md): Returns the set of custodians associated with client_id (e.g., for transfers), including identifiers and display names. Use this to populate custodian selectors or to validate transfer instructions. ## Journeys (Hosted Flows) **Journeys** are secure, hosted web flows for customer interactions: account opening (e-sign), KYC/KYB questionnaires, fund transfers, and allocation plan setup. Create a Journey via API, redirect customers to the time-limited URL, and poll/callback for results. ### Get journey - [GET /v2/partner/client/{client_id}/journey/{journey_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/journey/getjourney.md): Returns the current state, configuration, and outcome of a web journey identified by journey_id under client_id (e.g., createAccount). Includes journey URL, expiry, callback/redirect URLs, context/scope, and any produced results (such as created account, bank account, transfer instructions, allocation plan). Use it to monitor progress and fetch results after end-customer completion. ### Create journey - [POST /v2/partner/client/{client_id}/journey](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/journey/postjourney.md): Initiates a new web journey (e.g., createAccount) for the specified client_id. Provide journey configuration (account types, service type, optional allocation plan, KYC questions, transfer instructions) plus callback/redirect URLs. The response returns a journey id, a launchable url, status, and metadata you can track until completion. ## Instruments The **instrument universe** consists of mutual funds available for a given client or globally. Retrieve instrument metadata: identifiers (e.g., ISIN), currency, latest price, **KIID** links, tradability flags, unit decimals, minimums, and cost/fee breakdowns. ### List instruments - [GET /v2/partner/instrument](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/instrument/getinstruments.md): Returns all mutual fund instruments available on the platform, including identifiers, currency, latest prices and dates, KIID links, tradability flags, costs/fees, rebates, and instrument rules (unit decimals, minimums). Use for global discovery, search, or to pre-filter a client's instrument set. ### Get instrument - [GET /v2/partner/instrument/{instrument_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/instrument/getistrumentbyid.md): Returns the full instrument record for instrument_id, including identifiers (id, isincode), name, currency, latest pricing, KIID links, tradability flags, cost breakdowns, rebates, and unit/amount constraints. Use to power instrument detail pages and to validate order tickets. ## Payment Instructions **Payment instructions** (e.g., autogiro) batch one or more payments to accounts. Create instructions, then track the **payments** under each instruction (amounts, status, and references). ### Create payment instruction - [POST /v2/partner/client/{client_id}/instruction/payment](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/instruction/createpaymentinstruction.md): Creates a new payment instruction of the specified type (for example autogiro) for the client identified by client_id. Provide an array of payments with details such as amount, destination account, and a unique clientRef. The response returns the instruction id, the list of created payments, a bankTransferRef if available, and the initial status (for example new) so you can track subsequent processing and settlements. ### Get payments by instruction - [GET /v2/partner/client/{client_id}/instruction/{instruction_id}/payment](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/instruction/getinstructionpayment.md): Returns the list of individual payments linked to an instruction identified by instruction_id under the given client_id. Each payment record includes its id, destination account, amount, optional clientRef, current status (such as new or completed), and any explanatory reason or reasonCode. Use this endpoint to monitor execution and settlement of all payments created within a given payment instruction. ### Get payment instruction - [GET /v2/partner/client/{client_id}/instruction/{instruction_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/instruction/getpaymentinstruction.md): Returns the full payment instruction identified by instruction_id under the given client_id. The response includes the instruction id, a list of scheduled payments (each with amount, target account, and optional clientRef), any bankTransferRef provided by the payment system, and the current status (such as new, processing, or completed). Use this endpoint to track the overall lifecycle and settlement state of a particular payment instruction. ## Orders **Fund orders** (subscription/redemption) drive the trading lifecycle. Create, read, list, and cancel orders; track status from `received` → `sent` → `confirmed` → `settled`. Orders reference **accounts** and **instruments**, and map to cash/fund transactions on settlement. ### Create order withdrawal - [POST /v2/partner/client/{client_id}/order/withdrawal](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/order/createorderwithdrawal.md): Sell fund units and withdraw the resulting amount ### List orders - [GET /v2/partner/client/{client_id}/order](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/order/getorders.md): Returns every order placed under client_id, including both subscriptions and redemptions. Each order object provides its id, orderType, current status (e.g., received, sent, confirmed, settled), associated account, references (clientRef, executorRef), the targeted instrument, requested units or amount, and full lifecycle timestamps (createdDate, modifiedDate, canceledDate). Use this endpoint to monitor all fund orders and their progress from initiation through settlement. ### Create order - [POST /v2/partner/client/{client_id}/order](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/order/createorder.md): Creates a new fund order (subscription or redemption) on the account specified by account under the given client_id. Provide details such as orderType, instrument, amount or units, and optional references (clientRef, executorRef) to help track the order. The response includes the generated order id, its initial status (typically received), and full order details for monitoring as it moves through execution and settlement. ### Get order - [GET /v2/partner/client/{client_id}/order/{order_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/order/getorderbyid.md): Returns the full details of a single order identified by order_id under the given client_id. The response includes the order's status (for example received, sent, confirmed, settled), orderType (subscription or redemption), associated account, instrument details, requested amount or units, and lifecycle timestamps (createdDate, modifiedDate, canceledDate). Use this endpoint to track an individual order's progress from initiation through settlement or cancellation. ### Cancel order - [DELETE /v2/partner/client/{client_id}/order/{order_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/order/cancelorder.md): Cancels the order identified by order_id for the given client_id. Use this endpoint to stop an order that has been created but not yet fully executed or settled. The response returns the complete order object with its status updated to canceled (if the cancellation succeeded), including all key fields such as orderType, instrument, and lifecycle timestamps. ## Transactions **Transactions** record movements of money and units. - **Cash transactions (CT):** deposits, withdrawals, cash legs of fund orders (with settlement dates). - **Fund transactions (FT):** unit movements from subscriptions/redemptions (trade & settlement dates). Use these endpoints to reconcile ledgers and statements. ### List cash transactions - [GET /v2/partner/client/{client_id}/transaction/cash](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/transaction/getcashtransactions.md): Returns every cash movement across all accounts belonging to the specified client_id. Each transaction includes its id, transactionType (e.g. deposit, withdrawal, or cash leg of a fund order), linked references (ref, refType, clientRef, executorRef), debit and credit accounts, monetary details (amount, currency), and full lifecycle timestamps (createdDate, modifiedDate, settlementDate). Use this endpoint to audit or reconcile every cash inflow and outflow associated with the client. ### Get cash transaction - [GET /v2/partner/client/{client_id}/transaction/cash/{transaction_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/transaction/getcashtransactionbyid.md): Returns the full record of a single cash movement identified by transaction_id for the given client_id. The response provides all key properties—transactionType (deposit, withdrawal, or cash leg of a fund order), linked references (ref, refType, clientRef, executorRef), debit and credit accounts, amount, currency, optional free text, and full lifecycle timestamps (createdDate, modifiedDate, settlementDate). Use this endpoint to inspect or audit an individual cash transaction in detail. ### List fund transactions - [GET /v2/partner/client/{client_id}/transaction/fund](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/transaction/getfundtransactions.md): Returns every fund‐unit movement across the accounts of the specified client_id, including both subscriptions and redemptions. Each transaction details its transactionType (e.g. subscription, redemption), linked references (ref, refType, clientRef, executorRef), target account, instrument identifiers, number of units, executed price, currency, and full lifecycle timestamps (createdDate, modifiedDate, tradeDate, settlementDate). Use this endpoint to audit or reconcile all fund‐unit inflows and outflows associated with the client. ### Get fund transaction - [GET /v2/partner/client/{client_id}/transaction/fund/{transaction_id}](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/transaction/getfundtransactionbyid.md): Returns the complete record of a single fund‐unit movement identified by transaction_id for the given client_id. The response includes the transactionType (subscription or redemption), related references (ref, refType, clientRef, executorRef), account and instrument identifiers, number of units, executed price, currency, and full lifecycle timestamps (createdDate, modifiedDate, tradeDate, settlementDate). Use this endpoint to inspect or audit an individual subscription or redemption transaction. ## Subscriptions (WebSocket & Webhooks) Receive **real-time updates** from Fondo without polling. - **WebSocket:** open a persistent stream for `.create`, `.update`, `.delete`, and `heartbeat` events. - **Webhooks:** register a callback URL to get signed POSTs with `current`/`previous` payloads. Include replay/retry handling in your consumers. ### Get WebSocket connection - [GET /v2/partner/client/{client_id}/subscribe](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/subscription/getwebsocket.md): Opens a persistent WebSocket channel for the specified client_id and streams real-time events defined in the event schema. Event types: > .create – includes a current property with the newly created object. > > .update – includes a current property with the updated object and a previous property with the object's prior state. > > .delete – includes a previous property with the deleted object. > > heartbeat – sent at intervals to keep the connection alive. > Use this endpoint to receive live updates (for example on orders, transactions, or journeys) without polling the REST API. A heartbeat event is sent regularly to keep the connection alive. ### Webhook callback - [POST /fondo/webhooks/callback](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/subscription/webhookcallback.md): Your endpoint that Fondo calls whenever an event occurs. The POST body matches one of the event types defined in the event schema: > .create – current contains the newly created object. > > .update – current contains the updated object, and previous shows the object's state before the change. > > .delete – previous contains the deleted object. > Fondo sends these requests to the callback URL you register, allowing your system to react immediately to updates such as account changes, order executions, or transaction settlements. (This API doc shows it as a POST to Fondo for illustration; in practice, the call is made from Fondo to your server.) Note that this documentation system does not yet support OpenAPI 3.1 Webhooks spec and the callback is described as a POST to Fondos API. The URL and host is an endpoint on your system. ## System API Service functions ### Ping service - [GET /ping](https://fondo-api-docs.redocly.app/openapi/api_3.0.3/system/ping.md): Simple health-check endpoint that replies with a { "pong": ... } JSON object. Use it to verify that the Fondo API is reachable and responsive before making production calls.