# Facility groups

Facility groups can be used to mark individual facilities as belonging to a specific group. A facility can be part of several facility groups.

Facilities can be assigned to a group by:

1. creating a facility group via [API](https://fulfillmenttools.github.io/fulfillmenttools-api-reference-ui/#get-/api/facilitygroups)
2. referencing the ID of the facilities in the respective facility group

Facility groups can be used, for example, to define [sales prices](broken://spaces/2u56u6iixikInznwlzwk/pages/4ySwtszADj7bSkMOI4yf#sales-price-with-currency) for certain facility groups.

{% hint style="info" %}
More facility groups API information can be found here: [REST API documentation – Facility groups](https://fulfillmenttools.github.io/fulfillmenttools-api-reference-ui/#get-/api/facilitygroups)
{% endhint %}

{% hint style="info" %}
For a complete endpoint definition, see the [Facility groups section in the REST API reference](https://fulfillmenttools.github.io/fulfillmenttools-api-reference-ui/#get-/api/facilitygroups).
{% endhint %}

## Create a facility group

To create a facility group, send a `POST` request to the following endpoint with a JSON body.

```http
POST https://{projectId}.api.fulfillmenttools.com/api/facilitygroups
```

```json
{
  "tenantFacilityGroupId": "DE_W",
  "facilityRefs": [
    "871c1620-3757-4242-9a8d-5d20b81cadde_96358521",
    "bc6fd1f7-cbbf-41da-938d-01a68d90a926_0001a6c5",
    "bc6fd1f7-cbbf-41da-938d-01a68d90a926_003fcc05"
  ],
  "nameLocalized": {
    "de_DE": "Deutschland Westen",
    "en_US": "Germany West"
  }
}
```

A successful request returns a `201 Created` response with the created facility group object in the body:

```json
{
    "version": 1,
    "nameLocalized": {
        "de_DE": "Deutschland Westen",
        "en_US": "Germany West"
    },
    "tenantFacilityGroupId": "DE_W",
    "facilityRefs": [
        "871c1620-3757-4242-9a8d-5d20b81cadde_96358521",
        "bc6fd1f7-cbbf-41da-938d-01a68d90a926_0001a6c5",
        "bc6fd1f7-cbbf-41da-938d-01a68d90a926_003fcc05"
    ],
    "lastModified": "2025-04-29T12:26:15.844Z",
    "id": "26c594fc-d26a-4bad-a930-dda610c85678",
    "created": "2025-04-29T12:26:15.844Z",
    "name": "Germany West"
}
```


---

# Agent Instructions: 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:

```
GET https://docs.fulfillmenttools.com/documentation/getting-started/facilities/facility-groups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
