Skip to content

Operations

Typical operations are simple reads or writes (GETs and PUTs/POSTs). For data types and what paths they are located at see here.

Here we'll list some more complex operations.

List of groups

First read userGroups which will give you groupIds user has access to. Then read individual groups one by one using those ids.

Create group

  1. Create new group entry - POST to /groups
  2. Create your owner permission - PUT to /permissions/<groupId>/<userId> (level 30)
  3. Create first member - POST to /members/<group_id>
  4. Create your userGroup - PUT to /userGroups/<user_id>/<group_id>
  5. Update by PUT to /users/<user_id>/currentTabId so the user sees the group next.

Schedule future / recurring transaction

Write template (tx template - compared to transaction data definition, it is missing dateTime) and recurrence (specifies how often & when the transaction is generated) to /recurringTransactions/<groupId>/<rtxId>/.

The server is triggered 6x a day (4h apart) and based on the recurrence settings, current time and timezone offset generated given transactions - it aims to generate them between 1am - 5am depending on the user’s time zone.

Server Tasks

These are triggers for some more complex logic done on the server. POST to /serverTasks/<taskName>/, this will give you a taskId.

The data should look like this:

{
  "request": {
    // parameters from bellow table
  }
}

The API is asynchronous, it can run some time. After it’s processed, you can get the status (ok or error) on this GET:

/serverTasks/<taskName>/<taskId>/response/code

Task name Description Parameters
deleteGroup Delete a single group groupId
deleteTransactions Delete all transactions in a group groupId
calculateGroupsDebts Trigger recalculation of debts (normally automatic) groupId
currencyChange Change group currency groupId, targetCurrency

More

This documentation is probably not complete. Please let us know what you need at david@stepuplabs.io and we will extend it.