> For the complete documentation index, see [llms.txt](https://visionstore.gitbook.io/visionstore-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://visionstore.gitbook.io/visionstore-docs/scripts/badges/developers.md).

# Developers

Connect the badges to your own scripts, without touching the protected core.

The core is protected by escrow, but you get **three tools** to build on it:

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>📦 Exports</strong></td><td>Read a badge and its status, list badge types and a player's badges, revoke badges, open the Studio.</td><td><a href="/visionstore-docs/scripts/badges/developers/exports.md">Exports</a></td></tr><tr><td><strong>📡 Log event</strong></td><td>One server event for every issue, revocation and Studio change. Feed your Discord or database logs.</td><td><a href="/visionstore-docs/scripts/badges/developers/log-event.md">Log event</a></td></tr><tr><td><strong>🔌 Bridges</strong></td><td>Open-source framework, inventory and target adapters in <code>bridge/</code>. Change them or add your own.</td><td><a href="/visionstore-docs/scripts/badges/developers/bridges.md">Bridges</a></td></tr></tbody></table>

## Which one should I use?

| You want to...                                           | Use                                |
| -------------------------------------------------------- | ---------------------------------- |
| Check a badge from another script (MDT, police computer) | **Exports**: `GetBadge`            |
| Void badges when someone is fired from your job script   | **Exports**: `RevokeCitizenBadges` |
| Open the Studio from your admin menu                     | **Client export**: `OpenStudio`    |
| Log issues and revocations to Discord                    | **Log event**: `vision_badges:log` |
| Run on another framework, inventory or target            | **Bridges**                        |

## Words used on these pages

| Word                    | Meaning                                                                                                                                 |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **Badge id** / **type** | The key of a badge type, for example `'police'`.                                                                                        |
| **Serial**              | The database id of one issued badge (an integer). The card prints it with six digits (`001042`).                                        |
| **citizenid**           | The owner's identifier as your framework stores it (see [Bridges](/visionstore-docs/scripts/badges/developers/bridges.md#identifiers)). |
| **Badge number**        | The text on the badge, for example `LSPD-1001`.                                                                                         |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://visionstore.gitbook.io/visionstore-docs/scripts/badges/developers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
