> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/products/cc-hardware/credentials/credential-information/facility-code-management.md).

# Facility code management

Understand facility-code allocation, confidentiality, and supported card-encoding options.

Understand what facility codes are, how they are allocated to sites, and how to keep a site's facility code confidential.

A facility code identifies one Gallagher site from another, so that cards issued for one site cannot be used to access another. On this page, "facility code" means the region code and facility code together.

**Credential structure**

A Gallagher card credential is made up of four values:

* Region code. One of 16 regions, shown as a letter from A to P.
* Facility code. Up to 50,000 per region.
* Card number. Identifies the individual card.
* Issue level. Identifies which issue of that card is current.

The region code and facility code together identify the site. The card number and issue level identify the individual card. A site's code is usually written as the region letter followed by the facility code, for example A12345.

**Why facility codes must stay confidential**

A card does not hold any access rights itself. It carries an identifier, and Command Centre decides what that cardholder can access. The facility code is what makes an identifier valid for a particular site.

Anyone who can encode cards with a site's facility code can create credentials that the site will accept as genuine. By encoding the card number and issue level of an existing cardholder, they can impersonate that cardholder and gain the same access. Card numbers are often issued sequentially, so they are not difficult to guess.

Because access is decided centrally, a lost or stolen card can be disabled in Command Centre without affecting anyone else. That protection depends on the facility code staying with the site and its authorized Channel Partner.

{% hint style="warning" %}
A confidential facility code is one layer of protection, not the whole solution. 125kHz and MIFARE Classic cards can be read and copied with readily available tools, however well the facility code is managed. For sites that need a higher level of assurance, use MIFARE Plus or DESFire credentials with unique Site Specific Keys.
{% endhint %}

**How facility codes are allocated**

Facility codes are allocated automatically to new sites through the Gallagher licensing database when a site is created. Checks in the licensing process ensure that every facility code allocated is unique. A facility code always belongs to a single site. Where cardholders need one card that works across several sites, the preferred approach is for each site to encode its own facility code to the card, so no facility code is shared. If a site needs to use another site's facility code instead, the original site must authorize it. For how to set up either approach, see [Share DESFire cards between sites](https://help.security.gallagher.com/knowledge-hub/products/cc-hardware/credentials/credential-information/credentials-sharing-desfire-cards-betw.md).

The facility code is tied to the site's Command Centre licence. The ability to encode cards with that facility code is restricted to the methods described in [Encoding solutions](https://help.security.gallagher.com/knowledge-hub/products/cc-hardware/credentials/encoding-solutions.md): PhotoID and Encoding on the site's own license, a Channel Partner's Bureau Encoding license, or cards ordered pre-encoded through Gallagher Security's encoding services.

**Demo licences**

Demo licences are issued with facility code 49999 for the region where the licence is used. This is a demo facility code only and must not be used for live sites. No other facility codes are issued for demo licences.

**Encoding cards for a site**

There are three supported ways to encode cards with a site's facility code:

1. PhotoID and Encoding on the site's own licence. The site encodes, and optionally prints, its own cards in Command Centre.
2. Gallagher Security's encoding services. Cards are ordered pre-encoded through the site's Channel Partner.
3. Bureau Encoding. The Channel Partner encodes cards for their customer sites on a dedicated Command Centre system.

Bureau Encoding is the recommended solution for Channel Partners who encode cards for the sites they manage. It gives the Channel Partner a dedicated system for their customers, supports MIFARE Plus and DESFire with unique Site Specific Keys for each site, and is updated as Command Centre is upgraded. A Bureau Encoding system cannot be used to run a site's access control, and a Channel Partner's demo system cannot be used for Bureau Encoding.

{% hint style="danger" %}
[Encoder 3](https://help.security.gallagher.com/knowledge-hub/products/cc-hardware/credentials/encoding-solutions/encoder-3.md) is a legacy product that was used to encode cards. The software is no longer maintained, the MIFARE encoding hardware it relies on is obsolete, and it cannot encode MIFARE Plus or DESFire cards. Channel Partners still using Encoder 3 should move to Bureau Encoding.
{% endhint %}


---

# 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://help.security.gallagher.com/knowledge-hub/products/cc-hardware/credentials/credential-information/facility-code-management.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.
