> 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/developer/rest-api/divisions.md).

# Divisions

These methods provide access to the Command Centre divisions that are available to the REST client. Call `/api` and use the link at `features.{your_feature}.divisions.href` to retrieve the divisions in which the REST operator has privileges for that feature. Pick out the ones of interest and use those IDs in event, alarm, or item searches if you don't want the search to scan everything.

Or, you may end up here by following a division's link from a reception item when you need to retrieve the visitor management configuration for that reception's division.

### Licensing

Every REST licence enables the divisions controller: RESTEvents, RESTCreateEvents, RESTCardholders, RESTStatus, and RESTOverrides.

## Create a division

> Creates a new division.\
> \
> The POST expects a document in the same format as the \[division\
> detail]\(models#division) but with far fewer fields.  An example is \[this POST\
> example]\(models#divisionpatchandpostexample).  The only mandatory field is \`parent\`.\
> \
> When successful it returns a \`location\` header containing the address of the new division.\
> \
> Note that you can only create one division per POST.\
> \
> Do not code this URL into your application.  Take it from the results of \`GET /api\`.  That\
> shows the API features for which you have the necessary licence.\
> \
> New to 9.30.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Divisions","description":"These methods provide access to the Command Centre divisions that are available to the REST\nclient.  Call `/api` and use the link at `features.{your_feature}.divisions.href` to retrieve\nthe divisions in which the REST operator has privileges for that feature.  Pick out the ones of\ninterest and use those IDs in event, alarm, or item searches if you don't want the search to\nscan everything.\n\nOr, you may end up here by following a division's link from a reception item when you need to\nretrieve the visitor management configuration for that reception's division.\n\n## Licensing\n\nEvery REST licence enables the divisions controller:  RESTEvents, RESTCreateEvents,\nRESTCardholders, RESTStatus, and RESTOverrides.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"schemas":{"DivisionPATCHAndPOSTExample":{"title":"Division PATCH and POST example","description":"This is an example of a PATCH you could use to update a division, and a POST you could use\nto create one.\n\nWhen POSTing, `parent` is mandatory.\n","type":"object","properties":{"name":{"type":"string","description":"The division's name.  If you supply a name and another division already exists with that\nname, the call will fail.  If you leave it blank in a POST, Command Centre will pick a\nvalue for you.\n"},"description":{"type":"string","description":"The division's description."},"notes":{"type":"string","description":"A string, able to be much longer than `description`, suitable for holding notes about\nthe division.\n"},"parent":{"type":"object","properties":{"href":{"type":"string","format":"uri-reference"}},"description":"An object containing an href to the division entity representing the current division's\nparent.\n\nRequired when creating a new division, because only root divisions can be unparented and\nyou cannot create a new one of those.\n"}}}}},"paths":{"/api/divisions":{"post":{"tags":["Divisions"],"summary":"Create a division","description":"Creates a new division.\n\nThe POST expects a document in the same format as the [division\ndetail](models#division) but with far fewer fields.  An example is [this POST\nexample](models#divisionpatchandpostexample).  The only mandatory field is `parent`.\n\nWhen successful it returns a `location` header containing the address of the new division.\n\nNote that you can only create one division per POST.\n\nDo not code this URL into your application.  Take it from the results of `GET /api`.  That\nshows the API features for which you have the necessary licence.\n\nNew to 9.30.\n","requestBody":{"description":"The only required field here is the new division's parent.  All divisions (except the\nroot) must have a parent.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivisionPATCHAndPOSTExample"}}},"required":true},"responses":{"201":{"description":"Success.  Check the response body for feedback about your request.\n","headers":{"location":{"description":"The href of the new division.","schema":{"type":"string","format":"uri-reference"}}}},"400":{"description":"The body of the POST did not describe a valid division.  This includes not specifying a\nparent division.  Or it may be that you tried to give the new division the same name as\nan existing one.  Or you may have tried to set the new division's parent to a division\nthat is not visible to you.\n\nSee the body of the response for help.\n"},"403":{"description":"The operator does not have a privilege on the parent division that allows creating\ndivisions inside it ('Configure Site' or 'Edit Divisions'), or the server has reached\nits licensed limit of divisions or is not licensed.\n"}}}}}}
```

## List divisions

> The functions inside \`/api/divisions/\` retrieve the divisions in which the operator can\
> perform other functions.  They all return the same data structure.\
> \
> For example, \`/api/divisions/view\_events\` retrieves the list of divisions in which the REST\
> operator has privileges to view events, and \`/api/divisions/view\_alarms\` does the same for\
> alarms.\
> \
> Do not code these URLs into your application.  Take them from the results of \`GET /api\`.\
> For the events and alarms examples, the links will be at \`events.divisions.href\` and\
> \`alarms.divisions.href\`.\
> \
> \`/api\` only shows API features for which you have the necessary licence.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Divisions","description":"These methods provide access to the Command Centre divisions that are available to the REST\nclient.  Call `/api` and use the link at `features.{your_feature}.divisions.href` to retrieve\nthe divisions in which the REST operator has privileges for that feature.  Pick out the ones of\ninterest and use those IDs in event, alarm, or item searches if you don't want the search to\nscan everything.\n\nOr, you may end up here by following a division's link from a reception item when you need to\nretrieve the visitor management configuration for that reception's division.\n\n## Licensing\n\nEvery REST licence enables the divisions controller:  RESTEvents, RESTCreateEvents,\nRESTCardholders, RESTStatus, and RESTOverrides.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"sort":{"name":"sort","in":"query","schema":{"type":"string","enum":["id","name","-id","-name"]},"required":false,"description":"Changes the sort field between database ID and name.\n\nIf you prefix `id` or `name` with a minus sign (ASCII 45), the sort order is reversed.\n\nThere are two very strong reasons to sort by ID:\n\n1. Sorting by name carries a risk of missing or duplicating objects if your result set spans\n   multiple pages and another operator is editing the database while your REST client is\n   enumerating them.  This is known as \"page drift.\"  Sorting by ID does not carry that risk.\n2. Following a `next` link is _dramatically_ quicker when sorting by ID.\n\nWe _strongly_ recommend sorting by ID.  In case you were still in doubt, we will do that by\ndefault in a future version of Command Centre.\n\nThe server silently ignores anything except the options listed here.\n"}},"schemas":{"Divisions":{"type":"object","description":"Calls inside `/api/divisions/` return this object, which is simply a named array of\nobjects each containing some information about a division.\n","properties":{"results":{"type":"array","description":"An array of division objects.","items":{"$ref":"#/components/schemas/Division"}},"next":{"type":"object","properties":{"href":{"type":"string","format":"uri-reference"}},"description":"A site generally does not have too many divisions, but if yours does and you do not get\nthem all in the first page, follow this link to get more.  Repeat until the results do\nnot contain a `next` link.\n"}}},"Division":{"type":"object","description":"When a REST call returns the division of a Command Centre item such as a cardholder or access\ngroup, or when you ask it for the divisions in which an operator has a particular privilege,\nit will give an href inside `/divisions/`.  Following that href will return one of these.\n","properties":{"href":{"type":"string","description":"A self reference.","format":"uri-reference"},"id":{"type":"string","description":"The alphanumeric ID of the division.  Use this ID in the `division` filter when requesting\nevents.\n"},"name":{"type":"string","description":"The division's name."},"description":{"type":"string","description":"The division's description.  New in 8.50.  Not sent by default;  ask for it with `fields`."},"serverDisplayName":{"readOnly":true,"type":"string","description":"If you are running a multi-server installation and this item is homed on a remote server, this\nfield will contain the name of that server.  This field is missing from items that are held on\nthe machine that served the API request.  Added in 8.40.\n\nThis is a read-only field.  The server will ignore it if you send it.\n"},"parent":{"type":"object","properties":{"href":{"type":"string","format":"uri-reference"}},"description":"An object containing an href to the division entity representing the current division's\nparent.\n\nAll divisions except the root division have a parent.\n"},"visitorManagement":{"type":"object","description":"An object containing the division's visitor management configuration.  It only appears if\nyou ask for it with `fields=visitorManagement` and if your operator has the necessary\nprivilege ('View Site', 'Edit Site', 'View Visits', 'Edit Visits', or 'Manage\nReceptions').\n","properties":{"active":{"type":"boolean","description":"If present and true, this division has its own visitor management configuration.\nOtherwise it uses its parent's.  The same thing is indicated by the presence or\nabsence of the `visitorTypes` block.\n"},"visitorTypes":{"type":"array","description":"This is an array of items, each containing a 'visitor type'.  A visitor type\ncomprises three things:  an access group, to which visitor management will add every\nvisitor as soon as they are on the visit, host access groups, to one of which the\nhost cardholder must belong, and visitor access groups, to which Command Centre will\nadd a visitor when they sign in.\n\nWhen creating a visit you must pick a visitor type that is in the same division as\nthe visit's reception.  The visitor type you pick determines which host you can\nassign (he or she must be a member of at least one of the visitor type's host access\ngroups) and which visitor access groups you can assign (they must be in the visitor\ntype's list of visitor access groups).\n","items":{"type":"object","properties":{"href":{"type":"string","description":"This is the href you should use for a visitor type when you create or update a\nvisit.\n\nIt is only used for identification:  GETting it will 404.\n","format":"uri-reference"},"accessGroup":{"type":"object","properties":{"name":{"type":"string"},"href":{"type":"string","format":"uri-reference"}},"description":"The name and href of an access group.\n\nCommand Centre will add cardholders to this access group as soon as you add\nthem to a visit of this type.  The purpose of this group is to grant access to\nPDFs for personal data that will help them sign in on the day, such as\npassport and driver's licence numbers, and photos.\n"},"hostAccessGroups":{"type":"array","description":"Names and hrefs of more access groups.  When you create or modify a visit of\nthis type, its host cardholder must belong to one of these.\n\nA host is the cardholder Command Centre notifies when a visitor arrives, and\nis ultimately responsible for the visitor while on site.\n","items":{"type":"object","properties":{"accessGroup":{"type":"object","properties":{"name":{"type":"string"},"href":{"type":"string","format":"uri-reference"}}}}}},"visitorAccessGroups":{"type":"array","description":"An array of access groups.\n\nCommand Centre will add visitors to a visit's 'visitor access groups' when\nthey sign in.  Their purpose is to grant visitors access through the site's\ndoors so that they can move around the site.\n\nWhen creating a visit using this visitor type, you can only pick visitor\naccess groups from this list.\n\nThe server puts each group's name and href inside a block called\n`accessGroup`, rather than in the root of the array element, to allow for\nexpansion in a future version.\n","items":{"type":"object","properties":{"accessGroup":{"type":"object","properties":{"name":{"type":"string"},"href":{"type":"string","format":"uri-reference"}},"description":"The name and href of an access group.  Command Centre will add the\nvisitors on the visit to this access group when they sign in.\n"}}}}}}}}}}}}},"paths":{"/api/divisions/_operation_":{"get":{"tags":["Divisions"],"summary":"List divisions","description":"The functions inside `/api/divisions/` retrieve the divisions in which the operator can\nperform other functions.  They all return the same data structure.\n\nFor example, `/api/divisions/view_events` retrieves the list of divisions in which the REST\noperator has privileges to view events, and `/api/divisions/view_alarms` does the same for\nalarms.\n\nDo not code these URLs into your application.  Take them from the results of `GET /api`.\nFor the events and alarms examples, the links will be at `events.divisions.href` and\n`alarms.divisions.href`.\n\n`/api` only shows API features for which you have the necessary licence.\n","parameters":[{"name":"top","in":"query","description":"Sets the maximum number of divisions to return per page.","schema":{"minimum":1,"type":"integer"}},{"$ref":"#/components/parameters/sort"},{"name":"fields","in":"query","description":"Return these fields instead of the default set.  The values you can list are the same as\nthe field names you would see in the results, plus `visitorManagement`, which does not\ncome out by default.  Use it to specify the fields you want in your results.  Separate\nvalues with commas.\n\nTreat the string matches as case-sensitive.\n","schema":{"type":"string","enum":["href","id","name","parent","visitorManagement"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Divisions"}}}},"403":{"description":"The site does not have a REST licence."}}}}}}
```

## Get details of a division

> Details of a division.  Follow the \`href\` in a division summary to get here.

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Divisions","description":"These methods provide access to the Command Centre divisions that are available to the REST\nclient.  Call `/api` and use the link at `features.{your_feature}.divisions.href` to retrieve\nthe divisions in which the REST operator has privileges for that feature.  Pick out the ones of\ninterest and use those IDs in event, alarm, or item searches if you don't want the search to\nscan everything.\n\nOr, you may end up here by following a division's link from a reception item when you need to\nretrieve the visitor management configuration for that reception's division.\n\n## Licensing\n\nEvery REST licence enables the divisions controller:  RESTEvents, RESTCreateEvents,\nRESTCardholders, RESTStatus, and RESTOverrides.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"id":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An internal identifier."}},"schemas":{"Division":{"type":"object","description":"When a REST call returns the division of a Command Centre item such as a cardholder or access\ngroup, or when you ask it for the divisions in which an operator has a particular privilege,\nit will give an href inside `/divisions/`.  Following that href will return one of these.\n","properties":{"href":{"type":"string","description":"A self reference.","format":"uri-reference"},"id":{"type":"string","description":"The alphanumeric ID of the division.  Use this ID in the `division` filter when requesting\nevents.\n"},"name":{"type":"string","description":"The division's name."},"description":{"type":"string","description":"The division's description.  New in 8.50.  Not sent by default;  ask for it with `fields`."},"serverDisplayName":{"readOnly":true,"type":"string","description":"If you are running a multi-server installation and this item is homed on a remote server, this\nfield will contain the name of that server.  This field is missing from items that are held on\nthe machine that served the API request.  Added in 8.40.\n\nThis is a read-only field.  The server will ignore it if you send it.\n"},"parent":{"type":"object","properties":{"href":{"type":"string","format":"uri-reference"}},"description":"An object containing an href to the division entity representing the current division's\nparent.\n\nAll divisions except the root division have a parent.\n"},"visitorManagement":{"type":"object","description":"An object containing the division's visitor management configuration.  It only appears if\nyou ask for it with `fields=visitorManagement` and if your operator has the necessary\nprivilege ('View Site', 'Edit Site', 'View Visits', 'Edit Visits', or 'Manage\nReceptions').\n","properties":{"active":{"type":"boolean","description":"If present and true, this division has its own visitor management configuration.\nOtherwise it uses its parent's.  The same thing is indicated by the presence or\nabsence of the `visitorTypes` block.\n"},"visitorTypes":{"type":"array","description":"This is an array of items, each containing a 'visitor type'.  A visitor type\ncomprises three things:  an access group, to which visitor management will add every\nvisitor as soon as they are on the visit, host access groups, to one of which the\nhost cardholder must belong, and visitor access groups, to which Command Centre will\nadd a visitor when they sign in.\n\nWhen creating a visit you must pick a visitor type that is in the same division as\nthe visit's reception.  The visitor type you pick determines which host you can\nassign (he or she must be a member of at least one of the visitor type's host access\ngroups) and which visitor access groups you can assign (they must be in the visitor\ntype's list of visitor access groups).\n","items":{"type":"object","properties":{"href":{"type":"string","description":"This is the href you should use for a visitor type when you create or update a\nvisit.\n\nIt is only used for identification:  GETting it will 404.\n","format":"uri-reference"},"accessGroup":{"type":"object","properties":{"name":{"type":"string"},"href":{"type":"string","format":"uri-reference"}},"description":"The name and href of an access group.\n\nCommand Centre will add cardholders to this access group as soon as you add\nthem to a visit of this type.  The purpose of this group is to grant access to\nPDFs for personal data that will help them sign in on the day, such as\npassport and driver's licence numbers, and photos.\n"},"hostAccessGroups":{"type":"array","description":"Names and hrefs of more access groups.  When you create or modify a visit of\nthis type, its host cardholder must belong to one of these.\n\nA host is the cardholder Command Centre notifies when a visitor arrives, and\nis ultimately responsible for the visitor while on site.\n","items":{"type":"object","properties":{"accessGroup":{"type":"object","properties":{"name":{"type":"string"},"href":{"type":"string","format":"uri-reference"}}}}}},"visitorAccessGroups":{"type":"array","description":"An array of access groups.\n\nCommand Centre will add visitors to a visit's 'visitor access groups' when\nthey sign in.  Their purpose is to grant visitors access through the site's\ndoors so that they can move around the site.\n\nWhen creating a visit using this visitor type, you can only pick visitor\naccess groups from this list.\n\nThe server puts each group's name and href inside a block called\n`accessGroup`, rather than in the root of the array element, to allow for\nexpansion in a future version.\n","items":{"type":"object","properties":{"accessGroup":{"type":"object","properties":{"name":{"type":"string"},"href":{"type":"string","format":"uri-reference"}},"description":"The name and href of an access group.  Command Centre will add the\nvisitors on the visit to this access group when they sign in.\n"}}}}}}}}}}}}},"paths":{"/api/divisions/{id}":{"get":{"tags":["Divisions"],"summary":"Get details of a division","description":"Details of a division.  Follow the `href` in a division summary to get here.","parameters":[{"$ref":"#/components/parameters/id"},{"name":"fields","in":"query","description":"Return these fields instead of the default set.  The values you can list are the same as\nthe field names you would see in the results, plus `visitorManagement`, which does not\ncome out by default.  Use it to specify the fields you want in your results.  Separate\nvalues with commas.\n\nTreat the string matches as case-sensitive.\n","schema":{"type":"string","enum":["href","id","name","parent","visitorManagement"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Division"}}}},"403":{"description":"The site does not have a REST licence."},"404":{"description":"That is not the href of a division or you do not have privileges to read divisions (View\nSite, Configure Site, Edit Divisions, or Advanced User).\n"}}}}}}
```

## Remove a division

> This call removes a division from Command Centre.\
> \
> Deleting divisions will be possible in a future version of Command Centre.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Divisions","description":"These methods provide access to the Command Centre divisions that are available to the REST\nclient.  Call `/api` and use the link at `features.{your_feature}.divisions.href` to retrieve\nthe divisions in which the REST operator has privileges for that feature.  Pick out the ones of\ninterest and use those IDs in event, alarm, or item searches if you don't want the search to\nscan everything.\n\nOr, you may end up here by following a division's link from a reception item when you need to\nretrieve the visitor management configuration for that reception's division.\n\n## Licensing\n\nEvery REST licence enables the divisions controller:  RESTEvents, RESTCreateEvents,\nRESTCardholders, RESTStatus, and RESTOverrides.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"id":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An internal identifier."}}},"paths":{"/api/divisions/{id}":{"delete":{"tags":["Divisions"],"summary":"Remove a division","description":"This call removes a division from Command Centre.\n\nDeleting divisions will be possible in a future version of Command Centre.\n","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"204":{"description":"Success."},"400":{"description":"Deleting the division failed.  This happens when the division is not empty or is still\nbeing used by another item (such as an operator group).\n"},"403":{"description":"The operator has the permission to view the division but not delete it, or the server is\nnot licensed for the operation.\n"},"404":{"description":"That is not the URL of a division, or the operator is not privileged to view it.\n"}}}}}}
```

## Update a division

> This is the call you use to update a division's name, description, notes, or parent.\
> \
> The PATCH expects a document in the same format as the \[division\
> detail]\(models#division) but with fewer valid fields.  An example is \[this PATCH\
> example]\(models#divisionpatchandpostexample).\
> \
> New to 9.30.<br>

```json
{"openapi":"3.2.0","info":{"title":"Command Centre REST API","version":"2.0"},"tags":[{"name":"Divisions","description":"These methods provide access to the Command Centre divisions that are available to the REST\nclient.  Call `/api` and use the link at `features.{your_feature}.divisions.href` to retrieve\nthe divisions in which the REST operator has privileges for that feature.  Pick out the ones of\ninterest and use those IDs in event, alarm, or item searches if you don't want the search to\nscan everything.\n\nOr, you may end up here by following a division's link from a reception item when you need to\nretrieve the visitor management configuration for that reception's division.\n\n## Licensing\n\nEvery REST licence enables the divisions controller:  RESTEvents, RESTCreateEvents,\nRESTCardholders, RESTStatus, and RESTOverrides.\n"}],"servers":[{"url":"https://127.0.0.1:8904"}],"security":[{"API_key":[]},{"basic":[]}],"components":{"securitySchemes":{"API_key":{"type":"apiKey","name":"Authorization","in":"header","description":"\nClients authenticate by including a pre-shared API key in the `Authorization` header of each\nrequest after an authorisation method of `GGL-API-KEY`:\n\n`Authorization: GGL-API-KEY C774-B01F-D695-AA4B-215F-A158-AC22-ADEB`\n\nFor a fuller description see [API authentication](api-authentication).\n"},"basic":{"type":"http","scheme":"basic","description":"This is HTTP Basic authentication using a blank username and the API key as the password.\n\nExample:  `Authorization: Basic OkM3NzQtQjAxRi1ENjk1LUFBNEItMjE1Ri1BMTU4LUFDMjItQURFQg==`\n\nThat example is equivalent to the example in the description of the api_Key method:\nprepending a colon to the API key beginning with `C774` then encoding it into Base64\nproduces the 56 characters beginning with `OkM3`.\n\nThe colon is a separator between a username, which is blank in our case, and the password,\nwhich is our API key.\n\nFor a fuller description see [API authentication](api-authentication)\n"}},"parameters":{"id":{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"An internal identifier."}},"schemas":{"DivisionPATCHAndPOSTExample":{"title":"Division PATCH and POST example","description":"This is an example of a PATCH you could use to update a division, and a POST you could use\nto create one.\n\nWhen POSTing, `parent` is mandatory.\n","type":"object","properties":{"name":{"type":"string","description":"The division's name.  If you supply a name and another division already exists with that\nname, the call will fail.  If you leave it blank in a POST, Command Centre will pick a\nvalue for you.\n"},"description":{"type":"string","description":"The division's description."},"notes":{"type":"string","description":"A string, able to be much longer than `description`, suitable for holding notes about\nthe division.\n"},"parent":{"type":"object","properties":{"href":{"type":"string","format":"uri-reference"}},"description":"An object containing an href to the division entity representing the current division's\nparent.\n\nRequired when creating a new division, because only root divisions can be unparented and\nyou cannot create a new one of those.\n"}}}}},"paths":{"/api/divisions/{id}":{"patch":{"tags":["Divisions"],"summary":"Update a division","description":"This is the call you use to update a division's name, description, notes, or parent.\n\nThe PATCH expects a document in the same format as the [division\ndetail](models#division) but with fewer valid fields.  An example is [this PATCH\nexample](models#divisionpatchandpostexample).\n\nNew to 9.30.\n","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"description":"There are no mandatory fields, but it would not be much of an update without one.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DivisionPATCHAndPOSTExample"}}},"required":true},"responses":{"200":{"description":"Success.  The response body will contain feedback from the server about your PATCH.\n"},"204":{"description":"Success."},"400":{"description":"The body of the PATCH did not describe a valid division.  See the body of the response\nfor help on what went wrong.  It may be that you tried to use the name of another\ndivision:  no two items of the same type can have the same name.  Or you may have tried\nto set the division's parent to a division that is not visible to you.\n"},"403":{"description":"The operator has a privilege that allows viewing the division but not modifying it, or\nyou tried to set a parent on the root division, or you tried to set the parent to a\ndivision you cannot configure, or the server is missing the necessary licence.\n\nYou need either the 'Configure Site' or 'Edit Divisions' privilege on the division you\nare changing.  You also need it on the new parent, if you are changing that.\n"},"404":{"description":"That is not the URL of a division or the operator does not have the privilege to view\nthat division.  This probably means you have built the URL yourself instead of taking it\nfrom the results of a [GET](divisions#get-api-divisions-_operation_).\n"},"409":{"description":"The item is locked for editing by another operator.  The body of the response will\ntell you which operator is holding the lock.\n"}}}}}}
```


---

# 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/developer/rest-api/divisions.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.
