> For the complete documentation index, see [llms.txt](https://developers.trooply.co.uk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.trooply.co.uk/claims.md).

# Claims

## Claim a Scout group

> Claims a TSA group into a new Trooply group, seeds its sections, and makes the caller the group's lead volunteer. Returns 409 if the group is already claimed.

```json
{"openapi":"3.1.1","info":{"title":"Trooply API","version":"1.0"},"servers":[{"url":"https://api.trooply.co.uk/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer access token. Generate one from the **Developer** area of your Trooply account and send it as `Authorization: Bearer <token>`.","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SuccessResponse":{"type":"object","properties":{"data":{},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}},"ResponseMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"request_id":{"type":"string","format":"uuid"},"total":{"type":"integer"}}},"ClaimResult":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/ClaimedGroup"},"membership":{"$ref":"#/components/schemas/ClaimedMembership"},"sections":{"type":"array","items":{"$ref":"#/components/schemas/ClaimedSection"}}}},"ClaimedGroup":{"type":"object","properties":{"claimed_at":{"type":"string","format":"date-time"},"county":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"district":{"type":"string"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"postcode":{"type":"string"},"tsa_group_id":{"type":"string","format":"uuid"}}},"ClaimedMembership":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"role":{"type":"string"},"status":{"type":"string"},"user_id":{"type":"string","format":"uuid"}}},"ClaimedSection":{"type":"object","properties":{"badge_framework":{"type":"string"},"group_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"section_type":{"type":"string"},"tsa_section_id":{"type":"string","format":"uuid"}}},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"status":{"type":"integer"}}},"ClaimRequest":{"type":"object","required":["tsa_group_id"],"properties":{"section_ids":{"description":"optional; seeds all TSA sections if absent","type":"array","items":{"type":"string"}},"tsa_group_id":{"type":"string","format":"uuid"}}}}},"paths":{"/v1/groups/claim":{"post":{"description":"Claims a TSA group into a new Trooply group, seeds its sections, and makes the caller the group's lead volunteer. Returns 409 if the group is already claimed.","tags":["claims"],"summary":"Claim a Scout group","responses":{"201":{"description":"The new group, its seeded sections, and your leader membership","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ClaimResult"}}}]}}}},"400":{"description":"Malformed JSON body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No catalogue group with that ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"That group has already been claimed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation failed; see error.fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRequest"}}},"description":"Scout group to claim, identified by its catalogue ID","required":true}}}}}
```

## Search Scout groups

> Searches the local TSA reference catalogue for a Scout group by name. Runs against Trooply's local mirror — no live TSA dependency. Public endpoint — no authentication required.

```json
{"openapi":"3.1.1","info":{"title":"Trooply API","version":"1.0"},"servers":[{"url":"https://api.trooply.co.uk/"}],"paths":{"/v1/tsa/groups":{"get":{"description":"Searches the local TSA reference catalogue for a Scout group by name. Runs against Trooply's local mirror — no live TSA dependency. Public endpoint — no authentication required.","tags":["claims"],"summary":"Search Scout groups","parameters":[{"schema":{"type":"string"},"description":"Search term — part of a group name","name":"q","in":"query","required":true},{"schema":{"type":"integer","default":20,"maximum":50,"minimum":1},"description":"Maximum results","name":"limit","in":"query"},{"schema":{"type":"integer","maximum":7,"minimum":1},"description":"Meeting day (1=Mon … 7=Sun)","name":"day","in":"query"}],"responses":{"200":{"description":"Matching Scout groups from the reference catalogue","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TSAGroupResult"}}}}]}}}},"400":{"description":"Missing or invalid query parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"SuccessResponse":{"type":"object","properties":{"data":{},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}},"ResponseMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"request_id":{"type":"string","format":"uuid"},"total":{"type":"integer"}}},"TSAGroupResult":{"type":"object","properties":{"district_name":{"type":"string"},"id":{"type":"string","format":"uuid"},"meeting_days":{"type":"array","items":{"type":"integer"}},"name":{"type":"string"},"postcode":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"status":{"type":"integer"}}}}}}
```

## List sections for a Scout group

> Returns the active TSA sections for the given Scout group from the local catalogue. Response is cached for 1 hour. Public endpoint — no authentication required.

```json
{"openapi":"3.1.1","info":{"title":"Trooply API","version":"1.0"},"servers":[{"url":"https://api.trooply.co.uk/"}],"paths":{"/v1/tsa/groups/{tsa_group_id}/sections":{"get":{"description":"Returns the active TSA sections for the given Scout group from the local catalogue. Response is cached for 1 hour. Public endpoint — no authentication required.","tags":["claims"],"summary":"List sections for a Scout group","parameters":[{"schema":{"type":"string","format":"uuid"},"description":"TSA group catalogue ID","name":"tsa_group_id","in":"path","required":true}],"responses":{"200":{"description":"Sections for the group","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TSASectionResult"}}}}]}}}},"400":{"description":"Invalid group ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"SuccessResponse":{"type":"object","properties":{"data":{},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}},"ResponseMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"request_id":{"type":"string","format":"uuid"},"total":{"type":"integer"}}},"TSASectionResult":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"postcode":{"type":"string"},"section_type":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"status":{"type":"integer"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.trooply.co.uk/claims.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
