- For: trustees and treasurers
- You get: a Budget transfers tab listing each move between budgets this year: when, from which budget, to which, and how much
- Time: about ten minutes
- Scopes:
accounting:read
1. Try the request
Paste this into a terminal to see the demo group’s budget transfers:periodId), the two budgets (sourceBudgetId and destinationBudgetId), the amount in pounds and when it was made (createdAt). The reason the treasurer typed is shown in Scoutworks, on the budget, but the API does not return it.
2. Add the script
In your Google Sheet, choose Extensions → Apps Script. Delete what is there, paste the script below and choose Save.Code.gs
3. Add your key and run it
Choose Project Settings (the cog), then Script Properties → Add script property. Property:SCOUTWORKS_API_KEY. Value: the sandbox key to try it, or your own key. Then choose budgetTransfers and press Run.
4. Switch to your group
Changeapi-demo.scoutworks.app to api.scoutworks.app, and replace the sandbox key with your own. The key needs only accounting:read. The sheet holds budget names and amounts, and no one’s name, so it is safe to share with every trustee.
Variations
- One budget’s history: add
&budgetId=and the budget’s id to the/budget-transfersrequest. It lists moves in and out of that budget. - Last year: pick the closed year from
/accounting-periodsinstead of the open one.
If something goes wrong
403 insufficient_scope: the key does not haveaccounting:read.400 invalid_requestnamingperiodIdorbudgetId: the id is not one of your group’s. Read it again from/accounting-periodsor/budgets.