curl --request POST \
--url https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts \
--header 'Content-Type: multipart/form-data' \
--header 'domain: <domain>' \
--form file='@example-file' \
--form kind=csvimport requests
url = "https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "kind": "csv" }
headers = {"domain": "<domain>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('kind', 'csv');
const options = {method: 'POST', headers: {domain: '<domain>'}};
options.body = form;
fetch('https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts', 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://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"kind\"\r\n\r\ncsv\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"domain: <domain>"
],
]);
$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://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"kind\"\r\n\r\ncsv\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("domain", "<domain>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts")
.header("domain", "<domain>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"kind\"\r\n\r\ncsv\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["domain"] = '<domain>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"kind\"\r\n\r\ncsv\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"artifact_id": "art_95c650ded4824dc79bb6df16427e4a10",
"kind": "csv",
"source": "upload",
"bytes": 45678,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"content_type": "text/csv",
"uri": "s3://product-agent-data-prod-ue2/optimize-artifacts/svc_yourClientId/art_95c650ded4824dc79bb6df16427e4a10/catalog.csv",
"original_filename": "catalog.csv",
"brand_id": "691df5949676c8e0b1d7b6b3",
"created_at": "2026-05-15T10:30:00Z"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}Upload a catalog artifact
Uploads a catalog CSV as multipart form data and returns an artifact_id for use when starting an optimization workflow.
The HTTP client must set the Content-Type: multipart/form-data header with the appropriate boundary; the header should not be set manually. The domain header is required and must be a brand domain (for example, vessel.com) that the authenticated principal is authorized to access.
Each request creates a new artifact, even when the file content is identical to a previously uploaded file. Retain the returned artifact_id for the workflow that will reference it.
For catalogs larger than approximately 100 MB, contact fabric support to enable the presigned-URL upload flow.
Catalog CSV format
The uploaded file must be UTF-8 encoded, comma-delimited, and include a header row. The supported columns are:
| Column | Required | Description |
|---|---|---|
title | Yes | Product display name as shown on the product detail page. |
sku | Yes | Unique product identifier within the brand catalog. |
description | Yes | Full product description from the product detail page. |
category_id | Conditional | The brand’s category identifier. Each row must provide either category_id or breadcrumb. |
breadcrumb | Conditional | Full category hierarchy separated by > (for example, Mens > Clothing > Pants). Each row must provide either breadcrumb or category_id. |
category | No | Free-text category label. Used as a hint when neither category_id nor breadcrumb resolves to a known category. |
product_group_id | No | Identifier shared by product variants that belong to the same family. |
price | No | Numeric price value for the product. |
currency | No | Currency code corresponding to price. |
url | No | Canonical product detail page URL. |
images | No | One or more image URLs separated by the pipe character (|). |
attribute.<name> | No | Custom attribute value. Free-form string, single value per cell. The <name> segment must match an attribute key configured for the brand. |
For a worked end-to-end example including auth and workflow creation, see the Product Import Developer Guide.
curl --request POST \
--url https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts \
--header 'Content-Type: multipart/form-data' \
--header 'domain: <domain>' \
--form file='@example-file' \
--form kind=csvimport requests
url = "https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "kind": "csv" }
headers = {"domain": "<domain>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('kind', 'csv');
const options = {method: 'POST', headers: {domain: '<domain>'}};
options.body = form;
fetch('https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts', 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://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"kind\"\r\n\r\ncsv\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"domain: <domain>"
],
]);
$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://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"kind\"\r\n\r\ncsv\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("domain", "<domain>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts")
.header("domain", "<domain>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"kind\"\r\n\r\ncsv\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerceos.aiagents.fabric.inc/api/v2/optimize/artifacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["domain"] = '<domain>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"kind\"\r\n\r\ncsv\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"artifact_id": "art_95c650ded4824dc79bb6df16427e4a10",
"kind": "csv",
"source": "upload",
"bytes": 45678,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"content_type": "text/csv",
"uri": "s3://product-agent-data-prod-ue2/optimize-artifacts/svc_yourClientId/art_95c650ded4824dc79bb6df16427e4a10/catalog.csv",
"original_filename": "catalog.csv",
"brand_id": "691df5949676c8e0b1d7b6b3",
"created_at": "2026-05-15T10:30:00Z"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}Headers
The brand domain name (for example, vessel.com or containerstore.com) used to scope the request to a specific brand's data and configuration. The authenticated principal must be authorized for the specified brand.
"vessel.com"
Body
Response
Artifact uploaded
Stable identifier for the artifact. Reference this value when creating a workflow.
"art_95c650ded4824dc79bb6df16427e4a10"
Artifact file format. The supported value is csv.
csv Indicates how the artifact was ingested. upload denotes a direct multipart upload, presigned denotes the presigned-URL flow used for large files, uri denotes a server-side fetch from an external URI, and generated denotes a system-produced artifact.
upload, presigned, uri, generated MIME type as detected by the server.
"text/csv"
Internal storage URI for the artifact. Informational only.
"s3://product-agent-data-prod-ue2/optimize-artifacts/svc_yourClientId/art_95c650ded4824dc79bb6df16427e4a10/catalog.csv"
The brand the artifact is associated with, derived from the domain header.
"691df5949676c8e0b1d7b6b3"
Upload timestamp in UTC.
"2026-05-15T10:30:00Z"
File size in bytes.
45678
Hex-encoded SHA-256 checksum of the file contents.
"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
The filename submitted with the multipart upload.
"catalog.csv"
Was this page helpful?
