├── docs └── CNAME ├── .gitattributes ├── responses ├── forbidden.yaml ├── not_found.yaml └── unauthorized.yaml ├── schemas ├── errors │ ├── unauthorized.yaml │ ├── not_found.yaml │ └── forbidden.yaml ├── balance.yaml ├── notification_settings.yaml ├── parent_category.yaml ├── debt.yaml ├── share.yaml ├── comment_user.yaml ├── expense │ ├── equal_group_split.yaml │ ├── common.yaml │ └── by_shares.yaml ├── friend.yaml ├── user.yaml ├── current_user.yaml ├── comment.yaml ├── category.yaml ├── notification.yaml ├── group.yaml └── expense.yaml ├── .travis.yml ├── .gitignore ├── paths ├── get_current_user.yaml ├── get_groups.yaml ├── get_friends.yaml ├── get_user.yaml ├── get_expense.yaml ├── get_group.yaml ├── get_friend.yaml ├── delete_group.yaml ├── get_comments.yaml ├── undelete_expense.yaml ├── get_categories.yaml ├── get_currencies.yaml ├── update_user.yaml ├── delete_comment.yaml ├── create_friend.yaml ├── undelete_group.yaml ├── delete_expense.yaml ├── create_comment.yaml ├── update_expense.yaml ├── delete_friend.yaml ├── index.yaml ├── remove_user_from_group.yaml ├── get_expenses.yaml ├── create_expense.yaml ├── create_group.yaml ├── add_user_to_group.yaml ├── get_notifications.yaml └── create_friends.yaml ├── package.json ├── README.md ├── CODE_OF_CONDUCT.md └── splitwise.yaml /docs/CNAME: -------------------------------------------------------------------------------- 1 | dev.splitwise.com 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | docs/index.html linguist-generated=true 2 | -------------------------------------------------------------------------------- /responses/forbidden.yaml: -------------------------------------------------------------------------------- 1 | description: "Forbidden" 2 | content: 3 | application/json: 4 | schema: 5 | $ref: ../schemas/errors/forbidden.yaml 6 | -------------------------------------------------------------------------------- /responses/not_found.yaml: -------------------------------------------------------------------------------- 1 | description: "Not Found" 2 | content: 3 | application/json: 4 | schema: 5 | $ref: ../schemas/errors/not_found.yaml 6 | -------------------------------------------------------------------------------- /schemas/errors/unauthorized.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | error: 4 | type: string 5 | example: "Invalid API request: you are not logged in" 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: ruby 4 | 5 | rvm: 6 | - 2.3.3 7 | - 2.4.0 8 | 9 | cache: bundler 10 | script: bundle exec middleman build 11 | -------------------------------------------------------------------------------- /schemas/balance.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | currency_code: 4 | type: string 5 | example: "USD" 6 | amount: 7 | type: string 8 | example: "414.5" 9 | -------------------------------------------------------------------------------- /responses/unauthorized.yaml: -------------------------------------------------------------------------------- 1 | description: "Invalid API key or OAuth access token" 2 | content: 3 | application/json: 4 | schema: 5 | $ref: ../schemas/errors/unauthorized.yaml 6 | -------------------------------------------------------------------------------- /schemas/notification_settings.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | description: "User's notification preferences" 3 | additionalProperties: 4 | type: boolean 5 | example: 6 | added_as_friend: true 7 | -------------------------------------------------------------------------------- /schemas/errors/not_found.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | errors: 4 | type: object 5 | properties: 6 | base: 7 | type: array 8 | items: 9 | type: string 10 | example: 11 | "Invalid API Request: record not found" 12 | -------------------------------------------------------------------------------- /schemas/parent_category.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | allOf: 3 | - $ref: ./category.yaml 4 | - type: object 5 | properties: 6 | id: 7 | example: 1 8 | name: 9 | example: Utilities 10 | subcategories: 11 | type: array 12 | items: 13 | $ref: ./category.yaml 14 | -------------------------------------------------------------------------------- /schemas/errors/forbidden.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | errors: 4 | type: object 5 | properties: 6 | base: 7 | type: array 8 | items: 9 | type: string 10 | example: 11 | "Invalid API request: you do not have permission to perform that action" 12 | -------------------------------------------------------------------------------- /schemas/debt.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | from: 4 | type: integer 5 | example: 18523 6 | description: User ID 7 | to: 8 | type: integer 9 | example: 90261 10 | description: User ID 11 | amount: 12 | type: string 13 | example: "414.5" 14 | currency_code: 15 | type: string 16 | example: "USD" 17 | -------------------------------------------------------------------------------- /schemas/share.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | user: 4 | $ref: ./comment_user.yaml 5 | user_id: 6 | type: integer 7 | example: 491923 8 | paid_share: 9 | type: string 10 | example: "8.99" 11 | owed_share: 12 | type: string 13 | example: "4.5" 14 | net_balance: 15 | type: string 16 | example: "4.49" 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .bundle 4 | .config 5 | coverage 6 | InstalledFiles 7 | lib/bundler/man 8 | pkg 9 | rdoc 10 | spec/reports 11 | test/tmp 12 | test/version_tmp 13 | tmp 14 | *.DS_STORE 15 | build/ 16 | .cache 17 | .vagrant 18 | .sass-cache 19 | 20 | # YARD artifacts 21 | .yardoc 22 | _yardoc 23 | doc/ 24 | .idea/ 25 | 26 | # NodeJS 27 | node_modules/ 28 | -------------------------------------------------------------------------------- /schemas/comment_user.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | id: 4 | type: integer 5 | example: 491923 6 | first_name: 7 | type: string 8 | example: Jane 9 | last_name: 10 | type: string 11 | example: Doe 12 | picture: 13 | type: object 14 | properties: 15 | medium: 16 | type: string 17 | example: image_url 18 | -------------------------------------------------------------------------------- /schemas/expense/equal_group_split.yaml: -------------------------------------------------------------------------------- 1 | allOf: 2 | - $ref: ./common.yaml 3 | - type: object 4 | properties: 5 | group_id: 6 | type: integer 7 | description: The group to put this expense in. 8 | split_equally: 9 | type: boolean 10 | enum: [true] 11 | - required: 12 | - group_id 13 | - split_equally 14 | - description 15 | - cost 16 | -------------------------------------------------------------------------------- /paths/get_current_user.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | get: 3 | tags: 4 | - users 5 | summary: Get information about the current user 6 | responses: 7 | '200': 8 | description: OK 9 | content: 10 | application/json: 11 | schema: 12 | type: object 13 | properties: 14 | user: 15 | "$ref": "../schemas/current_user.yaml" 16 | '401': 17 | "$ref": "../responses/unauthorized.yaml" 18 | -------------------------------------------------------------------------------- /schemas/friend.yaml: -------------------------------------------------------------------------------- 1 | allOf: 2 | - $ref: ./user.yaml 3 | - type: object 4 | properties: 5 | groups: 6 | type: array 7 | items: 8 | type: object 9 | properties: 10 | group_id: 11 | type: integer 12 | example: 571 13 | balance: 14 | type: array 15 | items: 16 | $ref: ./balance.yaml 17 | balance: 18 | type: array 19 | items: 20 | $ref: ./balance.yaml 21 | updated_at: 22 | type: string 23 | format: date-time 24 | -------------------------------------------------------------------------------- /paths/get_groups.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | get: 3 | tags: 4 | - groups 5 | summary: List the current user's groups 6 | description: "**Note**: Expenses that are not associated with a group are listed 7 | in a group with ID 0.\n" 8 | responses: 9 | '200': 10 | description: OK 11 | content: 12 | application/json: 13 | schema: 14 | type: object 15 | properties: 16 | groups: 17 | type: array 18 | items: 19 | "$ref": "../schemas/group.yaml" 20 | '401': 21 | "$ref": "../responses/unauthorized.yaml" 22 | -------------------------------------------------------------------------------- /schemas/user.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | id: 4 | type: integer 5 | first_name: 6 | type: string 7 | example: "Ada" 8 | last_name: 9 | type: string 10 | example: "Lovelace" 11 | nullable: true 12 | email: 13 | type: string 14 | example: "ada@example.com" 15 | registration_status: 16 | type: string 17 | enum: [confirmed, dummy, invited] 18 | picture: 19 | type: object 20 | properties: 21 | small: 22 | type: string 23 | medium: 24 | type: string 25 | large: 26 | type: string 27 | custom_picture: 28 | type: boolean 29 | example: false 30 | -------------------------------------------------------------------------------- /paths/get_friends.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | get: 3 | tags: 4 | - friends 5 | summary: List current user's friends 6 | description: "**Note**: `group` objects only include group balances with that friend.\n" 7 | responses: 8 | '200': 9 | description: OK 10 | content: 11 | application/json: 12 | schema: 13 | type: object 14 | properties: 15 | friends: 16 | type: array 17 | items: 18 | allOf: 19 | - "$ref": "../schemas/friend.yaml" 20 | - title: User 21 | '401': 22 | "$ref": "../responses/unauthorized.yaml" 23 | -------------------------------------------------------------------------------- /paths/get_user.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | parameters: 3 | - in: path 4 | name: id 5 | schema: 6 | type: integer 7 | required: true 8 | get: 9 | tags: 10 | - users 11 | summary: Get information about another user 12 | responses: 13 | '200': 14 | description: OK 15 | content: 16 | application/json: 17 | schema: 18 | type: object 19 | properties: 20 | user: 21 | "$ref": "../schemas/user.yaml" 22 | '401': 23 | "$ref": "../responses/unauthorized.yaml" 24 | '403': 25 | "$ref": "../responses/forbidden.yaml" 26 | '404': 27 | "$ref": "../responses/not_found.yaml" -------------------------------------------------------------------------------- /paths/get_expense.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | parameters: 3 | - in: path 4 | name: id 5 | schema: 6 | type: integer 7 | required: true 8 | get: 9 | tags: 10 | - expenses 11 | summary: Get expense information 12 | responses: 13 | '200': 14 | description: OK 15 | content: 16 | application/json: 17 | schema: 18 | type: object 19 | properties: 20 | expense: 21 | "$ref": "../schemas/expense.yaml" 22 | '401': 23 | "$ref": "../responses/unauthorized.yaml" 24 | '403': 25 | "$ref": "../responses/forbidden.yaml" 26 | '404': 27 | "$ref": "../responses/not_found.yaml" 28 | -------------------------------------------------------------------------------- /paths/get_group.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | parameters: 3 | - in: path 4 | name: id 5 | schema: 6 | type: integer 7 | required: true 8 | get: 9 | tags: 10 | - groups 11 | summary: Get information about a group 12 | responses: 13 | '200': 14 | description: OK 15 | content: 16 | application/json: 17 | schema: 18 | type: object 19 | properties: 20 | group: 21 | "$ref": "../schemas/group.yaml" 22 | '401': 23 | "$ref": "../responses/unauthorized.yaml" 24 | '403': 25 | "$ref": "../responses/forbidden.yaml" 26 | '404': 27 | "$ref": "../responses/not_found.yaml" 28 | -------------------------------------------------------------------------------- /schemas/current_user.yaml: -------------------------------------------------------------------------------- 1 | allOf: 2 | - $ref: ./user.yaml 3 | - type: object 4 | properties: 5 | notifications_read: 6 | type: string 7 | example: "2017-06-02T20:21:57Z" 8 | description: "ISO 8601 date/time indicating the last time notifications were read" 9 | notifications_count: 10 | type: integer 11 | example: 12 12 | description: "Number of unread notifications since notifiations_read" 13 | notifications: 14 | $ref: ./notification_settings.yaml 15 | default_currency: 16 | type: string 17 | example: "USD" 18 | locale: 19 | type: string 20 | example: "en" 21 | description: "ISO_639-1 2-letter locale code" 22 | -------------------------------------------------------------------------------- /schemas/comment.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | id: 4 | type: integer 5 | example: 79800950 6 | content: 7 | type: string 8 | example: "John D. updated this transaction: - The cost changed from $6.99 to $8.99" 9 | comment_type: 10 | type: string 11 | enum: [System, User] 12 | relation_type: 13 | type: string 14 | enum: [ExpenseComment] 15 | relation_id: 16 | type: integer 17 | example: 855870953 18 | description: ID of the subject of the comment 19 | created_at: 20 | type: string 21 | format: date-time 22 | deleted_at: 23 | type: string 24 | format: date-time 25 | nullable: true 26 | user: 27 | $ref: ./comment_user.yaml 28 | -------------------------------------------------------------------------------- /paths/get_friend.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | parameters: 3 | - in: path 4 | name: id 5 | description: User ID of the friend 6 | schema: 7 | type: integer 8 | required: true 9 | get: 10 | tags: 11 | - friends 12 | summary: Get details about a friend 13 | responses: 14 | '200': 15 | description: OK 16 | content: 17 | application/json: 18 | schema: 19 | type: object 20 | properties: 21 | friend: 22 | "$ref": "../schemas/friend.yaml" 23 | '401': 24 | "$ref": "../responses/unauthorized.yaml" 25 | '403': 26 | "$ref": "../responses/forbidden.yaml" 27 | '404': 28 | "$ref": "../responses/not_found.yaml" 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "This repo powers the official documentation for the Splitwise API. You can view our official API documentation website at [http://dev.splitwise.com](http://dev.splitwise.com).", 3 | "scripts": { 4 | "serve": "npx @redocly/cli preview-docs splitwise.yaml", 5 | "build": "npx @redocly/cli build-docs splitwise.yaml -o docs/index.html" 6 | }, 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/splitwise/api-docs.git" 10 | }, 11 | "bugs": { 12 | "url": "https://github.com/splitwise/api-docs/issues" 13 | }, 14 | "homepage": "https://github.com/splitwise/api-docs#readme", 15 | "devDependencies": { 16 | "@redocly/cli": "^1.29.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /paths/delete_group.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - groups 5 | summary: Delete a group 6 | description: Delete an existing group. Destroys all associated records (expenses, 7 | etc.) 8 | parameters: 9 | - in: path 10 | name: id 11 | schema: 12 | type: integer 13 | required: true 14 | responses: 15 | '200': 16 | description: OK 17 | content: 18 | application/json: 19 | schema: 20 | type: object 21 | properties: 22 | success: 23 | type: boolean 24 | '401': 25 | "$ref": "../responses/unauthorized.yaml" 26 | '403': 27 | "$ref": "../responses/forbidden.yaml" 28 | '404': 29 | "$ref": "../responses/not_found.yaml" 30 | -------------------------------------------------------------------------------- /paths/get_comments.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | get: 3 | tags: 4 | - comments 5 | summary: Get expense comments 6 | parameters: 7 | - in: query 8 | name: expense_id 9 | schema: 10 | type: integer 11 | required: true 12 | example: 4193 13 | responses: 14 | '200': 15 | description: 'OK' 16 | content: 17 | application/json: 18 | schema: 19 | type: object 20 | properties: 21 | comments: 22 | type: array 23 | items: 24 | $ref: ../schemas/comment.yaml 25 | '401': 26 | $ref: ../responses/unauthorized.yaml 27 | '403': 28 | $ref: ../responses/forbidden.yaml 29 | '404': 30 | $ref: ../responses/not_found.yaml 31 | -------------------------------------------------------------------------------- /paths/undelete_expense.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - expenses 5 | summary: Restore an expense 6 | description: "**Note**: 200 OK does not indicate a successful response. The operation 7 | was successful only if `success` is true.\n" 8 | parameters: 9 | - in: path 10 | name: id 11 | description: ID of the expense to restore 12 | schema: 13 | type: integer 14 | required: true 15 | responses: 16 | '200': 17 | description: OK 18 | content: 19 | application/json: 20 | schema: 21 | type: object 22 | properties: 23 | success: 24 | type: boolean 25 | '401': 26 | "$ref": "../responses/unauthorized.yaml" 27 | '403': 28 | "$ref": "../responses/forbidden.yaml" 29 | -------------------------------------------------------------------------------- /schemas/category.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | type: object 3 | properties: 4 | id: 5 | type: integer 6 | example: 48 7 | name: 8 | type: string 9 | example: Cleaning 10 | icon: 11 | type: string 12 | example: https://s3.amazonaws.com/splitwise/uploads/category/icon/square/utilities/cleaning.png 13 | icon_types: 14 | type: object 15 | properties: 16 | slim: 17 | type: object 18 | properties: 19 | small: 20 | type: string 21 | format: uri 22 | large: 23 | type: string 24 | format: uri 25 | square: 26 | type: object 27 | properties: 28 | large: 29 | type: string 30 | format: uri 31 | xlarge: 32 | type: string 33 | format: uri 34 | -------------------------------------------------------------------------------- /paths/get_categories.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | get: 3 | tags: 4 | - other 5 | summary: Supported categories 6 | security: [] 7 | description: | 8 | Returns a list of all categories Splitwise allows for expenses. There are parent categories that represent groups of categories with subcategories for more specific categorization. 9 | When creating expenses, you must use a subcategory, not a parent category. 10 | If you intend for an expense to be represented by the parent category and nothing more specific, please use the "Other" subcategory. 11 | responses: 12 | '200': 13 | description: OK 14 | content: 15 | application/json: 16 | schema: 17 | type: object 18 | properties: 19 | categories: 20 | type: array 21 | items: 22 | $ref: ../schemas/parent_category.yaml 23 | -------------------------------------------------------------------------------- /schemas/notification.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | type: object 3 | properties: 4 | id: 5 | type: integer 6 | example: 32514315 7 | type: 8 | type: integer 9 | created_at: 10 | type: string 11 | format: date-time 12 | created_by: 13 | type: integer 14 | example: 2 15 | source: 16 | type: object 17 | nullable: true 18 | properties: 19 | type: 20 | type: string 21 | example: "Expense" 22 | id: 23 | type: integer 24 | example: 865077 25 | url: 26 | type: string 27 | nullable: true 28 | image_url: 29 | type: string 30 | example: "https://s3.amazonaws.com/splitwise/uploads/notifications/v2/0-venmo.png" 31 | image_shape: 32 | type: string 33 | enum: 34 | - "square" 35 | - "circle" 36 | content: 37 | type: string 38 | example: You paid Jon H..
You paid $23.45 39 | -------------------------------------------------------------------------------- /paths/get_currencies.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | get: 3 | tags: 4 | - other 5 | summary: Supported currencies 6 | security: [] 7 | description: | 8 | Returns a list of all currencies allowed by the system. These are mostly ISO 4217 codes, but we do 9 | sometimes use pending codes or unofficial, colloquial codes (like BTC instead of XBT for Bitcoin). 10 | responses: 11 | '200': 12 | description: OK 13 | content: 14 | application/json: 15 | schema: 16 | type: object 17 | properties: 18 | currencies: 19 | type: array 20 | items: 21 | type: object 22 | title: Currency 23 | properties: 24 | currency_code: 25 | type: string 26 | example: BRL 27 | unit: 28 | type: string 29 | example: R$ 30 | -------------------------------------------------------------------------------- /paths/update_user.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | parameters: 3 | - in: path 4 | name: id 5 | schema: 6 | type: integer 7 | required: true 8 | post: 9 | tags: 10 | - users 11 | summary: Update a user 12 | requestBody: 13 | required: true 14 | content: 15 | application/json: 16 | schema: 17 | properties: 18 | first_name: 19 | type: string 20 | last_name: 21 | type: string 22 | email: 23 | type: string 24 | password: 25 | type: string 26 | locale: 27 | type: string 28 | default_currency: 29 | type: string 30 | responses: 31 | '200': 32 | description: OK 33 | content: 34 | application/json: 35 | schema: 36 | "$ref": "../schemas/user.yaml" 37 | '401': 38 | "$ref": "../responses/unauthorized.yaml" 39 | '403': 40 | "$ref": "../responses/forbidden.yaml" 41 | -------------------------------------------------------------------------------- /schemas/expense/common.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | cost: 4 | type: string 5 | example: "25" 6 | description: A string representation of a decimal value, limited to 2 decimal places 7 | description: 8 | type: string 9 | description: A short description of the expense 10 | example: Grocery run 11 | details: 12 | type: string 13 | description: Also known as "notes." 14 | nullable: true 15 | date: 16 | type: string 17 | description: The date and time the expense took place. May differ from `created_at` 18 | format: date-time 19 | example: "2012-05-02T13:00:00Z" 20 | repeat_interval: 21 | type: string 22 | enum: [never, weekly, fortnightly, monthly, yearly] 23 | currency_code: 24 | type: string 25 | example: "USD" 26 | description: A currency code. Must be in the list from `get_currencies` 27 | category_id: 28 | type: integer 29 | description: A category id from `get_categories` 30 | example: 15 31 | -------------------------------------------------------------------------------- /paths/delete_comment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | parameters: 4 | - in: path 5 | name: id 6 | schema: 7 | type: integer 8 | required: true 9 | tags: 10 | - comments 11 | summary: Delete a comment 12 | description: Deletes a comment. Returns the deleted comment. 13 | responses: 14 | '200': 15 | description: 'OK' 16 | content: 17 | application/json: 18 | schema: 19 | type: object 20 | properties: 21 | comment: 22 | allOf: 23 | - $ref: ../schemas/comment.yaml 24 | - type: object 25 | properties: 26 | comment_type: 27 | example: "User" 28 | content: 29 | example: "Does this include the delivery fee?" 30 | user: 31 | $ref: ../schemas/comment_user.yaml 32 | '401': 33 | $ref: ../responses/unauthorized.yaml 34 | '403': 35 | $ref: ../responses/forbidden.yaml 36 | '404': 37 | $ref: ../responses/not_found.yaml 38 | -------------------------------------------------------------------------------- /paths/create_friend.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - friends 5 | summary: Add a friend 6 | description: | 7 | Adds a friend. If the other user does not exist, you must supply `user_first_name`. 8 | If the other user exists, `user_first_name` and `user_last_name` will be ignored. 9 | requestBody: 10 | required: true 11 | content: 12 | application/json: 13 | schema: 14 | type: object 15 | properties: 16 | user_email: 17 | type: string 18 | example: ada@example.com 19 | user_first_name: 20 | type: string 21 | example: Ada 22 | user_last_name: 23 | type: string 24 | example: Lovelace 25 | required: 26 | - email 27 | responses: 28 | '200': 29 | description: OK 30 | content: 31 | application/json: 32 | schema: 33 | type: object 34 | properties: 35 | friend: 36 | "$ref": "../schemas/friend.yaml" 37 | '401': 38 | "$ref": "../responses/unauthorized.yaml" 39 | -------------------------------------------------------------------------------- /paths/undelete_group.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | parameters: 3 | - in: path 4 | name: id 5 | schema: 6 | type: integer 7 | required: true 8 | post: 9 | tags: 10 | - groups 11 | summary: Restore a group 12 | description: | 13 | Restores a deleted group. 14 | 15 | **Note**: 200 OK does not indicate a successful response. You must check the `success` value of the response. 16 | responses: 17 | '200': 18 | description: OK 19 | content: 20 | application/json: 21 | schema: 22 | type: object 23 | properties: 24 | success: 25 | type: boolean 26 | errors: 27 | type: array 28 | items: 29 | type: string 30 | examples: 31 | Success: 32 | value: 33 | success: true 34 | Failure: 35 | value: 36 | success: false 37 | errors: 38 | - You do not have permission to undelete this group. 39 | '401': 40 | "$ref": "../responses/unauthorized.yaml" 41 | '403': 42 | "$ref": "../responses/forbidden.yaml" 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome to the Splitwise API! 2 | 3 | This repo powers the official documentation for the Splitwise API. You can view our official API documentation website at [http://dev.splitwise.com](http://dev.splitwise.com). 4 | 5 | ## Questions? Issues? 6 | 7 | If something in the API is confusing you, you can open an [issue](https://github.com/splitwise/api-docs/issues) 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. 8 | 9 | If you spot an issue in our API documentation itself, feel free to open a [pull request](https://github.com/splitwise/api-docs/pulls) to update this repo! 10 | 11 | ## Powered by OpenAPI + redocly 12 | 13 | These API docs follow the [OpenAPI v3](https://swagger.io/specification/) specification. The website is built with [redoc](https://github.com/Redocly/redoc). 14 | 15 | ### Developing 16 | ``` 17 | $ npm install 18 | $ npm run serve 19 | ``` 20 | 21 | This will start a local HTTP server that serves the documentation and rebuilds whenever any of the OpenAPI source files are modified. 22 | 23 | ### Compiling 24 | This will create a zero-dependency HTML file at docs/index.html. 25 | 26 | ``` 27 | $ npm run build 28 | ``` 29 | -------------------------------------------------------------------------------- /paths/delete_expense.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - expenses 5 | summary: Delete an expense 6 | description: "**Note**: 200 OK does not indicate a successful response. The operation 7 | was successful only if `success` is true.\n" 8 | parameters: 9 | - in: path 10 | name: id 11 | description: ID of the expense to delete 12 | schema: 13 | type: integer 14 | required: true 15 | responses: 16 | '200': 17 | description: OK 18 | content: 19 | application/json: 20 | schema: 21 | type: object 22 | properties: 23 | success: 24 | type: boolean 25 | errors: 26 | type: object 27 | required: 28 | - success 29 | examples: 30 | Success: 31 | value: 32 | success: true 33 | Failure: 34 | value: 35 | success: false 36 | errors: 37 | expense: 38 | - does not exist, or has already been deleted 39 | '401': 40 | "$ref": "../responses/unauthorized.yaml" 41 | '403': 42 | "$ref": "../responses/forbidden.yaml" 43 | -------------------------------------------------------------------------------- /paths/create_comment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - comments 5 | summary: Create a comment 6 | requestBody: 7 | required: true 8 | content: 9 | application/json: 10 | schema: 11 | type: object 12 | properties: 13 | expense_id: 14 | type: integer 15 | example: 5123 16 | content: 17 | type: string 18 | example: "Does this include the delivery fee?" 19 | responses: 20 | '200': 21 | description: 'OK' 22 | content: 23 | application/json: 24 | schema: 25 | type: object 26 | properties: 27 | comment: 28 | allOf: 29 | - $ref: ../schemas/comment.yaml 30 | - type: object 31 | properties: 32 | relation_id: 33 | example: 5123 34 | comment_type: 35 | example: "User" 36 | content: 37 | example: "Does this include the delivery fee?" 38 | user: 39 | $ref: ../schemas/comment_user.yaml 40 | '401': 41 | $ref: ../responses/unauthorized.yaml 42 | '403': 43 | $ref: ../responses/forbidden.yaml 44 | '404': 45 | $ref: ../responses/not_found.yaml 46 | -------------------------------------------------------------------------------- /paths/update_expense.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - expenses 5 | summary: Update an expense 6 | description: | 7 | Updates an expense. Parameters are the same as in `create_expense`, but you only need to include parameters 8 | that are changing from the previous values. If any values is supplied for `users__{index}__{property}`, _all_ 9 | shares for the expense will be overwritten with the provided values. 10 | 11 | **Note**: 200 OK does not indicate a successful response. The operation was successful only if `errors` is empty. 12 | parameters: 13 | - in: path 14 | name: id 15 | description: ID of the expense to update 16 | schema: 17 | type: integer 18 | required: true 19 | requestBody: 20 | required: true 21 | content: 22 | application/json: 23 | schema: 24 | "$ref": "../schemas/expense/by_shares.yaml" 25 | responses: 26 | '200': 27 | description: OK 28 | content: 29 | application/json: 30 | schema: 31 | type: object 32 | properties: 33 | expenses: 34 | type: array 35 | items: 36 | "$ref": "../schemas/expense.yaml" 37 | errors: 38 | type: object 39 | '401': 40 | "$ref": "../responses/unauthorized.yaml" 41 | '403': 42 | "$ref": "../responses/forbidden.yaml" 43 | -------------------------------------------------------------------------------- /paths/delete_friend.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - friends 5 | summary: Delete friendship 6 | description: | 7 | Given a friend ID, break off the friendship between the current user and the specified user. 8 | 9 | **Note**: 200 OK does not indicate a successful response. You must check the `success` value of the response. 10 | parameters: 11 | - in: path 12 | name: id 13 | description: User ID of the friend 14 | schema: 15 | type: integer 16 | required: true 17 | responses: 18 | '200': 19 | description: OK 20 | content: 21 | application/json: 22 | schema: 23 | type: object 24 | properties: 25 | success: 26 | type: boolean 27 | errors: 28 | type: object 29 | additionalProperties: 30 | type: array 31 | items: 32 | type: string 33 | examples: 34 | Success: 35 | value: 36 | success: true 37 | errors: [] 38 | Failure: 39 | value: 40 | success: false 41 | errors: 42 | base: 43 | - There was an issue deleting that friendship 44 | '401': 45 | "$ref": "../responses/unauthorized.yaml" 46 | '403': 47 | "$ref": "../responses/forbidden.yaml" 48 | '404': 49 | "$ref": "../responses/not_found.yaml" 50 | -------------------------------------------------------------------------------- /schemas/expense/by_shares.yaml: -------------------------------------------------------------------------------- 1 | allOf: 2 | - $ref: ./common.yaml 3 | - type: object 4 | properties: 5 | group_id: 6 | type: integer 7 | description: The group to put this expense in, or `0` to create an expense outside of a group. 8 | users__0__user_id: 9 | type: integer 10 | example: 54123 11 | users__0__paid_share: 12 | type: string 13 | example: "25" 14 | description: Decimal amount as a string with 2 decimal places. The amount this user paid for the expense 15 | users__0__owed_share: 16 | type: string 17 | example: "13.55" 18 | description: Decimal amount as a string with 2 decimal places. The amount this user owes for the expense 19 | users__1__first_name: 20 | type: string 21 | example: "Neu" 22 | users__1__last_name: 23 | type: string 24 | example: "Yewzer" 25 | users__1__email: 26 | type: string 27 | example: "neuyewxyz@example.com" 28 | users__1__paid_share: 29 | type: string 30 | example: "0" 31 | description: Decimal amount as a string with 2 decimal places. The amount this user paid for the expense 32 | users__1__owed_share: 33 | type: string 34 | example: "11.45" 35 | description: Decimal amount as a string with 2 decimal places. The amount this user owes for the expense 36 | additionalProperties: 37 | x-additionalPropertiesName: users__{index}__{property} 38 | type: string 39 | - required: 40 | - group_id 41 | - description 42 | - cost 43 | -------------------------------------------------------------------------------- /paths/index.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | /get_current_user: 3 | $ref: ./get_current_user.yaml 4 | /get_user/{id}: 5 | $ref: ./get_user.yaml 6 | /update_user/{id}: 7 | $ref: ./update_user.yaml 8 | /get_groups: 9 | $ref: ./get_groups.yaml 10 | /get_group/{id}: 11 | $ref: ./get_group.yaml 12 | /create_group: 13 | $ref: ./create_group.yaml 14 | /delete_group/{id}: 15 | $ref: ./delete_group.yaml 16 | /undelete_group/{id}: 17 | $ref: ./undelete_group.yaml 18 | /add_user_to_group: 19 | $ref: ./add_user_to_group.yaml 20 | /remove_user_from_group: 21 | $ref: ./remove_user_from_group.yaml 22 | /get_friends: 23 | $ref: ./get_friends.yaml 24 | /get_friend/{id}: 25 | $ref: ./get_friend.yaml 26 | /create_friend: 27 | $ref: ./create_friend.yaml 28 | /create_friends: 29 | $ref: ./create_friends.yaml 30 | /delete_friend/{id}: 31 | $ref: ./delete_friend.yaml 32 | /get_currencies: 33 | $ref: ./get_currencies.yaml 34 | /get_expense/{id}: 35 | $ref: ./get_expense.yaml 36 | /get_expenses: 37 | $ref: ./get_expenses.yaml 38 | /create_expense: 39 | $ref: ./create_expense.yaml 40 | /update_expense/{id}: 41 | $ref: ./update_expense.yaml 42 | /delete_expense/{id}: 43 | $ref: ./delete_expense.yaml 44 | /undelete_expense/{id}: 45 | $ref: ./undelete_expense.yaml 46 | /get_comments: 47 | $ref: ./get_comments.yaml 48 | /create_comment: 49 | $ref: ./create_comment.yaml 50 | /delete_comment/{id}: 51 | $ref: ./delete_comment.yaml 52 | /get_notifications: 53 | $ref: ./get_notifications.yaml 54 | /get_categories: 55 | $ref: ./get_categories.yaml 56 | -------------------------------------------------------------------------------- /paths/remove_user_from_group.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - groups 5 | summary: Remove a user from a group 6 | description: | 7 | Remove a user from a group. Does not succeed if the user has a non-zero balance. 8 | 9 | **Note:** 200 OK does not indicate a successful response. You must check the success value of the response. 10 | requestBody: 11 | required: true 12 | content: 13 | application/json: 14 | schema: 15 | type: object 16 | properties: 17 | group_id: 18 | type: integer 19 | example: 4012 20 | user_id: 21 | type: integer 22 | example: 940142 23 | required: 24 | - user_id 25 | - group_id 26 | responses: 27 | '200': 28 | description: OK 29 | content: 30 | application/json: 31 | schema: 32 | type: object 33 | properties: 34 | success: 35 | type: boolean 36 | errors: 37 | type: object 38 | additionalProperties: 39 | type: array 40 | items: 41 | type: string 42 | examples: 43 | Success: 44 | value: 45 | success: true 46 | errors: {} 47 | Failure: 48 | value: 49 | success: false 50 | errors: 51 | base: 52 | - The user has a non-zero balance 53 | -------------------------------------------------------------------------------- /paths/get_expenses.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | get: 3 | tags: 4 | - expenses 5 | summary: List the current user's expenses 6 | parameters: 7 | - in: query 8 | name: group_id 9 | schema: 10 | type: integer 11 | description: If provided, only expenses in that group will be returned, and `friend_id` 12 | will be ignored. 13 | - in: query 14 | name: friend_id 15 | schema: 16 | type: integer 17 | description: ID of another user. If provided, only expenses between the current 18 | and provided user will be returned. 19 | - in: query 20 | name: dated_after 21 | schema: 22 | type: string 23 | format: date-time 24 | - in: query 25 | name: dated_before 26 | schema: 27 | type: string 28 | format: date-time 29 | - in: query 30 | name: updated_after 31 | schema: 32 | type: string 33 | format: update-time 34 | - in: query 35 | name: updated_before 36 | schema: 37 | type: string 38 | format: date-time 39 | - in: query 40 | name: limit 41 | schema: 42 | type: integer 43 | default: 20 44 | - in: query 45 | name: offset 46 | schema: 47 | type: integer 48 | default: 0 49 | responses: 50 | '200': 51 | description: OK 52 | content: 53 | application/json: 54 | schema: 55 | type: object 56 | properties: 57 | expenses: 58 | type: array 59 | items: 60 | "$ref": "../schemas/expense.yaml" 61 | '401': 62 | "$ref": "../responses/unauthorized.yaml" 63 | '403': 64 | "$ref": "../responses/forbidden.yaml" 65 | '404': 66 | "$ref": "../responses/not_found.yaml" 67 | -------------------------------------------------------------------------------- /paths/create_expense.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - expenses 5 | summary: Create an expense 6 | description: | 7 | Creates an expense. You may either split an expense equally (only with `group_id` provided), 8 | or supply a list of shares. 9 | 10 | When splitting equally, the authenticated user is assumed to be the payer. 11 | 12 | When providing a list of shares, each share must include `paid_share` and `owed_share`, and must be identified by one of the following: 13 | - `email`, `first_name`, and `last_name` 14 | - `user_id` 15 | 16 | **Note**: 200 OK does not indicate a successful response. The operation was successful only if `errors` is empty. 17 | requestBody: 18 | required: true 19 | content: 20 | application/json: 21 | schema: 22 | oneOf: 23 | - "$ref": "../schemas/expense/equal_group_split.yaml" 24 | title: Equal group split 25 | - "$ref": "../schemas/expense/by_shares.yaml" 26 | title: Split by shares 27 | responses: 28 | '200': 29 | description: OK 30 | content: 31 | application/json: 32 | schema: 33 | type: object 34 | properties: 35 | expenses: 36 | type: array 37 | items: 38 | "$ref": "../schemas/expense.yaml" 39 | errors: 40 | type: object 41 | '400': 42 | description: Bad Request 43 | content: 44 | application/json: 45 | schema: 46 | type: object 47 | properties: 48 | errors: 49 | type: object 50 | properties: 51 | base: 52 | type: array 53 | items: 54 | type: string 55 | example: "Unrecognized parameter `bad_parameter`" 56 | '401': 57 | "$ref": "../responses/unauthorized.yaml" 58 | '403': 59 | "$ref": "../responses/forbidden.yaml" 60 | -------------------------------------------------------------------------------- /paths/create_group.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - groups 5 | summary: Create a group 6 | description: | 7 | Creates a new group. Adds the current user to the group by default. 8 | 9 | **Note**: group user parameters must be flattened into the format `users__{index}__{property}`, where 10 | `property` is `user_id`, `first_name`, `last_name`, or `email`. 11 | The user's email or ID must be provided. 12 | requestBody: 13 | required: true 14 | content: 15 | application/json: 16 | schema: 17 | properties: 18 | name: 19 | type: string 20 | group_type: 21 | type: string 22 | enum: [home, trip, couple, other, apartment, house] 23 | example: "home" 24 | description: | 25 | What is the group used for? 26 | 27 | **Note**: It is recommended to use `home` in place of `house` or `apartment`. 28 | simplify_by_default: 29 | type: boolean 30 | description: Turn on simplify debts? 31 | additionalProperties: 32 | type: string 33 | x-additionalPropertiesName: users__{index}__{property} 34 | example: 35 | name: The Brain Trust 36 | group_type: trip 37 | users__0__first_name: Alan 38 | users__0__last_name: Turing 39 | users__0__email: alan@example.org 40 | users__1__id: 5823 41 | required: 42 | - name 43 | responses: 44 | '200': 45 | description: OK 46 | content: 47 | application/json: 48 | schema: 49 | type: object 50 | properties: 51 | group: 52 | "$ref": "../schemas/group.yaml" 53 | '400': 54 | description: Bad Request 55 | content: 56 | application/json: 57 | schema: 58 | type: object 59 | properties: 60 | errors: 61 | type: object 62 | properties: 63 | base: 64 | type: array 65 | items: 66 | type: string 67 | example: You cannot add unknown users to a group by user_id 68 | -------------------------------------------------------------------------------- /paths/add_user_to_group.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - groups 5 | summary: Add a user to a group 6 | description: "**Note**: 200 OK does not indicate a successful response. You must 7 | check the `success` value of the response.\n" 8 | requestBody: 9 | required: true 10 | content: 11 | application/json: 12 | schema: 13 | oneOf: 14 | - type: object 15 | title: User ID 16 | properties: 17 | group_id: 18 | type: integer 19 | example: 49012 20 | user_id: 21 | type: integer 22 | example: 7999632 23 | required: 24 | - user_id 25 | - type: object 26 | title: User info 27 | properties: 28 | group_id: 29 | type: integer 30 | example: 49012 31 | first_name: 32 | type: string 33 | example: Grace 34 | last_name: 35 | type: string 36 | example: Hopper 37 | email: 38 | type: string 39 | example: gracehopper@example.com 40 | required: 41 | - first_name 42 | - last_name 43 | - email 44 | required: 45 | - group_id 46 | responses: 47 | '200': 48 | description: OK 49 | content: 50 | application/json: 51 | schema: 52 | type: object 53 | properties: 54 | success: 55 | type: boolean 56 | user: 57 | "$ref": "../schemas/user.yaml" 58 | errors: 59 | type: object 60 | additionalProperties: 61 | type: array 62 | items: 63 | type: string 64 | examples: 65 | Success: 66 | value: 67 | success: true 68 | user: {} 69 | errors: {} 70 | Failure: 71 | value: 72 | success: false 73 | user: 74 | errors: 75 | base: 76 | - That user cannot be a member of this group 77 | -------------------------------------------------------------------------------- /paths/get_notifications.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | get: 3 | tags: 4 | - notifications 5 | summary: Get notifications 6 | description: | 7 | Return a list of recent activity on the users account with the most recent items first. 8 | `content` will be suitable for display in HTML and uses only the ``, ``, ``, 9 | `
` and `` tags. 10 | 11 | The `type` value indicates what the notification is about. Notification types may be added in the future 12 | without warning. Below is an incomplete list of notification types. 13 | 14 | | Type | Meaning | 15 | | ---- | ------- | 16 | | 0 | Expense added | 17 | | 1 | Expense updated | 18 | | 2 | Expense deleted | 19 | | 3 | Comment added | 20 | | 4 | Added to group | 21 | | 5 | Removed from group | 22 | | 6 | Group deleted | 23 | | 7 | Group settings changed | 24 | | 8 | Added as friend | 25 | | 9 | Removed as friend | 26 | | 10 | News (a URL should be included) | 27 | | 11 | Debt simplification | 28 | | 12 | Group undeleted | 29 | | 13 | Expense undeleted | 30 | | 14 | Group currency conversion | 31 | | 15 | Friend currency conversion | 32 | 33 | **Note**: While all parameters are optional, the server sets arbitrary (but large) limits 34 | on the number of notifications returned if you set a very old `updated_after` value or `limit` of `0` for a 35 | user with many notifications. 36 | parameters: 37 | - in: query 38 | name: updated_after 39 | schema: 40 | type: string 41 | format: date-time 42 | example: "2020-07-28T20:46:00Z" 43 | description: If provided, returns only notifications after this time. 44 | - in: query 45 | name: limit 46 | schema: 47 | type: integer 48 | default: 0 49 | description: Omit (or provide `0`) to get the maximum number of notifications. 50 | responses: 51 | '200': 52 | description: OK 53 | content: 54 | application/json: 55 | schema: 56 | type: object 57 | properties: 58 | notifications: 59 | type: array 60 | items: 61 | $ref: ../schemas/notification.yaml 62 | '401': 63 | $ref: ../responses/unauthorized.yaml 64 | -------------------------------------------------------------------------------- /paths/create_friends.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | post: 3 | tags: 4 | - friends 5 | summary: Add friends 6 | description: | 7 | Add multiple friends at once. 8 | 9 | For each user, if the other user does not exist, you must supply `users__{index}__first_name`. 10 | 11 | **Note**: user parameters must be flattened into the format `users__{index}__{property}`, where 12 | `property` is `first_name`, `last_name`, or `email`. 13 | requestBody: 14 | required: true 15 | content: 16 | application/json: 17 | schema: 18 | type: object 19 | additionalProperties: 20 | type: string 21 | x-additionalPropertiesName: users__{index}__{property} 22 | example: 23 | users__0__first_name: Alan 24 | users__0__last_name: Turing 25 | users__0__email: alan@example.org 26 | users__1__email: existing_user@example.com 27 | responses: 28 | '200': 29 | description: OK 30 | content: 31 | application/json: 32 | schema: 33 | type: object 34 | properties: 35 | users: 36 | type: array 37 | items: 38 | allOf: 39 | - "$ref": "../schemas/friend.yaml" 40 | - title: User 41 | errors: 42 | type: object 43 | additionalProperties: 44 | type: array 45 | items: 46 | type: string 47 | '400': 48 | description: Bad Request 49 | content: 50 | application/json: 51 | schema: 52 | type: object 53 | properties: 54 | users: 55 | type: array 56 | items: 57 | allOf: 58 | - "$ref": "../schemas/friend.yaml" 59 | - title: User 60 | example: [] 61 | errors: 62 | type: object 63 | additionalProperties: 64 | type: array 65 | items: 66 | type: string 67 | example: 68 | base: 69 | - Please supply a name for this user 70 | example: 71 | users: [] 72 | errors: 73 | base: 74 | - That user cannot be a member of this group 75 | '401': 76 | "$ref": "../responses/unauthorized.yaml" 77 | -------------------------------------------------------------------------------- /schemas/group.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | id: 4 | type: integer 5 | example: 321 6 | name: 7 | type: string 8 | example: "Housemates 2020" 9 | group_type: 10 | type: string 11 | enum: [home, trip, couple, other, apartment, house] 12 | example: "home" 13 | description: | 14 | What is the group used for? 15 | 16 | **Note**: It is recommended to use `home` in place of `house` or `apartment`. 17 | updated_at: 18 | type: string 19 | format: date-time 20 | simplify_by_default: 21 | type: boolean 22 | members: 23 | type: array 24 | items: 25 | allOf: 26 | - $ref: ./user.yaml 27 | - type: object 28 | properties: 29 | balance: 30 | type: array 31 | items: 32 | type: object 33 | properties: 34 | currency_code: 35 | type: string 36 | example: "USD" 37 | amount: 38 | type: string 39 | example: "-5.02" 40 | original_debts: 41 | type: array 42 | items: 43 | $ref: ./debt.yaml 44 | simplified_debts: 45 | type: array 46 | items: 47 | $ref: ./debt.yaml 48 | avatar: 49 | type: object 50 | properties: 51 | original: 52 | type: string 53 | nullable: true 54 | example: null 55 | xxlarge: 56 | type: string 57 | example: "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-1000px.png" 58 | xlarge: 59 | type: string 60 | example: "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-500px.png" 61 | large: 62 | type: string 63 | example: "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-200px.png" 64 | medium: 65 | type: string 66 | example: "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-100px.png" 67 | small: 68 | type: string 69 | example: "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-50px.png" 70 | custom_avatar: 71 | type: boolean 72 | cover_photo: 73 | type: object 74 | properties: 75 | xxlarge: 76 | type: string 77 | example: "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-1000px.png" 78 | xlarge: 79 | type: string 80 | example: "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-500px.png" 81 | invite_link: 82 | type: string 83 | example: "https://www.splitwise.com/join/abQwErTyuI+12" 84 | description: "A link the user can send to a friend to join the group directly" 85 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@lord.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /schemas/expense.yaml: -------------------------------------------------------------------------------- 1 | allOf: 2 | - $ref: ./expense/common.yaml 3 | - type: object 4 | properties: 5 | id: 6 | type: integer 7 | format: int64 8 | example: 51023 9 | group_id: 10 | type: integer 11 | example: 391 12 | nullable: true 13 | description: Null if the expense is not associated with a group. 14 | friendship_id: 15 | type: integer 16 | example: 4818 17 | nullable: true 18 | description: Null if the expense is not associated with a friendship. 19 | expense_bundle_id: 20 | type: integer 21 | example: 491030 22 | nullable: true 23 | description: 24 | type: string 25 | example: "Brunch" 26 | repeats: 27 | type: boolean 28 | description: Whether the expense recurs automatically 29 | repeat_interval: 30 | type: string 31 | enum: [never, weekly, fortnightly, monthly, yearly] 32 | email_reminder: 33 | type: boolean 34 | description: | 35 | Whether a reminder will be sent to involved users in advance of the next occurrence of a recurring expense. 36 | Only applicable if the expense recurs. 37 | email_reminder_in_advance: 38 | type: integer 39 | description: | 40 | Number of days in advance to remind involved users about the next occurrence of a new expense. 41 | Only applicable if the expense recurs. 42 | enum: [null, -1, 0, 1, 2, 3, 4, 5, 6, 7, 14] 43 | nullable: true 44 | next_repeat: 45 | type: string 46 | nullable: true 47 | description: 48 | The date of the next occurrence of a recurring expense. 49 | Only applicable if the expense recurs. 50 | details: 51 | type: string 52 | description: Also known as "notes." 53 | nullable: true 54 | comments_count: 55 | type: integer 56 | payment: 57 | type: boolean 58 | description: Whether this was a payment between users 59 | transaction_confirmed: 60 | type: boolean 61 | description: If a payment was made via an integrated third party service, whether it was confirmed by that service. 62 | cost: 63 | type: string 64 | example: "25.0" 65 | currency_code: 66 | type: string 67 | example: "USD" 68 | repayments: 69 | type: array 70 | items: 71 | type: object 72 | properties: 73 | from: 74 | type: integer 75 | description: ID of the owing user 76 | example: 6788709 77 | to: 78 | type: integer 79 | description: ID of the owed user 80 | example: 270896089 81 | amount: 82 | type: string 83 | example: "25.0" 84 | date: 85 | type: string 86 | format: date-time 87 | description: The date and time the expense took place. May differ from `created_at` 88 | example: "2012-05-02T13:00:00Z" 89 | created_at: 90 | type: string 91 | format: date-time 92 | description: The date and time the expense was created on Splitwise 93 | example: "2012-07-27T06:17:09Z" 94 | created_by: 95 | allOf: 96 | - $ref: ./user.yaml 97 | - nullable: true 98 | updated_at: 99 | type: string 100 | description: The last time the expense was updated. 101 | format: date-time 102 | example: "2012-12-23T05:47:02Z" 103 | updated_by: 104 | allOf: 105 | - $ref: ./user.yaml 106 | - nullable: true 107 | deleted_at: 108 | type: string 109 | description: If the expense was deleted, when it was deleted. 110 | format: date-time 111 | example: "2012-12-23T05:47:02Z" 112 | nullable: true 113 | deleted_by: 114 | allOf: 115 | - $ref: ./user.yaml 116 | - nullable: true 117 | category: 118 | type: object 119 | properties: 120 | id: 121 | type: integer 122 | example: 5 123 | name: 124 | type: string 125 | example: Electricity 126 | description: Translated to the current user's locale 127 | receipt: 128 | type: object 129 | properties: 130 | large: 131 | type: string 132 | nullable: true 133 | example: https://splitwise.s3.amazonaws.com/uploads/expense/receipt/3678899/large_95f8ecd1-536b-44ce-ad9b-0a9498bb7cf0.png 134 | original: 135 | type: string 136 | nullable: true 137 | example: https://splitwise.s3.amazonaws.com/uploads/expense/receipt/3678899/95f8ecd1-536b-44ce-ad9b-0a9498bb7cf0.png 138 | users: 139 | type: array 140 | items: 141 | $ref: ./share.yaml 142 | comments: 143 | type: array 144 | items: 145 | $ref: ./comment.yaml 146 | -------------------------------------------------------------------------------- /splitwise.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | version: 3.0.0 4 | title: Splitwise API 5 | x-logo: 6 | url: https://www.splitwise.com/assets/press/logos/sw.svg 7 | altText: Splitwise logo and name 8 | description: | 9 | # Introduction 10 | Hey there! We're glad you're interested in the Splitwise API. This documentation will help you to fetch information 11 | on users, expenses, groups, and much more. 12 | 13 | If something in the API is confusing you, you can open an issue about it [on GitHub](https://github.com/splitwise/api-docs). 14 | 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. 15 | (If you spot an issue in our API documentation itself, feel free to open a pull request to update this website!) 16 | 17 | # Third-Party SDKs 18 | The development community has built a number of unofficial, third-party SDKs for Splitwise in a variety of different languages. 19 | 20 | - Javascript 21 | - https://github.com/keriwarr/splitwise 22 | - https://github.com/Bearer/Pizzly 23 | - https://github.com/athulanilthomas/splitwise-ts 24 | - Ruby 25 | - https://github.com/divyum/splitwise-ruby 26 | - Python 27 | - https://github.com/namaggarwal/splitwise 28 | - Elixir 29 | - https://github.com/matiasdelgado/ex_splitwise 30 | - Java 31 | - https://github.com/sritejakv/splitwise-java 32 | - Dart 33 | - https://github.com/srthkpthk/splitwise_api 34 | - Golang 35 | - https://github.com/anvari1313/splitwise.go 36 | - https://github.com/aanzolaavila/splitwise.go 37 | - Rust 38 | - https://github.com/pbar1/splitwise-rs 39 | 40 | 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! 41 | 42 | **Note**: These links are provided for convenience. These libraries have not been reviewed or endorsed by Splitwise, and Splitwise 43 | cannot vouch for their quality. If you have questions or bug reports, please direct your feedback to the authors of these libraries. 44 | 45 | # Terms of Use 46 | 47 | ## Overview 48 | 49 | 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. 50 | 51 | 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. 52 | 53 | 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. 54 | 55 | All Self-Service API users are subject to the API Terms of Use below. 56 | 57 | ## TERMS OF USE 58 | 59 | 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. 60 | 61 | 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. 62 | 63 | These API terms form a binding contract between you and us. In these terms "you," and "your," refers to the individual, company or legal entity and/or entities that you represent while accessing the API. “We”, “us”, “our” and “Splitwise” refers to Splitwise Inc. By accepting these API terms, either by accessing or using the API, or authorizing or permitting any individual to access or use the API, you agree to be bound by this contract. 64 | 65 |
    66 |
  1. 67 | API License: 68 |
      69 |
    1. 70 | Subject to the restrictions in these terms, we grant you a non-exclusive, revocable, worldwide, non-transferable, non-sublicensable, limited license to access and use (i) our APIs (ii) related API documentation, packages, sample code, software, or materials made available by Splitwise (“API Documentation”), and (iii) any and all access keys or data derived or obtained from Splitwise API responses (“Splitwise Data”). The Splitwise API, Splitwise Data, and API Documentation will be together referred to as the “Splitwise Materials.” You will use Splitwise Materials solely as necessary to develop, test and support a Self-Service integration of your software application (an "Application" or "App") with Splitwise in accordance with this Agreement and any other agreements between You and Splitwise. 71 |
    2. 72 |
    73 |
  2. 74 |
  3. 75 | API License Restrictions 76 |
      77 |
    1. 78 | You agree that will you will not, and will not allow any of your partners, subsidiaries and/or affiliates and each of their respective directors, officers, employees, agents, partners, suppliers, service providers, contractors or end users (collectively, “Your Affiliates”) to engage in any Prohibited Activities set forth in section 2f. 79 |
    2. 80 |
    3. 81 | Splitwise reserves the right to block or revoke, with or without notice, your access to any or all of the Splitwise Materials if Splitwise determines in its sole discretion that you are engaging in any of the Prohibited Activities. 82 |
    4. 83 |
    5. 84 | Splitwise may monitor your use of Splitwise Materials to improve our services and ensure compliance with this agreement, and may suspend your access to Splitwise Materials if we believe you are in violation. 85 |
    6. 86 |
    7. 87 | Your use of the Splitwise API is subject to usage limits and other functional restrictions in the sole discretion of Splitwise. You will not use the API in a manner that exceeds rate limits, or constitutes excessive or abusive usage. 88 |
    8. 89 |
    9. 90 | Your use of Splitwise Materials must respect Splitwise user’s privacy choices and settings and the Privacy portion of this agreement. You will obtain explicit consent from end users as a basis for any processing of Splitwise Materials. Your use of Splitwise Materials must comply with all Applicable Data Protection Laws applicable to you, including but not limited to GDPR and CCPA compliance. 91 |
    10. 92 |
    11. 93 | Prohibited Activities: 94 |
        95 |
      1. 96 | You will not use Splitwise Materials or any part thereof in any manner or for any purpose that violates any law or regulation, or any right of any person, including but not limited to intellectual property rights, rights of privacy and/or publicity, or which otherwise results in liability to Splitwise, or its officers, employees, or end users. 97 |
      2. 98 |
      3. 99 | You will not use Splitwise Materials in a way that poses a security, operational or technical risk to our Services. 100 |
      4. 101 |
      5. 102 | You may not Splitwise Materials to create an application that replicates existing Splitwise functionality or competes with Splitwise and our Services. 103 |
      6. 104 |
      7. 105 | You will not use Splitwise Materials to create an application that encourages or creates functionality for users to violate our Terms of Service. 106 |
      8. 107 |
      9. 108 | You will not use Splitwise Materials to create an application that can be used by anyone under the age of 13. You will not knowingly collect or enable the collection of any personal information from children under the age of 13. 109 |
      10. 110 |
      11. 111 | You will not reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code or underlying ideas, trade secrets, algorithms or structure of the Splitwise Materials, or Splitwise software applications. 112 |
      12. 113 |
      13. 114 | You will not attempt to defeat, avoid, bypass, remove, deactivate or otherwise circumvent any software protection mechanisms in the Splitwise Materials or Application or any part thereof, including without limitation, any such mechanism used to restrict or control the functionality of the API. 115 |
      14. 116 |
      15. 117 | You will not use Splitwise’s name to endorse or promote any product, including a product derived from Splitwise Materials. 118 |
      16. 119 |
      17. 120 | You will not sell, lease, rent, sublicense or in any way otherwise commercialize any Splitwise Data, or dataset derived from Splitwise Data and/or Splitwise Materials. 121 |
      18. 122 |
      19. 123 | You will not use Splitwise Materials in applications that send unsolicited communications to users or include any malware, adware, potentially unwanted programs, or similar applications that could damage or disparage Splitwise’s reputation or services. 124 |
      20. 125 |
      126 |
    127 |
  4. 128 |
  5. 129 | Privacy 130 |
      131 |
    1. 132 | Your Application shall have a lawful privacy policy, accessible with reasonably prominent hyperlinks that does not conflict with or supersede the Splitwise Privacy Policy and that explains how you collect, store, use, and/or transfer any Personal Data via your Applications. Personal Data is data that may be used, either alone or together with other information, to identify an individual user, including, without limitation, a user’s name, address, telephone number, username, email address, city and country, geolocation, unique identifiers, picture, or other similar information and includes personal data as defined in the GDPR. 133 |
    2. 134 |
    3. 135 | You are responsible for maintaining an appropriate legal basis to process any data under all applicable data protection laws (including but not limited to the GDPR, and the CCPA). 136 |
    4. 137 |
    5. 138 | You will use industry standard security measures to protect against and prevent security breaches and any unauthorized disclosure of any personal information you process, including administrative, physical and technical safeguards for protection of the security, confidentiality and integrity of that personal information. 139 |
    6. 140 |
    7. 141 | You must promptly notify us in writing via email to security@splitwise.com of any security deficiencies in, or intrusions to, your Applications or systems that you discover, and of any breaches of your user agreement or privacy policy that impact or may impact Splitwise customers. Please review our Privacy Policy for more information on how we collect and use data relating to the use and performance of our Service. 142 |
    8. 143 |
    9. 144 | You will delete Splitwise Data as requested within a reasonable time, if so requested by either a Splitwise User or Splitwise Inc. 145 |
    10. 146 |
    11. 147 | Any data submitted to Splitwise through your use of the Splitwise API will be governed by the Splitwise Privacy Policy. 148 |
    12. 149 |
    13. 150 | You agree that Splitwise may collect certain use data and information related to your use of the Splitwise Materials, and the Splitwise API in connection with your Application (“Usage Data”), and that Splitwise may use such Usage Data for any business purpose, internal or external, including, without limitation, providing enhancements to the Splitwise Materials or Splitwise Platform, providing developer of user support, or otherwise. You agree to include a statement to this effect in your Application’s Privacy Policy. 151 |
    14. 152 |
    153 |
  6. 154 | 155 |
  7. 156 | Conditions Of Use 157 |
      158 |
    1. 159 | Splitwise reserves the right to modify our API at any time, for any reason, without notice. 160 |
    2. 161 |
    3. 162 | Splitwise may use your name, and other contact details to contact you regarding your use of our API or, if we believe you are in violation of this contract. 163 |
    4. 164 |
    5. 165 | You are solely responsible for your use of the Splitwise API and any application you create that uses Splitwise Materials, including but not limited to Customer Support. 166 |
    6. 167 |
    7. 168 | Splitwise reserves the right to develop and extend its products and capabilities without regard to whether those products compete with or invalidate your Splitwise integration or products offered by you. 169 |
    8. 170 |
    9. 171 | Splitwise may limit (i) the number of network calls that your App may make via the API; and (ii) the maximum number of Splitwise users that may connect your Application, or (iii) anything else about the Splitwise API as Splitwise deems appropriate, at Splitwise’s sole discretion. 172 |
    10. 173 |
    11. 174 | Splitwise may impose or modify these limitations without notice. Splitwise may utilize technical measures to prevent over-usage and stop usage of the API by your App after any usage limitations are exceeded or suspend your access to the API with or without notice to you in the event you exceed such limitations. 175 |
    12. 176 |
    13. 177 | You will not issue any press release or other announcement regarding your Application that makes any reference to Splitwise without our prior written consent. 178 |
    14. 179 |
    15. 180 | You will not use our API to distribute unsolicited advertising or promotions, or to send messages, make comments, or initiate any other unsolicited direct communication or contact with Splitwise users or partners. 181 |
    16. 182 |
    183 |
  8. 184 | 185 |
  9. 186 | Use of Splitwise Marks 187 |
      188 |
    1. 189 | The rights granted in this Agreement do not include any general right to use the Splitwise name or any Splitwise trademarks, service marks or logos (the “Splitwise Marks”) with respect to your Applications. Subject to your continued compliance with this Agreement, you may use Splitwise Marks for limited purposes related to your Applications only as described in Splitwise Branding Guidelines and/or as provided in written communications with the Splitwise team. 190 |
    2. 191 |
    3. 192 | These rights apply on a non-exclusive, non-transferable, worldwide, royalty-free basis, without any right to sub-license, and may be revoked by Splitwise at any time. 193 |
    4. 194 |
    5. 195 | If Splitwise updates Branding Guidelines or any Splitwise Marks that you are using, you agree to update such Splitwise Marks to reflect the most current versions. You must not use any Splitwise Marks or trade dress, or any confusingly similar mark or trade dress, as the name or part of the name, user interface, or icon of your Applications, or as part of any logo or branding for your Applications. 196 |
    6. 197 |
    198 |
  10. 199 | 200 |
  11. 201 | Reservation Of Rights. The Splitwise Materials as well as the trademarks, copyrights, trade secrets, patents or other intellectual property (collectively, “Intellectual Property”) contained therein will remain the sole and exclusive property of Splitwise, and you will reasonably assist Splitwise in protecting such ownership. Splitwise reserves to itself all rights to the Splitwise Materials not expressly granted to You. Except as expressly provided in this Agreement, You do not acquire any rights to or interest in the Intellectual Property. You will not utilize Splitwise Intellectual Property except as expressly authorized under this Agreement. 202 |
  12. 203 | 204 |
  13. 205 | Feedback. Splitwise welcomes feedback from developers to improve our API, documentation and Services, and may provide feedback to you as well. We will review any feedback received, however we make no guarantee that suggestions will be implemented. If you choose to provide feedback, suggestions or comments regarding the Splitwise API, documentation, or services, you acknowledge that Splitwise will be free to use your feedback in any way it sees fit. This includes the freedom to copy, modify, create derivative works, distribute, publicly display, publicly perform, grant sublicenses to, and otherwise exploit in any manner such feedback, suggestions or comments, for any and all purposes, with no obligation of any kind to you, in perpetuity. 206 |
  14. 207 | 208 |
  15. 209 | Confidentiality. Any information not generally available to the public that is made available to you should be considered Confidential. You agree to: 210 |
      211 |
    1. 212 | Protect this information from unauthorized use, access, or disclosure, 213 |
    2. 214 |
    3. 215 | Use this information only as necessary, 216 |
    4. 217 |
    5. 218 | Destroy any copies, or return this information to us when this Contract is terminated, or at any time as requested by Splitwise 219 |
    6. 220 |
    221 |
  16. 222 | 223 |
  17. 224 | Termination. This Contract shall remain effective until terminated by either party. You may terminate this Contract at any time, by discontinuing your use of our APIs. Splitwise may terminate this Contract at any time with or without cause and without advanced notice to you. Upon termination, all rights and licenses granted under this Contract shall immediately terminate. You must immediately discontinue any use, and destroy any copies of the Splitwise Materials and Confidential Information in your possession. 225 |
  18. 226 |
  19. 227 | Representations and Warranties. You represent and warrant that you have validly entered into the Contract, and that you have the legal power to do so, and that doing so will not violate any law, government regulation, or breach agreement with another third party. 228 |

    THE SPLITWISE API AND DOCUMENTATION IS BEING PROVIDED TO YOU ‘AS IS’ AND ‘AS AVAILABLE’ WITHOUT ANY WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. YOU ACKNOWLEDGE THAT WE DO NOT WARRANT THAT THE APIS WILL BE UNINTERRUPTED, TIMELY, SECURE, OR ERROR-FREE. 229 |
  20. 230 |
  21. 231 | Limitation of Liability. 232 |

    TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL SPLITWISE, ITS AFFILIATES, OFFICERS, DIRECTORS, EMPLOYEES, AGENTS, LICENSORS, LICENSEES, ASSIGNS OR SUCCESSORS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO ANY LOSS OF DATA, SERVICE INTERRUPTION, COMPUTER FAILURE, OR PECUNIARY LOSS) HOWEVER CAUSED, WHETHER IN CONTRACT, TORT OR UNDER ANY OTHER THEORY OF LIABILITY, AND WHETHER OR NOT YOU OR THE THIRD PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. YOUR ONLY RIGHT WITH RESPECT TO ANY PROBLEMS OR DISSATISFACTION WITH THE SPLITWISE SERVICES IS TO STOP USING THE SPLITWISE SERVICES. 233 |

    SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY FOR CERTAIN TYPES OF DAMAGES REFERRED TO ABOVE (INCLUDING INCIDENTAL OR CONSEQUENTIAL DAMAGES). ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS AND EXCLUSIONS MAY NOT APPLY TO YOU. YOU AGREE THAT SPLITWISE’S AGGREGATE LIABILITY UNDER THIS AGREEMENT IS LIMITED TO ONE HUNDRED DOLLARS ($100). 234 |
  22. 235 | 236 |
  23. 237 | Indemnification: You agree to defend, indemnify, and hold harmless Splitwise and its affiliates, directors, and customers, from and against any and all third-party claims, actions, suits, and proceedings (including, but not limited to legal, or investigative fees), arising out of, or related to your use of the Splitwise Services, your violation of this Contract, your violation of your user agreement or privacy policy, or your violation of any laws, regulations, or third party rights. 238 |
  24. 239 | 240 |
  25. 241 | Miscellaneous 242 |
      243 |
    1. 244 | Applicable Law, Jurisdiction, and Venue: Any dispute arising out of this Agreement shall be governed by Massachusetts law and controlling U.S. federal law, without regard to conflict of law provisions thereof. Any claim or dispute between you and Splitwise that arises in whole or in part from this Contract or your use of the API or our Services shall be decided exclusively by a court of competent jurisdiction located in Massachusetts, and you hereby consent to, and waive all defenses of lack of personal jurisdiction and forum non conveniens with respect to venue and jurisdiction in the state and federal courts of Massachusetts. 245 |
    2. 246 |
    3. 247 | Assignment: You may not assign or delegate any of your rights or obligations hereunder, whether by operation of law or otherwise, without Splitwise’s prior written consent. Splitwise retains the right to assign the Contract in its entirety, without consent of the other party, to a corporate affiliate or in connection with a merger, acquisition, corporate reorganization, or sale of all or substantially all of its assets. Any purported assignment in violation of this section is void. 248 |
    4. 249 |
    5. 250 | Language: This contact was drafted in English. In the event that this contract, or any part thereof, is translated to a language other than English, the English-language version shall control in the event of a conflict. 251 |
    6. 252 |
    7. 253 | Relationship: You and Splitwise are independent contractors. This Contract does not create or imply any partnership, agency, joint venture, fiduciary or employment relationship between the parties. There are no third party beneficiaries to the Contract. 254 |
    8. 255 |
    9. 256 | Severability: The Contract will be enforced to the fullest extent permitted under applicable law. If any provision of the Contract is found to be invalid or unenforceable by a court of competent jurisdiction, the provision will be modified by the court and interpreted so as best to accomplish the objectives of the original provision to the fullest extent permitted by law, and the remaining provisions of the Contract will remain in effect. 257 |
    10. 258 |
    11. 259 | Force Majeure: Neither we nor you will be responsible for any failure to perform obligations under this Contract if such failure is caused by events beyond the reasonable control of a party, which may include denial-of-service attacks, a failure by a third party hosting provider, acts of God, war, strikes, revolutions, lack or failure of transportation facilities, laws or governmental regulations. 260 |
    12. 261 |
    13. 262 | Entire Agreement: These Terms comprise the entire agreement between you and Splitwise with respect to the above subject matter and supersedes and merges all prior proposals, understandings and contemporaneous communications. 263 |
    14. 264 |
    265 |
  26. 266 |
267 | 268 | servers: 269 | - url: 'https://secure.splitwise.com/api/v3.0' 270 | variables: {} 271 | security: 272 | - OAuth: [] 273 | - ApiKeyAuth: [] 274 | tags: 275 | - name: users 276 | x-displayName: Users 277 | description: Resources to access and modify user information. 278 | - name: groups 279 | x-displayName: Groups 280 | description: 281 | A Group represents a collection of users who share expenses together. For example, some users use a Group to aggregate expenses related to a home. Others use it to represent a trip. 282 | Expenses assigned to a group are split among the users of that group. 283 | Importantly, two users in a Group can also have expenses with one another outside of the Group. 284 | - name: friends 285 | x-displayName: Friends 286 | - name: expenses 287 | x-displayName: Expenses 288 | - name: comments 289 | x-displayName: Comments 290 | - name: notifications 291 | x-displayName: Notifications 292 | - name: other 293 | x-displayName: Other 294 | paths: 295 | $ref: ./paths/index.yaml 296 | 297 | components: 298 | securitySchemes: 299 | OAuth: 300 | type: oauth2 301 | description: | 302 | Splitwise uses OAuth 2 with the authorization code flow. To connect via OAuth 2, you'll need to [register your app](https://secure.splitwise.com/apps). When you register, you'll be given a key and secret. 303 | 304 | **Note**: OAuth can be a very confusing protocol to implement correctly, and we **strongly** recommend 305 | that you use an existing OAuth library to connect to Splitwise. You can find a list of OAuth client libraries at the 306 | [OAuth community site](https://oauth.net/code/#client-libraries). 307 | 308 | For more information on using OAuth, check out the following resources: 309 | 310 | - The OAuth community [getting started guide](https://oauth.net/getting-started/) 311 | - The oauth.com [OAuth 2.0 playground](https://www.oauth.com/playground/) (great for debugging authorization issues) 312 | - This [old Splitwise blog post](https://blog.splitwise.com/2013/07/15/setting-up-oauth-for-the-splitwise-api/) about OAuth 313 | flows: 314 | authorizationCode: 315 | authorizationUrl: /oauth/authorize 316 | tokenUrl: /oauth/token 317 | scopes: {} 318 | ApiKeyAuth: 319 | type: http 320 | description: 321 | For speed and ease of prototyping, you can generate a personal API key on your app's details page. You should present this key to the server via the Authorization header as a Bearer token. The API key is an access token for your personal account, so keep it as safe as you would a password. 322 | 323 | If your key becomes compromised or you want to invalidate your existing key for any other reason, you can do so on the app details page by generating a new key. 324 | scheme: bearer 325 | bearerFormat: API key 326 | responses: 327 | Unauthorized: 328 | $ref: ./responses/unauthorized.yaml 329 | Forbidden: 330 | $ref: ./responses/forbidden.yaml 331 | Not_Found: 332 | $ref: ./responses/not_found.yaml 333 | schemas: 334 | Debt: 335 | $ref: ./schemas/debt.yaml 336 | User: 337 | $ref: ./schemas/user.yaml 338 | CurrentUser: 339 | $ref: ./schemas/current_user.yaml 340 | NotificationSettings: 341 | $ref: ./schemas/notification_settings.yaml 342 | Group: 343 | $ref: ./schemas/group.yaml 344 | UnauthorizedError: 345 | $ref: ./schemas/errors/unauthorized.yaml 346 | ForbiddenError: 347 | $ref: ./schemas/errors/forbidden.yaml 348 | NotFoundError: 349 | $ref: ./schemas/errors/not_found.yaml 350 | --------------------------------------------------------------------------------