# Facility discounts

Facility discounts determine the value by which the [sales price](broken://spaces/2u56u6iixikInznwlzwk/pages/4ySwtszADj7bSkMOI4yf#category-salesprice) of the facility's listings is reduced for a specific group. It is configured on the facility that supplies the listing to other facilities. The amount of the discount can be defined as a relative or absolute value. Discounts can be defined for a facility, a [group of facilities](broken://spaces/wxw7CUWGaTQdU5nY8tU0/pages/7nmtGyOtaO8jD0gVUo1W) or a group of articles ([category](broken://spaces/wxw7CUWGaTQdU5nY8tU0/pages/ESRAKKLGOifEzDYlMvbV)).The scope of application can be extended or reduced with the help of `AND` and `NOT` operators. The contexts set in the discount (for example, facility groups) are matched with the corresponding context of the [listing attributes](https://docs.fulfillmenttools.com/documentation/developer-docs/api/core-concepts/customization-via-attributes#category-salesprice). If all contexts are matching, the discount is applied to the [sales price](broken://spaces/2u56u6iixikInznwlzwk/pages/4ySwtszADj7bSkMOI4yf#category-salesprice) of the item. The priority defines the order in which the discounts should be applied.Facility discounts can be viewed, created and edited via the REST API: [REST API documentation – Facility discounts](https://fulfillmenttools.github.io/fulfillmenttools-api-reference-ui/#get-/api/facilities/-facilityRef-/discounts). More information can be found under [Developer Docs – Facility discounts](broken://spaces/2u56u6iixikInznwlzwk/pages/1t80Sn80lYKorB7EY0V4).

#### **Example** <a href="#example" id="example"></a>

**Discounts supplier facility "CGN-02"**

| Discount | Scope of application                   | Priority |
| -------- | -------------------------------------- | -------- |
| 10%      | Facility "CGN-01" \| Facility "DUS-01" | 10       |
| 10%      | Article category "school books"        | 50       |
| 50€      | Facility group "NRW"                   | 100      |

Facility discounts determine the value by which the [sales price](/documentation/by-pillar/global-inventory-hub/articles/article-attributes.md#category-salesprice) of the facility's listings is reduced for a specific group. Discounts can be defined for a facility, a [group of facilities](/documentation/getting-started/facilities/facility-groups.md) or a group of articles ([category](/documentation/by-pillar/global-inventory-hub/categories.md)). The scope of application can be extended or reduced with the help of `AND`, `OR`, `NOT` operators. The contexts set in the discount (for example, facility groups) are matched with the corresponding context of the [listing attributes](/documentation/by-pillar/global-inventory-hub/articles/article-attributes.md#category-salesprice). If all contexts were matching, the discount would be applied to the sales price of the item.

## Create facility discounts

To add a discount to an existing facility, perform the following `POST` request with a JSON body similar to the example provided. This example applies a discount of 5 EUR to articles that do NOT belong to the category `pet food` and that belong to either the `CGN` or `DUS` facility groups.

```http
POST https://{projectId}.api.fulfillmenttools.com/api/facilities/{facilityRef}/discounts
```

```json
{
  "context": [
    {
      "operator": "NOT",
      "type": "CATEGORY",
      "values": [
        "pet food"
      ]
    },
    {
      "operator": "AND",
      "type": "FACILITY_GROUP",
      "values": [
        "CGN",
        "DUS"
      ]
    }
  ],
  "discount": {
    "type": "ABSOLUTE",
    "value": 500,
    "currency": "EUR",
    "decimalPlaces": 2
  },
  "priority": 20,
  "type": "SALES_PRICE"
}

```


---

# 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-discounts.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.
