Variant Groups
Set variant group images
Replaces all images for a variant group
PUT
/
api
/
v1
/
{team_slug}
/
{app_slug}
/
products
/
{product_id}
/
variant-groups
/
{group_id}
/
images
Set variant group images
curl --request PUT \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images \
--header 'Content-Type: application/json' \
--data '
{
"images": [
{
"image_id": "<string>",
"priority": 123
}
]
}
'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images"
payload = { "images": [
{
"image_id": "<string>",
"priority": 123
}
] }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({images: [{image_id: '<string>', priority: 123}]})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images', 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}/products/{product_id}/variant-groups/{group_id}/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'images' => [
[
'image_id' => '<string>',
'priority' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"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}/products/{product_id}/variant-groups/{group_id}/images"
payload := strings.NewReader("{\n \"images\": [\n {\n \"image_id\": \"<string>\",\n \"priority\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images")
.header("Content-Type", "application/json")
.body("{\n \"images\": [\n {\n \"image_id\": \"<string>\",\n \"priority\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"images\": [\n {\n \"image_id\": \"<string>\",\n \"priority\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": [
{
"attribute_id": "<string>",
"attribute_key": "<string>",
"attribute_name": "<string>",
"template_key": "<string>",
"template_name": "<string>"
}
],
"channel_statuses": [
{
"channel_id": "<string>",
"channel_slug": "<string>",
"status": "<string>"
}
],
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"images": [
{
"alt": "<string>",
"app_id": "<string>",
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"blurhash": "<string>",
"copyright": "<string>",
"custom": {},
"folder_id": "<string>",
"id": "<string>",
"parent_id": "<string>",
"priority": 123,
"public": true,
"status": "<string>",
"title": "<string>",
"translations": {
"alt": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"copyright": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"url": "<string>"
}
],
"name": "<string>",
"priority": 123,
"product_id": "<string>",
"slug": "<string>",
"tags": [
{
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"created_at": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"markets": [
{
"active": true,
"country_codes": [
"<string>"
],
"created_at": "<string>",
"currency_code": "<string>",
"id": "<string>",
"locale": "<string>",
"name": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"name": "<string>",
"order": 123,
"schedules": [
{
"add_category_names": [
"<string>"
],
"add_collection_names": [
"<string>"
],
"add_tag_names": [
"<string>"
],
"execute_at": "<string>",
"finished_at": "<string>",
"group_id": "<string>",
"id": "<string>",
"item_id": "<string>",
"item_name": "<string>",
"item_type": "<string>",
"remove_category_names": [
"<string>"
],
"remove_collection_names": [
"<string>"
],
"remove_tag_names": [
"<string>"
],
"to_amount_cents_with_tax": 123,
"to_market_id": "<string>",
"to_market_status": "<string>",
"to_on_sale": true,
"to_sale_amount_cents_with_tax": 123,
"to_start_sale_timestamp": "<string>",
"to_status": "<string>",
"to_stop_sale_timestamp": "<string>",
"to_store_group_id": "<string>"
}
],
"status": "<string>",
"translations": {
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>"
}
],
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"slug": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"variants": [
{
"id": "<string>",
"status": "<string>",
"variant_name": "<string>",
"variant_number": "<string>"
}
],
"videos": [
{
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"description": "<string>",
"folder_id": "<string>",
"id": "<string>",
"path": "<string>",
"public": true,
"status": "<string>",
"title": "<string>",
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"variants": [
{
"format": "<string>",
"height": 123,
"url": "<string>",
"width": 123
}
]
}
]
},
"success": true,
"details": [
"<string>"
]
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}Path Parameters
Team slug
App slug
Product ID
Variant group ID
Body
application/json
Images to set
Show child attributes
Show child attributes
⌘I
Set variant group images
curl --request PUT \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images \
--header 'Content-Type: application/json' \
--data '
{
"images": [
{
"image_id": "<string>",
"priority": 123
}
]
}
'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images"
payload = { "images": [
{
"image_id": "<string>",
"priority": 123
}
] }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({images: [{image_id: '<string>', priority: 123}]})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images', 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}/products/{product_id}/variant-groups/{group_id}/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'images' => [
[
'image_id' => '<string>',
'priority' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"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}/products/{product_id}/variant-groups/{group_id}/images"
payload := strings.NewReader("{\n \"images\": [\n {\n \"image_id\": \"<string>\",\n \"priority\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images")
.header("Content-Type", "application/json")
.body("{\n \"images\": [\n {\n \"image_id\": \"<string>\",\n \"priority\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/variant-groups/{group_id}/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"images\": [\n {\n \"image_id\": \"<string>\",\n \"priority\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": [
{
"attribute_id": "<string>",
"attribute_key": "<string>",
"attribute_name": "<string>",
"template_key": "<string>",
"template_name": "<string>"
}
],
"channel_statuses": [
{
"channel_id": "<string>",
"channel_slug": "<string>",
"status": "<string>"
}
],
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"images": [
{
"alt": "<string>",
"app_id": "<string>",
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"blurhash": "<string>",
"copyright": "<string>",
"custom": {},
"folder_id": "<string>",
"id": "<string>",
"parent_id": "<string>",
"priority": 123,
"public": true,
"status": "<string>",
"title": "<string>",
"translations": {
"alt": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"copyright": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"url": "<string>"
}
],
"name": "<string>",
"priority": 123,
"product_id": "<string>",
"slug": "<string>",
"tags": [
{
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"created_at": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"markets": [
{
"active": true,
"country_codes": [
"<string>"
],
"created_at": "<string>",
"currency_code": "<string>",
"id": "<string>",
"locale": "<string>",
"name": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"name": "<string>",
"order": 123,
"schedules": [
{
"add_category_names": [
"<string>"
],
"add_collection_names": [
"<string>"
],
"add_tag_names": [
"<string>"
],
"execute_at": "<string>",
"finished_at": "<string>",
"group_id": "<string>",
"id": "<string>",
"item_id": "<string>",
"item_name": "<string>",
"item_type": "<string>",
"remove_category_names": [
"<string>"
],
"remove_collection_names": [
"<string>"
],
"remove_tag_names": [
"<string>"
],
"to_amount_cents_with_tax": 123,
"to_market_id": "<string>",
"to_market_status": "<string>",
"to_on_sale": true,
"to_sale_amount_cents_with_tax": 123,
"to_start_sale_timestamp": "<string>",
"to_status": "<string>",
"to_stop_sale_timestamp": "<string>",
"to_store_group_id": "<string>"
}
],
"status": "<string>",
"translations": {
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>"
}
],
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"slug": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"variants": [
{
"id": "<string>",
"status": "<string>",
"variant_name": "<string>",
"variant_number": "<string>"
}
],
"videos": [
{
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"description": "<string>",
"folder_id": "<string>",
"id": "<string>",
"path": "<string>",
"public": true,
"status": "<string>",
"title": "<string>",
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"variants": [
{
"format": "<string>",
"height": 123,
"url": "<string>",
"width": 123
}
]
}
]
},
"success": true,
"details": [
"<string>"
]
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}