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¶
- Create new
groupentry - POST to/groups - Create your owner
permission- PUT to/permissions/<groupId>/<userId>(level30) - Create first
member- POST to/members/<group_id> - Create your
userGroup- PUT to/userGroups/<user_id>/<group_id> - Update by PUT to
/users/<user_id>/currentTabIdso 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.