Full Sample
Sample
{
"campaigns":{
"campaign_id_1": {
"en-US": {
"title": "We are awesome",
"description": "Checkout how awesome we are",
"imageUrl": "https://link.awesome.pic/yolo.png",
"actionLink": "http://settleup.io/",
"actionName": "Show"
},
"cs-CZ": {
"title": "Jsme úžasní",
"description": "Mrkněte na to, jak jsme úžasní",
"imageUrl": "https://link.awesome.pic/yolo.png",
"actionLink": "http://settleup.io/",
"actionName": "Ukaž"
}
}
},
"changes": {
"group_id_1": {
"change_id_1": {
"action": "insert",
"by": "user_id_1", // this can be missing if the change was made by the server
"entity": "expense",
"entityId": "transaction_id_1",
"entityName": "Pivo", // generated for the given entity type
"serverTimestamp": 147454656
},
"change_id_2": {
"action": "delete",
"entity": "transfer",
"entityId": "user_id_1",
"entityName": "David → Michal",
"serverTimestamp": 147454657
},
"change_id_3": {
"action": "update",
"entity": "permission",
"by": "user_id_1",
"entityId": "user_id_1",
"serverTimestamp": 147454657
},
"change_id_4": {
"action": "currencyChange",
"by": "user_id_1",
"entity": "group",
"entityId": "group_id_1",
"entityName": "CZK",
"serverTimestamp": 3232132
},
"change_id_5": {
"action": "insert",
"entity": "member",
"entityId": "member_id_1",
"entityName": "David",
"serverTimestamp": 147454657
},
"change_id_6": {
"action": "delete",
"by": "user_id_1",
"entity": "allTransactions",
"serverTimestamp": 147454657
},
"change_id_7": {
"action": "migrate",
"by": "user_id_1",
"entity": "group",
"serverTimestamp": 147454657
},
"change_id_8": {
"action": "exchangeRatesChange",
"by": "user_id_1",
"entity": "group",
"entityName": "CZK;EUR",
"serverTimestamp": 147454657
}
}
},
"debts": {
"group_id_1": [{
"from": "member_id_1",
"to": "member_id_2",
"amount": "100.50" // amount in group currency
},
{
"from": "member_id_1",
"to": "member_id_3",
"amount": "100.50"
}]
},
"debtsInternal": {
"group_id_1": {
"generated": 147454657,
"transactions": {
"tx_id_1": 1234
}
}
},
"transactions": {
"group_id_1": {
"expense_id_1": {
"category": "☕", // category of the transaction, can be one of the defaults or custom one
"currencyCode": "CZK",
"dateTime": 1457015264428,
"exchangeRates": {
"EUR": "27.05", // 1 = X in currencyCode currency
"USD": "21.70"
},
"fixedExchangeRate": false, // exchange rate changed manually, next transaction should be fixed as well
"items": [ // first item main expense, second tip, third tax, you need to sum everything to get total
{
"amount": "200.33",
"forWhom": [
{
"memberId": "member_id_1",
"weight": "1"
},
{
"memberId": "member_id_2",
"weight": "2.3"
}
]
}
],
"migrated": true, // not used anymore
"purpose": "Pivo",
"receiptUrl": "http://www.makereceipts.com/receipt_preview.jpg",
"templateId": "template_id_1", // if it was generated from template (recurring or future)
"timezone": "+01:00", // timezone of the user who created the transaction
"type": "expense",
"whoPaid": [
{
"memberId": "member_id_1",
"weight": "1"
}
]
}
}
},
"recurringTransactions": {
"group_id_1": {
"template_id_1": {
"lastGenerated": 1457015264428, // set by server
"runCount": 3, // how many already generated, set by server
"recurrence": {
"startDate": 1457015264428,
"endDate": 1457015264428,
"timezoneOffsetMillis": 3600000, // timezone offset of the user creating the template, used to generate transaction at "appropriate" time
"endCount": 10, // maximum generated repetitions
"period": "daily",
"frequency": 1, // every day
"monthlySetting": "lastDayOfMonth", // mandatory, only for period=monthly
"weeklySetting": [ "mon","wed","fri" ] // optional, only for period=weekly. If missing day is determined by startDate
},
"template": {
"currencyCode": "CZK",
"exchangeRates": {
"EUR": "27.05"
},
"fixedExchangeRate": true,
"items": [
{
"amount": "200.33",
"forWhom": [
{
"memberId": "member_id_1",
"weight": "1"
}
]
}
],
"purpose": "Pivo",
"receiptUrl": "http://www.makereceipts.com/receipt_preview.jpg",
"type": "expense",
"whoPaid": [
{
"memberId": "member_id_1",
"weight": "1"
}
]
}
},
"template_id_2": {
"lastGenerated": 1457015264428,
"runCount": 0,
"recurrence": {
"startDate": 1457015264428,
"timezoneOffsetMillis": 3600000,
"period": "yearly",
"frequency": 1
},
"template": {
"currencyCode": "CZK",
"fixedExchangeRate": false,
"items": [
{
"amount": "200.33",
"forWhom": [
{
"memberId": "member_id_1",
"weight": "1"
}
]
}
],
"purpose": "Pivo",
"receiptUrl": "http://www.makereceipts.com/receipt_preview.jpg",
"type": "expense",
"whoPaid": [
{
"memberId": "member_id_1",
"weight": "1"
}
]
}
},
"template_id_3": {
"lastGenerated": 1457015264428,
"runCount": 0,
"recurrence": {
"startDate": 1457015264428,
"endCount": 10,
"timezoneOffsetMillis": 3600000,
"period": "weekly",
"frequency": 1,
"weeklySetting": [ "mon","tue","fri" ]
},
"template": { }
},
"template_id_4": {
"lastGenerated": 1457015264428,
"runCount": 0,
"recurrence": {
"startDate": 1457015264428,
"endDate": 1457015264428,
"endCount": 10,
"timezoneOffsetMillis": 3600000,
"period": "monthly",
"frequency": 1,
"monthlySetting": "lastDayOfMonth"
},
"template": { }
}
}
},
"groups": {
"group_id_1": {
"ownerColor": "#ec1561", // fallback when user doesn't have own color in userGroups (like in group preview)
"convertedToCurrency": "USD",
"inviteLink": "https://join.settleup.app/abcdefgh",
"inviteLinkHash": "test",
"inviteLinkActive": true,
"minimizeDebts": true,
"remindOldDebts": true,
"name": "Dogfood",
"premiumPurchasedBy": "user_id_1", // this is a premium group, purchased by user_id_1
"premiumPurchasedUntil": 1457015264428, // time-limited group premium (lifetime if)
"lastChanged": 1457015264428, // set automatically by server
"defaultPermission": 10 // default permission for new members, enforced by server
},
"group_id_2": {
"ownerColor": "#00BCD4",
"convertedToCurrency": "USD",
"inviteLinkHash": "test",
"migrated": true,
"minimizeDebts": true,
"name": "Flatmates"
},
"group_id_3": {
"ownerColor": "#ff5607",
"convertedToCurrency": "USD",
"inviteLinkHash": "test",
"minimizeDebts": true,
"name": "Friends"
},
"group_id_4": {
"ownerColor": "#009788",
"convertedToCurrency": "USD",
"inviteLinkHash": "test",
"minimizeDebts": true,
"name": "Fellowship"
},
"group_id_5": {
"ownerColor": "#ffc200",
"convertedToCurrency": "USD",
"inviteLinkHash": "test",
"minimizeDebts": true,
"name": "Jedi",
"premiumPurchasedBy": "user_id_1" // lifetime group premium
},
"group_id_6": {
"ownerColor": "#ffc200",
"convertedToCurrency": "USD",
"inviteLinkHash": "test",
"minimizeDebts": true,
"name": "Jedi"
}
},
"groupCategories": {
"group_id_1": {
"☕": "Coffee",
"🍦": "Ice Cream"
}
},
"inviteLinkHashes": {
"invite_hash_1": "group_id_1",
"invite_hash_2": "group_id_2"
},
"archivedGroups": {
"user_id_1": {
"group_id_1": {
"name": "Ultra old group",
"ownerId": "user_id_1"
}
}
},
"deletedGroups": {
"group_id_1": {
"name": "Deleted group",
"ownerId": "user_id_1",
"timestamp": 123456789
}
},
"members": {
"group_id_1": {
"member_id_1": {
"active": true, // whether to include member in new transactions
"bankAccount": "532224564654/0100",
"lightningAddress": "ln@settleup.io",
"defaultWeight": "1", // 0 = check off by default in transactions, otherwise default weight in new transactions
"name": "David",
"photoUrl": "https://lh3.googleusercontent.com/-BNa-7Enz7G8/AAAAAAAAAAI/AAAAAAAA16I/4cLGMI6XXl4/s120-c/photo.jpg",
"paymentHandles": {
"revolut": "bezy",
"cashapp": "bezy"
}
},
"member_id_2": {
"active": true,
"defaultWeight": "1",
"migrated": true,
"name": "Daria"
},
"member_id_3": {
"active": true,
"defaultWeight": "1",
"name": "Filip"
},
"member_id_4": {
"active": true,
"defaultWeight": "1",
"name": "Michal"
}
},
"group_id_2": {
"member_id_1": {
"active": true,
"bankAccount": "532224564654/0100",
"defaultWeight": "1",
"name": "David",
"photoUrl": "https://lh3.googleusercontent.com/-BNa-7Enz7G8/AAAAAAAAAAI/AAAAAAAA16I/4cLGMI6XXl4/s120-c/photo.jpg"
},
"member_id_2": {
"active": true,
"defaultWeight": "1",
"name": "Daria"
}
},
"group_id_3": {
"member_id_1": {
"active": true,
"bankAccount": "532224564654/0100",
"defaultWeight": "1",
"name": "David",
"photoUrl": "https://lh3.googleusercontent.com/-BNa-7Enz7G8/AAAAAAAAAAI/AAAAAAAA16I/4cLGMI6XXl4/s120-c/photo.jpg"
}
},
"group_id_4": {
"member_id_1": {
"active": true,
"bankAccount": "532224564654/0100",
"defaultWeight": "1",
"name": "Frodo"
},
"member_id_2": {
"active": true,
"defaultWeight": "1",
"name": "Sam"
}
},
"group_id_5": {
"member_id_1": {
"active": true,
"bankAccount": "532224564654/0100",
"defaultWeight": "1",
"name": "Obi-Wan",
"photoUrl": "http://icons.iconarchive.com/icons/creativeflip/starwars-longshadow-flat/128/Obi-Wan-icon.png"
},
"member_id_2": {
"active": true,
"defaultWeight": "2",
"name": "R2-D2",
"photoUrl": "https://cdn0.iconfinder.com/data/icons/geek-zone-icons-rounded/110/R2D2-128.png"
},
"member_id_3": {
"active": true,
"defaultWeight": "1",
"name": "C3-PO",
"photoUrl": "http://icons.iconarchive.com/icons/creativeflip/starwars-longshadow-flat/128/C3PO-icon.png"
},
"member_id_4": {
"active": true,
"defaultWeight": "1",
"name": "Yoda",
"photoUrl": "http://icons.iconarchive.com/icons/creativeflip/starwars-longshadow-flat/128/Yoda-icon.png"
},
"member_id_5": {
"active": true,
"defaultWeight": "1",
"name": "Finn",
"photoUrl": "https://66.media.tumblr.com/avatar_0de93ba1f99b_128.png"
}
}
},
"offers":{
"black-friday-2025": { // offerId from the Google Play / App Store / Stripe
"endsAt": 1457015264428, // required; timestamp in ms, used for countdown
"colorPrimaryLight": "#ff5607", // colour of the primary text (see below); a lighter version will be applied to the background of the campaign stripe around the promoted offer on the Premium screen; optional; if missing, Premium colour is used (IP or GP)
"colorPrimaryDark": "#ff7845", // optional; if missing, Premium colour is used (IP or GP)
"colorSecondaryLight": "#F7AD00", // colour of the secondary text and text inside the discount bubble; optional; if missing, onBackground colour is used (black)
"colorSecondaryDark": "#F7AD00", // optional; if missing, onBackground colour is used (white)
"colorTertiaryLight": "#F7AD00", // colour of the background of the campaign stripe and the discount bubble; optional; if missing, primary colour is used to calculate background colour
"colorTertiaryDark": "#F7AD00", // optional; if missing, primary colour is used to calculate background colour
"showDiscountIcon": true, // required; whether to show discount icon next to discount text in the discount bubble
"localized": {
"en": { // default if locale doesn't match
"titlePrimary": "BLACK", // required; this string will have Primary colour
"titleSecondary": "FRIDAY", // this string will have Secondary colour; optional
"buttonTextPrimary": "Claim your 50% discount", // this is on CTA button; optional; if missing, normal button text without offer is used
"buttonTextSecondary": "Yearly subscription: cancel anytime" // this is under the CTA button on bottom sheets and in before-ad; optional, if missing default text under button is used
},
"cs-CZ": {
"titlePrimary": "BLACK",
"titleSecondary": "FRIDAY",
"buttonTextPrimary": "Nechci slevu zadarmo",
"buttonTextSecondary": "Roční předplatné: zrušte kdykoliv"
}
}
}
},
"paymentProviders": {
"revolut": {
"platforms": ["ios", "android", "web"], // null means available for all
"name": "Revolut",
"icon": "<url>",
"link": "https://revolut.me/{handle}?amount={amount}¤cy={currency}¬e={purpose}",
"handlePrefix": "@", // optional
"amountFormat": "minor|decimal",
"currencies": ["USD", "CZK"], // null means no limit
"regions": ["CZ", "US", "UK", "IN"], // null means no limit
"androidPackageName": "com.x.y",
"active": true,
"order": 0
}
},
"partnerGroupPremiums": { // Karavaan (and others) cooperation, contains a list of activated GPs
"partner_id_1": {
"user_id_1": {
"subscription_id_1": true,
"subscription_id_2": true
},
"user_id_2": {
"subscription_id_3": true
}
}
},
"permissions": {
"group_id_1": {
"user_id_1": {
"level": 30
}
},
"group_id_2": {
"user_id_1": {
"level": 20,
"migrated": true
}
}
},
"pushRegistrations": {
"uid_1": {
"push_token_1": {
"platform": "android",
"version": "1666", // version of the app, used to control if given push is supported
"url": "url" // legacy, used only for Windows app
},
"push_token_2": {
"platform": "ios",
"version": "10.0.666"
}
}
},
"users": {
"user_id_1": {
"currentTabId": "group_id_1", // NEW_GROUP or groupId
"authProvider": "google",
"email": "me@destil.cz",
"inviteLinkHash": "test", // used for joining a group
"name": "David Vávra",
"photoUrl": "https://lh3.googleusercontent.com/-BNa-7Enz7G8/AAAAAAAAAAI/AAAAAAAA16I/4cLGMI6XXl4/s120-c/photo.jpg",
"superuser": true,
"locale": "en-us", // system locale or app-specific locale
"defaultPaymentHandles": {
"revolut": "bezy",
"cashapp": "bezy"
}
}
},
"usersInternal": {
"user_id_1": {
"lastActive": 21312321321,
"created": 12312312312,
"anonymous": false
}
},
"userGroups": {
"user_id_1": {
"group_id_1": {
"order": 1,
"color": "#ec1561", // custom color which overrides group ownerColor
"member": "member_id_1" // "This is me" in the app, connection between member and user, multiple users can have same member, optional
},
"group_id_2": {
"order": 2,
"color": "#00BCD4",
"member": "member_id_1",
"migrated": true // Not used anymore
}
}
},
"userRewards": { // Superuser rewards
"user_id_1": {
"reward_id_1": {
"type": "referral",
"count": 1,
"target": 5,
"subscriptionId": "subscription_id_1"
}
}
},
"userRewardsInternal": {
"user_id_1": {
"user_id_2": "reward_id_1"
}
},
"userLightningWithdrawals": {
"user_id_1": {
"group_id_1": {
"lnurlw_id_1": {
"from": "user_id_2",
"lnurl": "LNURL",
"amount": "500",
"fee": 10,
"originalAmount": "5",
"originalCurrency": "CZK",
"refund": false,
"refundAddress": "tomas@settleup.io",
"active": true,
"created": 21312321321,
"expires": 21312321322
}
}
}
},
"subscriptions" : {
"user_id_1" : {
"subscription_id_1" : {
"active": true, // If subscription was cancelled or not
"start" : 21312321321,
"end" : 21312381321,
"store": "googlePlay",
"type" : "monthly",
"receipt": "dsajldjsakljlkdsa",
"sku": "premium_monthly"
},
"subscription_id_2" : {
"start" : 21312321321,
"end" : 21312381321,
"type" : "gift"
},
"subscription_id_3" : {
"start" : 21312321321, // No end = lifetime
"store": "googlePlay",
"type" : "group",
"receipt": "dsajldjsakljlkdsa",
"groupId": "group_id_5",
"durationDays": 9999,
"sku": "sku_7"
},
"subscription_id_4" : {
"start" : 21312321321,
"end" : 41312321321,
"store": "googlePlay",
"type" : "group",
"receipt": "dsajldjsakljlkdsa",
"groupId": "group_id_5",
"durationDays": 31,
"sku": "sku"
},
"subscription_id_5" : {
"start" : 21312321321,
"end" : 41312321321,
"store": "googlePlay",
"type" : "group",
"receipt": "dsajldjsakljlkdsa",
"groupId": "group_id_5",
"durationDays": 7,
"sku": "sku"
},
"subscription_id_6" : {
"start": 21312321321,
"type": "featureReward",
"feature": "colors"
}
}
},
"subscriptionsInternal": {
"user_id_1": {
"active": true
}
},
"subscriptionReceipts": {
"receipt_hash": {
"user": "user_id_1"
}
},
"serverTasksInternal": {
"prohibitChanges": {
"group_id_1": true,
"group_id_2": true
}
},
"serverTasks": {
// force recalculate group debts
"calculateGroupsDebts": {
"task_id_1": {
"serverTimestamp": 21312321321,
"request": {
"groupId": "group_id_1"
},
"response": {
"code": "ok"
}
}
},
// import members & their balances from supported supported service (e.g. Splitwise)
"importMemberBalances": {
"task_id_1": {
"serverTimestamp": 21312321321,
"request": {
"source": "splitwise",
"data": "serialized_file_content"
},
"response": {
"code": "ok",
"currency": "USD",
"memberBalances": [{
"name": "John",
"balance": "25.00"
},{
"name": "Eva",
"balance": "-25.00"
}]
}
}
},
// user picked a reward, activate it
"activateUserReward": {
"task_id_1": {
"serverTimestamp": 21312321321,
"request": {
"rewardId": "reward_id_1",
"type": "featureReward",
"feature": "colors"
},
"response": {
"code": "ok",
"subscriptionId": "subscription_id_1"
}
}
},
// verify subscription receipt and seed /subscriptions/<uid>/
"verifySubscription": {
"task_id_1": {
"serverTimestamp": 21312321321,
"request": {
"store": "googlePlay",
"receipt": "dsajldjsakljlkdsa",
"type" : "monthly"
},
"response": {
"code": "ok"
}
}
},
// change group currency, this requires updating all transactions in the group
"currencyChange" : {
"task_id_3": {
"serverTimestamp": 21312321321,
"request": {
"groupId": "group_id_1",
"targetCurrency": "CZK"
},
"response": {
"code": "ok"
}
}
},
// delete group, backend will actually just archive it and mark it for deletion later
"deleteGroup" : {
"task_id_4": {
"serverTimestamp": 21312321322,
"request": {
"groupId": "group_id_2"
},
"response": {
"code": "ok"
}
}
},
// delete archived group
"deleteArchivedGroup" : {
"task_id_4": {
"serverTimestamp": 21312321322,
"request": {
"groupId": "group_id_2"
},
"response": {
"code": "ok"
}
}
},
// delete all transactions in group
"deleteTransactions" : {
"task_id_5": {
"serverTimestamp": 21312321323,
"request": {
"groupId": "group_id_3"
},
"response": {
"code": "ok"
}
}
},
// archive group to Storage, users will see it in their Groups list
"archiveGroup" : {
"task_id_6": {
"serverTimestamp": 21312321323,
"request": {
"groupId": "group_id_3"
},
"response": {
"code": "ok"
}
}
},
// temporarily restore archived group in preview
"previewGroup" : {
"task_id_7": {
"serverTimestamp": 21312321323,
"request": {
"groupId": "group_id_3"
},
"response": {
"code": "ok"
}
}
},
// fully restore archived group
"restoreGroup" : {
"task_id_8": {
"serverTimestamp": 21312321323,
"request": {
"groupId": "group_id_3"
},
"response": {
"code": "ok"
}
}
},
// active empty Group Premium (one which doesn't have groupId set) for a specied group
"activateEmptyGroupPremium" : {
"task_id_9": {
"serverTimestamp": 21312321323,
"request": {
"subscriptionId": "subscription_id_1",
"groupId": "group_id_5"
},
"response": {
"code": "ok"
}
}
},
// verify Group Premium purchase and set group as Premium
"verifyGroupPremium" : {
"task_id_10": {
"serverTimestamp": 21312321323,
"request": {
"store": "googlePlay",
"receipt": "dsajldjsakljlkdsa",
"groupId": "group_id_5",
"extendSubscriptionId": "subscription_id_1" // optional, for renewing Group Premium
},
"response": {
"code": "ok"
}
}
},
// update exchange rates in bulk for all transactions
"updateExchangeRates" : {
"task_id_11": {
"serverTimestamp": 21312321323,
"request": {
"exchangeRatesToGroupCurrency": {
"EUR": "25.0001",
"USD": "automatic"
},
"groupId": "group_id_5"
},
"response": {
"code": "ok"
}
}
},
// clone group into a new one, optionally archiving the old group
"cloneGroup" : {
"task_id_12": {
"serverTimestamp": 21312321323,
"request": {
"cloneMembers": true,
"cloneDebts": true,
"clonePermissions": true,
"cloneRecurringTransactions": true,
"archiveOldGroup": true,
"debtTransactionPurpose": "Converted debt from %s",
"oldGroupId": "group_id_5",
"oldGroupName": "old_group_name",
"newGroupName": "new_group_name"
},
"response": {
"code": "ok",
"newGroupId": "group_id_11"
}
}
},
// delete all user data, can fail if user is owner of a group
"deleteUser": {
"task_id_13": {
"serverTimestamp": 21312321323,
"request": {
"uid": "user_id_123",
"force": true // if user is owner of some groups they are either deleted or transferred to someone else
},
"response": {
"code": "error",
"ownedGroupIds": [ "group_id_1" ], // groups user ownes they need to transfer to someone else
"subscriptionId": "sub_id_1" // active subscription which couldn't be cancelled automatically
}
}
},
// remind all users in a group about their debts
"remindAllDebts" : {
"task_id_14": {
"serverTimestamp": 21312321323,
"request": {
"groupId": "group_id_5"
},
"response": {
"code": "ok"
}
}
},
// remind the debtor about a specific debt
"remindDebt" : {
"task_id_10": {
"serverTimestamp": 21312321323,
"request": {
"groupId": "group_id_5",
"fromMemberId": "member_id_1",
"toMemberId": "member_id_2",
"amount": "500"
},
"response": {
"code": "ok"
}
}
},
// cancel subscription
"cancelSubscription": { // Only for Stripe & Google Play
"request": {
"subscriptionId": "sub_id_1"
},
"response": {
"code": "ok"
}
}
},
"exchangeRatesToUsd": {
"latest": {
"CZK": "21.43",
"EUR": "0.94"
},
"20150601": {
"CZK": "21.42",
"EUR": "0.94"
}
},
"statistics": {
"public": {
"userCount": 200,
"groupCount": 2000,
"averageGroupCountPerUser": 10
},
"private": {
"userGroupCount": 10
}
},
"emailsInternal": {
"2022031015": {
"02_tips": {
"user_id_1": true
}
}
}
}