StoreGroups
Create a store group
Creates a new store group with the specified name, slug, store type, and optional markets. The store group defines pricing and availability settings for products across multiple markets.
POST
/
api
/
v1
/
{team_slug}
/
{app_slug}
/
store-groups
Create a store group
curl --request POST \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country_of_sale": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"markets": [
"<string>"
]
}
'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups"
payload = {
"country_of_sale": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"markets": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country_of_sale: '<string>',
name: '<string>',
slug: '<string>',
description: '<string>',
markets: ['<string>']
})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country_of_sale' => '<string>',
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'markets' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups"
payload := strings.NewReader("{\n \"country_of_sale\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"markets\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country_of_sale\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"markets\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country_of_sale\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"markets\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"country_of_sale": "<string>",
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"markets": [
{
"active": true,
"country_codes": [
"<string>"
],
"created_at": "<string>",
"currency_code": "<string>",
"id": "<string>",
"is_tax_exemption_eligible": true,
"is_tax_included_in_price": true,
"locale": "<string>",
"name": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"name": "<string>",
"slug": "<string>",
"store_type": "<string>",
"updated_at": "<string>"
},
"success": true,
"details": [
"<string>"
]
}{
"data": {
"country_of_sale": "<string>",
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"markets": [
{
"active": true,
"country_codes": [
"<string>"
],
"created_at": "<string>",
"currency_code": "<string>",
"id": "<string>",
"is_tax_exemption_eligible": true,
"is_tax_included_in_price": true,
"locale": "<string>",
"name": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"name": "<string>",
"slug": "<string>",
"store_type": "<string>",
"updated_at": "<string>"
},
"success": true,
"details": [
"<string>"
]
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}Authorizations
Management API token, sent as Authorization: Bearer <token>.
Body
application/json
Store group data
Country value needs to follow ISO3166_1_alpha2, which means we want a country value written in alpha-2 two-letter country codes, Example: SE or FI
The slug of the markets which should be related to this store group
Available options:
b2c, b2b, d2c, d2b ⌘I
Create a store group
curl --request POST \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country_of_sale": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"markets": [
"<string>"
]
}
'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups"
payload = {
"country_of_sale": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"markets": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country_of_sale: '<string>',
name: '<string>',
slug: '<string>',
description: '<string>',
markets: ['<string>']
})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'country_of_sale' => '<string>',
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'markets' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups"
payload := strings.NewReader("{\n \"country_of_sale\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"markets\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country_of_sale\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"markets\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/store-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country_of_sale\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"markets\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"country_of_sale": "<string>",
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"markets": [
{
"active": true,
"country_codes": [
"<string>"
],
"created_at": "<string>",
"currency_code": "<string>",
"id": "<string>",
"is_tax_exemption_eligible": true,
"is_tax_included_in_price": true,
"locale": "<string>",
"name": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"name": "<string>",
"slug": "<string>",
"store_type": "<string>",
"updated_at": "<string>"
},
"success": true,
"details": [
"<string>"
]
}{
"data": {
"country_of_sale": "<string>",
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"markets": [
{
"active": true,
"country_codes": [
"<string>"
],
"created_at": "<string>",
"currency_code": "<string>",
"id": "<string>",
"is_tax_exemption_eligible": true,
"is_tax_included_in_price": true,
"locale": "<string>",
"name": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"name": "<string>",
"slug": "<string>",
"store_type": "<string>",
"updated_at": "<string>"
},
"success": true,
"details": [
"<string>"
]
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}