create_expense

Add an expense

POST https://secure.splitwise.com/api/v3.0/create_expense

Parameters (Incomplete detailed Expense hash):

  1. payment
  2. cost
  3. description
  4. optional
    1. group_id
    2. friendship_id
    3. details
    4. creation_method: iou, quickadd, payment, or split
    5. date
    6. repeat_interval (one of: never, weekly, fortnightly, monthly, yearly)
    7. currency_code
    8. category_id

multiple user share entries, in the following format:

  1. users__array_index__user_id
  2. users__array_index__first_name
  3. users__array_index__last_name
  4. users__array_index__email
  5. users__array_index__paid_share
  6. users__array_index__owed_share

sending first_name/last_name/email automatically sends an invite/creates a friendship as appropriate

Return value (An array of complete detailed Expense hashes):

  1. id (= nil if record could not be saved)
  2. group_id
  3. friendship_id
  4. expense_bundle_id
  5. description
  6. details
  7. payment
  8. cost
  9. date
  10. created_at
  11. created_by
  12. updated_at
  13. updated_by
  14. deleted_at
  15. deleted_by
  16. category
    1. id
    2. name
  17. users (array)
    1. user_id
    2. paid_share
    3. owed_share
    4. net_balance
  18. In the event of an error, expense hash will include an “errors” attribute, which is an array of errors