Ghi khoản chi
Records an entry in a Chia Chia group: an expense (default), income, transfer between two members, or a fund deposit or withdrawal. Send the total, who paid and who takes part with split_mode; the server computes every share and refuses totals that do not add up, saying by how much. Member ids come from get_group. Returns the entry and the new balance of the user.
Tham số (16)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
amountbắt buộc | integer | Total, an integer in the smallest unit of currency (đồng for VND, cents for USD). |
payersbắt buộc | object[] | Who paid. One payer with no amount pays it all. |
kind | string | expense (default), income, transfer (person to person), deposit (into the fund), withdraw (from the fund). Giá trị: expenseincometransferdepositwithdraw |
title | string | |
currency | string | Defaults to the group currency; another currency needs rate. Giá trị: VNDUSDEURJPYKRWTHBSGDCNY |
rate | string | Group currency per 1 unit of currency, e.g. "25380.5". |
occurred_at | string | ISO 8601 date-time or YYYY-MM-DD; defaults to now in Vietnam. |
category | string | Giá trị: fooddrinktransportlodgingshoppinggroceriesentertainmentbillsrenthealthgiftfeesother |
note | string | |
payer_mode | string | How several payers share the total; default amounts. Giá trị: equalamountssharespercent |
split_mode | string | How the total is shared; default equal among splits. Giá trị: equalamountssharespercentitems |
splits | object[] | Who takes part (for transfer/deposit: the one receiving). The server computes each share. |
items | object[] | For split_mode items: each line and who shares it. |
extras | object[] | For split_mode items: tax, tip or discount spread over the items. |
idempotency_key | string | Khoá chống lặp tuỳ chọn: gọi lại cùng khoá không tạo bản ghi thứ hai. |
Thêm người vào nhóm
Adds a person (just a name, no CTAS account needed) to a Chia Chia group so expenses can be split with them. If someone with exactly that name is already in the group, returns them with created=false instead of adding a duplicate.
Tham số (3)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
namebắt buộc | string | |
idempotency_key | string | Khoá chống lặp tuỳ chọn: gọi lại cùng khoá không tạo bản ghi thứ hai. |
Tạo nhóm Chia Chia
Creates a Chia Chia group with the user as owner and, optionally, the names of the other people in it (they need no CTAS account) and a shared fund. Fails with PLAN_EXPIRED when the account has no free group slot. Returns the group with member ids.
Tham số (8)
| Tên | Kiểu | Mô tả |
|---|
namebắt buộc | string | Group name, e.g. "Đà Lạt 3N2Đ". |
type | string | Default other. Giá trị: triphomecoupleeventworkother |
currency | string | Default VND. Cannot change once the group has entries. Giá trị: VNDUSDEURJPYKRWTHBSGDCNY |
emoji | string | |
fund | boolean | Add a shared fund (quỹ chung) people pay into. |
my_name | string | The user's name in this group; defaults to their account name. |
member_names | string[] | Names of the other people. |
idempotency_key | string | Khoá chống lặp tuỳ chọn: gọi lại cùng khoá không tạo bản ghi thứ hai. |
Xoá khoản chi
Deletes an entry from a Chia Chia group; balances no longer count it and the group activity records who deleted it. Returns the new balance of the user in the group.
Tham số (3)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
entry_idbắt buộc | string | |
idempotency_key | string | Khoá chống lặp tuỳ chọn: gọi lại cùng khoá không tạo bản ghi thứ hai. |
Xem ai nợ ai
Returns the balance of every member of a Chia Chia group (positive: is owed; negative: owes) and the fewest transfers that settle everyone up, as the app shows them. settle_fund=true also pays out the fund cash to the people it belongs to.
Tham số (2)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
settle_fund | boolean | Include paying out the fund cash in the transfers. |
Xem một khoản chi
Returns one entry of a Chia Chia group in full: amount, payers and how it is split (with names and weights), items, extras, note, whether it has a receipt photo, whether it was deleted, and its change history.
Tham số (2)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
entry_idbắt buộc | string | |
Xem một nhóm Chia Chia
Returns one Chia Chia group: its members (people and the shared fund, with ids to use in other tools), each member balance, the fewest transfers that settle everyone up, fund cash, currency and the current invite code. Bank accounts show only their last four digits.
Tham số (1)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
Xem báo cáo nhóm
Returns the spending report of a Chia Chia group: total spent, by category, by day, top payer and per member paid, consumed and balance. With member_id, returns that member instead: whom they paid for, who paid for them, transfers, fund deposits, by category and their latest entries.
Tham số (2)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
member_id | string | Report on this member only. |
Rời nhóm Chia Chia
Makes the user leave a Chia Chia group. Their name and entries stay in the group for the others; an owner who leaves hands ownership to the next admin. Coming back needs an invite code from someone still in the group.
Tham số (2)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
idempotency_key | string | Khoá chống lặp tuỳ chọn: gọi lại cùng khoá không tạo bản ghi thứ hai. |
Xem hoạt động Chia Chia
Lists recent Chia Chia activity, newest first, as one-line summaries (who added, changed or deleted which entry, who joined or left): across all of the user's groups, or in one group with group_id.
Tham số (3)
| Tên | Kiểu | Mô tả |
|---|
group_id | string | One group only; leave out for all groups. |
limit | integer | Rows per page, default 20, at most 50. |
cursor | string | next_cursor from the previous page; leave out for the first page. |
Xem khoản chi của nhóm
Lists the entries of a Chia Chia group (expenses, incomes, transfers, fund deposits and withdrawals), newest first, with payer and split names. Filter by kind, member (as payer or participant), category, words in the title or a date range. response_format=detailed adds notes, items, weights and payer mode.
Tham số (10)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
kind | string | Giá trị: expenseincometransferdepositwithdraw |
member_id | string | Only entries this member paid or shares in. |
category | string | Giá trị: fooddrinktransportlodgingshoppinggroceriesentertainmentbillsrenthealthgiftfeesother |
query | string | Words in the title. |
date_from | string | YYYY-MM-DD, Vietnam time, inclusive. |
date_to | string | YYYY-MM-DD, Vietnam time, inclusive. |
response_format | string | Default concise. Giá trị: concisedetailed |
limit | integer | Rows per page, default 20, at most 50. |
cursor | string | next_cursor from the previous page; leave out for the first page. |
Xem các nhóm Chia Chia
Lists the Chia Chia (shared expenses) groups the user belongs to, most recently active first, with their own member id and balance in each (positive: the group owes them; negative: they owe), total spent and fund cash. Amounts are integers in the smallest unit of the group currency. Archived groups only with archived=true.
Tham số (3)
| Tên | Kiểu | Mô tả |
|---|
archived | boolean | true lists archived groups instead of active ones. |
limit | integer | Rows per page, default 20, at most 50. |
cursor | string | next_cursor from the previous page; leave out for the first page. |
Bỏ người khỏi nhóm
Removes a member from a Chia Chia group. A member with no entries is deleted; one who appears in entries is only hidden (left=true) and their balance stays. Removing a name someone has claimed needs a group manager; the owner cannot be removed.
Tham số (3)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
member_idbắt buộc | string | |
idempotency_key | string | Khoá chống lặp tuỳ chọn: gọi lại cùng khoá không tạo bản ghi thứ hai. |
Sửa khoản chi
Changes an entry of a Chia Chia group. Send only the fields to change; the rest stay. If only the amount changes, a single payer pays the new total and weighted splits keep their weights; fixed per-person amounts must be sent again. The server recomputes every share and returns the entry and the new balance of the user.
Tham số (17)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
entry_idbắt buộc | string | |
kind | string | expense (default), income, transfer (person to person), deposit (into the fund), withdraw (from the fund). Giá trị: expenseincometransferdepositwithdraw |
title | string | |
amount | integer | Total, an integer in the smallest unit of currency (đồng for VND, cents for USD). |
currency | string | Defaults to the group currency; another currency needs rate. Giá trị: VNDUSDEURJPYKRWTHBSGDCNY |
rate | string | Group currency per 1 unit of currency, e.g. "25380.5". |
occurred_at | string | ISO 8601 date-time or YYYY-MM-DD; defaults to now in Vietnam. |
category | string | Giá trị: fooddrinktransportlodgingshoppinggroceriesentertainmentbillsrenthealthgiftfeesother |
note | string | |
payers | object[] | Who paid. One payer with no amount pays it all. |
payer_mode | string | How several payers share the total; default amounts. Giá trị: equalamountssharespercent |
split_mode | string | How the total is shared; default equal among splits. Giá trị: equalamountssharespercentitems |
splits | object[] | Who takes part (for transfer/deposit: the one receiving). The server computes each share. |
items | object[] | For split_mode items: each line and who shares it. |
extras | object[] | For split_mode items: tax, tip or discount spread over the items. |
idempotency_key | string | Khoá chống lặp tuỳ chọn: gọi lại cùng khoá không tạo bản ghi thứ hai. |
Sửa nhóm Chia Chia
Changes a Chia Chia group: name, type, emoji, currency (only while it has no entries), the shared fund (on, or off once its cash is zero) or archived. Currency and fund need a group manager. Send only the fields to change.
Tham số (8)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
name | string | |
type | string | Giá trị: triphomecoupleeventworkother |
currency | string | Giá trị: VNDUSDEURJPYKRWTHBSGDCNY |
emoji | string | |
fund | boolean | |
archived | boolean | true archives (read-only), false brings it back. |
idempotency_key | string | Khoá chống lặp tuỳ chọn: gọi lại cùng khoá không tạo bản ghi thứ hai. |
Sửa người trong nhóm
Changes a member of a Chia Chia group: rename them, set role admin or member (group owner only), or set settled_by_member_id so another member pays and receives on their behalf (null undoes it). Send only the fields to change.
Tham số (6)
| Tên | Kiểu | Mô tả |
|---|
group_idbắt buộc | string | Chia Chia group id, from list_groups. |
member_idbắt buộc | string | |
name | string | |
role | string | Giá trị: adminmember |
settled_by_member_id | string | null | Member who settles for this one; null to settle alone again. |
idempotency_key | string | Khoá chống lặp tuỳ chọn: gọi lại cùng khoá không tạo bản ghi thứ hai. |