Splitwise icon

Splitwise

Consume the Splitwise API

Actions9

Overview

This node integrates with the Splitwise API to manage expenses and groups. Specifically, for the Expense - Restore operation, it allows users to restore a previously deleted expense by its ID. This is useful in scenarios where an expense was accidentally deleted or needs to be recovered for record-keeping or further processing.

Practical example:

  • A user deletes an expense but later realizes it was needed for reimbursement. Using this node's restore operation, they can recover that expense without manually recreating it.

Properties

Name Meaning
Authentication Method of authenticating with Splitwise API. Options: "API Key" or "OAuth2".
Expense ID The unique numeric identifier of the expense to restore. Must be a non-negative integer.

Output

The output JSON contains a single field indicating success:

{
  "success": true
}
  • If the restore operation succeeds, success is true.
  • If it fails, an error is thrown (or returned if "continue on fail" is enabled).

No binary data is output by this operation.

Dependencies

  • Requires access to the Splitwise API.
  • Requires either an API key credential or OAuth2 authentication configured in n8n.
  • The base URL used is https://secure.splitwise.com/api/v3.0.

Troubleshooting

  • Common issues:

    • Invalid or missing Expense ID: Ensure the ID corresponds to a deleted expense that can be restored.
    • Authentication errors: Verify that the API key or OAuth2 credentials are correctly set up and have necessary permissions.
    • Network or API downtime: Check connectivity and Splitwise service status.
  • Error messages:

    • "Could not restore expense": Indicates the API call failed to restore the expense. Possible causes include invalid ID, expense not deleted, or permission issues.
      • Resolution: Confirm the expense ID is correct and that the authenticated user has rights to restore it.
    • Other API errors may be surfaced as messages from the Splitwise API; review those for specific guidance.

Links and References

Discussion