> This page is for API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fiftytwo-demo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fiftytwo-demo.ferndocs.com/_mcp/server.

# Get discount family by ID, chain, and store

GET https://api.fiftytwo.com/masterdata/articlefamilies/v1/chain/{chainId}/store/{storeId}/{articleFamilyId}



Reference: https://fiftytwo-demo.ferndocs.com/api/master-data/reference/article-families/get-discount-family-by-id-chain-and-store

## Request

### Path parameters

- `articleFamilyId` (long, required) — The ID of the discount family to retrieve
- `chainId` (integer, required) — The ID of the chain
- `storeId` (integer, required) — The ID of the store

## Response

### 200

Success

- `articleFamilies` (list of ArticleFamiliesArticleFamiliesItems, required)

## Errors

### 400 Bad Request Error

Bad Request

- `string`

## Types

### ArticleFamiliesArticleFamiliesItems

- `articleFamilyId` (integer, required) — The ID of the discount family.
- `description` (string, optional) — A text that describes the discount family.
- `familyDiscount` (list of ArticleFamiliesArticleFamiliesItemsFamilyDiscountItems, optional) — Definition of the discount family's discount ladder (that can have from one to five steps).
- `discountCode` (integer, optional) — Defines the meaning of the amount field in the familyDiscount ladder. 0 = Amount is the discount given when selling the required quantity of articles. Example: Example: Buy three and save EUR 5.00.1 = Amount is the total price for the required quantity of articles. Example: Buy three for EUR 20.00.2 = Amount is the discount percentage given when buying the required quantity of articles. Example: Buy three and save 10%.3 = Amount is the percentage to pay for the cheapest article. Example: Buy three and pay 30% for the cheapest (so 0 means get the cheapest article for free).
- `discountInSets` (enum, optional) — Defines if the discount should only be triggered each time the required quantity of articles is reached.\<ul>\<li>0 = Minimum buy, discount is triggered for all articles after required quantity is reached.\</li>\<li>1 = Set-wise, discount is triggered for multiplums of the required quantity\</li>\</ul>\<p>Example where required quantity is three and customer buys four articles:\<ul>\<li>discountInSets = 0, discount is given for all four articles.\</li>\<li>discountInSets = 1, discount is only given for three articles.\</ul>\</li>\</p>
  - Allowed values: `0`, `1`
- `discountMaximum` (integer, optional) — The maximum number of articles in the discount family that can be sold on one receipt at the discounted price. When the maximum is exceeded, additional articles are sold with no discount.
- `clubId` (integer, optional) — Defines if discount only applies to members of the club with the defined ID. If 0, the discount applies to everyone, regardless of club membership.
- `receiptTextId` (integer, optional) — If you require a special receipt discount text for use with the discount family, you can specify a reference to the required text. The text must be present in the 52ViKING text segments table with the name RTX_yyy, where yyy is the value of the field. Ask your Fiftytwo consultant if you're in doubt.
- `receiptGroup` (integer, optional) — Print group reference for sorting receipts. Print groups are maintained by Fiftytwo consultants.

### ArticleFamiliesArticleFamiliesItemsFamilyDiscountItems

- `quantity` (integer, optional) — Quantity of articles that customer is required to buy for each step in the discount ladder.
- `amount` (double, optional) — See discountCode in the following for an explanation of this field.

## Examples

**Response**

```json
{
  "articleFamilies": [
    {
      "articleFamilyId": 123,
      "description": "articlefamily 123",
      "familyDiscount": [
        {
          "quantity": 1,
          "amount": 16
        },
        {
          "quantity": 2,
          "amount": 8
        },
        {
          "quantity": 4,
          "amount": 4
        },
        {
          "quantity": 8,
          "amount": 2
        },
        {
          "quantity": 16,
          "amount": 1
        }
      ],
      "discountInSets": 1,
      "discountMaximum": 16,
      "clubId": 1,
      "receiptTextId": 99,
      "receiptGroup": 12
    }
  ]
}
```

**SDK Code**

```python ArticleFamilies_getDiscountFamilyByIdChainAndStore_example
import requests

url = "https://api.fiftytwo.com/masterdata/articlefamilies/v1/chain/1/store/1/1"

response = requests.get(url)

print(response.json())
```

```javascript ArticleFamilies_getDiscountFamilyByIdChainAndStore_example
const url = 'https://api.fiftytwo.com/masterdata/articlefamilies/v1/chain/1/store/1/1';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ArticleFamilies_getDiscountFamilyByIdChainAndStore_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fiftytwo.com/masterdata/articlefamilies/v1/chain/1/store/1/1"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ArticleFamilies_getDiscountFamilyByIdChainAndStore_example
require 'uri'
require 'net/http'

url = URI("https://api.fiftytwo.com/masterdata/articlefamilies/v1/chain/1/store/1/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java ArticleFamilies_getDiscountFamilyByIdChainAndStore_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fiftytwo.com/masterdata/articlefamilies/v1/chain/1/store/1/1")
  .asString();
```

```php ArticleFamilies_getDiscountFamilyByIdChainAndStore_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fiftytwo.com/masterdata/articlefamilies/v1/chain/1/store/1/1');

echo $response->getBody();
```

```csharp ArticleFamilies_getDiscountFamilyByIdChainAndStore_example
using RestSharp;

var client = new RestClient("https://api.fiftytwo.com/masterdata/articlefamilies/v1/chain/1/store/1/1");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift ArticleFamilies_getDiscountFamilyByIdChainAndStore_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fiftytwo.com/masterdata/articlefamilies/v1/chain/1/store/1/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```