https://www.buxfer.com/api/[command]?token=login_token[¶ms]
login
get a unique 'token' which must included on all future requeststransaction_add
add a transactiontransaction_edit
edit a transactiontransaction_delete
delete a transactionupload_statement
upload a bank or credit card statementtransactions
list of transactionsaccounts
list of accounts with balancesloans
list of your loanstags
list of your transaction tagsbudgets
list of your budgetsreminders
list of your remindersgroups
list of your groupscontacts
list of your contacts
All commands, except the login
command, must specify a token
parameter returned by the login
command in the event of a successful login.
The response element contains a status
element which reports the status of the
API call. If the call succeeded, it's content is OK
, otherwise it is ERROR: [error_description]
.
login
This command only looks at POST parameters and discards GET parameters.
Before accessing any of the API commands, you must obtain a unique, ephemeral token by logging in to the API service.
On successful login, the command returns a token which must be included in all future API requests.
See sample outputLogin using email address and passwordPOST /api/login email=john@doe.com&password=dohdoh
transaction_add
This command only looks at POST parameters and discards GET parameters.
The following parameters are accepted:
description
amount
accountId
fromAccountId
toAccountId
date: YYYY-MM-DD
tags
: comma-separated tag namestype: expense | income | refund | payment | transfer | investment_buy | investment_sell | investment_dividend | capital_gain | capital_loss | sharedBill | paidForFriend | settlement | loan
status: cleared | pending
type = sharedBill
payers: [{"email", "amount"}]
JSON-formatted arraysharers: [{"email", "amount"}]
JSON-formatted arrayisEvenSplit: true | false
type = loan
loanedBy:
uid | emailborrowedBy:
uid | emailtype = paidForFriend
paidBy:
uid | emailpaidFor:
uid | emailSee sample outputGot a pending paycheck for $4000 into bank accountPOST /api/transaction_add description=Paycheck&type=income&amount=4000&status=pending
Loaned $8 to a friend for lunchPOST /api/transaction_add description=Loan&amount=8&type=loan&loanedBy=myself@email.com&borrowedBy=myfrield@email.com
Shared grocery bill with roommatesPOST /api/transaction_add description=Grocery&amount=126&type=sharedBill&sharers=[{"email":"myself@email.com"},{"email":"roommate.1@email.com"},{"email":"roommate.2@email.com"}]&payers=[{"email":"myself@email.com","amount":100},{"email":"roommate.1@email.com","amount":26}]
transaction_edit
This command only looks at POST parameters and discards GET parameters.
The following parameters are accepted:
id
description
amount
accountId
fromAccountId
toAccountId
date: YYYY-MM-DD
tags
: comma-separated tag namestype: income | expense | transfer | refund | sharedBill | paidForFriend | loan
status: cleared | pending
type = sharedBill
payers: [{"email", "amount"}]
JSON-formatted arraysharers: [{"email", "amount"}]
JSON-formatted arrayisEvenSplit: true | false
type = loan
loanedBy:
uid | emailborrowedBy:
uid | emailtype = paidForFriend
paidBy:
uid | emailpaidFor:
uid | emailSee sample outputGot a pending paycheck for $4000 into bank accountPOST /api/transaction_edit id=18282&description=Paycheck&type=income&amount=4000&status=pending
Loaned $8 to a friend for lunchPOST /api/transaction_edit id=3281&description=Loan&amount=8&type=loan&loanedBy=myself@email.com&borrowedBy=myfrield@email.com
Shared grocery bill with roommatesPOST /api/transaction_edit id=28329&description=Grocery&amount=126&type=sharedBill&sharers=[{"email":"myself@email.com"},{"email":"roommate.1@email.com"},{"email":"roommate.2@email.com"}]&payers=[{"email":"myself@email.com","amount":100},{"email":"roommate.1@email.com","amount":26}]
transaction_delete
This command only looks at POST parameters and discards GET parameters.
The following parameters are accepted:
id
See sample outputDelete a transaction by idPOST /api/transaction_delete id=18282
upload_statement
This command only looks at POST parameters and discards GET parameters.
Parameters:
accountId
statement
: the text of the statement to be uploadeddateFormat
: (optional) date format used in the statement (one of
"MM/DD/YYYY" or "DD/MM/YYYY")
transactions
You can restrict the set of transactions returned by specifying parameters
. The permitted parameters are:
accountId OR accountName
tagId OR tagName
startDate AND endDate OR month
: date can be specified as "10 feb 2008", or "2008-02-10". month can be specified as "feb08", "feb 08", or "feb 2008".
budgetId OR budgetName
contactId OR contactName
groupId OR groupName
status
: pending | reconciled | cleared
page
: paginate between results
Each call to this method returns at most 100 transactions matching the specified criteria. If there are more that 100 results, you can specify increasing values of the page parameter to page through the results.
See sample outputYour most recent 100 transactionsGET /api/transactions
Previous 100 transactionsGET /api/transactions?page=2
Transactions for account 'Amex'GET /api/transactions?accountName=Amex
Transactions for account id f32ade4GET /api/transactions?accountId=f32ade4
Transactions for tag 'Grocery' for January 2008GET /api/transactions?transactions?tagName=Grocery&month=jan08
accounts
See sample outputList of all your accountsGET /api/accounts
loans
See sample outputList of all your loans with friendsGET /api/loans
tags
See sample outputList of all your tagsGET /api/tags
budgets
See sample outputList of all your budgetsGET /api/budgets
reminders
See sample outputList of all your remindersGET /api/reminders
groups
See sample outputList of all your groupsGET /api/groups
contacts
See sample outputList of all your contactsGET /api/contacts
You can get started with some sample code in some of the popular languages listed below. Each sample program logs in and retrieves the login token, downloads the list of your budgets, and prints the name, spending limit and available balance for the budget for the current period.