### Sample Response: Get Notifications Success Source: https://dev.splitwise.com/index An example JSON response containing a list of notifications, detailing their type, creation time, source, and display content, including HTML tags. ```APIDOC { "notifications": [ { "id": 32514315, "type": 0, "created_at": "2019-08-24T14:15:22Z", "created_by": 2, "source": { "type": "Expense", "id": 865077, "url": "string" }, "image_url": "", "image_shape": "square", "content": "You paid Jon H..
You paid $23.45" } ] } ``` -------------------------------- ### Sample Response: Get Comments List Source: https://dev.splitwise.com/index An example JSON structure for a list of comments, showing system and user-generated comments with associated user details and timestamps. ```APIDOC { "comments": [ { "id": 79800950, "content": "John D. updated this transaction: - The cost changed from $6.99 to $8.99", "comment_type": "System", "relation_type": "ExpenseComment", "relation_id": 855870953, "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "user": { "id": 491923, "first_name": "Jane", "last_name": "Doe", "picture": { "medium": "image_url" } } } ] } ``` -------------------------------- ### API: Create Expense Request Example (JSON) Source: https://dev.splitwise.com/index An example JSON payload for creating an expense using the `post/create_expense` endpoint. This example demonstrates the required and optional fields for an equally split group expense. ```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, "split_equally": true } ``` -------------------------------- ### Sample Response: Create Comment Success Source: https://dev.splitwise.com/index An example JSON response after successfully creating a comment, including the new comment's details and associated user information. ```APIDOC { "comment": { "id": 79800950, "content": "Does this include the delivery fee?", "comment_type": "User", "relation_type": "ExpenseComment", "relation_id": 5123, "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "user": { "id": 491923, "first_name": "Jane", "last_name": "Doe", "picture": { "medium": "image_url" } } } } ``` -------------------------------- ### Create Group API Request Payload Example Source: https://dev.splitwise.com/index An example JSON payload demonstrating how to structure a request to the `create_group` endpoint. It shows how to specify the group name, type, and include multiple users with flattened properties like first name, last name, email, or user ID. ```APIDOC { "name": "The Brain Trust", "group_type": "trip", "users__0__first_name": "Alan", "users__0__last_name": "Turing", "users__0__email": "alan@example.org", "users__1__id": 5823 } ``` -------------------------------- ### Get Expenses API Response Sample Source: https://dev.splitwise.com/index Example JSON response for a successful API call to retrieve expense details. It includes a list of expenses, each with detailed information such as cost, description, dates, currency, categories, associated users, and comments. ```JSON { "expenses": [ { "cost": "25.0", "description": "Brunch", "details": "string", "date": "2012-05-02T13:00:00Z", "repeat_interval": "never", "currency_code": "USD", "category_id": 15, "id": 51023, "group_id": 391, "friendship_id": 4818, "expense_bundle_id": 491030, "repeats": true, "email_reminder": true, "email_reminder_in_advance": null, "next_repeat": "string", "comments_count": 0, "payment": true, "transaction_confirmed": true, "repayments": [ { "from": 6788709, "to": 270896089, "amount": "25.0" } ], "created_at": "2012-07-27T06:17:09Z", "created_by": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false }, "updated_at": "2012-12-23T05:47:02Z", "updated_by": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false }, "deleted_at": "2012-12-23T05:47:02Z", "deleted_by": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false }, "category": { "id": 5, "name": "Electricity" }, "receipt": { "large": "https://splitwise.s3.amazonaws.com/uploads/expense/receipt/3678899/large_95f8ecd1-536b-44ce-ad9b-0a9498bb7cf0.png", "original": "https://splitwise.s3.amazonaws.com/uploads/expense/receipt/3678899/95f8ecd1-536b-44ce-ad9b-0a9498bb7cf0.png" }, "users": [ { "user": { "id": 491923, "first_name": "Jane", "last_name": "Doe", "picture": { "medium": "image_url" } }, "user_id": 491923, "paid_share": "8.99", "owed_share": "4.5", "net_balance": "4.49" } ], "comments": [ { "id": 79800950, "content": "John D. updated this transaction: - The cost changed from $6.99 to $8.99", "comment_type": "System", "relation_type": "ExpenseComment", "relation_id": 855870953, "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "user": { "id": 491923, "first_name": "Jane", "last_name": "Doe", "picture": { "medium": "image_url" } } } ] } ], "errors": {} } ``` -------------------------------- ### Example Request Body for Update Expense API Source: https://dev.splitwise.com/index A sample JSON payload demonstrating the structure and typical values for updating an expense via the Splitwise API. ```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" } ``` -------------------------------- ### Sample Request: Create Comment Payload Source: https://dev.splitwise.com/index An example JSON payload for creating a new comment, specifying the expense ID and the comment content. ```APIDOC { "expense_id": 5123, "content": "Does this include the delivery fee?" } ``` -------------------------------- ### API Endpoint: Get Supported Currencies Source: https://dev.splitwise.com/index Retrieves a list of all currencies supported by the system. These include standard ISO 4217 codes, as well as some pending or unofficial colloquial codes. ```APIDOC API Endpoint: Get Supported Currencies Method: GET Path: /get_currencies Full URL: https://secure.splitwise.com/api/v3.0/get_currencies Responses: 200 OK: Content-Type: application/json Body Schema: currencies: array of objects - currency_code: string (e.g., "BRL") - unit: string (e.g., "R$") Example Response Body: { "currencies": [ { "currency_code": "BRL", "unit": "R$" } ] } ``` -------------------------------- ### Sample Response: Delete Comment Success Source: https://dev.splitwise.com/index An example JSON response after successfully deleting a comment, showing the details of the comment that was removed. ```APIDOC { "comment": { "id": 79800950, "content": "Does this include the delivery fee?", "comment_type": "User", "relation_type": "ExpenseComment", "relation_id": 855870953, "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "user": { "id": 491923, "first_name": "Jane", "last_name": "Doe", "picture": { "medium": "image_url" } } } } ``` -------------------------------- ### API: Create Expense Successful Response Example (JSON) Source: https://dev.splitwise.com/index A sample JSON response returned upon successful creation of an expense. It includes detailed information about the created expense, including IDs, timestamps, user details, category, receipt, and comments. ```JSON { "expenses": [ { "cost": "25.0", "description": "Brunch", "details": "string", "date": "2012-05-02T13:00:00Z", "repeat_interval": "never", "currency_code": "USD", "category_id": 15, "id": 51023, "group_id": 391, "friendship_id": 4818, "expense_bundle_id": 491030, "repeats": true, "email_reminder": true, "email_reminder_in_advance": null, "next_repeat": "string", "comments_count": 0, "payment": true, "transaction_confirmed": true, "repayments": [ { "from": 6788709, "to": 270896089, "amount": "25.0" } ], "created_at": "2012-07-27T06:17:09Z", "created_by": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false }, "updated_at": "2012-12-23T05:47:02Z", "updated_by": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false }, "deleted_at": "2012-12-23T05:47:02Z", "deleted_by": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false }, "category": { "id": 5, "name": "Electricity" }, "receipt": { "large": "https://splitwise.s3.amazonaws.com/uploads/expense/receipt/3678899/large_95f8ecd1-536b-44ce-ad9b-0a9498bb7cf0.png", "original": "https://splitwise.s3.amazonaws.com/uploads/expense/receipt/3678899/95f8ecd1-536b-44ce-ad9b-0a9498bb7cf0.png" }, "users": [ { "user": { "id": 491923, "first_name": "Jane", "last_name": "Doe", "picture": { "medium": "image_url" } }, "user_id": 491923, "paid_share": "8.99", "owed_share": "4.5", "net_balance": "4.49" } ], "comments": [ { "id": 79800950, "content": "John D. updated this transaction: - The cost changed from $6.99 to $8.99", "comment_type": "System", "relation_type": "ExpenseComment", "relation_id": 855870953, "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "user": { "id": 491923, "first_name": "Jane", "last_name": "Doe", "picture": { "medium": "image_url" } } } ] } ], "errors": {} } ``` -------------------------------- ### Group Object JSON Schema Example Source: https://dev.splitwise.com/index An example JSON structure representing a group object, including members, debts, and avatar information. This schema details the fields returned for a group, such as ID, name, type, members with their details, balances, original and simplified debts, and various avatar and cover photo URLs. ```APIDOC { "group": { "id": 321, "name": "Housemates 2020", "group_type": "home", "updated_at": "2019-08-24T14:15:22Z", "simplify_by_default": true, "members": [ { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false, "balance": [ { "currency_code": "USD", "amount": "-5.02" } ] } ], "original_debts": [ { "from": 18523, "to": 90261, "amount": "414.5", "currency_code": "USD" } ], "simplified_debts": [ { "from": 18523, "to": 90261, "amount": "414.5", "currency_code": "USD" } ], "avatar": { "original": null, "xxlarge": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-1000px.png", "xlarge": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-500px.png", "large": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-200px.png", "medium": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-100px.png", "small": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-50px.png" }, "custom_avatar": true, "cover_photo": { "xxlarge": "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-1000px.png", "xlarge": "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-500px.png" }, "invite_link": "https://www.splitwise.com/join/abQwErTyuI+12" } } ``` -------------------------------- ### API Documentation for Get Expense Information Endpoint Source: https://dev.splitwise.com/index This section outlines the API endpoint for retrieving detailed information about a specific expense. It includes authorization requirements, path parameters, and common HTTP response codes. ```APIDOC Endpoint: /get_expense/{id} Method: GET Description: Get expense information. Authorizations: OAuth, ApiKeyAuth Path Parameters: id: integer (required) Responses: 200: OK 401: Invalid API key or OAuth access token 403: Forbidden 404: Not Found ``` -------------------------------- ### Get Expense Comments API Documentation Source: https://dev.splitwise.com/index API endpoint details for retrieving comments associated with a specific expense. This GET request requires an expense ID as a query parameter and supports OAuth or API Key authentication. ```APIDOC Endpoint: Get expense comments Method: GET Path: /get_comments URL: https://secure.splitwise.com/api/v3.0/get_comments Authorizations: - OAuth - ApiKeyAuth Query Parameters: expense_id: integer (required) - Example: expense_id=4193 Responses: 200: OK 401: Invalid API key or OAuth access token 403: Forbidden 404: Not Found ``` -------------------------------- ### List Current User's Groups API (GET /get_groups) Source: https://dev.splitwise.com/index Documents the API endpoint for retrieving a list of groups associated with the current user, including authorization, response codes, and a detailed response sample. ```APIDOC Endpoint: GET /get_groups URL: https://secure.splitwise.com/api/v3.0/get_groups Authorizations: OAuth, ApiKeyAuth Responses: 200: OK 401: Invalid API key or OAuth access token ``` ```json { "groups": [ { "id": 321, "name": "Housemates 2020", "group_type": "home", "updated_at": "2019-08-24T14:15:22Z", "simplify_by_default": true, "members": [ { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false, "balance": [ { "currency_code": "USD", "amount": "-5.02" } ] } ], "original_debts": [ { "from": 18523, "to": 90261, "amount": "414.5", "currency_code": "USD" } ], "simplified_debts": [ { "from": 18523, "to": 90261, "amount": "414.5", "currency_code": "USD" } ], "avatar": { "original": null, "xxlarge": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-1000px.png", "xlarge": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-500px.png", "large": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-200px.png", "medium": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-100px.png", "small": "https://s3.amazonaws.com/splitwise/uploads/group/default_avatars/avatar-ruby2-house-50px.png" }, "custom_avatar": true, "cover_photo": { "xxlarge": "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-1000px.png", "xlarge": "https://s3.amazonaws.com/splitwise/uploads/group/default_cover_photos/coverphoto-ruby-500px.png" }, "invite_link": "https://www.splitwise.com/join/abQwErTyuI+12" } ] } ``` -------------------------------- ### Get Group by ID API (GET /get_group/{id}) Source: https://dev.splitwise.com/index Documents the API endpoint for retrieving detailed information about a specific group by its ID, including path parameters, authorization, and response codes. ```APIDOC Endpoint: GET /get_group/{id} URL: https://secure.splitwise.com/api/v3.0/get_group/{id} Authorizations: OAuth, ApiKeyAuth Path Parameters: id: integer (required) Responses: 200: OK 401: Invalid API key or OAuth access token 403: Forbidden 404: Not Found ``` -------------------------------- ### API Endpoint: Get Supported Categories Source: https://dev.splitwise.com/index Retrieves a list of all expense categories and subcategories allowed by Splitwise. When creating expenses, a subcategory must be used; if a parent category is intended, use the 'Other' subcategory. ```APIDOC API Endpoint: Get Supported Categories Method: GET Path: /get_categories Full URL: https://secure.splitwise.com/api/v3.0/get_categories Responses: 200 OK: Content-Type: application/json Body Schema: categories: array of objects - id: number (e.g., 1) - name: string (e.g., "Utilities") - icon: string (URL) - icon_types: object - slim: object - small: string (URL) - large: string (URL) - square: object - large: string (URL) - xlarge: string (URL) - subcategories: array of objects - id: number (e.g., 48) - name: string (e.g., "Cleaning") - icon: string (URL) - icon_types: object - slim: object - small: string (URL) - large: string (URL) - square: object - large: string (URL) - xlarge: string (URL) Example Response Body: { "categories": [ { "id": 1, "name": "Utilities", "icon": "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/utilities/cleaning.png", "icon_types": { "slim": { "small": "http://example.com", "large": "http://example.com" }, "square": { "large": "http://example.com", "xlarge": "http://example.com" } }, "subcategories": [ { "id": 48, "name": "Cleaning", "icon": "https://s3.amazonaws.com/splitwise/uploads/category/icon/square/utilities/cleaning.png", "icon_types": { "slim": { "small": "http://example.com", "large": "http://example.com" }, "square": { "large": "http://example.com", "xlarge": "http://example.com" } } } ] } ] } ``` -------------------------------- ### Splitwise API: Get Expenses Endpoint Documentation Source: https://dev.splitwise.com/index Documents the `get_expenses` endpoint, including available query parameters for filtering, possible HTTP response codes, and a comprehensive sample JSON response body for a successful request. This endpoint allows users to retrieve their expenses, optionally filtered by group, friend, or date ranges. ```APIDOC Endpoint: GET /get_expenses URL: https://secure.splitwise.com/api/v3.0/get_expenses 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 ) dated_before (string ) updated_after (string ) updated_before (string ) limit (integer): Default: 20 offset (integer): Default: 0 Responses: 200: OK 401: Invalid API key or OAuth access token 403: Forbidden 404: Not Found Response Sample (200 OK, application/json): { "expenses": [ { "cost": "25.0", "description": "Brunch", "details": "string", "date": "2012-05-02T13:00:00Z", "repeat_interval": "never", "currency_code": "USD", "category_id": 15, "id": 51023, "group_id": 391, "friendship_id": 4818, "expense_bundle_id": 491030, "repeats": true, "email_reminder": true, "email_reminder_in_advance": null, "next_repeat": "string", "comments_count": 0, "payment": true, "transaction_confirmed": true, "repayments": [ { "from": 6788709, "to": 270896089, "amount": "25.0" } ], "created_at": "2012-07-27T06:17:09Z", "created_by": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false }, "updated_at": "2012-12-23T05:47:02Z", "updated_by": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false }, "deleted_at": "2012-12-23T05:47:02Z", "deleted_by": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false }, "category": { "id": 5, "name": "Electricity" }, "receipt": { "large": "", "original": "" }, "users": [ { "user": { "id": 491923, "first_name": "Jane", "last_name": "Doe", "picture": { "medium": "image_url" } }, "user_id": 491923, "paid_share": "8.99", "owed_share": "4.5", "net_balance": "4.49" } ], "comments": [ { "id": 79800950, "content": "John D. updated this transaction: - The cost changed from $6.99 to $8.99", "comment_type": "System", "relation_type": "ExpenseComment", "relation_id": 855870953, "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "user": { "id": 491923, "first_name": "Jane", "last_name": "Doe", "picture": { "medium": "image_url" } } } ] } ] } ``` -------------------------------- ### Get All Friends (Splitwise API) Source: https://dev.splitwise.com/index Retrieves a list of all friends associated with the authenticated user. The response includes comprehensive details for each friend, such as their ID, name, email, registration status, picture URLs, associated groups with balances, and overall balances. ```APIDOC GET /api/v3.0/get_friends URL: https://secure.splitwise.com/api/v3.0/get_friends Responses: 200 OK: Content-Type: application/json Schema: { "friends": [ { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false, "groups": [ { "group_id": 571, "balance": [ { "currency_code": "USD", "amount": "414.5" } ] } ], "balance": [ { "currency_code": "USD", "amount": "414.5" } ], "updated_at": "2019-08-24T14:15:22Z" } ] } 401 Unauthorized: Invalid API key or OAuth access token ``` -------------------------------- ### Get Current User Information (Splitwise API) Source: https://dev.splitwise.com/index Retrieves detailed information about the currently authenticated user. This endpoint requires either OAuth or API Key authorization. The response includes comprehensive user profile data such as ID, name, email, registration status, picture details, notification settings, default currency, and locale. ```APIDOC Method: GET Path: /get_current_user Full URL: https://secure.splitwise.com/api/v3.0/get_current_user Authorizations: OAuth, ApiKeyAuth Responses: 200 OK: Content-Type: application/json Sample Body: { "user": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false, "notifications_read": "2017-06-02T20:21:57Z", "notifications_count": 12, "notifications": { "added_as_friend": true }, "default_currency": "USD", "locale": "en" } } 401 Unauthorized: Invalid API key or OAuth access token ``` -------------------------------- ### API Specification: Get Notifications Source: https://dev.splitwise.com/index Defines the API endpoint for retrieving a list of recent activity notifications for the user's account. Supports filtering by 'updated_after' timestamp and limiting the number of results. Includes a table of notification types and their meanings. ```APIDOC get /get_notifications https://secure.splitwise.com/api/v3.0/get_notifications Authorizations: OAuth, ApiKeyAuth Query Parameters: updated_after: string (optional) Example: updated_after=2020-07-28T20:46:00Z Description: If provided, returns only notifications after this time. limit: integer (optional) Default: 0 Description: Omit (or provide 0) to get the maximum number of notifications. Notification Types: 0: Expense added 1: Expense updated 2: Expense deleted 3: Comment added 4: Added to group 5: Removed from group 6: Group deleted 7: Group settings changed 8: Added as friend 9: Removed from friend 10: News (a URL should be included) 11: Debt simplification 12: Group undeleted 13: Expense undeleted 14: Group currency conversion 15: Friend currency conversion Responses: 200: OK 401: Invalid API key or OAuth access token ``` -------------------------------- ### Get Information About Another User (Splitwise API) Source: https://dev.splitwise.com/index Retrieves detailed information for a specific user by their unique ID. This endpoint requires either OAuth or API Key authorization. The response includes user profile data such as ID, name, email, registration status, and picture details. ```APIDOC Method: GET Path: /get_user/{id} Full URL: https://secure.splitwise.com/api/v3.0/get_user/{id} Authorizations: OAuth, ApiKeyAuth Path Parameters: id: Type: integer Required: true Responses: 200 OK: Content-Type: application/json Sample Body: { "user": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false } } 401 Unauthorized: Invalid API key or OAuth access token 403 Forbidden 404 Not Found ``` -------------------------------- ### Get Friend Details by ID (Splitwise API) Source: https://dev.splitwise.com/index Retrieves detailed information for a specific friend using their unique user ID. This endpoint requires either OAuth or API Key authorization. The response provides a complete profile for the requested friend. ```APIDOC GET /api/v3.0/get_friend/{id} URL: https://secure.splitwise.com/api/v3.0/get_friend/{id} Authorizations: OAuth, ApiKeyAuth Path Parameters: id (required): integer - User ID of the friend Responses: 200 OK: Content-Type: application/json Schema: { "friend": { "id": 0, "first_name": "Ada", "last_name": "Lovelace", "email": "ada@example.com", "registration_status": "confirmed", "picture": { "small": "string", "medium": "string", "large": "string" }, "custom_picture": false, "groups": [ { "group_id": 571, "balance": [ { "currency_code": "USD", "amount": "414.5" } ] } ], "balance": [ { "currency_code": "USD", "amount": "414.5" } ], "updated_at": "2019-08-24T14:15:22Z" } } 401 Unauthorized: Invalid API key or OAuth access token 403 Forbidden 404 Not Found ``` -------------------------------- ### Splitwise API Endpoint Reference Source: https://dev.splitwise.com/index Detailed reference for all available resources and their associated HTTP methods and descriptions within the Splitwise API. ```APIDOC Users: get: Get information about the current user get: Get information about another user post: Update a user Groups: get: List the current user's groups get: Get information about a group post: Create a group post: Delete a group post: Restore a group post: Add a user to a group post: Remove a user from a group Friends: get: List current user's friends get: Get details about a friend post: Add a friend post: Add friends post: Delete friendship Expenses: get: Get expense information get: List the current user's expenses post: Create an expense post: Update an expense post: Delete an expense post: Restore an expense Comments: get: Get expense comments post: Create a comment post: Delete a comment Notifications: get: Get notifications Other: get: Supported currencies get: Supported categories ``` -------------------------------- ### Create Group API Endpoint Reference Source: https://dev.splitwise.com/index Detailed API documentation for the `create_group` endpoint. This includes authorization requirements, the request body schema with parameter types and descriptions, possible response status codes, and the full endpoint URL. ```APIDOC Endpoint: POST /api/v3.0/create_group Base URL: https://secure.splitwise.com Description: Creates a new group. Adds the current user to the group by default. Note: group user parameters must be flattened into the format `users__{index}__{property}`, where `property` is `user_id`, `first_name`, `last_name`, or `email`. The user's email or ID must be provided. Authorizations: - OAuth - ApiKeyAuth Request Body (application/json): - name (required): string - group_type: string (Enum: "home", "trip", "couple", "other", "apartment", "house") Description: What is the group used for? Note: It is recommended to use `home` in place of `house` or `apartment`. - simplify_by_default: boolean Description: Turn on simplify debts? - users__{index}__{property} (additional property): string Description: Flattened user parameters (e.g., users__0__first_name, users__0__email). Responses: - 200: OK - 400: Bad Request - 401: Unauthorized - 403: Forbidden - 404: Not Found ``` -------------------------------- ### Splitwise API: Create Expense Endpoint Documentation Source: https://dev.splitwise.com/index Details the functionality for creating an expense, including rules for splitting expenses equally or by providing specific shares. It also specifies the required user identification methods for shares and highlights an important note regarding the interpretation of a 200 OK response. ```APIDOC Endpoint: Create an expense Description: 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: - `email`, `first_name`, and `last_name` - `user_id` Note: 200 OK does not indicate a successful response. The operation was successful only if `errors` is empty. Authorizations: - OAuth - ApiKeyAuth ``` -------------------------------- ### Splitwise API: Update Expense Endpoint Reference Source: https://dev.splitwise.com/index Detailed documentation for the `POST /update_expense/{id}` endpoint, including path parameters, request body schema, and HTTP response codes. ```APIDOC Endpoint: POST /update_expense/{id} URL: https://secure.splitwise.com/api/v3.0/update_expense/{id} Path Parameters: id: type: integer required: true description: ID of the expense to update Request Body Schema (application/json): cost: type: string required: true description: A string representation of a decimal value, limited to 2 decimal places description: type: string required: true description: A short description of the expense details: type: string or null description: Also known as "notes." date: type: string description: The date and time the expense took place. May differ from `created_at` repeat_interval: type: string enum: "never", "weekly", "fortnightly", "monthly", "yearly" currency_code: type: string description: A currency code. Must be in the list from `get_currencies` category_id: type: integer description: A category id from `get_categories` group_id: type: integer required: true description: The group to put this expense in, or `0` to create an expense outside of a group. users__0__user_id: type: integer users__0__paid_share: type: string description: Decimal amount as a string with 2 decimal places. The amount this user paid for the expense users__0__owed_share: type: string description: Decimal amount as a string with 2 decimal places. The amount this user owes for the expense users__1__first_name: type: string users__1__last_name: type: string users__1__email: type: string users__1__paid_share: type: string description: Decimal amount as a string with 2 decimal places. The amount this user paid for the expense users__1__owed_share: type: string description: Decimal amount as a string with 2 decimal places. The amount this user owes for the expense users__{index}__{property}*: type: string description: additional property Responses: 200: OK 401: Invalid API key or OAuth access token 403: Forbidden ```