Introduction
Hey there! We're glad you're interested in the Splitwise API. This documentation will help you to fetch information on users, expenses, groups, and much more.
If something in the API is confusing you, you can open an issue about it on GitHub. We're a small team, so we may not have an instant fix, but we'll get back to you as soon as we're able. (If you spot an issue in our API documentation itself, feel free to open a pull request to update this website!)
Third-party SDKs
The development community has built a number of unofficial, third-party SDKs for Splitwise in a variety of different languages.
- Javascript
- Ruby
- Python
If you've built a third-party SDK for Splitwise and you'd like to see it included in this list, then please open a pull request to update this section and add a new link. Thank you for your work!
Authentication
###################
# OAuth 2 example #
###################
#!/usr/bin/env ruby
require 'oauth2' # gem 'oauth2'
require 'pp'
CONSUMER_KEY = <fill in your key>
CONSUMER_SECRET = <fill in your secret>
TOKEN_URL = 'https://secure.splitwise.com/oauth/token'
AUTHORIZE_URL = 'https://secure.splitwise.com/oauth/authorize'
MY_CALLBACK_URL = 'http://localhost:8080/callback' # Make sure to set the redirect URL that you registered with Splitwise when creating your app so that it matches this URL
BASE_SITE = 'https://secure.splitwise.com/'
client = OAuth2::Client.new(CONSUMER_KEY, CONSUMER_SECRET, site: BASE_SITE)
authorize_url = client.auth_code.authorize_url(redirect_uri: MY_CALLBACK_URL)
# => "https://www.splitwise.com/oauth/authorize?response_type=code&client_id=#{CONSUMER_KEY}&redirect_uri=#{MY_CALLBACK_URL}
require 'webrick'
require 'cgi'
server = WEBrick::HTTPServer.new(
Port: 8080,
StartCallback: proc { puts "Opening 'localhost:8080'"; `open 'http://localhost:8080/'` })
server.mount_proc "/" do |req, res|
res.body = "<a href=\"#{authorize_url}\"> Get Code </a>"
end
server.mount_proc "/callback" do |req, res|
authorization_code = CGI.parse(req.query_string)['code']
access_token = client.auth_code.get_token(
authorization_code,
redirect_uri: MY_CALLBACK_URL
)
# This is your actual bearer token! Your bearer token will be printed out to the console.
# You can then use that bearer token to make additional API requests to Splitwise. For example:
# curl -XGET "http://secure.splitwise.com/api/v3.0/get_current_user" -H "Authorization: Bearer YOUR_TOKEN"
puts "***"
puts "Here is your OAuth Bearer token!"
pp access_token.to_hash
puts "***"
response = access_token.get('/api/v3.0/get_current_user')
res.body = response.body
end
# Triggered by ^C on os x; run `$ stty -a |grep intr` to find appropriate key combination
trap('INT') { server.stop }
server.start
###################
# OAuth 1 example #
###################
#!/usr/bin/env ruby
require 'oauth' # gem oauth
CONSUMER_KEY = <fill in your key>
CONSUMER_SECRET = <fill in your secret>
REQUEST_TOKEN_URL ='https://secure.splitwise.com/oauth/request_token'
ACCESS_TOKEN_URL = 'https://secure.splitwise.com/oauth/access_token'
AUTHORIZE_URL = 'https://secure.splitwise.com/oauth/authorize'
MY_CALLBACK_URL = 'http://localhost:8080/callback'
consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, site: 'https://www.splitwise.com')
request_token = consumer.get_request_token(oauth_callback: MY_CALLBACK_URL)
# => "https://www.splitwise.com/oauth/authorize?oauth_token="#{request_token}"
require 'webrick'
require 'cgi'
server = WEBrick::HTTPServer.new(
Port: 8080,
StartCallback: proc { puts "Opening 'localhost:8080'"; `open 'http://localhost:8080/'` })
server.mount_proc "/" do |req, res|
res.body = "<a href=\"#{request_token.authorize_url}\"> Get Code </a>"
end
server.mount_proc "/callback" do |req, res|
oauth_verifier = CGI.parse(req.query_string)['oauth_verifier'].first
access_token = request_token.get_access_token(oauth_verifier: oauth_verifier)
access_token.params.each do |k, v|
puts " #{k}: #{v}" unless k.is_a?(Symbol)
end
response = access_token.request(:get, '/api/v3.0/get_current_user')
res.body = response.body
end
# Triggered by ^C on os x; run `$ stty -a |grep intr` to find appropriate key combination
trap('INT') { server.stop }
server.start
###################
# OAuth 2 example #
###################
#!/usr/bin/env node
'use strict';
const OAuth = require('oauth');
const {exec} = require('child_process');
const qs = require('querystring');
const http = require('http');
const CONSUMER_KEY = <fill in your key>;
const CONSUMER_SECRET = <fill in your secret>;
const TOKEN_URL = '/oauth/token';
const AUTHORIZE_URL = '/oauth/authorize';
const MY_CALLBACK_URL = 'http://localhost:8080/callback';
const BASE_SITE = 'https://www.splitwise.com';
var authURL;
const client = new OAuth.OAuth2(
CONSUMER_KEY,
CONSUMER_SECRET,
BASE_SITE,
AUTHORIZE_URL,
TOKEN_URL,
null);
const server = http.createServer(function(req, res) {
console.log(req.url);
var p = req.url.split('/');
console.log(p);
var pLen = p.length;
authURL = client.getAuthorizeUrl({
redirect_uri: MY_CALLBACK_URL,
response_type: 'code'
});
/**
* Creating an anchor with authURL as href and sending as response
*/
var body = '<a href="' + authURL + '"> Get Code </a>';
if (pLen === 2 && p[1] === '') {
res.writeHead(200, {
'Content-Length': body.length,
'Content-Type': 'text/html'
});
res.end(body);
} else if (pLen === 2 && p[1].indexOf('callback') === 0) {
/** To obtain and parse code='...' from code?code='...' */
var qsObj = qs.parse(p[1].split('?')[1]);
console.log(qsObj.code);
/** Obtaining access_token */
client.getOAuthAccessToken(
qsObj.code,
{
'redirect_uri': MY_CALLBACK_URL,
'grant_type': 'authorization_code'
},
function(e, access_token, refresh_token, results) {
if (e) {
console.log(e);
res.end(JSON.stringify(e));
} else if (results.error) {
console.log(results);
res.end(JSON.stringify(results));
}
else {
console.log('Obtained access_token: ', access_token);
client.get('https://secure.splitwise.com/api/v3.0/get_current_user', access_token, function(e, data, response) {
if (e) console.error(e);
res.end(data);
});
}
});
} else {
// Unhandled url
}
});
server.listen({port: 8080}, serverReady);
function serverReady() {
console.log(`Server on port ${server.address().port} is now up`);
exec(`open http://localhost:8080/`, (err, stdout, stderr) => {
if (err) {
// node couldn't execute the command
return;
}
// the *entire* stdout and stderr (buffered)
console.log(`stdout: ${stdout}`);
console.log(`stderr: ${stderr}`);
});
}
module.exports = client;
Splitwise uses OAuth for authentication. To connect via OAuth, you'll need to register your app on Splitwise. When you register, you'll be given a consumer key and a consumer secret, which can be used by your application to make requests to the Splitwise server.
For more information on using OAuth, check out the following resources:
- The OAuth community getting started guide
- The term.ie OAuth test server (great for debugging authorization issues)
- This old Splitwise blog post about OAuth
An important note about nested parameters
Due to a quirk in Splitwise's servers, nested parameters (e.g. users[1][first_name]
) cannot currently be used when submitting a request. Instead, to indicate nested parameters, use double underscores (e.g. users__1__first_name
). We hope to support proper nested parameters in future API versions.
Users
get_current_user
Example Response:
{
"user": {
"id": 1,
"first_name": "Ada",
"last_name": "Lovelace",
"picture": {
"small": "image_url",
"medium": "image_url",
"large": "image_url"
},
"email": "ada@example.com",
"registration_status": "confirmed", //'dummy', 'invited', or 'confirmed'
"default_currency": "USD",
"locale": "en",
"notifications_read": "2017-06-02T20:21:57Z", // the last time notifications were marked as read
"notifications_count": 12, // the number of unread notifications
"notifications": { // notification preferences
"added_as_friend": true,
// ...
}
}
}
GET https://www.splitwise.com/api/v3.0/get_current_user
Retrieve info about the user who is currently logged in.
get_user/:id
Example Response:
{
"user": {
"id": 1,
"first_name": "Ada",
"last_name": "Lovelace",
"picture": {
"small": "image_url",
"medium": "image_url",
"large": "image_url"
},
"email": "ada@example.com",
"registration_status": "confirmed" //'dummy', 'invited', or 'confirmed'
}
}
}
GET https://www.splitwise.com/api/v3.0/get_user/:id
Retrieve info about another user that the current user is acquainted with (e.g. they are friends, or they both belong to the same group).
update_user/:id
POST https://www.splitwise.com/api/v3.0/update_user/:id
Update a specific user. A user can edit anything about their own account, and may edit the first_name
, last_name
, and email
for any acquaintances who have not logged in yet.
Query Parameters
Parameter | Type | Description |
---|---|---|
first_name | String | User's first name |
last_name | String | User's last name |
String | User's email address | |
password | String | User's password |
locale | String | User's locale (ISO 639-1) |
date_format | String | Preferred Date Format (e.g. MM/DD/YYYY or |
default_currency | String | User's default currency (ISO 4217) |
default_group_id | String | Default Group ID (set -1 for none) |
notification_settings | Object { notification_type: bool, ... } |
Set notification types on or off: added_as_friend, added_to_group, expense_added, expense_updated, bills, payments, monthly_summary, announcements,} |
Groups
A Group represents a collection of users who share expenses together. For example, some users use a Group to aggregate expenses related to an apartment. Others use it to represent a trip. Expenses assigned to a group are split among the users of that group. Importantly, two users in a Group can also have expenses with one another outside of the Group.
get_groups
Example Response:
{
"groups":[
// Non-group expenses are listed in a group with id 0
{
"id":0,
"name":"Non-group expenses",
"updated_at": "2017-08-30T20:31:51Z", //<current time in UTC>
"members":[
{
"id": 1,
"first_name": "Ada",
"last_name": "Lovelace",
"picture": {
"small": "image_url",
"medium": "image_url",
"large": "image_url"
},
"email": "ada@example.com",
"registration_status": "confirmed", //'dummy', 'invited', or 'confirmed'
"balance":[
{
"currency_code":"AED",
"amount":"0.0"
},
{
"currency_code":"ALL",
"amount":"0.0"
},
{
"currency_code":"EUR",
"amount":"-5.0"
},
{
"currency_code":"USD",
"amount":"3730.5"
} //, ...
]
} // , ...
],
"simplify_by_default":false,
"original_debts":[
{
"from": 12345, // user_id
"to": 54321, // user_id
"amount":"414.5", // amount as a decimal string
"currency_code":"USD" // three-letter currency code
} // , ...
]
},
{
"id":3018312,
"name":"a test group",
"updated_at":"2017-08-30T20:31:51Z",
"members":[ /* <User object> , <User object>, ... */ ],
"simplify_by_default":false,
"original_debts":[
{
"from": 12345, // user_id
"to": 54321, // user_id
"amount":"414.5", // amount as a decimal string
"currency_code":"USD" // three-letter currency code
} // , ...
],
"simplified_debts":[
{
"from": 12345, // user_id
"to": 54321, // user_id
"amount":"414.5", // amount as a decimal string
"currency_code":"USD" // three-letter currency code
} // , ...
],
"whiteboard":"a message!",
"group_type":"apartment",
"invite_link":"https://www.splitwise.com/join/abcdef1232456"
} // , ...
}
GET https://www.splitwise.com/api/v3.0/get_groups
Returns list of all groups that the current_user belongs to
get_group/:id
Example Response:
{
"group":
{
"id":3018312,
"name":"a test group",
"updated_at":"2017-08-30T20:31:51Z",
"members":[ /* <User object> , <User object>, ... */ ],
"simplify_by_default":false,
"original_debts":[
{
"from": 12345, // user_id
"to": 54321, // user_id
"amount":"414.5", // amount as a decimal string
"currency_code":"USD" // three-letter currency code
} // , ...
],
"simplified_debts":[
{
"from": 12345, // user_id
"to": 54321, // user_id
"amount":"414.5", // amount as a decimal string
"currency_code":"USD" // three-letter currency code
} // , ...
],
"whiteboard":"a message!",
"group_type":"apartment",
"invite_link":"https://www.splitwise.com/join/abcdef1232456"
}
}
GET https://www.splitwise.com/api/v3.0/get_group/:id
Returns information about the specified group (as long as the current user has access)
create_group
Example Response:
{
"group":
{
"id":3018312,
"name":"a test group",
"updated_at":"2017-08-30T20:31:51Z",
"members":[ /* <User object> , <User object>, ... */ ],
"simplify_by_default":false,
"original_debts":[],
"simplified_debts":[],
"whiteboard":"a message!",
"group_type":"apartment",
"invite_link":"https://www.splitwise.com/join/abcdef1232456",
// or if create failed
"errors": ["something went wrong", "with your group"]
}
}
POST https://secure.splitwise.com/api/v3.0/create_group
Create a new group. Adds the current user to the group by default.
Query Parameters
Parameter | Type | Description |
---|---|---|
name | String | Group name |
whiteboard | String | Text to display on the group whiteboard |
group_type | String | What the group is being used for (apartment, trip, couple, etc.) |
simplify_by_default | Boolean | Turn on simplify debts? |
users_0_first_name | String | Add a user's first name |
users_0_last_name | String | Add a user's last name |
users_0_email | String | Add a user's email |
users_1_user_id | Integer | Add an existing user by id |
delete_group/:id
Example Response:
{
"success": true // or false
}
POST https://secure.splitwise.com/api/v3.0/delete_group/:id
Delete an existing group. Destroys all associated records (expenses, etc.)
undelete_group/:id
Example Response:
``
Desc:
add_user_to_group
Example Response:
{
"success": true, //or false
"errors": ["any errors"]
}
POST https://secure.splitwise.com/api/v3.0/add_user_to_group
Add a user to a group
Query Parameters
Parameter | Type | Description |
---|---|---|
group_id | Integer | Existing group to add the user to |
first_name | String | Add a user's first name |
last_name | String | Add a user's last name |
String | Add a user's email | |
user_id | Integer | Add an existing user by id |
remove_user_from_group
Example Response:
{
"success": true, //or false
"errors": ["any errors"]
}
POST https://secure.splitwise.com/api/v3.0/remove_user_from_group
Remove a user from a group if their balance is 0
Query Parameters
Parameter | Type | Description |
---|---|---|
group_id | Integer | Group to remove the user from |
user_id | Integer | Id of user to remove |
Friends
Friends of a user are other users with whom the user splits expenses. To split expenses with one another, users must be friends. Users in a group together are automatically made friends. Many of the calls containing the word “friend” return objects representing friends of the current user. In addition to containing the user data, these objects contain information about the current user's balance with each friend.
get_friends
Example Response:
{
"friends":[
{
"id": 1,
"first_name": "Ada",
"last_name": "Lovelace",
"picture": {
"small": "image_url",
"medium": "image_url",
"large": "image_url"
},
"balance":[
{
"currency_code":"USD",
"amount":"-1794.5"
},
{
"currency_code":"AED",
"amount":"7.5"
}
],
"groups":[ // group objects only include group balances with that friend
{
"group_id":3018312,
"balance":[
{
"currency_code":"USD",
"amount":"414.5"
}
]
},
{
"group_id":2830896,
"balance":[
]
},
{
"group_id":0,
"balance":[
{
"currency_code":"USD",
"amount":"-2209.0"
},
{
"currency_code":"AED",
"amount":"7.5"
}
]
}
],
"updated_at":"2017-11-30T09:41:09Z"
} // , ...
]
}
GET https://www.splitwise.com/api/v3.0/get_friends
Returns a list of the current user's friends.
get_friend/:id
Example Response:
{
"friend":
{
"id": 1,
"first_name": "Ada",
"last_name": "Lovelace",
"picture": {
"small": "image_url",
"medium": "image_url",
"large": "image_url"
},
"registration_status": "confirmed", // or 'dummy' or 'invited'
"balance":[
{
"currency_code":"USD",
"amount":"-1794.5"
},
{
"currency_code":"AED",
"amount":"7.5"
}
],
"groups":[
{
"group_id":3018312,
"balance":[
{
"currency_code":"USD",
"amount":"414.5"
}
]
},
{
"group_id":2830896,
"balance":[
]
},
{
"group_id":0,
"balance":[
{
"currency_code":"USD",
"amount":"-2209.0"
},
{
"currency_code":"AED",
"amount":"7.5"
}
]
}
],
"updated_at":"2017-11-30T09:41:09Z"
}
}
}
GET https://secure.splitwise.com/api/v3.0/get_group/:id
Get detailed info on one group that current_user belongs to
create_friend
Example Response: same as get_friend response
POST https://secure.splitwise.com/api/v3.0/create_friend
Makes the current user a friend of a user specified with the url parameters user_email, user_first_name, and, optionally, user_last_name.
Query Parameters
Parameter | Type | Description |
---|---|---|
user_first_name | String | Add a user's first name |
user_last_name | String | Add a user's last name |
user_email | String | Add a user's email (or find an existing user by email) |
create_friends
Example Response: same as get_friends response
POST https://secure.splitwise.com/api/v3.0/create_friends
Make the current user a friend of the specified users.
Query Parameters
Parameter | Type | Description |
---|---|---|
friends_0_user_first_name | String | Add a user's first name |
friends_0_user_last_name | String | Add a user's last name |
friends_0_user_email | String | Add a user's email (or find an existing user by email) |
friends_1_user_email | String | Find an existing user by email) |
delete_friend/:id
Example Response:
{
"success": true, //or false
"errors": ["any errors"]
}
POST https://secure.splitwise.com/api/v3.0/delete_friend/:id
Given a friend ID, break off the friendship between the current user and the specified user.
Expenses
get_expenses
get_expense/:id
create_expense
update_expense/:id
delete_expense/:id
undelete_expense/:id
Comments
get_comments?expense_id=
Notifications
get_notifications
Other API calls
get_currencies
{
"currencies":[
{ "currency_code":"USD", "unit":"$" },
{ "currency_code":"ARS", "unit":"$" },
{ "currency_code":"AUD", "unit":"$" },
{ "currency_code":"EUR", "unit":"€" },
{ "currency_code":"BRL", "unit":"R$" },
{ "currency_code":"CAD", "unit":"$" },
{ "currency_code":"CNY", "unit":"¥" },
{ "currency_code":"DKK", "unit":"kr" },
{ "currency_code":"GBP", "unit":"£" },
{ "currency_code":"INR", "unit":"₹" },
{ "currency_code":"ILS", "unit":"₪" },
{ "currency_code":"JPY", "unit":"¥" },
{ "currency_code":"MXN", "unit":"$" },
{ "currency_code":"NZD", "unit":"$" },
{ "currency_code":"PHP", "unit":"₱" },
{ "currency_code":"RUB", "unit":"₽" },
{ "currency_code":"SGD", "unit":"$" },
{ "currency_code":"SEK", "unit":"kr" },
{ "currency_code":"CHF", "unit":"Fr." },
{ "currency_code":"MYR", "unit":"RM" },
{ "currency_code":"RON", "unit":"RON" },
{ "currency_code":"ZAR", "unit":"R" },
{ "currency_code":"LKR", "unit":"Rs. " },
{ "currency_code":"NAD", "unit":"$" },
{ "currency_code":"SAR", "unit":"SR" },
{ "currency_code":"AED", "unit":"DH" },
{ "currency_code":"PLN", "unit":"PLN" },
{ "currency_code":"HRK", "unit":"HRK" },
{ "currency_code":"PKR", "unit":"Rs" },
{ "currency_code":"TWD", "unit":"NT$" },
{ "currency_code":"VEF", "unit":"Bs" },
{ "currency_code":"HUF", "unit":"Ft" },
{ "currency_code":"CLP", "unit":"$" },
{ "currency_code":"BDT", "unit":"Tk" },
{ "currency_code":"CZK", "unit":"Kč" },
{ "currency_code":"COP", "unit":"$" },
{ "currency_code":"TRY", "unit":"TL" },
{ "currency_code":"KRW", "unit":"₩" },
{ "currency_code":"BOB", "unit":"Bs." },
{ "currency_code":"VND", "unit":"₫" },
{ "currency_code":"NOK", "unit":"kr" },
{ "currency_code":"EGP", "unit":"E£" },
{ "currency_code":"HKD", "unit":"$" },
{ "currency_code":"THB", "unit":"฿" },
{ "currency_code":"KES", "unit":"KSh" },
{ "currency_code":"IDR", "unit":"Rp " },
{ "currency_code":"ISK", "unit":"kr" },
{ "currency_code":"BTC", "unit":"฿" },
{ "currency_code":"UAH", "unit":"₴" },
{ "currency_code":"MVR", "unit":"MVR" },
{ "currency_code":"OMR", "unit":"OMR" },
{ "currency_code":"YER", "unit":"YER" },
{ "currency_code":"IRR", "unit":"IRR" },
{ "currency_code":"QAR", "unit":"QR" },
{ "currency_code":"BHD", "unit":"BD" },
{ "currency_code":"TZS", "unit":"TZS" },
{ "currency_code":"RSD", "unit":"RSD" },
{ "currency_code":"ETB", "unit":"Br" },
{ "currency_code":"BGN", "unit":"BGN" },
{ "currency_code":"FJD", "unit":"$" },
{ "currency_code":"JMD", "unit":"J$" },
{ "currency_code":"UYU", "unit":"$" },
{ "currency_code":"GTQ", "unit":"Q" },
{ "currency_code":"NPR", "unit":"Rs. " },
{ "currency_code":"PEN", "unit":"S/. " },
{ "currency_code":"DJF", "unit":"Fdj " },
{ "currency_code":"LTL", "unit":"Lt " },
{ "currency_code":"MKW", "unit":"MK" },
{ "currency_code":"KWD", "unit":"KWD" },
{ "currency_code":"CRC", "unit":"₡" },
{ "currency_code":"DOP", "unit":"$" },
{ "currency_code":"NGN", "unit":"₦" },
{ "currency_code":"JOD", "unit":"JOD" },
{ "currency_code":"MAD", "unit":"MAD" },
{ "currency_code":"RWF", "unit":"FRw" },
{ "currency_code":"UGX", "unit":"USh" },
{ "currency_code":"AOA", "unit":"Kz" },
{ "currency_code":"XAF", "unit":"CFA" },
{ "currency_code":"XOF", "unit":"CFA" },
{ "currency_code":"CMG", "unit":"CMg" },
{ "currency_code":"ANG", "unit":"NAf" },
{ "currency_code":"ALL", "unit":"L" },
{ "currency_code":"PYG", "unit":"₲" },
{ "currency_code":"KYD", "unit":"CI$" },
{ "currency_code":"KZT", "unit":"₸" },
{ "currency_code":"BAM", "unit":"KM" },
{ "currency_code":"AWG", "unit":"Afl." },
{ "currency_code":"BIF", "unit":"FBu" },
{ "currency_code":"MKD", "unit":"ден" },
{ "currency_code":"XPF", "unit":"F" },
{ "currency_code":"GEL", "unit":"GEL" },
{ "currency_code":"TND", "unit":"DT" },
{ "currency_code":"MZN", "unit":"MT" },
{ "currency_code":"BYR", "unit":"BYR" },
{ "currency_code":"TTD", "unit":"TT$" },
{ "currency_code":"XCD", "unit":"EC$" },
{ "currency_code":"LBP", "unit":"ل.ل" },
{ "currency_code":"LAK", "unit":"₭" },
{ "currency_code":"MOP", "unit":"MOP$" },
{ "currency_code":"GHS", "unit":"GH₵" },
{ "currency_code":"UZS", "unit":"UZS" },
{ "currency_code":"NIO", "unit":"C$" },
{ "currency_code":"AZN", "unit":"m." },
{ "currency_code":"ZMW", "unit":"ZMW" },
{ "currency_code":"SZL", "unit":"E" },
{ "currency_code":"BWP", "unit":"P" },
{ "currency_code":"MMK", "unit":"K" },
{ "currency_code":"CVE", "unit":"$" },
{ "currency_code":"MUR", "unit":"₨" },
{ "currency_code":"SCR", "unit":"SR" },
{ "currency_code":"KHR", "unit":"៛" },
{ "currency_code":"CUP", "unit":"$" },
{ "currency_code":"CUC", "unit":"CUC$" },
{ "currency_code":"STD", "unit":"Db" },
{ "currency_code":"HNL", "unit":"L" },
{ "currency_code":"AMD", "unit":"AMD" },
{ "currency_code":"MDL", "unit":"MDL" },
{ "currency_code":"MNT", "unit":"₮" },
{ "currency_code":"BYN", "unit":"Br" },
{ "currency_code":"MGA", "unit":"Ar" },
{ "currency_code":"BBD", "unit":"$" },
{ "currency_code":"KMF", "unit":"CF" },
{ "currency_code":"IQD", "unit":"IQD" },
{ "currency_code":"BZD", "unit":"BZ$" },
{ "currency_code":"GYD", "unit":"G$" },
{ "currency_code":"SRD", "unit":"$" },
{ "currency_code":"KGS", "unit":"KGS" },
{ "currency_code":"TJS", "unit":"TJS" },
{ "currency_code":"VUV", "unit":"Vt" },
{ "currency_code":"BTN", "unit":"Nu." },
{ "currency_code":"WST", "unit":"WS$" }
] }
GET https://secure.splitwise.com/api/v3.0/get_currencies
Returns a list of all currencies allowed by the system. These are mostly ISO 4217 codes, but we do sometimes use pending codes or unofficial, colloquial codes (like BTC instead of XBT for Bitcoin)
get_categories
parse_sentence
Errors
In general, the Splitwise API returns the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request. Something about the request was invalid, and you will probably need to change your request before trying again. |
401 | Unauthorized. You are not logged in — your OAuth authentication may not be configured correctly. |
403 | Forbidden. The current user is not allowed to perform this action. |
404 | Not Found. The endpoint that you were trying to call does not exist. |
500 | Internal Server Error. Our server had an unexpected error while trying to process your request. This may be a temporary problem, or there may be a problem with your request that is causing the server to crash. |
503 | Service Unavailable. We're temporarily offline for maintenance. Please try again later. |
In addition, even when a call is successful and returns a 200 OK
HTTP response, the body of the response may include a key called error
or errors
. This is usually used to communicate validation errors. For example, if you submit an expense without any cost, we may return an errors
key as part of the JSON response.
The format of these errors is somewhat inconsistent, unfortunately. We're working on standardizing it, but it's a work in progress.
Terms of Use
The general idea
Splitwise provides you with access to our API so that you can develop cool new stuff. We will help support you as best we can, but we can't guarantee the API's reliability (no warranty), and we may need to change or switch things at our discretion, including these Terms of Use themselves. We use these APIs for developing our own apps too, and if there's an unforeseen issue that requires us to change the API in order to keep our own apps running, then that change will likely take precedence over any third-party tools.
How you use stuff
We're excited to see what you build with our API! You can charge for your tools (or not), show ads (or not), and do pretty much anything else you'd like to do. On the other hand, please do NOT do anything deceptive or manipulative with the Splitwise API, do NOT steal users' data without their consent, and in general do NOT do anything that would violate the spirit of fairness and transparency. We reserve the right to revoke your API key if we think you are doing something malicious, or something bad for our business.
We may also need to throttle your API calls if you send us large amounts of traffic, or if your API calls are causing other issues, but if so, we will get in touch and explain what's going on.
Data use
Data from the Splitwise API should be stored locally (i.e. on the user's client, not on your app's servers). You agree not to use a user's contact info or expense tracking data for unrelated purposes (e.g. you shouldn't spam a person's contacts list). Splitwise takes user privacy very seriously, and violating these conditions may result in termination of your API access at any time.