> 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 stores on 52ViKING enterprise service

POST https://api.fiftytwo.com/masterdata/stores/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/stores/ecst

## Request

### Path parameters

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

### Body (application/json)

This endpoint expects a stores.

- `stores` (list of StoresStoresItems, required) — List of stores in your chain (if you use 52ViKING enterprise service distribution).

## Response

### 202

Accepted

## Errors

### 400 Bad Request Error

Bad Request

- `string`

## Types

### StoresStoresItems

- `storeId` (integer, required) — The ID of the store.
- `internalStoreId` (string, optional) — The ID of the store in your organization's ERP system.
- `storeName` (string, optional) — Name of the store.
- `addressLine1` (string, optional) — Address line 2.
- `addressLine2` (string, optional) — Address line 3.
- `addressLine3` (string, optional) — Address line 4.
- `zipCode` (integer, optional) — Zip code (postcode).
- `email` (string, optional) — E-mail address of the store.
- `telephone` (string, optional) — Telephone number of the store.
- `ownerType` (integer, optional) — Store owner type. In organizations where different types of owners exist, you can use ownership to filter stores0 = Privately owned1 = Chain-owned2 = Franchise
- `location` (StoresStoresItemsLocation, optional) — GPS coordinates of the store. This information is currently purely informational and has no impact on store functions.
- `openingHours` (list of StoresStoresItemsOpeningHoursItems, optional) — Opening hours from Monday to Sunday. This information is purely informational and has no impact on store functions. Format is free.
- `companyInformation` (StoresStoresItemsCompanyInformation, optional) — Information about the company that owns the store.

### StoresStoresItemsLocation

GPS coordinates of the store. This information is currently purely informational and has no impact on store functions.

- `longitude` (double, required) — Longitude coordinate.
- `latitude` (double, required) — Latitude coordinate.

### StoresStoresItemsOpeningHoursItems

- `open` (string, optional) — Opening hour
- `close` (string, optional) — Closing hour

### StoresStoresItemsCompanyInformation

Information about the company that owns the store.

- `VATNumber` (string, optional) — The authorities' VAT identification of the company.
- `bankAccount` (string, optional) — Company back account number. Used only for printing on invoices.
- `IBAN` (string, optional) — Company IBAN number (International Bank Account Number, for making or receiving international payments). Used only for printing on invoices.
- `swift` (string, optional) — Swift code of company's bank. Swift is an international bank code for identifying a particular bank. It's also known as BIC (Bank Identifier Code). Used only for printing on invoices.

## Examples

**Request**

```json
{
  "stores": [
    {
      "storeId": 1234,
      "internalStoreId": "STOREID",
      "storeName": "Mystore",
      "addressLine1": "Store street number",
      "addressLine2": "Other adress information",
      "addressLine3": "Store city",
      "zipCode": 1234,
      "email": "1234@domain.dk",
      "telephone": "+45 123456789",
      "ownerType": 1,
      "location": {
        "longitude": -100,
        "latitude": 90
      },
      "openingHours": [
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        }
      ],
      "companyInformation": {
        "VATNumber": "1234567890",
        "bankAccount": "2345-1234567890",
        "IBAN": "12341234",
        "swift": "543217"
      }
    }
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python Stores_ECST_example
import requests

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

payload = { "stores": [
        {
            "storeId": 1234,
            "internalStoreId": "STOREID",
            "storeName": "Mystore",
            "addressLine1": "Store street number",
            "addressLine2": "Other adress information",
            "addressLine3": "Store city",
            "zipCode": 1234,
            "email": "1234@domain.dk",
            "telephone": "+45 123456789",
            "ownerType": 1,
            "location": {
                "longitude": -100,
                "latitude": 90
            },
            "openingHours": [
                {
                    "open": "08:00:00",
                    "close": "20:00:00"
                },
                {
                    "open": "08:00:00",
                    "close": "20:00:00"
                },
                {
                    "open": "08:00:00",
                    "close": "20:00:00"
                },
                {
                    "open": "08:00:00",
                    "close": "20:00:00"
                },
                {
                    "open": "08:00:00",
                    "close": "20:00:00"
                },
                {
                    "open": "08:00:00",
                    "close": "20:00:00"
                },
                {
                    "open": "08:00:00",
                    "close": "20:00:00"
                }
            ],
            "companyInformation": {
                "VATNumber": "1234567890",
                "bankAccount": "2345-1234567890",
                "IBAN": "12341234",
                "swift": "543217"
            }
        }
    ] }
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Stores_ECST_example
const url = 'https://api.fiftytwo.com/masterdata/stores/v1/chain/1';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"stores":[{"storeId":1234,"internalStoreId":"STOREID","storeName":"Mystore","addressLine1":"Store street number","addressLine2":"Other adress information","addressLine3":"Store city","zipCode":1234,"email":"1234@domain.dk","telephone":"+45 123456789","ownerType":1,"location":{"longitude":-100,"latitude":90},"openingHours":[{"open":"08:00:00","close":"20:00:00"},{"open":"08:00:00","close":"20:00:00"},{"open":"08:00:00","close":"20:00:00"},{"open":"08:00:00","close":"20:00:00"},{"open":"08:00:00","close":"20:00:00"},{"open":"08:00:00","close":"20:00:00"},{"open":"08:00:00","close":"20:00:00"}],"companyInformation":{"VATNumber":"1234567890","bankAccount":"2345-1234567890","IBAN":"12341234","swift":"543217"}}]}'
};

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

```go Stores_ECST_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"stores\": [\n    {\n      \"storeId\": 1234,\n      \"internalStoreId\": \"STOREID\",\n      \"storeName\": \"Mystore\",\n      \"addressLine1\": \"Store street number\",\n      \"addressLine2\": \"Other adress information\",\n      \"addressLine3\": \"Store city\",\n      \"zipCode\": 1234,\n      \"email\": \"1234@domain.dk\",\n      \"telephone\": \"+45 123456789\",\n      \"ownerType\": 1,\n      \"location\": {\n        \"longitude\": -100,\n        \"latitude\": 90\n      },\n      \"openingHours\": [\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        }\n      ],\n      \"companyInformation\": {\n        \"VATNumber\": \"1234567890\",\n        \"bankAccount\": \"2345-1234567890\",\n        \"IBAN\": \"12341234\",\n        \"swift\": \"543217\"\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 Stores_ECST_example
require 'uri'
require 'net/http'

url = URI("https://api.fiftytwo.com/masterdata/stores/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  \"stores\": [\n    {\n      \"storeId\": 1234,\n      \"internalStoreId\": \"STOREID\",\n      \"storeName\": \"Mystore\",\n      \"addressLine1\": \"Store street number\",\n      \"addressLine2\": \"Other adress information\",\n      \"addressLine3\": \"Store city\",\n      \"zipCode\": 1234,\n      \"email\": \"1234@domain.dk\",\n      \"telephone\": \"+45 123456789\",\n      \"ownerType\": 1,\n      \"location\": {\n        \"longitude\": -100,\n        \"latitude\": 90\n      },\n      \"openingHours\": [\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        }\n      ],\n      \"companyInformation\": {\n        \"VATNumber\": \"1234567890\",\n        \"bankAccount\": \"2345-1234567890\",\n        \"IBAN\": \"12341234\",\n        \"swift\": \"543217\"\n      }\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.fiftytwo.com/masterdata/stores/v1/chain/1")
  .header("Content-Type", "application/json")
  .body("{\n  \"stores\": [\n    {\n      \"storeId\": 1234,\n      \"internalStoreId\": \"STOREID\",\n      \"storeName\": \"Mystore\",\n      \"addressLine1\": \"Store street number\",\n      \"addressLine2\": \"Other adress information\",\n      \"addressLine3\": \"Store city\",\n      \"zipCode\": 1234,\n      \"email\": \"1234@domain.dk\",\n      \"telephone\": \"+45 123456789\",\n      \"ownerType\": 1,\n      \"location\": {\n        \"longitude\": -100,\n        \"latitude\": 90\n      },\n      \"openingHours\": [\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        }\n      ],\n      \"companyInformation\": {\n        \"VATNumber\": \"1234567890\",\n        \"bankAccount\": \"2345-1234567890\",\n        \"IBAN\": \"12341234\",\n        \"swift\": \"543217\"\n      }\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.fiftytwo.com/masterdata/stores/v1/chain/1', [
  'body' => '{
  "stores": [
    {
      "storeId": 1234,
      "internalStoreId": "STOREID",
      "storeName": "Mystore",
      "addressLine1": "Store street number",
      "addressLine2": "Other adress information",
      "addressLine3": "Store city",
      "zipCode": 1234,
      "email": "1234@domain.dk",
      "telephone": "+45 123456789",
      "ownerType": 1,
      "location": {
        "longitude": -100,
        "latitude": 90
      },
      "openingHours": [
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        },
        {
          "open": "08:00:00",
          "close": "20:00:00"
        }
      ],
      "companyInformation": {
        "VATNumber": "1234567890",
        "bankAccount": "2345-1234567890",
        "IBAN": "12341234",
        "swift": "543217"
      }
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Stores_ECST_example
using RestSharp;

var client = new RestClient("https://api.fiftytwo.com/masterdata/stores/v1/chain/1");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"stores\": [\n    {\n      \"storeId\": 1234,\n      \"internalStoreId\": \"STOREID\",\n      \"storeName\": \"Mystore\",\n      \"addressLine1\": \"Store street number\",\n      \"addressLine2\": \"Other adress information\",\n      \"addressLine3\": \"Store city\",\n      \"zipCode\": 1234,\n      \"email\": \"1234@domain.dk\",\n      \"telephone\": \"+45 123456789\",\n      \"ownerType\": 1,\n      \"location\": {\n        \"longitude\": -100,\n        \"latitude\": 90\n      },\n      \"openingHours\": [\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        },\n        {\n          \"open\": \"08:00:00\",\n          \"close\": \"20:00:00\"\n        }\n      ],\n      \"companyInformation\": {\n        \"VATNumber\": \"1234567890\",\n        \"bankAccount\": \"2345-1234567890\",\n        \"IBAN\": \"12341234\",\n        \"swift\": \"543217\"\n      }\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Stores_ECST_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["stores": [
    [
      "storeId": 1234,
      "internalStoreId": "STOREID",
      "storeName": "Mystore",
      "addressLine1": "Store street number",
      "addressLine2": "Other adress information",
      "addressLine3": "Store city",
      "zipCode": 1234,
      "email": "1234@domain.dk",
      "telephone": "+45 123456789",
      "ownerType": 1,
      "location": [
        "longitude": -100,
        "latitude": 90
      ],
      "openingHours": [
        [
          "open": "08:00:00",
          "close": "20:00:00"
        ],
        [
          "open": "08:00:00",
          "close": "20:00:00"
        ],
        [
          "open": "08:00:00",
          "close": "20:00:00"
        ],
        [
          "open": "08:00:00",
          "close": "20:00:00"
        ],
        [
          "open": "08:00:00",
          "close": "20:00:00"
        ],
        [
          "open": "08:00:00",
          "close": "20:00:00"
        ],
        [
          "open": "08:00:00",
          "close": "20:00:00"
        ]
      ],
      "companyInformation": [
        "VATNumber": "1234567890",
        "bankAccount": "2345-1234567890",
        "IBAN": "12341234",
        "swift": "543217"
      ]
    ]
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fiftytwo.com/masterdata/stores/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()
```