- A refund linked to the purchase it gives back names that purchase:
refund_of_idonGET /v1/transactions,GETandPATCH /v1/transactions/{id},POST /v1/transactionsand thetransaction.createdandtransaction.updatedwebhooks. The field is absent when there’s no link. - A webhook whose signing secret was found in public code gets a new secret by itself, and
secret_leaksays when (at) and where (url, when the report named one) it was found. The secret shown since is the new one: give it to the receiver. The field is onGET /v1/webhooks,POST /v1/webhooks(inendpoint),GETandPATCH /v1/webhooks/{id}and the pause and resume responses. - SDK 1.0.0-beta.17 for JavaScript and 1.0.0b17 for Python: these fields. See SDKs.
- An account that is the archived copy of your part of a shared account, after access to it ended, has
keeps_share_historyonGET /v1/accounts,GET /v1/accounts/{id}and the accounts inGET /v1/accounts/net-worth. Such an account stays archived; it can only be deleted for good. - A transaction booked at the card’s rate has
fx_correction_bps: the correction to our rate in basis points (460 is +4.6%). The field is onGET /v1/transactions,GETandPATCH /v1/transactions/{id},POST /v1/transactionsand thetransaction.createdandtransaction.updatedwebhooks. DELETE /v1/transactions/{id}takes an optionalas_duplicate_of: the ID of the transaction kept when this one is deleted as its duplicate.- SDK 1.0.0-beta.15 and 1.0.0-beta.16 for JavaScript, 1.0.0b15 and 1.0.0b16 for Python: these fields and the parameter. See SDKs.
- Webhooks can be managed with an API key that holds
webhooks:manage(“Full access” gives it):/v1/webhookscreates, changes, pauses and deletes the request space’s webhooks, rotates their secrets, sends test events and shows deliveries. A key sees only that space’s webhooks whose events’ data it reads; the secret comes in the answers to creating a webhook and changing its secret. A new code,WHK_009.space_idsinPOST /v1/webhooksis now optional. See Managing webhooks through the API. GET /v1/transactions/day-totals: every day and the response carrycount, how many rows the list shows for the same filters (transfers and cancelled rows included). A day with rows but no money (transfers alone) now appears withspentandearnedat 0. Every list filter it already took is now documented on it: places, project, counterparty, recurring rule, import, tax review,include_portfolio_transfersandone_row_per_transfer.- SDKs 1.0.0-beta.3 for JavaScript and 1.0.0b3 for Python:
degroshi.webhooksmanages webhooks (list, create, change, pause, rotate the secret, send a test event, deliveries and resending them) besideverify. See SDKs. - The developer sandbox: a sandbox key starts with
dg_test_and reaches only your «Пісочниця», a space of invented demo data.POST /v1/sandbox/resetputs it back to that data (sandbox keys only, else 403SBX_004; 20 a day, 429SBX_003), and change-feed cursors then get 410.GET /v1/me/spaceshasis_sandbox. New codesSBX_001toSBX_009. - SDKs 1.0.0-beta.4 for JavaScript and 1.0.0b4 for Python:
sandbox.reset()for a sandbox key,is_sandboxon spaces, and an account’sinstalment_plan_idand a recurring rule’sday_changes(instalments are still off, so for now they’renulland empty). See SDKs. - Webhook event
sandbox.reset: the sandbox went back to its starting data (originapiorapp, the newseeded_atandseed_version). Only the sandbox sends it; a key needstransactions:read. The reference console now sends requests and takes only a sandbox key: any other key gets 403AUTH_081. See Sandbox. fx_basison transactions (reference,cardorbank): howamountwas found fromoriginal_amount. Sendbankwhenamountis what the account was charged: the account learns its own rate from it, and amounts the server converts itself (an edit of the original, the assistant’s drafts) take our rate with that correction.GET /v1/transactionsandGET /v1/transactions/day-totalstakemerchant_key: one merchant’s rows, by the key analytics gives a merchant (p:<brand id>, orn:<text>for a merchant without a brand).GET /v1/transactionspages by cursor: passmeta.next_cursor(absent on the last page) asafter, and the next page starts right after the last row, with the same filters andsort(anothersortis a 400). Rows added or removed meanwhile don’t repeat or go missing;pageworks as before. The amount sorts compare at the latest rates, so a rate change between pages can move a row: drop repeats byid, or page by date.count=falsetogether withafterskips counting every row:meta.totalandtotal_pagesare then 0, whilehas_nextandnext_cursorwork as always.GET /v1/accounts/net-worthhaschange_24h: the net worth now against 24 hours earlier (since), withprevious_net_worth,amountandpercent(absent when the earlier net worth was 0). The earlier net worth counts every balance as of then, wallets, exchanges and brokerage accounts at that day’s value and that day’s rates. The field is absent when a rate of that day is missing.- A transaction’s place, when written, can be
{"ref": "online"}: the space’s one place for purchases online. GET /v1/analytics/merchantstakesgroup_by=categorywithlimit_per_category(1 to 20, 3 by default): each category’s largest merchants, and the newotherswith what the category has left.exclude_recurring=trueleaves out the transactions a recurring payment created or matched.- Accounts have
archived_at, when an archived account was closed: onGET /v1/accounts,GET /v1/accounts/{id}andby_account.itemsinGET /v1/accounts/net-worth. - A recurring payment can be a transfer:
kindtransferwithto_account_id, andto_amountwhen the receiving account is in another currency (without it, the amount converts at the payment day’s rate). The items ofGET /v1/recurring-transactions/occurrenceshavekind,to_account_idandto_account_name. Transfers count in neither income nor spending. - A transaction on an account of pooled money can say whose spending it is:
spent_byandspent_by_namein the responses and thetransaction.createdandtransaction.updatedwebhooks.PATCH /v1/transactions/{id}takesspent_by(ornullto make it shared again), andGET /v1/transactionsandGET /v1/transactions/day-totalsfilter byspent_by. - Items in
POST /v1/sources/{id}/transactions/batchcan carrytransfer: {account}: the item is one leg of a transfer, andaccountis another account of the source (itsexternal_id) or any account of the space (itsid). It links to the other leg on that account (the same amount the other way within 3 days; in another currency, the only one the other way), or waits up to 3 days for it. Degroshi never creates the other leg. - An account shared with the “View and add transactions” role has
grant.edit_scope(ownorall): which transactions may be changed. Every transaction haseditable: whether the caller may change it (in the responses and thetransaction.createdandtransaction.updatedwebhooks). - SDK 1.0.0-beta.5 to 1.0.0-beta.14 for JavaScript and 1.0.0b5 to 1.0.0b14 for Python: all of these fields and
parameters, and
transactions.iterate()pages by cursor once the API gives one. See SDKs.
GET /v1/analytics/net-worthtakesshare: withaccount_ids(an account’s own chart),wholeshows the account whole, the whole balance and every operation, an account shared with you included. Withoutaccount_ids, net worth counts your part, as before.shareon the analytics endpoints andGET /v1/transactions/day-totalsis documented:mine(your part of an account shared with you, the default) orwhole(the whole account). It used to read “Reserved”.- Writing transactions:
POST /v1/transactions,PATCHandDELETE /v1/transactions/{id}with thetransactions:writepermission (“Full access”). See Recording transactions. - Custom sources:
/v1/sourcescreates a source, and a key withsources:writesends its accounts, transactions and balances. See Custom sources. - An
Idempotency-Keyheader on the requests that create transactions, sources and balances: a retry with the same key within 24 hours gets the first answer. GET /v1/me/spacesreturns a key’s spaces with their ID, kind and your role, and works with any key.- A key can be limited to IP addresses and ranges; a request from another address gets a 403 with the code
AUTH_080. - Webhooks: nine events, each signed in
Degroshi-Signature. See Webhooks. GET /v1/eventsandGET /v1/events/{id}return the last 30 days of events in the same shape as the webhook; the transaction and account lists takeupdated_since.GET /v1/transactionstakes thetypes,statuses,category_idsandtreatment_classesfilters, andGET /v1/transactions/day-totalstakestypes,statusesandcategory_ids, to pick several values at once.- The official SDKs for JavaScript and Python, 1.0.0-beta.0 and then 1.0.0-beta.1. See SDKs.
- The API reference describes only what keys can use.
- The change feed,
GET /v1/changes: everything that changed since a cursor, deletions included, in the order the changes were saved. See Keeping a copy. GET /v1/eventsrecords events from the first API key, even before there is a webhook.- Webhooks send amounts and balances as exact decimal strings, like the rest of the API (
"642.3"), and changes made with an API key carrysourceapi. - The API reference reads in English throughout: examples don’t quote the app’s labels, and fields go by their JSON
names. Every operation documents its 429 answer (
BIZ_080) with theRetry-AfterandX-RateLimit-*headers, the operations that convert money document theX-Display-Currencyheader, andx-error-codeslists only the codes the API answers with, each with its HTTP statuses. - Transactions carry
linked_activity: the crypto wallet or exchange activity a row was recorded from (network, hash, explorer link, amount and fee legs, status), on reads and in thetransaction.createdandtransaction.updatedwebhooks. - Recurring payments can wait for confirmation: a rule’s
modegainsconfirm, an occurrence’sstatusgainsawaiting_confirmation, andPOST /v1/transactionstakesrecurring_occurrenceto record a waiting payment. - Transactions have a place:
place,place_idandplace_sourceon reads and writes, and the transaction list takes thecity,country,onlineandplace_idfilters. Places aren’t switched on yet, so these stay empty for now. - SDKs 1.0.0-beta.2 for JavaScript and 1.0.0b2 for Python: the change feed through
changes.iterate(), every method with its response type, the Python models indegroshi.models, and a retried delete that no longer finds the row counts as done. See SDKs. - A 401 says what’s wrong with the key:
AUTH_041(not a whole key),AUTH_042(no such key),AUTH_043(expired,details.expired_at) andAUTH_044(revoked,details.revoked_at). They all used to beAUTH_048, which now covers only the remaining cases. See Errors. - The key can also be sent as
Authorization: Bearer dg_pat_…. - New webhook secrets start with
dg_whsec_; those starting withwhsec_work as before. - Shared accounts in
GET /v1/accounts:granton an account shared with you haspeople, everyone with access (the owner first, then the rest, with a name,avatar_urland role, never an e-mail), andshared_withon your own account has the person’suser_idandavatar_urlonce they accept.
- API keys work only in the spaces you tick and expire after 30, 90 or 365 days. A key made earlier is marked “Legacy key”: it works in all your spaces. See API keys.