- For: quartermasters and leaders who borrow kit
- You get: a sheet of QR labels, a phone shortcut that checks kit out and in with one scan, and a morning email of overdue kit
- Time: about twenty minutes
- Scopes:
equipment:readfor the labels and the email;equipment:writefor the shortcut;adults:readto name who has overdue kit
1. Try the requests
assetNumber, the number on its label. GET /equipment?assetNumber= finds the item a scan read.
2. Print the labels
In a new Google Sheet, choose Extensions → Apps Script. Delete what is there, paste the script below and choose Save.Code.gs
SCOUTWORKS_API_KEY. Reload the sheet and choose Scoutworks → Make QR labels. Print the Labels tab on label paper. The QR code holds the asset number and nothing else.
For the morning email, choose Triggers (the clock) → Add Trigger: function overdueEmail, Time-driven, Day timer, 7am to 8am.
Prefer a message the moment kit is late? Subscribe a webhook to equipment.overdue: Scoutworks sends it once for each check-out that passes its due date, with the item and the adult who has it. Point it at a Zapier, Power Automate or n8n flow that posts in your leaders’ chat.
3. Make the phone shortcut
On an iPhone, open Shortcuts and choose +. Call it Kit store. Add these actions in order:- Scan QR or Barcode.
- Get Contents of URL: your API address,
https://api.scoutworks.app/api/v1, then/equipment?assetNumber=and the QR/Barcode result. Under Headers, addAuthorizationwith the valueBearerand your key. - Get Dictionary Value
data, then Get Item from List: First Item. Name it Item. - If the Item’s
statusisavailable:- Date: Adjust Date to add 7 days. Name it Due.
- Get Contents of URL: the API address then
/equipment-checkouts, MethodPOST, headersAuthorizationas above andIdempotency-Keyset to the Item’sidfollowed by the Current Date in ISO 8601 format, so each check-out has its own key, Request Body JSON:equipmentIdthe Item’sid,dueBackAtthe Due date in ISO 8601 format. - Show Notification: “Checked out: ” and the Item’s
name.
- Otherwise:
- Get Contents of URL: the API address then
/equipment-checkouts?status=active&equipmentId=and the Item’sid, with theAuthorizationheader. Take the first item of itsdata: the open check-out. - Get Contents of URL: the API address then
/equipment-checkouts/, the check-out’sidand/return, MethodPOST, headersAuthorizationandIdempotency-Keyset to the check-out’sid, Request Body JSON empty. - Show Notification: “Checked in: ” and the Item’s
name.
- Get Contents of URL: the API address then
checkedOutToUserId and kit is checked out to the admin who created the key. To record who really has it, give each leader their own shortcut with checkedOutToUserId set to their id from GET /adults.
4. Report damage on return
To say how an item came back, addcondition to the return’s Request Body: good, fair, poor, damaged or needs_repair. Poor, damaged or needs repair puts the item in for repair, as Scoutworks does. Add "notify": true and Scoutworks tells your quartermasters, as it does when a leader reports damage in the app. Without it, nobody is notified.
5. Try one item
Scan one item’s label. You see “Checked out”. Open Equipment in Scoutworks: the item is out, to you, due back in a week. Scan it again: “Checked in”, and the item is available again.6. Switch to your group
The shortcut already usesapi.scoutworks.app. In the script, change api-demo.scoutworks.app to api.scoutworks.app, and put your own key in Script Properties. The labels and the email need equipment:read, plus adults:read to name who has overdue kit. The shortcut needs equipment:write too.
If something goes wrong
See Errors for every code.not_available means the item is out, in repair, retired or lost: open it in Scoutworks to see which. insufficient_stock on a consumable, such as gas canisters, means fewer are left than you asked for.