Skip to main content
Every endpoint that changes data works the same way. A key that can write follows three rules, whichever area it writes to.

Retry a create safely: Idempotency-Key

A request can time out after Scoutworks has made the record. If you send it again, you could make a second one. To stop that, send an Idempotency-Key header with every POST: any printable text up to 255 characters, unique to the record you are making. A UUID is a good choice.
For 24 hours, Scoutworks remembers the key: Each key keeps its own list, so two of your keys can use the same Idempotency-Key without clashing. Most creates accept the header and recommend it. A create that must never run twice, such as POST /transactions, requires it and answers 400 without it.

Do not overwrite a newer change: If-Match

Every record you read with a single-record GET, and every record a write returns, comes with an ETag header. The tag changes whenever anything in the record changes. To change a record only if nobody else has changed it since you read it, send that tag back as If-Match on the PATCH, PUT or DELETE:
If the record has changed, the API answers 412 with the code stale_write, and changes nothing. The 412 carries the record’s current ETag. Read the record again, decide what to do with the new values, and send the change with that tag.
  • Send the tag exactly as you received it, quotes included. If-Match: * matches any version.
  • If-Match is optional. Without it, the last write wins. We recommend it for anything a person might also edit in Scoutworks.
  • The tag describes the record as your key sees it. A key with more scopes sees more fields, so it gets a different tag for the same record.
  • The tag covers everything in the record, totals included. A budget’s spent and a fund’s remaining change when someone records a transaction against them, so the tag changes too, even if nobody edited the budget or fund. On a busy budget, expect the occasional 412: retry with the tag it carries.
PATCH /transactions/{transactionId} also takes the updatedAt you last read, in the body, and answers 412 the same way when it is stale.

Write many records at once: bulk writes

Endpoints that write many records in one request all work the same way: PUT /events/{eventId}/attendance (one register), POST /attendance/bulk (marks across registers), POST /badge-requirements/bulk (badge sign-offs) and POST /badge-awards/bulk (badge awards). They take a body of { "items": [...] }, with 1 to 100 items, and answer 200 with one result for each item, in the order you sent them:
  • An item that is not valid, or that is refused, does not stop the others. Its result has status: "error" and says why, and none of its changes are saved.
  • A request with no items, or more than 100, is refused as a whole with 400.
  • Each item is matched on what it is about (a member and a meeting, say), so sending the same items again is safe: unchanged items answer unchanged.
  • A bulk request counts as one change against the limit of 30 changes a minute. See Rate limits.
  • A bulk POST also takes an Idempotency-Key. You do not need one to retry safely, but with one, a second copy of the request sent while the first is still running answers 409 instead of running too. A replay with the same key and body runs the items again and answers with Idempotent-Replayed: true; each item then answers as it stands, which is unchanged for an item the first request wrote.
  • PUT /events/{eventId}/attendance takes If-Match with the register’s ETag from GET /events/{eventId}/attendance, and answers with the register’s new ETag.
Try a write on one record first: send one item, check the result in Scoutworks, then send the rest. The sandbox key is read-only, so use your own key with the write scope, on a young person whose record you can put back.

Try a write safely

There is no practice mode, and the public sandbox key is read only. So test a write on your own group, with your own key, on a record you made for the purpose:
  1. Make a test record with the write itself. Add a test member called “Test Member”, a draft event, or a waiting-list application for a made-up child. A draft event is the safest: families hear of an event only when a leader publishes it.
  2. Check it in Scoutworks. Open the record and see that every field landed where you meant.
  3. Undo it in Scoutworks. Archive the test member, delete the draft event or the application, or delete the test transaction. The API never deletes a member, so this step is in the app.
  4. Then run it for real. Start with one real record, check it, then the rest.
Writes through the API never email or notify a family unless the request sends "notify": true. Leave it out while you test. Each recipe shows one write in full: curl, Python, JavaScript, PowerShell and n8n.

Who made the change

A change made with a key is recorded as made by the admin who created the key, and Scoutworks marks the record with the key’s name, so people can see a script did it. A write never emails or notifies parents unless the request asks it to. POST /badge-requirements/bulk takes notify: true to send the one notice the app sends for a sign-off, the Young Leader’s own; without it, nobody is told. A register mark or a badge award sends nothing either way, as in the app.