AndroMoney 云端账本与共享链接数据 API
AndroMoney 是 KPMoney 的个人记账应用(包名 com.kpmoney.android,付费姊妹包 com.andromoney.pro)。家庭登记收入、支出与账户间转账,覆盖现金、悠遊卡与银行账户,可附小票照片、按周期写入工资和房租、按主币种换算外币,并把整本账或单笔流水用链接分享给家人,链接可在应用内或 AndroMoney 网站上打开。台湾用户可登录财政部电子发票、扫描发票 QR Code、查询中奖发票、做所得税试算与贷款试算,再把对应小票写入账本。云同步加上 Google Drive 与 Dropbox(Apps/_AndroMoney_)把设备上的 SQLite 账本带到其他手机;Plus / Pro 以 andromoney.plus.monthly、yearly 与 andromoney.pro.monthly、yearly 走 Google Play Billing。它和其他记账应用同场,面向希望用一本含台湾电子发票入账的家庭账、而不是只用银行自家 App 的用户。
签字金额写在 mount,旁边是主币种 amount_to_main,再用 hash_key 标识,并带 sub_category、receipt_num 以及支付哈希 in_payment / out_payment。云端分页用各表的 delete 与 update 数组回填 record_table、payment_table(payment_name、card_number、bill_date、pay_date)、以 card_no 为键的 carrier_table,以及 record_hash_key 下的小票图。共享账暴露 url_id、entity_hash_key、entity_type(Record 或 Project)、secrecy、permission 与 expired_at;评论挂在 entity_hash_key 上,含 content 与 user_email。权益返回 plan、record_limit、image_limit、update_limit 与 usage.record,对照 free/plus/pro 的 all_limits。台湾载具发票给出 invNum、sellerBan、sellerName、票头 amount 与行项目 details(description、quantity、unitPrice);汇率 compact-ultra 把 TWD_USD 这样的币种对映射成汇率字符串。
家办任务可用 mount 与 amount_to_main 重建损益;家庭机器人可盯共享链接 url_id 和评论线程;额度监控可把 usage.record 与 record_limit 比较;报税接入可把 invNum 与 sellerBan 写成账本行。openData Studio 把这层接口变成可调用的开放数据。
应用截图
API 端点一览
以下端点与请求/响应示例均依据应用界面推导重构,为示意说明,并非实际抓包。
开始云同步
POST
/v1/ledger-sync/sessions/openopenfinance打开一次家庭账本的云同步会话。客户端随后分页下载云端账本、上传本地变更,再关闭会话。响应带 message 与 sync_start_time 时间戳。
认证方式: 设备绑定会话以 JSON 字段 user、device、token 传递,不使用 Authorization 头。Accept: application/json。device_id 可为 null;mobile_type 默认 0。
- user
- device
- token
- now_utc
- device_id
- device_type
- mobile_type
- message
- sync_start_time
POST /v1/ledger-sync/sessions/open HTTP/1.1 Accept: application/json Content-Type: application/json { "body": { "user": "[email protected]", "device": "a1b2c3d4e5f6", "token": "YOUR_SYNC_TOKEN", "now_utc": "2026-10-21 08:15:00", "device_id": null, "device_type": "Pixel 8", "mobile_type": "0" } }{ "message": "ok", "sync_start_time": "2026-10-21 08:15:01" }分页下载账本
GET
/v1/ledger-sync/pagesopenfinance会话打开之后分页拉取云端账本。响应带 total_pages 与各表对象:先处理单页表(含以 card_no 为键的 carrier_table),再处理多页的 record_table 与 image_table,用 delete 与 update 数组写入设备上的账本。带符号金额的线上字段名为 mount。
认证方式: 设备绑定会话以查询参数 user、device、token 传递,不使用 Authorization 头。另传 device_type、page、账本表上次同步时间 sync_time,以及 now_utc。Accept: application/json。
- total_pages
- record_table
- image_table
- payment_table
- carrier_table
- delete
- update
- hash_key
- mount
- amount_to_main
- currency_code
- date
- category
- sub_category
- in_payment
- out_payment
- receipt_num
- payment_name
- card_no
- card_type
- card_encrypt
- payment_hash_key
- record_hash_key
- url
GET /v1/ledger-sync/pages?user=ada%40example.com&device=a1b2c3d4e5f6&device_type=Pixel%208&token=YOUR_SYNC_TOKEN&page=1&sync_time=2026-10-01%2000:00:00&now_utc=2026-10-21%2008:15:00 HTTP/1.1 Accept: application/json{ "total_pages": 2, "record_table": { "delete": [ {"hash_key": "rec_del_01"} ], "update": [ { "hash_key": "rec_a1", "mount": "-320.00", "amount_to_main": "-320.00", "currency_code": "TWD", "date": "2026-10-20 12:30:00", "category": "cat_food", "sub_category": "sub_lunch", "in_payment": null, "out_payment": "pay_cash", "in_amount": null, "out_amount": "320.00", "in_currency": null, "out_currency": "TWD", "payee": "payee_cafe", "project": null, "period": null, "fee": "0", "remark": "Lunch", "receipt_num": "AB12345678", "status": "20", "update_time": "2026-10-20 12:31:00" } ] }, "image_table": { "delete": [], "update": [ { "hash_key": "img_01", "record_hash_key": "rec_a1", "url": "https://images.example.com/rec_a1/img_01.jpg" } ] }, "payment_table": { "delete": [], "update": [ { "hash_key": "pay_cash", "payment_name": "Cash", "currency_code": "TWD", "kind": 0, "card_number": null, "bill_date": null, "pay_date": null, "total": "12000.00" } ] }, "carrier_table": { "delete": [], "update": [ { "card_no": "/ABC+123", "card_type": "3J0002", "card_name": "Phone barcode", "card_encrypt": "****", "payment_hash_key": "pay_cash", "auto_sync": 1 } ] } }上传账本变更
POST
/v1/ledger-sync/changesopenfinance推送本地新增、修改与删除。body.record_table 含流水变更(mount、amount_to_main、sub_category),body.images 含小票图的新增与删除。响应为简单的 message。
认证方式: 设备绑定会话写在 JSON body.body 的 user、device、token 中,不使用 Authorization 头。顶层 device_id 重复设备 uuid。Accept: application/json。
- device_id
- body
- other_count
- record_table
- images
- count
- insert
- update
- delete
- hash_key
- mount
- amount_to_main
- sub_category
- receipt_num
- payment_user_email
- record_hash_key
- url
- order_no
- message
POST /v1/ledger-sync/changes HTTP/1.1 Accept: application/json Content-Type: application/json { "device_id": "a1b2c3d4e5f6", "body": { "user": "[email protected]", "device": "a1b2c3d4e5f6", "token": "YOUR_SYNC_TOKEN", "now_utc": "2026-10-21 08:16:00", "device_id": "a1b2c3d4e5f6", "device_type": "Pixel 8", "mobile_type": "0", "other_count": 1, "record_table": { "count": 2, "insert": [ { "hash_key": "rec_new_01", "mount": "-88.00", "amount_to_main": "-88.00", "currency_code": "TWD", "date": "2026-10-21 08:10:00", "category": "cat_food", "sub_category": "sub_coffee", "in_payment": null, "out_payment": "pay_cash", "in_amount": null, "out_amount": "88.00", "in_currency": null, "out_currency": "TWD", "payee": "payee_cafe", "project": null, "period": null, "fee": "0", "remark": "Coffee", "receipt_num": "", "status": "20", "payment_user_email": "[email protected]", "update_time": "2026-10-21 08:16:00" } ], "update": [], "delete": [ { "hash_key": "rec_del_01", "in_payment": null, "out_payment": "pay_cash", "payment_user_email": "[email protected]", "update_time": "2026-10-21 08:16:00" } ] }, "images": { "count": 1, "insert": [ { "hash_key": "img_02", "record_hash_key": "rec_new_01", "url": "https://images.example.com/rec_new_01/img_02.jpg", "order_no": "1", "payment_user_email": "[email protected]", "update_time": "2026-10-21 08:16:00" } ], "delete": [] } } }{ "message": "ok" }结束云同步
POST
/v1/ledger-sync/sessions/closeopenfinance关闭先前打开的同步会话。请求额外带 sync_time 时间戳,客户端把它保存为账本表的上次同步标记,下一轮只拉取更新的变更。
认证方式: 设备绑定会话写在 JSON body.body 的 user、device、token 中,不使用 Authorization 头。Accept: application/json。
- user
- device
- token
- now_utc
- device_id
- device_type
- sync_time
- message
POST /v1/ledger-sync/sessions/close HTTP/1.1 Accept: application/json Content-Type: application/json { "body": { "user": "[email protected]", "device": "a1b2c3d4e5f6", "token": "YOUR_SYNC_TOKEN", "now_utc": "2026-10-21 08:17:00", "device_id": null, "device_type": "Pixel 8", "mobile_type": "0", "sync_time": "2026-10-21 08:17:00" } }{ "message": "ok" }读取共享流水
GET
/v1/shared-books/{linkId}/entriesopenfinance分页读取一本共享账。响应返回 share_link(url_id、entity_type 为 Record 或 Project、secrecy、permission)以及嵌套 records,含 record.mount 与 amount_to_main,并关联 category、subcategory、payments、currency、comments、images。user_email 标出哪些行属于当前登录用户。
认证方式: 设备绑定会话以查询参数 user、device、token 传递,不使用 Authorization 头。客户端通过 per_page 每页取 30 行。Accept: application/json。
- message
- share_link
- url_id
- entity_type
- entity_hash_key
- permission
- secrecy
- expired_at
- title
- records
- user_email
- mount
- amount_to_main
- hash_key
- sub_category
- receipt_num
- payment_name
- subcategory
- id_category
GET /v1/shared-books/abcUrlId01/entries?device=a1b2c3d4e5f6&user=ada%40example.com&token=YOUR_SYNC_TOKEN&per_page=30&page=1 HTTP/1.1 Accept: application/json{ "message": null, "share_link": { "id": 4412, "url_id": "abcUrlId01", "title": "October household", "entity_type": "Record", "entity_hash_key": "rec_a1", "entity_user_id": 1001, "user_id": 1001, "permission": 1, "secrecy": 0, "expired_at": "2026-12-31 23:59:59", "created_at": "2026-10-01 09:00:00", "updated_at": "2026-10-20 12:00:00" }, "records": [ { "user_email": "[email protected]", "record": { "id": 88, "hash_key": "rec_a1", "mount": "-320.00", "amount_to_main": "-320.00", "currency_code": "TWD", "date": "2026-10-20 12:30:00", "category": "cat_food", "sub_category": "sub_lunch", "in_payment": null, "out_payment": "pay_cash", "in_amount": null, "out_amount": "320.00", "receipt_num": "AB12345678", "remark": "Lunch", "status": 20, "is_delete": false }, "category": { "hash_key": "cat_food", "category": "Food", "type": 20 }, "subcategory": { "hash_key": "sub_lunch", "subcategory": "Lunch", "id_category": "cat_food" }, "out_payment": { "hash_key": "pay_cash", "payment_name": "Cash", "currency_code": "TWD", "kind": 0, "total": "12000.00" }, "currency": { "currency_code": "TWD", "rate": "1" }, "comment": [], "image": [] } ] }列出共享链接
GET
/v1/shared-books/linksopendata列出自己发出的链接(share_links)和别人分享给自己的链接(links_share_to_me)。客户端分别查询 entity_type 为 Record 与 Project 的结果,合并成同一个共享链接页面。打开共享链接会在应用内启动对应账本。
认证方式: 设备绑定会话以查询参数 user、device、token 传递,不使用 Authorization 头。entity_type 为 Record 或 Project;客户端会合并两份列表。Accept: application/json。
- share_links
- links_share_to_me
- id
- url_id
- title
- entity_type
- entity_hash_key
- entity_user_id
- user_id
- permission
- secrecy
- expired_at
- created_at
- updated_at
GET /v1/shared-books/links?device=a1b2c3d4e5f6&user=ada%40example.com&token=YOUR_SYNC_TOKEN&entity_type=Record HTTP/1.1 Accept: application/json{ "share_links": [ { "id": 4412, "url_id": "abcUrlId01", "title": "October household", "entity_type": "Record", "entity_hash_key": "rec_a1", "entity_user_id": 1001, "user_id": 1001, "permission": 1, "secrecy": 0, "expired_at": "2026-12-31 23:59:59", "created_at": "2026-10-01 09:00:00", "updated_at": "2026-10-20 12:00:00" } ], "links_share_to_me": [ { "id": 5520, "url_id": "xyzUrlId99", "title": "Trip Kyoto", "entity_type": "Project", "entity_hash_key": "proj_kyoto", "permission": 0, "secrecy": 1, "expired_at": null } ] }创建共享链接
POST
/v1/shared-books/publishopendata按给定流水 hash_keys 创建共享链接并返回 url_id。客户端随后为新链接设置标题。共享方式涵盖一组流水、一个项目或单笔流水。
认证方式: 设备绑定会话写在 JSON body.body 的 user、device、token 中,不使用 Authorization 头。Accept: application/json。
- user
- device
- token
- hash_keys
- msg
- success
- url_id
POST /v1/shared-books/publish HTTP/1.1 Accept: application/json Content-Type: application/json { "body": { "user": "[email protected]", "device": "a1b2c3d4e5f6", "token": "YOUR_SYNC_TOKEN" }, "hash_keys": ["rec_a1", "rec_b2"] }{ "msg": null, "success": true, "url_id": "abcUrlId01" }列出共享某支付账户的用户
GET
/v1/accounts/collaboratorsopendata列出所有者已共享某个支付账户的协作者。每条含 email、数字 id、is_approved 与 permission;payment_hash_key 指定账户。
认证方式: 设备绑定 token 作为查询参数 token,另加 owner_user,不使用 Authorization 头。Accept: application/json。
- owner_user
- payment_hash_key
- token
- id
- is_approved
- permission
GET /v1/accounts/collaborators?owner_user=ada%40example.com&payment_hash_key=pay_cash&token=YOUR_SYNC_TOKEN HTTP/1.1 Accept: application/json[ { "email": "[email protected]", "id": 2002, "is_approved": true, "permission": 1 } ]列出流水评论
GET
/v1/entry-notesopendata分页读取共享支付流水上的评论。响应包装 data、success 与 total_pages;每条评论带 entity_hash_key、entity_type=Record 与 user_email。客户端按每页 10 条翻页直到最后一页。
认证方式: 设备绑定会话以查询参数 user、device、token 传递,不使用 Authorization 头。客户端每页 10 条,直到 total_pages。
- success
- total_pages
- data
- id
- hash_key
- content
- entity_hash_key
- entity_type
- entity_user_id
- root_entity_hash_key
- root_entity_type
- replies_count
- is_delete
- user_email
- user_name
- created_at
- updated_at
GET /v1/entry-notes?user=ada%40example.com&device=a1b2c3d4e5f6&token=YOUR_SYNC_TOKEN&start_date=2026-10-01&end_date=2026-10-22&page=1&per_page=10&payment_user_email=ada%40example.com&payment_hash_key=pay_cash HTTP/1.1{ "success": true, "total_pages": 1, "data": [ { "id": 91, "hash_key": "cmt_01", "content": "Split this with Bob", "entity_hash_key": "rec_a1", "entity_type": "Record", "entity_user_id": "1001", "root_entity_hash_key": "rec_a1", "root_entity_type": "Record", "root_entity_user_id": "1001", "replies_count": 0, "is_delete": false, "user_email": "[email protected]", "user_name": "Ada", "user_id": 1001, "created_at": "2026-10-20 13:00:00", "updated_at": "2026-10-20 13:00:00", "update_time": "2026-10-20 13:00:00" } ] }发表流水评论
POST
/v1/entry-notes/addopendata对一条 Record 发表评论。实体类型固定为 Record,评论正文走 value;结果复用评论列表的外层结构。
认证方式: 设备绑定会话以 JSON 字段 user、device、token 传递,不使用 Authorization 头。
- user
- device
- token
- entity_hash_key
- entity_type
- entity_user_email
- value
- success
- data
- hash_key
- content
- user_email
- user_name
POST /v1/entry-notes/add HTTP/1.1 Content-Type: application/json { "user": "[email protected]", "device": "a1b2c3d4e5f6", "token": "YOUR_SYNC_TOKEN", "entity_hash_key": "rec_a1", "entity_type": "Record", "entity_user_email": "[email protected]", "value": "Split this with Bob" }{ "success": true, "total_pages": 1, "data": { "id": 91, "hash_key": "cmt_01", "content": "Split this with Bob", "entity_hash_key": "rec_a1", "entity_type": "Record", "user_email": "[email protected]", "user_name": "Ada" } }读取订阅额度
GET
/v1/plan/entitlementsopendata在 Play Billing 购买之后读取 Plus/Pro 权益。响应含 plan、expires_at、各资源限额与 usage;all_limits 列出 free、plus、pro 三档。配套的购买上报调用会提交平台、商品 id、包名与购买令牌。
认证方式: 设备绑定会话以查询参数 user、device、token 传递,不使用 Authorization 头。Accept: application/json。
- plan
- platform
- expires_at
- message
- record_limit
- image_limit
- update_limit
- usage
- usage.record
- usage.image
- usage.update
- all_limits
- all_limits.free
- all_limits.plus
- all_limits.pro
GET /v1/plan/entitlements?user=ada%40example.com&device=a1b2c3d4e5f6&token=YOUR_SYNC_TOKEN HTTP/1.1 Accept: application/json{ "plan": "plus", "platform": "android", "expires_at": "2027-10-21T08:00:00Z", "message": null, "record_limit": 20000, "image_limit": 5000, "update_limit": 20000, "usage": { "record": 4120, "image": 88, "update": 3900 }, "all_limits": { "free": {"record": 500, "image": 50, "update": 500}, "plus": {"record": 20000, "image": 5000, "update": 20000}, "pro": {"record": 100000, "image": 20000, "update": 100000} } }载具发票明细
POST
/v1/invoices/carrier/detailopenfinance读取一张台湾载具电子发票。应用把 invNum、sellerBan、amount 映射成账本行(receipt_num、mount)。姊妹查询覆盖条码与 QR 扫描;donateMark 为 1 表示已捐赠。
认证方式: 台湾财政部电子发票 appID,加上载具 cardNo、cardEncrypt、cardType。另传 uuid、timeStamp、expTimeStamp。以表单正文提交,不用 AndroMoney 的 user/device/token。
- appID
- cardEncrypt
- cardNo
- cardType
- invDate
- invNum
- code
- msg
- v
- invPeriod
- invStatus
- invoiceTime
- amount
- sellerBan
- sellerName
- sellerAddress
- details
- description
- quantity
- unitPrice
- rowNum
POST /v1/invoices/carrier/detail HTTP/1.1 Content-Type: application/x-www-form-urlencoded appID=<mof-app-id>&cardEncrypt=****&cardNo=%2FABC%2B123&cardType=3J0002&invDate=2026%2F10%2F20&expTimeStamp=2147483647&timeStamp=1761034500&uuid=device-uuid-01&invNum=AB12345678{ "code": "200", "msg": "執行成功", "v": "0.5", "invNum": "AB12345678", "invDate": "2026/10/20", "invPeriod": "11510", "invStatus": "2", "invoiceTime": "12:30:00", "amount": "320", "sellerBan": "12345678", "sellerName": "Cafe Example", "sellerAddress": "Taipei", "details": [ { "rowNum": "1", "description": "Latte", "quantity": "1", "unitPrice": "120", "amount": "120" }, { "rowNum": "2", "description": "Sandwich", "quantity": "1", "unitPrice": "200", "amount": "200" } ] }换算币种对
GET
/v1/rates/pairopendata查询 {from}_{to} 币种对汇率。响应是一个对象,键等于所请求的币种对,值为汇率字符串;应用保存该汇率,并在主币种变化时重算 amount_to_main。
认证方式: 服务商 apiKey 作为查询参数(请换成你自己的)。与 AndroMoney 的 user/device/token 会话无关。compact=ultra。
- q
- compact
- apiKey
GET /v1/rates/pair?compact=ultra&apiKey=<your-api-key>&q=TWD_USD HTTP/1.1{ "TWD_USD": "0.0312" }
数据类别
- 流水
- 账户
- 共享链接
- 评论
- 订阅
- 汇率
- 电子发票
数据使用场景与案例
从云端分页重建家庭损益
税务或家办任务分页拉取云端账本,按 category 与 date 汇总 record_table.mount,并核对 amount_to_main,使年报在主币种变更后仍与设备账本一致。
运营共享账链接
家庭机器人列出 share_links 的 url_id / entity_hash_key / expired_at,按链接加载嵌套流水,并在 entity_hash_key 上发评论,室友分摊小票而不必交换整份 SQLite。
盯紧 Plus/Pro 额度
同步看门狗读取 plan、record_limit、usage.record,对照 all_limits.plus / all_limits.pro,在云端拒绝新行之前暂停 upload 的 insert 批次。
接入台湾载具发票
小票流水线拉取载具 invNum、sellerBan、sellerName 与 details.amount,再把 receipt_num 与 mount 写到对应 out_payment,使家庭账与财政部发票对齐。
常见问题
AndroMoney 的云端下载里有什么?
带 total_pages 的分页 JSON,表键包括 record_table、image_table、payment_table、carrier_table。每张表有 delete 与 update 数组。流水线上字段名是 mount(不是 amount),另有 amount_to_main、hash_key、sub_category、receipt_num、in_payment、out_payment。carrier_table 以 card_no 为键。
共享账如何工作?
创建链接时提交 hash_keys,返回 url_id。列表返回自己发出的 share_links 和别人分享来的 links_share_to_me。加载链接会分页给出嵌套流水,含 category、subcategory、payments、currency、comments、images。entity_type 为 Record 或 Project;secrecy 与 permission 控制可见性。形如 …/link 的深度链接在应用内打开共享账。
AndroMoney 会调用银行接口吗?
没有自有银行主机。支付账户是本地账户(现金、悠遊卡、银行别名),作为 payment_table 同步。台湾电子发票来自财政部载具/条码接口(invNum、sellerBan)。汇率来自 compact-ultra 的币种对转换。Plus/Pro 状态是订阅对象上的 plan、record_limit 与 usage。
哪些字段标识一笔流水?
hash_key 是跨设备稳定 id。mount 是带符号金额;amount_to_main 是按主币种折算后的金额。从载具或 QR 扫描入账时,receipt_num 保存台湾发票号码。status 10/20/30 分别是收入、支出与转账。
与 AndroMoney 相似的应用
- Money Manager Expense & Budget — Realbyte 的 Money Manager Expense & Budget 用复式记账登记收入与支出,用图表对照预算和花费,并跟踪信用卡账单日。
- Bluecoins — Bluecoins 是记账与预算应用,登记收入支出、做预算,并通过 Google Drive、Dropbox 或 OneDrive 同步一本共享账本。
- Money Lover — Money Lover 是记账与理财应用,按分类登记日常收支、设定预算,并在多台设备间同步,还带周期账单和多币种。
- Monefy — Monefy 是支出跟踪与家庭预算应用,可快速记账、用图表看花费结构,支持多账户与多币种,并能在多台设备间共享预算。
- Wallet: Budget Expense Tracker — BudgetBakers 的 Wallet 是个人理财应用,可连接银行账户自动登记支出、自订预算,并与家人共享账户。
- YNAB — YNAB(You Need A Budget)是面向 iOS、Android 与网页的个人预算应用,先把钱分到各类用途再花,并可连接金融账户导入流水。
- Spendee — Spendee 是理财应用,跟踪现金、银行账户、电子钱包与加密钱包,设定分类预算,并为情侣、家庭和室友提供共享钱包。
- Cashew — Cashew 是记账与预算应用,登记收入支出,支持按周或按月预算和多币种,并可把设备上的账本备份到 Google Drive。
相关主题
- AndroMoney API
- record_table mount
- amount_to_main
- share_links url_id
- 台湾电子发票 invNum
- KPMoney 记账
- 電子發票
- hash_key
需要集成这个 App 的数据 API?
我们可为任意指定 App 交付定制集成——源码交付 USD 500 起,或托管 API 按调用计费。告诉我们您需要的数据即可。
- 每个项目均签 NDA 与 SOW
- 3–7 天交付
- 验收通过后才付款
- 仅在授权范围内作业