diff --git a/docs/index.html b/docs/index.html index c493799..80b5da9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2163,7 +2163,7 @@ -

Terms of Use

Overview

Splitwise provides this Self-Serve API to facilitate integrations with third-party applications, as well as open-up functionality for hobbyists and power users to programmatically interact with their own Splitwise account and build plugins or other tools.

-

If you’re interested in integrating your commercial application with Splitwise, we strongly encourage you to contact developers@splitwise.com so our development team can help discuss your use case, provide private APIs and Enterprise support, and offer an appropriate commercial license for the integration. The Self-Serve API documented here may be suitable for internal prototyping and other exploratory work.

-

If you are developing a non-commercial plugin application or personal project, we recommend you make use of the Self-Serve API documented here under the API Terms Of Use. Please be aware that our Self-Serve API has conservative rate and access limits, which are subject to change at any time and not well suited to commercial projects. If this is a problem for your use case, please contact us at developers@splitwise.com to discuss your needs.

+

If you’re interested in integrating your commercial application with Splitwise, we strongly encourage you to contact developers@splitwise.com so our development team can help discuss your use case, provide private APIs and Enterprise support, and offer an appropriate commercial license for the integration. The Self-Serve API documented here may be suitable for internal prototyping and other exploratory work.

+

If you are developing a non-commercial plugin application or personal project, we recommend you make use of the Self-Serve API documented here under the API Terms Of Use. Please be aware that our Self-Serve API has conservative rate and access limits, which are subject to change at any time and not well suited to commercial projects. If this is a problem for your use case, please contact us at developers@splitwise.com to discuss your needs.

All Self-Service API users are subject to the API Terms of Use below.

TERMS OF USE

These API Terms of Use describe your rights and responsibilities when accessing our publicly available Application Programming Interface (API) and related API documentation. Please review them carefully.

Splitwise may modify this Agreement at any time by posting a revised version on our website. The revised version will be effective at the time that it is posted.

@@ -2483,10 +2483,10 @@

Response samples

Content type
application/json
Example
{
  • "success": true
}

Add a user to a group

Note: 200 OK does not indicate a successful response. You must check the success value of the response.

Authorizations:
Request Body schema: application/json
One of
group_id
required
integer
user_id
required
integer

Responses

Request samples

Content type
application/json
Example
{
  • "group_id": 49012,
  • "user_id": 7999632
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "user": { },
  • "errors": [ ]
}

Remove a user from a group

Remove a user from a group. Does not succeed if the user has a non-zero balance.

+

Request samples

Content type
application/json
Example
{
  • "group_id": 49012,
  • "user_id": 7999632
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "user": { },
  • "errors": { }
}

Remove a user from a group

Remove a user from a group. Does not succeed if the user has a non-zero balance.

Note: 200 OK does not indicate a successful response. You must check the success value of the response.

Authorizations:
Request Body schema: application/json
group_id
required
integer
user_id
required
integer

Responses

Request samples

Content type
application/json
{
  • "group_id": 4012,
  • "user_id": 940142
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "errors": [ ]
}

Friends

List current user's friends

Note: group objects only include group balances with that friend.

+

Request samples

Content type
application/json
{
  • "group_id": 4012,
  • "user_id": 940142
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "errors": { }
}

Friends

List current user's friends

Note: group objects only include group balances with that friend.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "friends": [
    ]
}

Get details about a friend

Authorizations:
path Parameters
id
required
integer

User ID of the friend

@@ -2505,7 +2505,7 @@
Authorizations:
Request Body schema: application/json
friends__{index}__{property}*
string

Responses

Request samples

Content type
application/json
{
  • "friends__0__first_name": "Alan",
  • "friends__0__last_name": "Turing",
  • "friends__0__email": "alan@example.org",
  • "friends__1__email": "existing_user@example.com"
}

Response samples

Content type
application/json
{
  • "users": [
    ],
  • "errors": [ ]
}

Delete friendship

Given a friend ID, break off the friendship between the current user and the specified user.

+

Request samples

Content type
application/json
{
  • "friends__0__first_name": "Alan",
  • "friends__0__last_name": "Turing",
  • "friends__0__email": "alan@example.org",
  • "friends__1__email": "existing_user@example.com"
}

Response samples

Content type
application/json
{
  • "users": [
    ],
  • "errors": {
    }
}

Delete friendship

Given a friend ID, break off the friendship between the current user and the specified user.

Note: 200 OK does not indicate a successful response. You must check the success value of the response.

Authorizations:
path Parameters
id
required
integer

User ID of the friend

Responses

Response samples

Content type
application/json
{
  • "expense": {
    }
}

List the current user's expenses

Authorizations:
query Parameters
group_id
integer

If provided, only expenses in that group will be returned, and friend_id will be ignored.

+

Response samples

Content type
application/json
{
  • "expense": {
    }
}

List the current user's expenses

Authorizations:
query Parameters
group_id
integer

If provided, only expenses in that group will be returned, and friend_id will be ignored.

friend_id
integer

ID of another user. If provided, only expenses between the current and provided user will be returned.

dated_after
string <date-time>
dated_before
string <date-time>
updated_after
string <update-time>
updated_before
string <date-time>
limit
integer
Default: 20
offset
integer
Default: 0

Responses

Response samples

Content type
application/json
{
  • "expenses": [
    ]
}

Create an expense

Creates an expense. You may either split an expense equally (only with group_id provided), +

Response samples

Content type
application/json
{
  • "expenses": [
    ]
}

Create an expense

Creates an expense. You may either split an expense equally (only with group_id provided), or supply a list of shares.

When splitting equally, the authenticated user is assumed to be the payer.

When providing a list of shares, each share must include paid_share and owed_share, and must be identified by one of the following:

@@ -2541,11 +2541,12 @@
split_equally
required
boolean
Value: true

Responses

Request samples

Content type
application/json
Example
{
  • "cost": "25",
  • "description": "Grocery run",
  • "details": "string",
  • "date": "2012-05-02T13:00:00Z",
  • "repeat_interval": "never",
  • "currency_code": "USD",
  • "category_id": 15,
  • "group_id": 0,
  • "split_equally": true
}

Response samples

Content type
application/json
{
  • "expenses": [
    ],
  • "errors": { }
}

Update an expense

Updates an expense. Parameters are the same as in create_expense, but you only need to include parameters +

Request samples

Content type
application/json
Example
{
  • "cost": "25",
  • "description": "Grocery run",
  • "details": "string",
  • "date": "2012-05-02T13:00:00Z",
  • "repeat_interval": "never",
  • "currency_code": "USD",
  • "category_id": 15,
  • "group_id": 0,
  • "split_equally": true
}

Response samples

Content type
application/json
{
  • "expenses": [
    ],
  • "errors": { }
}

Update an expense

Updates an expense. Parameters are the same as in create_expense, but you only need to include parameters that are changing from the previous values. If any values is supplied for users__{index}__{property}, all shares for the expense will be overwritten with the provided values.

Note: 200 OK does not indicate a successful response. The operation was successful only if errors is empty.

-
Authorizations:
Request Body schema: application/json
cost
required
string

A string representation of a decimal value, limited to 2 decimal places

+
Authorizations:
path Parameters
id
required
integer

ID of the expense to update

+
Request Body schema: application/json
cost
required
string

A string representation of a decimal value, limited to 2 decimal places

description
required
string

A short description of the expense

details
string or null

Also known as "notes."

date
string <date-time>

The date and time the expense took place. May differ from created_at

@@ -2559,26 +2560,30 @@
users__{index}__{property}*
string

Responses

Request samples

Content type
application/json
{
  • "cost": "25",
  • "description": "Grocery run",
  • "details": "string",
  • "date": "2012-05-02T13:00:00Z",
  • "repeat_interval": "never",
  • "currency_code": "USD",
  • "category_id": 15,
  • "group_id": 0,
  • "users__0__user_id": 54123,
  • "users__0__paid_share": "25",
  • "users__0__owed_share": "13.55",
  • "users__1__first_name": "Neu",
  • "users__1__last_name": "Yewzer",
  • "users__1__email": "neuyewxyz@example.com",
  • "users__1__paid_share": "0",
  • "users__1__owed_share": "11.45",
  • "users__{index}__{property}1": "string",
  • "users__{index}__{property}2": "string"
}

Response samples

Content type
application/json
{
  • "expenses": [
    ],
  • "errors": { }
}

Delete an expense

Note: 200 OK does not indicate a successful response. The operation was successful only if success is true.

-
Authorizations:

Responses

Request samples

Content type
application/json
{
  • "cost": "25",
  • "description": "Grocery run",
  • "details": "string",
  • "date": "2012-05-02T13:00:00Z",
  • "repeat_interval": "never",
  • "currency_code": "USD",
  • "category_id": 15,
  • "group_id": 0,
  • "users__0__user_id": 54123,
  • "users__0__paid_share": "25",
  • "users__0__owed_share": "13.55",
  • "users__1__first_name": "Neu",
  • "users__1__last_name": "Yewzer",
  • "users__1__email": "neuyewxyz@example.com",
  • "users__1__paid_share": "0",
  • "users__1__owed_share": "11.45",
  • "users__{index}__{property}1": "string",
  • "users__{index}__{property}2": "string"
}

Response samples

Content type
application/json
{
  • "expenses": [
    ],
  • "errors": { }
}

Delete an expense

Note: 200 OK does not indicate a successful response. The operation was successful only if success is true.

+
Authorizations:
path Parameters
id
required
integer

ID of the expense to delete

+

Responses

Response samples

Content type
application/json
Example
{
  • "success": true
}

Restore an expense

Note: 200 OK does not indicate a successful response. The operation was successful only if success is true.

-
Authorizations:

Responses

Authorizations:
path Parameters
id
required
integer

ID of the expense to restore

+

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Comments

Get expense comments

Authorizations:
query Parameters
expense_id
required
integer
Example: expense_id=4193

Responses

Response samples

Content type
application/json
{
  • "comments": [
    ]
}

Create a comment

Authorizations:
Request Body schema: application/json
expense_id
integer
content
string

Responses

Response samples

Content type
application/json
{
  • "comments": [
    ]
}

Create a comment

Authorizations:
Request Body schema: application/json
expense_id
integer
content
string

Responses

Request samples

Content type
application/json
{
  • "expense_id": 5123,
  • "content": "Does this include the delivery fee?"
}

Response samples

Content type
application/json
{
  • "comment": {
    }
}

Delete a comment

Deletes a comment. Returns the deleted comment.

-
Authorizations:

Responses

Request samples

Content type
application/json
{
  • "expense_id": 5123,
  • "content": "Does this include the delivery fee?"
}

Response samples

Content type
application/json
{
  • "comment": {
    }
}

Delete a comment

Deletes a comment. Returns the deleted comment.

+
Authorizations:
path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "comment": {
    }
}

Notifications

Get notifications

Return a list of recent activity on the users account with the most recent items first. +

Response samples

Content type
application/json
{
  • "comment": {
    }
}

Notifications

Get notifications

Return a list of recent activity on the users account with the most recent items first. content will be suitable for display in HTML and uses only the <strong>, <strike>, <small>, <br> and <font color="#FFEE44"> tags.

The type value indicates what the notification is about. Notification types may be added in the future @@ -2676,9 +2681,9 @@

Authorizations:
Request Body schema: application/json
One of
input
required
string

A natural language sentence describing an expense.

autosave
boolean
Default: false

If true, the resulting expense will be saved if valid.

Responses

Request samples

Content type
application/json
Example
{
  • "input": "I owe Ada 5 bucks",
  • "autosave": false
}

Response samples

Content type
application/json
{
  • "expense": {
    },
  • "valid": true,
  • "confidence": 0.5,
  • "error": "string"
}
+

Request samples

Content type
application/json
Example
{
  • "input": "I owe Ada 5 bucks",
  • "autosave": false
}

Response samples

Content type
application/json
{
  • "expense": {
    },
  • "valid": true,
  • "confidence": 0.5,
  • "error": "string"
}