Draft, check, send and track a proposal
Goal: turn a recommendation from your own system into a proposal the client approves in the IDEALX app.
Scopes: read and advise. Needs: an advisory or discretionary mandate on the portfolio.
- Your system to IDEALX API: POST /v1/firms/{firmId}/proposals/check
- IDEALX API to Your system: costs, checks, secondApproval.required
- Your system to IDEALX API: POST …/accounts/{accountId}/proposals (draft)
- Your system to IDEALX API: POST …/proposals/{proposalId}/submit
- IDEALX API to Your system: status: pending_approval
- Colleague (Console) to IDEALX API: Approve (or return with a comment)
- IDEALX API: Record of advice frozen; sent
- Client (IDEALX app) to IDEALX API: Views, then accepts
- IDEALX API: Orders placed: executing, executed
- Your system to IDEALX API: GET …/proposals/{proposalId}
1. Dry-run the checks
Section titled “1. Dry-run the checks”/v1/firms/{firmId}/proposals/checkDry run: costs, tax estimate and checks for trades, and whether a second approval applies
Nothing is written. Use it while your system iterates on the trades.
curl -X POST "$IDEALX_API/v1/firms/frm_01937a1b2c3d4e5f6a7b8c9d0e1f2a3b/proposals/check" \ -H "Authorization: Bearer $IDEALX_API_KEY" -H "Content-Type: application/json" \ -d '{ "accountId": "acc_01937f00f1e2d3c4b5a6978877665544", "portfolioId": "ptf_01937f00f1e2d3c4b5a69788776655a1", "items": [ { "kind": "order", "instrumentId": "XASX:EXW", "side": "sell", "type": "market", "quantity": "120" }, { "kind": "order", "instrumentId": "XASX:EXB", "side": "buy", "type": "market", "amount": "16000.00" } ] }'const firm = process.env.IDEALX_FIRM_ID;const res = await fetch(`${process.env.IDEALX_API}/v1/firms/${firm}/proposals/check`, { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ accountId, portfolioId, items }),});const { costs, checks } = await res.json();if (checks.outcome === "block") console.log(checks.results.filter((r) => r.outcome === "block"));res = requests.post( f"{base}/v1/firms/{firm_id}/proposals/check", headers=headers, json={"accountId": account_id, "portfolioId": portfolio_id, "items": items}, timeout=30,)result = res.json()blocks = [r for r in result["checks"]["results"] if r["outcome"] == "block"]{ "costs": { "currency": "AUD", "buys": "16000.00", "sells": "16698.00", "fees": "10.00", "fx": "0.00", "turnover": "32698.00", "gain": "1842.60", "gainLongTerm": "1842.60", "gainEstimated": true, "cashBefore": "4200.00", "cashAfter": "4888.00", "totalBefore": "96400.00", "lines": [ { "instrumentId": "XASX:EXW", "symbol": "EXW", "name": "Example World Shares ETF", "assetClass": "etf", "side": "sell", "quantity": "120", "price": "139.1500", "priceCurrency": "AUD", "value": "16698.00", "valueBase": "16698.00", "fee": "5.00", "gain": "1842.60", "nowBp": 3460, "afterBp": 1728, "held": "240" }, { "instrumentId": "XASX:EXB", "symbol": "EXB", "name": "Example Bond Fund", "assetClass": "etf", "side": "buy", "quantity": "321", "price": "49.8400", "priceCurrency": "AUD", "value": "16000.00", "valueBase": "16000.00", "fee": "5.00", "gain": null, "nowBp": 1500, "afterBp": 3160, "held": "290" } ] }, "checks": { "policyVersion": 3, "outcome": "warn", "ranAt": "2026-11-25T05:02:11.000Z", "results": [ { "key": "mandate", "outcome": "pass", "label": "Inside the mandate", "detail": "Advisory" }, { "key": "concentration", "outcome": "warn", "label": "Concentration", "detail": "EXB 31.6% after the trades, above 30%" }, { "key": "cash", "outcome": "pass", "label": "Cash after trades", "detail": "A$4,888.00" } ], "secondApproval": { "enabled": true, "required": true, "threshold": { "amount": "25000.00", "currency": "AUD" } } }}secondApproval.required tells you up front that a colleague will need to approve: here the turnover is above the
firm’s threshold.
2. Save a draft
Section titled “2. Save a draft”/v1/firms/{firmId}/accounts/{accountId}/proposalsWrite a proposal for a portfolio: a draft, or sent at once with `send`
Send an Idempotency-Key so a retry returns the same proposal instead of a second one.
curl -X POST "$IDEALX_API/v1/firms/frm_01937a1b2c3d4e5f6a7b8c9d0e1f2a3b/accounts/acc_01937f00f1e2d3c4b5a6978877665544/proposals" \ -H "Authorization: Bearer $IDEALX_API_KEY" -H "Content-Type: application/json" \ -H "Idempotency-Key: prp-2026-11-25-morgan-primary-01" \ -d '{ "portfolioId": "ptf_01937f00f1e2d3c4b5a69788776655a1", "title": "Reduce world shares, add bonds", "note": "Hi Alex, as discussed on Tuesday, this moves part of your world shares into bonds.", "items": [ { "kind": "order", "instrumentId": "XASX:EXW", "side": "sell", "type": "market", "quantity": "120" }, { "kind": "order", "instrumentId": "XASX:EXB", "side": "buy", "type": "market", "amount": "16000.00" } ], "rationale": { "objective": "Lower swings in the portfolio ahead of a planned withdrawal in 2028.", "recommendation": "Sell 120 EXW and buy about A$16,000 of EXB, bringing bonds from 15% to 32%.", "alternatives": "Keeping the current mix was considered; it leaves more risk than the stated objective allows." }, "expiresInDays": 14 }'The answer is the full proposal, 201 Created, status: "draft". Keep its id. Change it with
PATCH /v1/firms/{firmId}/proposals/{proposalId} (title, note, items, rationale,
expiry) while it is a draft.
3. Submit
Section titled “3. Submit”/v1/firms/{firmId}/proposals/{proposalId}/submitSend a draft: to a colleague for second approval when the firm's policy says so, else to the client
curl -X POST "$IDEALX_API/v1/firms/frm_01937a1b2c3d4e5f6a7b8c9d0e1f2a3b/proposals/prp_01937f20a1b2c3d4e5f6a7b8c9d0e1f2/submit" \ -H "Authorization: Bearer $IDEALX_API_KEY"The checks run again. Then:
- with second approval required, the proposal answers
status: "pending_approval",needsSecondApproval: true; - otherwise it is approved and sent to the client at once (
status: "sent",sentAtset,adviceRecordfrozen).
| If you get | It means |
|---|---|
422 validation_failed, details.field: "rationale" |
Write rationale.recommendation first |
409 conflict with details.checks |
A check blocks it; the blocking results are listed |
409 conflict “Only a draft can be sent” |
It is no longer a draft (submitting again while it waits returns it unchanged) |
403 forbidden |
No mandate allows proposals on this portfolio, or the key lacks advise |
4. Second approval (in Console)
Section titled “4. Second approval (in Console)”A colleague with the right role opens Proposals → Waiting for approval in Console and approves or returns it with
a comment. The author can never approve their own proposal, and the firm key acts as the admin who made it, so the
approver is always someone else. On approval the checks run once more, the record of advice is frozen and the
proposal is sent; older open proposals for the same portfolio become superseded. A returned proposal goes back to
draft with returnedComment.
5. Track the client’s answer
Section titled “5. Track the client’s answer”/v1/firms/{firmId}/proposals/{proposalId}One proposal: trades, costs, rationale, checks, history and the record of advice
{ "id": "prp_01937f20a1b2c3d4e5f6a7b8c9d0e1f2", "firmId": "frm_01937a1b2c3d4e5f6a7b8c9d0e1f2a3b", "accountId": "acc_01937f00f1e2d3c4b5a6978877665544", "portfolioId": "ptf_01937f00f1e2d3c4b5a69788776655a1", "title": "Reduce world shares, add bonds", "status": "viewed", "views": 2, "lastViewedAt": "2026-11-26T08:41:00.000Z", "sentAt": "2026-11-25T23:10:00.000Z", "expiresAt": "2026-12-09T23:10:00.000Z", "needsSecondApproval": true, "author": { "id": "tmm_01937a2b3c4d5e6f7a8b9c0d1e2f3a4b", "name": "Jordan Lee" }, "approver": { "id": "tmm_01937a2b3c4d5e6f7a8b9c0d1e2f3a4c", "name": "Priya Nair" }, "approvedAt": "2026-11-25T23:10:00.000Z", "adviceRecord": { "id": "doc_01937f21b2c3d4e5f6a7b8c9d0e1f2a3", "title": "Record of advice: Reduce world shares, add bonds", "sha256": "9c1e5b0d…", "createdAt": "2026-11-25T23:10:00.000Z" }, "adviceRecordName": "Record of advice", "nudge": { "count": 1, "lastAt": "2026-11-27T22:00:00.000Z", "nextAt": "2026-11-30T22:00:00.000Z" }, "history": [ { "state": "draft", "at": "2026-11-25T05:03:40.000Z", "by": "Jordan Lee" }, { "state": "pending_approval", "at": "2026-11-25T05:04:02.000Z", "by": "Jordan Lee" }, { "state": "approved", "at": "2026-11-25T23:10:00.000Z", "by": "Priya Nair", "comment": "Bond concentration is fine for this client." }, { "state": "sent", "at": "2026-11-25T23:10:00.000Z", "by": "Priya Nair" }, { "state": "viewed", "at": "2026-11-26T08:39:12.000Z", "by": "Alex Morgan" } ], "…": "items, rationale, costs and checks as above"}Poll your open proposals with GET /v1/firms/{firmId}/proposals (add
accountId for one account) a few times a day and act on changes:
| Status | Do |
|---|---|
pending_approval |
Remind the approver in your own tools |
sent, viewed |
Waiting for the client; IDEALX sends reminders (nudge) |
accepted, executing |
Orders are being placed; order.updated webhooks follow on the account |
executed |
Done; results lists each order |
failed |
Orders could not be placed; read results |
declined |
Read declineReason; follow up with the client |
expired, superseded, withdrawn |
Closed; nothing more happens |
Download the frozen record with GET /v1/firms/{firmId}/proposals/{proposalId}/advice-record.pdf
and keep it with your client file.
Withdraw
Section titled “Withdraw”POST /v1/firms/{firmId}/proposals/{proposalId}/withdrawWithdraw a proposal: a draft, one waiting for approval, or one the client has not answered: a draft, one
waiting for approval, or one the client has not answered.
Checklist
Section titled “Checklist”- Dry-run with
checkuntil nothing blocks; show warnings to the adviser. - Create with an
Idempotency-Key; keep the proposal id with your recommendation. - Always write
rationale.recommendation: it goes into the record of advice. - Expect
pending_approvalwhensecondApproval.requiredis true. - Track status until it is final, and store the record of advice.