Wesabe logo
Sign In   Help   Join Wesabe  

Wesabe API: API Methods

How To Get A List Of Your Accounts

To get a list of your accounts, perform the following HTTP request:

GET /accounts.xml

This will provide you with an XML document describing your accounts:

<?xml version="1.0" encoding="UTF-8"?>
<accounts>
  <account>
    <!-- the public identifier (index into your sorted account list) -->
    <id>1</id>
    <!-- the globally unique identifier (non-public) -->
    <guid>f3171feb9188508f69795d2d071a452411dcdf832234b03cdbb87538b3451451</guid>
    <!-- last four digits of the account number -->
    <account-number>1234</account-number>
    <name>Checking</name>
    <financial-institution>
      <!-- an internal unique identifier -->
      <id>us-001069</id>
      <name>Washington Mutual</name>
    </financial-institution>
    <!-- can also be Money Market, Credit Card, Savings, Credit Line, Brokerage, or Cash -->
    <account-type>Checking</account-type>
    <currency symbol="$" separator="." delimiter="," decimal_places="2">USD</currency>
    <current-balance type="float">123.45</current-balance>
    <last-uploaded-at type="datetime">2007-10-09T03:29:30Z</last-uploaded-at>
    <txaction-count>185</txaction-count>
    <oldest-txaction type="datetime">2006-04-17T19:00:00Z</oldest-txaction>
    <newest-txaction type="datetime">2007-10-07T12:00:00Z</newest-txaction>
  </account>
</accounts>

Alternative Formats

This resource is also available in CSV format:

GET /accounts.csv

How To Get A List Of Transactions In A Single Account

To get a list of transactions in a single account, perform the following HTTP request:

GET /accounts/<account id or guid>.xml

where account id is the public identifier listed in accounts.xml, and guid is the globally unique identifier.

The response will be a XML document similar to accounts.xml, containing the last 30 transactions in the account:

<?xml version="1.0" encoding="UTF-8"?>
<account>
  <!-- the same data as in accounts.xml -->
  <id>1</id>
  <guid>f3171feb9188508f69795d2d071a452411dcdf832234b03cdbb87538b3451451</guid>
  <account-number>1234</account-number>
  <name>Checking</name>
  <financial-institution>
    <id>us-001069</id>
    <name>Washington Mutual</name>
  </financial-institution>
  <account-type>Checking</account-type>
  <currency symbol="$" separator="." delimiter="," decimal_places="2">USD</currency>
  <current-balance type="float">123.45</current-balance>
  <last-uploaded-at type="datetime">2007-06-21T03:29:30Z</last-uploaded-at>
  <oldest-txaction type="datetime">2007-06-01T08:00:00Z</oldest-txaction>
  <newest-txaction type="datetime">2007-08-05T08:00:00Z</newest-txaction>

  <!-- a list of the last 30 transactions in this account -->
  <txactions>
    <txaction>
      <guid>2c99edbddedf5a5fd1546fab956119cb3726f2851779da4382a44c23f6c30880</guid>
      <date>2007-05-03</date>
      <amount>-89.72</amount>
      <!-- if the transaction has not been associated with a merchant, this element won't exist -->
      <merchant>
        <id>2784</id>
        <name>Berkeley Bowl</name>
        <rating>Fan</rating>
      </merchant>
      <raw-name>MC-BLAH BANK GIBBERISH</raw-name>
      <memo>MC-BLAH BANK GIBBERISH</memo>
      <!-- if there aren't any tags, this element won't exist -->
      <tags>
        <tag>
          <name>groceries</name>
        </tag>
        <tag>
          <name>snacks</name>
          <split-amount type="float">-40.00</split-amount>
        </tag>
      </tags>
    </txaction>
  </txactions>
</account>

Alternative Formats

This resource is also available in OFX, OFX2, QIF, CSV, and XLS formats:

GET /accounts/<account id or guid>.ofx
GET /accounts/<account id or guid>.ofx2
GET /accounts/<account id or guid>.qif
GET /accounts/<account id or guid>.csv
GET /accounts/<account id or guid>.xls

Pagination

To request the next 30 transactions, add a page query string variable:

GET /accounts/<account id or guid>.xml?page=2

Date Ranges

To request the transactions for a particular month, add month and year:

GET /accounts/<account id or guid>.xml?month=5&year=2007

To request the transactions within a data range, add start_date and end_date:

GET /accounts/<account id or guid>.xml?start_date=20070401&end_date=20070801

How To Get A List Of Transactions Across All Accounts

To get a list of transactions across all accounts, perform the following HTTP request:

GET /transactions.xml

The response will only contain txaction nodes, but each transaction will have an account-id node. The date range parameters described above will work as well.

Alternative Formats

This resource is also available in CSV format:

GET /transactions.csv

You can also get all transactions within their respective account nodes with:

GET /accounts_with_transactions.xml

The response will be similar to that of the above request for a single account, but will iterate over all accounts.

How To Get A List Of Transactions With A Particular Tag

To get a list of transactions with a particular tag, perform the following HTTP request:

GET /transactions/tag/<tag name>.xml

The response will be an XML document with the last 30 transactions with that tag:

<?xml version="1.0" encoding="UTF-8"?>
<tag>
  <name>groceries</name>
  <txactions type="array">
    <txaction>
      <guid>2c99edbddedf5a5fd1546fab956119cb3726f2851779da4382a44c23f6c30880</guid>
      <date>2007-05-03</date>
      <amount>-89.72</amount>
      <merchant>
        <id>2784</id>
        <name>Berkeley Bowl</name>
        <rating>Fan</rating>
      </merchant>
      <raw-name>MC-BLAH BANK GIBBERISH</raw-name>
      <memo>MC-BLAH BANK GIBBERISH</memo>
      <tags type="array">
        <tag>
          <name>groceries</name>
        </tag>
        <tag>
          <name>snacks</name>
          <split-amount type="float">-40.00</split-amount>
        </tag>
      </tags>
    </txaction>
  </txactions>
</tag>

Alternative Formats

This resource is also available in CSV and XLS formats:

GET /transactions/tag/<tag name>.csv
GET /transactions/tag/<tag name>.xls

Pagination

To request the next 30 transactions, add a page query string variable:

GET /transactions/tag/<tag name>.xml?page=2

Date Ranges

To request the transactions for a particular month, add month and year:

GET /transactions/tag/<tag name>.xml&month=5?year=2007

How To Get A List Of Transactions At A Particular Merchant

To get a list of transactions for a particular merchant, perform the following HTTP request:

GET /transactions/merchant/<merchant id>.xml

The response will be an XML document with the last 30 transactions with that tag:

<?xml version="1.0" encoding="UTF-8"?>
<merchant>
  <name>Berkeley Bowl</name>
  <wesabe-score>84</wesabe-score>
  <txactions type="array">
    <txaction>
      <guid>2c99edbddedf5a5fd1546fab956119cb3726f2851779da4382a44c23f6c30880</guid>
      <date>2007-05-03</date>
      <amount>-89.72</amount>
      <merchant>
        <name>Berkeley Bowl</name>
        <rating>Fan</rating>
      </merchant>
      <raw-name>MC-BLAH BANK GIBBERISH</raw-name>
      <memo>MC-BLAH BANK GIBBERISH</memo>
      <tags type="array">
        <tag>
          <name>groceries</name>
        </tag>
        <tag>
          <name>snacks</name>
          <split-amount type="float">-40.00</split-amount>
        </tag>
      </tags>
    </txaction>
  </txactions>
</merchant>

Alternative Formats

This resource is also available in CSV and XLS formats:

GET /transactions/merchant/<merchant id>.csv
GET /transactions/merchant/<merchant id>.xls

Pagination

To request the next 30 transactions, add a page query string variable:

GET /transactions/merchant/<merchant id>.xml?page=2

Date Ranges

To request the transactions for a particular month, add month and year:

GET /transactions/merchant/<merchant id>.xml?month=5&year=2007

Searching For Transactions

To search for transactions, perform the following HTTP request:

GET /transactions/search?q=<search term>&format=xml

The response will be an XML document with the top 25 transactions matching the query:

<?xml version="1.0" encoding="UTF-8"?>
<search>
  <query>berkeley</query>
  <txactions type="array">
    <txaction>
      <guid>2c99edbddedf5a5fd1546fab956119cb3726f2851779da4382a44c23f6c30880</guid>
      <date>2007-05-03</date>
      <amount>-89.72</amount>
      <merchant>
        <id>2784</id>
        <name>Berkeley Bowl</name>
        <rating>Fan</rating>
      </merchant>
      <raw-name>MC-BLAH BANK GIBBERISH</raw-name>
      <memo>MC-BLAH BANK GIBBERISH</memo>
      <tags type="array">
        <tag>
          <name>groceries</name>
        </tag>
        <tag>
          <name>snacks</name>
          <split-amount type="float">-40.00</split-amount>
        </tag>
      </tags>
    </txaction>
  </txactions>
</search>

Alternative Formats

This resource is also available in CSV and XLS formats:

GET /transactions/search?q=<search term>&format=csv
GET /transactions/search?q=<search term>&format=xls

How To Get A List Of All Tags Used In Your Transactions

To get a list of all the tags used in your transactions:

GET /transactions/tags.xml

The response will be an XML document with the list of all of your transaction tags:

<?xml version="1.0" encoding="UTF-8"?>
<tags type="array">
  <tag>
    <name>groceries</name>
    <normalized-name>grocery</normalized-name>
    <count>57</count>
  </tag>
  <tag>
    <name>never buy this again</name>
    <normalized-name>neverbuythisagain</normalized-name>
    <count>1</count>
  </tag>
  <tag>
    <name>rent</name>
    <normalized-name>rent</normalized-name>
    <count>8</count>
  </tag>
</tags>

count is the number of transactions that have that tag.

How To Get A List Of All Of Your Targets

To get a list of all of your targets:

GET /targets.xml

The response will be an XML document with the list of all of your targets:

<?xml version="1.0" encoding="UTF-8"?>
<targets type="array">
  <target>
    <tag>
      <name>groceries</name>
    </tag>
    <monthly-limit type="float">400.00</monthly-limit>
    <amount-remaining type="float">200.00</amount-remaining>
  </target>
  <target>
    <tag>
      <name>entertainment</name>
    </tag>
    <monthly-limit type="float">100.00</monthly-limit>
    <amount-remaining type="float">52.50</amount-remaining>
  <target>
  </target>
    <tag>
      <name>clothing</name>
    </tag>
    <monthly-limit type="float">200.00</monthly-limit>
    <amount-remaining type="float">100.03</amount-remaining>
  </target>
</targets>

How To Get A Specific Target By Tag Name

To get a specific target by tag name:

GET /targets/tag/groceries.xml

The response will be an XML document with the target:

<?xml version="1.0" encoding="UTF-8"?>
<targets type="array">
  <target>
    <tag>
      <name>groceries</name>
    </tag>
    <monthly-limit type="float">400.00</monthly-limit>
    <amount-remaining type="float">200.00</amount-remaining>
  </target>
</targets>

How To Get Your Profile Information

To get your profile information:

GET /profile.xml

The response will be an XML document with the the following data:

<?xml version="1.0" encoding="UTF-8"?>
<profile>
  <username>jschmoe</username>
  <name>Joe Schmoe</name>
  <postal-code>12345</postal-code>
  <country id="1">United States of America</country>
  <email>joe-schmoe@example.com</email>
  <default-currency symbol="$" separator="." delimiter="," decimal_places="2">USD</default-currency>
  <joined>2008-06-13T19:21:19Z</joined>
</profile>