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

# Insert/update list of article groups for all stores

POST https://api.fiftytwo.com/masterdata/articlegroups/v1/chain/{chain}
Content-Type: application/json

Only supported when master data is distributed by the 52ViKING enterprise service.

Reference: https://fiftytwo-demo.ferndocs.com/api/master-data/reference/article-groups/ecag

## Request

### Path parameters

- `chain` (integer, required) — The ID of the chain

### Body (application/json)

This endpoint expects an articleGroups.

- `articleGroups` (list of ArticleGroupsArticleGroupsItems, required)

## Response

### 202

Accepted

## Errors

### 400 Bad Request Error

Bad Request

- `string`

## Types

### ArticleGroupsArticleGroupsItems

- `articleGroupId` (integer, required) — ID of the article group.
- `description` (string, optional) — A short text that describes the article group.
- `department` (string, optional) — The department that the article group in question belongs to.
- `discountPercentage` (integer, optional) — Discount percentage that applies to all articles in the article group, where discountPercentage is -1. For more information, see the articles endpoint.
- `minimumPrice` (integer, optional) — Minimum allowed price when selling from this article group and registering the sale via the price (\<P>) key. Enforced for articles that have the entryCode P. For more information, see the articles endpoint.
- `maximumPrice` (integer, optional) — Maximum allowed price when selling from this article group and registering the sale via the price (\<P>) key. Enforced for articles that have the entryCode P. For more information, see the articles endpoint.0 in this field means no maximum price check.
- `account` (string, optional) — Specify relevant finance accounts for audit journals. Ask your organization's finance department if you're in doubt about which accounts to use.
- `omitFromTurnover` (enum, optional) — If this field has the value 1, the article group in question is NOT included in "net turnover" reporting (common.oms &amp; f100.oms). Ask your Fiftytwo consultant if you're in doubt.
  - Allowed values: `0`, `1`
- `statistics` (integer, optional) — Optional field for statistical use. For example, if you want to deliver data about the article group to SPSS, a statistics platform from IBM, you can include a reference to an SPSS accumulator in this field.
- `joinId` (integer, optional) — This field is used to tie articles that have the samepricediscount numberdiscount amount \<p>together in a virtual family. This means that articles that have the same aggregate discount code via the article group, and whose previously listed fields match, can be mixed and still qualify for the discount.\<p>
- `receiptGroup` (integer, optional) — Receipt groups, a.k.a. print groups, define how articles are sorted on receipts (for example into logical sections like Beverages, Frozen food, etc.). The groups are maintained by Fiftytwo consultants.
- `specialShelfLabel` (enum, optional) — You can use this parameter to indicate that the article group concerns fruit&amp;vegetables as thus requires special shelf label treatment.
  - Allowed values: `0`, `1`
- `grossProfitLimit` (double, optional) — A gross profit limit provides pricing assistance in 52ViKING user interfaces, so that prices that don't meet the gross profit requirement aren't allowed.
- `maximumPayout` (integer, optional) — Maximum amount that can be paid out on articles that have the entryCode value P and the applyNegativePrice value 2 (see the articles endpoint for more information). The maximum payout limit doesn't apply to returns.Example: Lotto winnings.
- `variantIds` (list of integer, optional) — A list of variant groups assigned to this article group. Variants represent product differences such as Color or Size. Assigning a variant here makes it available for all articles belonging to this group.
- `modifierIds` (list of integer, optional) — A list of modifier groups available for articles in this group. Modifiers represent optional add-ons such as gift wrapping or extra accessories.
- `specificationIds` (list of integer, optional) — A list of specification groups relevant to articles group. Specifications describe technical or functional attributes such as display type, performance features, and similar product properties.

## Examples

**Request**

```json
{
  "articleGroups": [
    {
      "articleGroupId": 10,
      "description": "Article Group 10",
      "department": "10",
      "discountPercentage": 15,
      "minimumPrice": 10,
      "maximumPrice": 20,
      "account": "1234567890",
      "omitFromTurnover": 1,
      "statistics": 1,
      "joinId": 10,
      "receiptGroup": 1,
      "specialShelfLabel": 0,
      "grossProfitLimit": 22.5,
      "maximumPayout": 110,
      "variantIds": [
        201,
        202
      ],
      "modifierIds": [
        301,
        302
      ],
      "specificationIds": [
        401
      ]
    },
    {
      "articleGroupId": 11,
      "description": "Article Group 11",
      "department": "11",
      "discountPercentage": 20,
      "minimumPrice": 100,
      "maximumPrice": 200,
      "account": "0987654321",
      "omitFromTurnover": 0,
      "statistics": 0,
      "joinId": 11,
      "receiptGroup": 2,
      "specialShelfLabel": 0,
      "grossProfitLimit": 20,
      "maximumPayout": 111,
      "variantIds": [
        203
      ],
      "modifierIds": [
        303,
        304
      ],
      "specificationIds": [
        402,
        403
      ]
    }
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python ArticleGroups_ECAG_example
import requests

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

payload = { "articleGroups": [
        {
            "articleGroupId": 10,
            "description": "Article Group 10",
            "department": "10",
            "discountPercentage": 15,
            "minimumPrice": 10,
            "maximumPrice": 20,
            "account": "1234567890",
            "omitFromTurnover": 1,
            "statistics": 1,
            "joinId": 10,
            "receiptGroup": 1,
            "specialShelfLabel": 0,
            "grossProfitLimit": 22.5,
            "maximumPayout": 110,
            "variantIds": [201, 202],
            "modifierIds": [301, 302],
            "specificationIds": [401]
        },
        {
            "articleGroupId": 11,
            "description": "Article Group 11",
            "department": "11",
            "discountPercentage": 20,
            "minimumPrice": 100,
            "maximumPrice": 200,
            "account": "0987654321",
            "omitFromTurnover": 0,
            "statistics": 0,
            "joinId": 11,
            "receiptGroup": 2,
            "specialShelfLabel": 0,
            "grossProfitLimit": 20,
            "maximumPayout": 111,
            "variantIds": [203],
            "modifierIds": [303, 304],
            "specificationIds": [402, 403]
        }
    ] }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ArticleGroups_ECAG_example
const url = 'https://api.fiftytwo.com/masterdata/articlegroups/v1/chain/1';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"articleGroups":[{"articleGroupId":10,"description":"Article Group 10","department":"10","discountPercentage":15,"minimumPrice":10,"maximumPrice":20,"account":"1234567890","omitFromTurnover":1,"statistics":1,"joinId":10,"receiptGroup":1,"specialShelfLabel":0,"grossProfitLimit":22.5,"maximumPayout":110,"variantIds":[201,202],"modifierIds":[301,302],"specificationIds":[401]},{"articleGroupId":11,"description":"Article Group 11","department":"11","discountPercentage":20,"minimumPrice":100,"maximumPrice":200,"account":"0987654321","omitFromTurnover":0,"statistics":0,"joinId":11,"receiptGroup":2,"specialShelfLabel":0,"grossProfitLimit":20,"maximumPayout":111,"variantIds":[203],"modifierIds":[303,304],"specificationIds":[402,403]}]}'
};

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

```go ArticleGroups_ECAG_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"articleGroups\": [\n    {\n      \"articleGroupId\": 10,\n      \"description\": \"Article Group 10\",\n      \"department\": \"10\",\n      \"discountPercentage\": 15,\n      \"minimumPrice\": 10,\n      \"maximumPrice\": 20,\n      \"account\": \"1234567890\",\n      \"omitFromTurnover\": 1,\n      \"statistics\": 1,\n      \"joinId\": 10,\n      \"receiptGroup\": 1,\n      \"specialShelfLabel\": 0,\n      \"grossProfitLimit\": 22.5,\n      \"maximumPayout\": 110,\n      \"variantIds\": [\n        201,\n        202\n      ],\n      \"modifierIds\": [\n        301,\n        302\n      ],\n      \"specificationIds\": [\n        401\n      ]\n    },\n    {\n      \"articleGroupId\": 11,\n      \"description\": \"Article Group 11\",\n      \"department\": \"11\",\n      \"discountPercentage\": 20,\n      \"minimumPrice\": 100,\n      \"maximumPrice\": 200,\n      \"account\": \"0987654321\",\n      \"omitFromTurnover\": 0,\n      \"statistics\": 0,\n      \"joinId\": 11,\n      \"receiptGroup\": 2,\n      \"specialShelfLabel\": 0,\n      \"grossProfitLimit\": 20,\n      \"maximumPayout\": 111,\n      \"variantIds\": [\n        203\n      ],\n      \"modifierIds\": [\n        303,\n        304\n      ],\n      \"specificationIds\": [\n        402,\n        403\n      ]\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

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

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"articleGroups\": [\n    {\n      \"articleGroupId\": 10,\n      \"description\": \"Article Group 10\",\n      \"department\": \"10\",\n      \"discountPercentage\": 15,\n      \"minimumPrice\": 10,\n      \"maximumPrice\": 20,\n      \"account\": \"1234567890\",\n      \"omitFromTurnover\": 1,\n      \"statistics\": 1,\n      \"joinId\": 10,\n      \"receiptGroup\": 1,\n      \"specialShelfLabel\": 0,\n      \"grossProfitLimit\": 22.5,\n      \"maximumPayout\": 110,\n      \"variantIds\": [\n        201,\n        202\n      ],\n      \"modifierIds\": [\n        301,\n        302\n      ],\n      \"specificationIds\": [\n        401\n      ]\n    },\n    {\n      \"articleGroupId\": 11,\n      \"description\": \"Article Group 11\",\n      \"department\": \"11\",\n      \"discountPercentage\": 20,\n      \"minimumPrice\": 100,\n      \"maximumPrice\": 200,\n      \"account\": \"0987654321\",\n      \"omitFromTurnover\": 0,\n      \"statistics\": 0,\n      \"joinId\": 11,\n      \"receiptGroup\": 2,\n      \"specialShelfLabel\": 0,\n      \"grossProfitLimit\": 20,\n      \"maximumPayout\": 111,\n      \"variantIds\": [\n        203\n      ],\n      \"modifierIds\": [\n        303,\n        304\n      ],\n      \"specificationIds\": [\n        402,\n        403\n      ]\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.fiftytwo.com/masterdata/articlegroups/v1/chain/1")
  .header("Content-Type", "application/json")
  .body("{\n  \"articleGroups\": [\n    {\n      \"articleGroupId\": 10,\n      \"description\": \"Article Group 10\",\n      \"department\": \"10\",\n      \"discountPercentage\": 15,\n      \"minimumPrice\": 10,\n      \"maximumPrice\": 20,\n      \"account\": \"1234567890\",\n      \"omitFromTurnover\": 1,\n      \"statistics\": 1,\n      \"joinId\": 10,\n      \"receiptGroup\": 1,\n      \"specialShelfLabel\": 0,\n      \"grossProfitLimit\": 22.5,\n      \"maximumPayout\": 110,\n      \"variantIds\": [\n        201,\n        202\n      ],\n      \"modifierIds\": [\n        301,\n        302\n      ],\n      \"specificationIds\": [\n        401\n      ]\n    },\n    {\n      \"articleGroupId\": 11,\n      \"description\": \"Article Group 11\",\n      \"department\": \"11\",\n      \"discountPercentage\": 20,\n      \"minimumPrice\": 100,\n      \"maximumPrice\": 200,\n      \"account\": \"0987654321\",\n      \"omitFromTurnover\": 0,\n      \"statistics\": 0,\n      \"joinId\": 11,\n      \"receiptGroup\": 2,\n      \"specialShelfLabel\": 0,\n      \"grossProfitLimit\": 20,\n      \"maximumPayout\": 111,\n      \"variantIds\": [\n        203\n      ],\n      \"modifierIds\": [\n        303,\n        304\n      ],\n      \"specificationIds\": [\n        402,\n        403\n      ]\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.fiftytwo.com/masterdata/articlegroups/v1/chain/1', [
  'body' => '{
  "articleGroups": [
    {
      "articleGroupId": 10,
      "description": "Article Group 10",
      "department": "10",
      "discountPercentage": 15,
      "minimumPrice": 10,
      "maximumPrice": 20,
      "account": "1234567890",
      "omitFromTurnover": 1,
      "statistics": 1,
      "joinId": 10,
      "receiptGroup": 1,
      "specialShelfLabel": 0,
      "grossProfitLimit": 22.5,
      "maximumPayout": 110,
      "variantIds": [
        201,
        202
      ],
      "modifierIds": [
        301,
        302
      ],
      "specificationIds": [
        401
      ]
    },
    {
      "articleGroupId": 11,
      "description": "Article Group 11",
      "department": "11",
      "discountPercentage": 20,
      "minimumPrice": 100,
      "maximumPrice": 200,
      "account": "0987654321",
      "omitFromTurnover": 0,
      "statistics": 0,
      "joinId": 11,
      "receiptGroup": 2,
      "specialShelfLabel": 0,
      "grossProfitLimit": 20,
      "maximumPayout": 111,
      "variantIds": [
        203
      ],
      "modifierIds": [
        303,
        304
      ],
      "specificationIds": [
        402,
        403
      ]
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp ArticleGroups_ECAG_example
using RestSharp;

var client = new RestClient("https://api.fiftytwo.com/masterdata/articlegroups/v1/chain/1");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"articleGroups\": [\n    {\n      \"articleGroupId\": 10,\n      \"description\": \"Article Group 10\",\n      \"department\": \"10\",\n      \"discountPercentage\": 15,\n      \"minimumPrice\": 10,\n      \"maximumPrice\": 20,\n      \"account\": \"1234567890\",\n      \"omitFromTurnover\": 1,\n      \"statistics\": 1,\n      \"joinId\": 10,\n      \"receiptGroup\": 1,\n      \"specialShelfLabel\": 0,\n      \"grossProfitLimit\": 22.5,\n      \"maximumPayout\": 110,\n      \"variantIds\": [\n        201,\n        202\n      ],\n      \"modifierIds\": [\n        301,\n        302\n      ],\n      \"specificationIds\": [\n        401\n      ]\n    },\n    {\n      \"articleGroupId\": 11,\n      \"description\": \"Article Group 11\",\n      \"department\": \"11\",\n      \"discountPercentage\": 20,\n      \"minimumPrice\": 100,\n      \"maximumPrice\": 200,\n      \"account\": \"0987654321\",\n      \"omitFromTurnover\": 0,\n      \"statistics\": 0,\n      \"joinId\": 11,\n      \"receiptGroup\": 2,\n      \"specialShelfLabel\": 0,\n      \"grossProfitLimit\": 20,\n      \"maximumPayout\": 111,\n      \"variantIds\": [\n        203\n      ],\n      \"modifierIds\": [\n        303,\n        304\n      ],\n      \"specificationIds\": [\n        402,\n        403\n      ]\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ArticleGroups_ECAG_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["articleGroups": [
    [
      "articleGroupId": 10,
      "description": "Article Group 10",
      "department": "10",
      "discountPercentage": 15,
      "minimumPrice": 10,
      "maximumPrice": 20,
      "account": "1234567890",
      "omitFromTurnover": 1,
      "statistics": 1,
      "joinId": 10,
      "receiptGroup": 1,
      "specialShelfLabel": 0,
      "grossProfitLimit": 22.5,
      "maximumPayout": 110,
      "variantIds": [201, 202],
      "modifierIds": [301, 302],
      "specificationIds": [401]
    ],
    [
      "articleGroupId": 11,
      "description": "Article Group 11",
      "department": "11",
      "discountPercentage": 20,
      "minimumPrice": 100,
      "maximumPrice": 200,
      "account": "0987654321",
      "omitFromTurnover": 0,
      "statistics": 0,
      "joinId": 11,
      "receiptGroup": 2,
      "specialShelfLabel": 0,
      "grossProfitLimit": 20,
      "maximumPayout": 111,
      "variantIds": [203],
      "modifierIds": [303, 304],
      "specificationIds": [402, 403]
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fiftytwo.com/masterdata/articlegroups/v1/chain/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```