Upsert Products
curl --request POST \
--url https://api.depict.ai/catalog/v0/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant": "<string>",
"products": [
{
"product_id": "<string>",
"item_group_id": "<string>",
"main_product_id": "<string>",
"image_urls": [
"<string>"
],
"category_ids": [
"<string>"
],
"transaction_product_id": "<string>",
"locale_attributes": [
{
"locale_id": "<string>",
"title": "<string>",
"color_name": "<string>",
"description": "<string>",
"size_name": "<string>",
"material": [
"<string>"
],
"custom_attributes": {}
}
],
"inventory_attributes": [
{
"inventory_id": "<string>",
"in_stock": true,
"quantity": 123,
"custom_attributes": {}
}
],
"pricelist_attributes": [
{
"pricelist_id": "<string>",
"sale_price": 1,
"original_price": 1,
"currency": "<string>",
"custom_attributes": {}
}
],
"brand": "<string>",
"inactive": false,
"store_attributes": "<unknown>",
"size": "<string>",
"is_second_hand": true,
"color_hex": "<string>",
"custom_attributes": {}
}
]
}
'import requests
url = "https://api.depict.ai/catalog/v0/products"
payload = {
"merchant": "<string>",
"products": [
{
"product_id": "<string>",
"item_group_id": "<string>",
"main_product_id": "<string>",
"image_urls": ["<string>"],
"category_ids": ["<string>"],
"transaction_product_id": "<string>",
"locale_attributes": [
{
"locale_id": "<string>",
"title": "<string>",
"color_name": "<string>",
"description": "<string>",
"size_name": "<string>",
"material": ["<string>"],
"custom_attributes": {}
}
],
"inventory_attributes": [
{
"inventory_id": "<string>",
"in_stock": True,
"quantity": 123,
"custom_attributes": {}
}
],
"pricelist_attributes": [
{
"pricelist_id": "<string>",
"sale_price": 1,
"original_price": 1,
"currency": "<string>",
"custom_attributes": {}
}
],
"brand": "<string>",
"inactive": False,
"store_attributes": "<unknown>",
"size": "<string>",
"is_second_hand": True,
"color_hex": "<string>",
"custom_attributes": {}
}
]
}
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({
merchant: '<string>',
products: [
{
product_id: '<string>',
item_group_id: '<string>',
main_product_id: '<string>',
image_urls: ['<string>'],
category_ids: ['<string>'],
transaction_product_id: '<string>',
locale_attributes: [
{
locale_id: '<string>',
title: '<string>',
color_name: '<string>',
description: '<string>',
size_name: '<string>',
material: ['<string>'],
custom_attributes: {}
}
],
inventory_attributes: [
{inventory_id: '<string>', in_stock: true, quantity: 123, custom_attributes: {}}
],
pricelist_attributes: [
{
pricelist_id: '<string>',
sale_price: 1,
original_price: 1,
currency: '<string>',
custom_attributes: {}
}
],
brand: '<string>',
inactive: false,
store_attributes: '<unknown>',
size: '<string>',
is_second_hand: true,
color_hex: '<string>',
custom_attributes: {}
}
]
})
};
fetch('https://api.depict.ai/catalog/v0/products', 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.depict.ai/catalog/v0/products",
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([
'merchant' => '<string>',
'products' => [
[
'product_id' => '<string>',
'item_group_id' => '<string>',
'main_product_id' => '<string>',
'image_urls' => [
'<string>'
],
'category_ids' => [
'<string>'
],
'transaction_product_id' => '<string>',
'locale_attributes' => [
[
'locale_id' => '<string>',
'title' => '<string>',
'color_name' => '<string>',
'description' => '<string>',
'size_name' => '<string>',
'material' => [
'<string>'
],
'custom_attributes' => [
]
]
],
'inventory_attributes' => [
[
'inventory_id' => '<string>',
'in_stock' => true,
'quantity' => 123,
'custom_attributes' => [
]
]
],
'pricelist_attributes' => [
[
'pricelist_id' => '<string>',
'sale_price' => 1,
'original_price' => 1,
'currency' => '<string>',
'custom_attributes' => [
]
]
],
'brand' => '<string>',
'inactive' => false,
'store_attributes' => '<unknown>',
'size' => '<string>',
'is_second_hand' => true,
'color_hex' => '<string>',
'custom_attributes' => [
]
]
]
]),
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.depict.ai/catalog/v0/products"
payload := strings.NewReader("{\n \"merchant\": \"<string>\",\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"item_group_id\": \"<string>\",\n \"main_product_id\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_ids\": [\n \"<string>\"\n ],\n \"transaction_product_id\": \"<string>\",\n \"locale_attributes\": [\n {\n \"locale_id\": \"<string>\",\n \"title\": \"<string>\",\n \"color_name\": \"<string>\",\n \"description\": \"<string>\",\n \"size_name\": \"<string>\",\n \"material\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n }\n ],\n \"inventory_attributes\": [\n {\n \"inventory_id\": \"<string>\",\n \"in_stock\": true,\n \"quantity\": 123,\n \"custom_attributes\": {}\n }\n ],\n \"pricelist_attributes\": [\n {\n \"pricelist_id\": \"<string>\",\n \"sale_price\": 1,\n \"original_price\": 1,\n \"currency\": \"<string>\",\n \"custom_attributes\": {}\n }\n ],\n \"brand\": \"<string>\",\n \"inactive\": false,\n \"store_attributes\": \"<unknown>\",\n \"size\": \"<string>\",\n \"is_second_hand\": true,\n \"color_hex\": \"<string>\",\n \"custom_attributes\": {}\n }\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.depict.ai/catalog/v0/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant\": \"<string>\",\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"item_group_id\": \"<string>\",\n \"main_product_id\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_ids\": [\n \"<string>\"\n ],\n \"transaction_product_id\": \"<string>\",\n \"locale_attributes\": [\n {\n \"locale_id\": \"<string>\",\n \"title\": \"<string>\",\n \"color_name\": \"<string>\",\n \"description\": \"<string>\",\n \"size_name\": \"<string>\",\n \"material\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n }\n ],\n \"inventory_attributes\": [\n {\n \"inventory_id\": \"<string>\",\n \"in_stock\": true,\n \"quantity\": 123,\n \"custom_attributes\": {}\n }\n ],\n \"pricelist_attributes\": [\n {\n \"pricelist_id\": \"<string>\",\n \"sale_price\": 1,\n \"original_price\": 1,\n \"currency\": \"<string>\",\n \"custom_attributes\": {}\n }\n ],\n \"brand\": \"<string>\",\n \"inactive\": false,\n \"store_attributes\": \"<unknown>\",\n \"size\": \"<string>\",\n \"is_second_hand\": true,\n \"color_hex\": \"<string>\",\n \"custom_attributes\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.depict.ai/catalog/v0/products")
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 \"merchant\": \"<string>\",\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"item_group_id\": \"<string>\",\n \"main_product_id\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_ids\": [\n \"<string>\"\n ],\n \"transaction_product_id\": \"<string>\",\n \"locale_attributes\": [\n {\n \"locale_id\": \"<string>\",\n \"title\": \"<string>\",\n \"color_name\": \"<string>\",\n \"description\": \"<string>\",\n \"size_name\": \"<string>\",\n \"material\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n }\n ],\n \"inventory_attributes\": [\n {\n \"inventory_id\": \"<string>\",\n \"in_stock\": true,\n \"quantity\": 123,\n \"custom_attributes\": {}\n }\n ],\n \"pricelist_attributes\": [\n {\n \"pricelist_id\": \"<string>\",\n \"sale_price\": 1,\n \"original_price\": 1,\n \"currency\": \"<string>\",\n \"custom_attributes\": {}\n }\n ],\n \"brand\": \"<string>\",\n \"inactive\": false,\n \"store_attributes\": \"<unknown>\",\n \"size\": \"<string>\",\n \"is_second_hand\": true,\n \"color_hex\": \"<string>\",\n \"custom_attributes\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Catalog Push API (v0)
Upsert Products
POST
/
catalog
/
v0
/
products
Upsert Products
curl --request POST \
--url https://api.depict.ai/catalog/v0/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchant": "<string>",
"products": [
{
"product_id": "<string>",
"item_group_id": "<string>",
"main_product_id": "<string>",
"image_urls": [
"<string>"
],
"category_ids": [
"<string>"
],
"transaction_product_id": "<string>",
"locale_attributes": [
{
"locale_id": "<string>",
"title": "<string>",
"color_name": "<string>",
"description": "<string>",
"size_name": "<string>",
"material": [
"<string>"
],
"custom_attributes": {}
}
],
"inventory_attributes": [
{
"inventory_id": "<string>",
"in_stock": true,
"quantity": 123,
"custom_attributes": {}
}
],
"pricelist_attributes": [
{
"pricelist_id": "<string>",
"sale_price": 1,
"original_price": 1,
"currency": "<string>",
"custom_attributes": {}
}
],
"brand": "<string>",
"inactive": false,
"store_attributes": "<unknown>",
"size": "<string>",
"is_second_hand": true,
"color_hex": "<string>",
"custom_attributes": {}
}
]
}
'import requests
url = "https://api.depict.ai/catalog/v0/products"
payload = {
"merchant": "<string>",
"products": [
{
"product_id": "<string>",
"item_group_id": "<string>",
"main_product_id": "<string>",
"image_urls": ["<string>"],
"category_ids": ["<string>"],
"transaction_product_id": "<string>",
"locale_attributes": [
{
"locale_id": "<string>",
"title": "<string>",
"color_name": "<string>",
"description": "<string>",
"size_name": "<string>",
"material": ["<string>"],
"custom_attributes": {}
}
],
"inventory_attributes": [
{
"inventory_id": "<string>",
"in_stock": True,
"quantity": 123,
"custom_attributes": {}
}
],
"pricelist_attributes": [
{
"pricelist_id": "<string>",
"sale_price": 1,
"original_price": 1,
"currency": "<string>",
"custom_attributes": {}
}
],
"brand": "<string>",
"inactive": False,
"store_attributes": "<unknown>",
"size": "<string>",
"is_second_hand": True,
"color_hex": "<string>",
"custom_attributes": {}
}
]
}
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({
merchant: '<string>',
products: [
{
product_id: '<string>',
item_group_id: '<string>',
main_product_id: '<string>',
image_urls: ['<string>'],
category_ids: ['<string>'],
transaction_product_id: '<string>',
locale_attributes: [
{
locale_id: '<string>',
title: '<string>',
color_name: '<string>',
description: '<string>',
size_name: '<string>',
material: ['<string>'],
custom_attributes: {}
}
],
inventory_attributes: [
{inventory_id: '<string>', in_stock: true, quantity: 123, custom_attributes: {}}
],
pricelist_attributes: [
{
pricelist_id: '<string>',
sale_price: 1,
original_price: 1,
currency: '<string>',
custom_attributes: {}
}
],
brand: '<string>',
inactive: false,
store_attributes: '<unknown>',
size: '<string>',
is_second_hand: true,
color_hex: '<string>',
custom_attributes: {}
}
]
})
};
fetch('https://api.depict.ai/catalog/v0/products', 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.depict.ai/catalog/v0/products",
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([
'merchant' => '<string>',
'products' => [
[
'product_id' => '<string>',
'item_group_id' => '<string>',
'main_product_id' => '<string>',
'image_urls' => [
'<string>'
],
'category_ids' => [
'<string>'
],
'transaction_product_id' => '<string>',
'locale_attributes' => [
[
'locale_id' => '<string>',
'title' => '<string>',
'color_name' => '<string>',
'description' => '<string>',
'size_name' => '<string>',
'material' => [
'<string>'
],
'custom_attributes' => [
]
]
],
'inventory_attributes' => [
[
'inventory_id' => '<string>',
'in_stock' => true,
'quantity' => 123,
'custom_attributes' => [
]
]
],
'pricelist_attributes' => [
[
'pricelist_id' => '<string>',
'sale_price' => 1,
'original_price' => 1,
'currency' => '<string>',
'custom_attributes' => [
]
]
],
'brand' => '<string>',
'inactive' => false,
'store_attributes' => '<unknown>',
'size' => '<string>',
'is_second_hand' => true,
'color_hex' => '<string>',
'custom_attributes' => [
]
]
]
]),
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.depict.ai/catalog/v0/products"
payload := strings.NewReader("{\n \"merchant\": \"<string>\",\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"item_group_id\": \"<string>\",\n \"main_product_id\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_ids\": [\n \"<string>\"\n ],\n \"transaction_product_id\": \"<string>\",\n \"locale_attributes\": [\n {\n \"locale_id\": \"<string>\",\n \"title\": \"<string>\",\n \"color_name\": \"<string>\",\n \"description\": \"<string>\",\n \"size_name\": \"<string>\",\n \"material\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n }\n ],\n \"inventory_attributes\": [\n {\n \"inventory_id\": \"<string>\",\n \"in_stock\": true,\n \"quantity\": 123,\n \"custom_attributes\": {}\n }\n ],\n \"pricelist_attributes\": [\n {\n \"pricelist_id\": \"<string>\",\n \"sale_price\": 1,\n \"original_price\": 1,\n \"currency\": \"<string>\",\n \"custom_attributes\": {}\n }\n ],\n \"brand\": \"<string>\",\n \"inactive\": false,\n \"store_attributes\": \"<unknown>\",\n \"size\": \"<string>\",\n \"is_second_hand\": true,\n \"color_hex\": \"<string>\",\n \"custom_attributes\": {}\n }\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.depict.ai/catalog/v0/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchant\": \"<string>\",\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"item_group_id\": \"<string>\",\n \"main_product_id\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_ids\": [\n \"<string>\"\n ],\n \"transaction_product_id\": \"<string>\",\n \"locale_attributes\": [\n {\n \"locale_id\": \"<string>\",\n \"title\": \"<string>\",\n \"color_name\": \"<string>\",\n \"description\": \"<string>\",\n \"size_name\": \"<string>\",\n \"material\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n }\n ],\n \"inventory_attributes\": [\n {\n \"inventory_id\": \"<string>\",\n \"in_stock\": true,\n \"quantity\": 123,\n \"custom_attributes\": {}\n }\n ],\n \"pricelist_attributes\": [\n {\n \"pricelist_id\": \"<string>\",\n \"sale_price\": 1,\n \"original_price\": 1,\n \"currency\": \"<string>\",\n \"custom_attributes\": {}\n }\n ],\n \"brand\": \"<string>\",\n \"inactive\": false,\n \"store_attributes\": \"<unknown>\",\n \"size\": \"<string>\",\n \"is_second_hand\": true,\n \"color_hex\": \"<string>\",\n \"custom_attributes\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.depict.ai/catalog/v0/products")
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 \"merchant\": \"<string>\",\n \"products\": [\n {\n \"product_id\": \"<string>\",\n \"item_group_id\": \"<string>\",\n \"main_product_id\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_ids\": [\n \"<string>\"\n ],\n \"transaction_product_id\": \"<string>\",\n \"locale_attributes\": [\n {\n \"locale_id\": \"<string>\",\n \"title\": \"<string>\",\n \"color_name\": \"<string>\",\n \"description\": \"<string>\",\n \"size_name\": \"<string>\",\n \"material\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n }\n ],\n \"inventory_attributes\": [\n {\n \"inventory_id\": \"<string>\",\n \"in_stock\": true,\n \"quantity\": 123,\n \"custom_attributes\": {}\n }\n ],\n \"pricelist_attributes\": [\n {\n \"pricelist_id\": \"<string>\",\n \"sale_price\": 1,\n \"original_price\": 1,\n \"currency\": \"<string>\",\n \"custom_attributes\": {}\n }\n ],\n \"brand\": \"<string>\",\n \"inactive\": false,\n \"store_attributes\": \"<unknown>\",\n \"size\": \"<string>\",\n \"is_second_hand\": true,\n \"color_hex\": \"<string>\",\n \"custom_attributes\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Was this page helpful?
⌘I

