Products
Upload product image
Uploads an image either by file or URL and adds it to a product
PUT
/
api
/
v1
/
{team_slug}
/
{app_slug}
/
products
/
{product_id}
/
images
Upload product image
curl --request PUT \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'image=<string>' \
--data 'title=<string>' \
--data 'alt=<string>' \
--data 'copyright=<string>' \
--data priority=123 \
--data 'url=<string>' \
--data public=true \
--data 'filename=<string>' \
--data overwrite=true \
--data 'blurhash=<string>' \
--data 'parent_id=<string>' \
--data 'attributes=<string>'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/images"
payload = {
"image": "<string>",
"title": "<string>",
"alt": "<string>",
"copyright": "<string>",
"priority": "123",
"url": "<string>",
"public": "true",
"filename": "<string>",
"overwrite": "true",
"blurhash": "<string>",
"parent_id": "<string>",
"attributes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
image: '<string>',
title: '<string>',
alt: '<string>',
copyright: '<string>',
priority: '123',
url: '<string>',
public: 'true',
filename: '<string>',
overwrite: 'true',
blurhash: '<string>',
parent_id: '<string>',
attributes: '<string>'
})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_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}/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 => "image=%3Cstring%3E&title=%3Cstring%3E&alt=%3Cstring%3E©right=%3Cstring%3E&priority=123&url=%3Cstring%3E&public=true&filename=%3Cstring%3E&overwrite=true&blurhash=%3Cstring%3E&parent_id=%3Cstring%3E&attributes=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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}/images"
payload := strings.NewReader("image=%3Cstring%3E&title=%3Cstring%3E&alt=%3Cstring%3E©right=%3Cstring%3E&priority=123&url=%3Cstring%3E&public=true&filename=%3Cstring%3E&overwrite=true&blurhash=%3Cstring%3E&parent_id=%3Cstring%3E&attributes=%3Cstring%3E")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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}/images")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("image=%3Cstring%3E&title=%3Cstring%3E&alt=%3Cstring%3E©right=%3Cstring%3E&priority=123&url=%3Cstring%3E&public=true&filename=%3Cstring%3E&overwrite=true&blurhash=%3Cstring%3E&parent_id=%3Cstring%3E&attributes=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "image=%3Cstring%3E&title=%3Cstring%3E&alt=%3Cstring%3E©right=%3Cstring%3E&priority=123&url=%3Cstring%3E&public=true&filename=%3Cstring%3E&overwrite=true&blurhash=%3Cstring%3E&parent_id=%3Cstring%3E&attributes=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"data": {
"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>"
},
"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>.
Path Parameters
Product Number
App slug
Team slug
Body
application/x-www-form-urlencoded
Image file to upload
Title for the image
Alternative text for the image
Copyright text for the image
Priority for the image list
URL for image to upload
If image is public or not
Custom filename (without extension)
Overwrite the existing image with the same filename instead of creating a new one. Requires filename
Optional precomputed blurhash. If provided, generation is skipped
Parent image ID
Attribute for image, e.g. white-background
⌘I
Upload product image
curl --request PUT \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'image=<string>' \
--data 'title=<string>' \
--data 'alt=<string>' \
--data 'copyright=<string>' \
--data priority=123 \
--data 'url=<string>' \
--data public=true \
--data 'filename=<string>' \
--data overwrite=true \
--data 'blurhash=<string>' \
--data 'parent_id=<string>' \
--data 'attributes=<string>'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/images"
payload = {
"image": "<string>",
"title": "<string>",
"alt": "<string>",
"copyright": "<string>",
"priority": "123",
"url": "<string>",
"public": "true",
"filename": "<string>",
"overwrite": "true",
"blurhash": "<string>",
"parent_id": "<string>",
"attributes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
image: '<string>',
title: '<string>',
alt: '<string>',
copyright: '<string>',
priority: '123',
url: '<string>',
public: 'true',
filename: '<string>',
overwrite: 'true',
blurhash: '<string>',
parent_id: '<string>',
attributes: '<string>'
})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_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}/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 => "image=%3Cstring%3E&title=%3Cstring%3E&alt=%3Cstring%3E©right=%3Cstring%3E&priority=123&url=%3Cstring%3E&public=true&filename=%3Cstring%3E&overwrite=true&blurhash=%3Cstring%3E&parent_id=%3Cstring%3E&attributes=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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}/images"
payload := strings.NewReader("image=%3Cstring%3E&title=%3Cstring%3E&alt=%3Cstring%3E©right=%3Cstring%3E&priority=123&url=%3Cstring%3E&public=true&filename=%3Cstring%3E&overwrite=true&blurhash=%3Cstring%3E&parent_id=%3Cstring%3E&attributes=%3Cstring%3E")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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}/images")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("image=%3Cstring%3E&title=%3Cstring%3E&alt=%3Cstring%3E©right=%3Cstring%3E&priority=123&url=%3Cstring%3E&public=true&filename=%3Cstring%3E&overwrite=true&blurhash=%3Cstring%3E&parent_id=%3Cstring%3E&attributes=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/products/{product_id}/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "image=%3Cstring%3E&title=%3Cstring%3E&alt=%3Cstring%3E©right=%3Cstring%3E&priority=123&url=%3Cstring%3E&public=true&filename=%3Cstring%3E&overwrite=true&blurhash=%3Cstring%3E&parent_id=%3Cstring%3E&attributes=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"data": {
"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>"
},
"success": true,
"details": [
"<string>"
]
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}