Skip to content

User Management

Base path: `/api/users`

Get Profile

Get current user profile.

  • Method: `GET`
  • Endpoint: `/me`
  • Response: User object including preferences.

Update Profile

Update profile details.

  • Method: `PUT`
  • Endpoint: `/me`
  • Body: ```json { "full_name": "New Name", "phone": "+1234567890", "is_freelancer_mode": true } ```

Get Balances

Get net balances across all groups.

  • Method: `GET`
  • Endpoint: `/me/balances`

Get Analytics

Get personal spending and income analytics.

  • Method: `GET`
  • Endpoint: `/me/analytics`
  • Query Params:
    • `startDate` (YYYY-MM-DD)
    • `endDate` (YYYY-MM-DD)

Personal Income

Add Income

  • Method: `POST`
  • Endpoint: `/income`
  • Body: ```json { "title": "Salary", "amount": 5000, "source": "job", "date": "2024-01-01" } ```

List Income

  • Method: `GET`
  • Endpoint: `/income`

Delete Income

  • Method: `DELETE`
  • Endpoint: `/income/:id`

Notifications

Get Notifications

  • Method: `GET`
  • Endpoint: `/api/notifications`

Register Push Device (OneSignal)

  • Method: `POST`
  • Endpoint: `/me/onesignal/register`
  • Body: `{"player_id": "..."}`