Import attributes from CSV
curl --request POST \
--url https://commerceos.aiagents.fabric.inc/api/v2/attributes/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'domain: <domain>' \
--form file='@example-file' \
--form 'name=Spring attributes import'import requests
url = "https://commerceos.aiagents.fabric.inc/api/v2/attributes/import"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "name": "Spring attributes import" }
headers = {
"domain": "<domain>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', 'Spring attributes import');
const options = {method: 'POST', headers: {domain: '<domain>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://commerceos.aiagents.fabric.inc/api/v2/attributes/import', 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/attributes/import",
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=\"name\"\r\n\r\nSpring attributes import\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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/attributes/import"
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=\"name\"\r\n\r\nSpring attributes import\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("domain", "<domain>")
req.Header.Add("Authorization", "Bearer <token>")
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/attributes/import")
.header("domain", "<domain>")
.header("Authorization", "Bearer <token>")
.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=\"name\"\r\n\r\nSpring attributes import\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerceos.aiagents.fabric.inc/api/v2/attributes/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["domain"] = '<domain>'
request["Authorization"] = 'Bearer <token>'
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=\"name\"\r\n\r\nSpring attributes import\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"import_id": "e2716438-b763-4be8-82d2-36abe0cb92b1",
"name": "attribute_test.csv",
"status": "PENDING",
"total_rows": 36,
"processed_rows": 0,
"created_count": 0,
"updated_count": 0,
"skipped_count": 0,
"failed_count": 0,
"input_filename": "attribute_test.csv",
"input_file_url": null,
"error_file_url": null,
"error_message": null,
"errors": [],
"started_at": null,
"completed_at": null,
"created_at": "2026-03-12T18:04:03.879876Z"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}Attributes
Import attributes from CSV
Upload a CSV file to import attribute definitions for the specified brand/domain. The import is processed asynchronously.
Expected CSV columns
- attribute_name (required): Attribute display name
- attribute_key (optional): Machine-readable key
- description (optional): Attribute description
- data_type (optional): Data type
- scope (optional): Attribute scope
- enum_values (optional): Allowed values, pipe-delimited (e.g.
S|M|L) - allow_ai_content (optional): Allow AI to generate values (
true/false) - source (optional):
MERCHANTorGOLD_STANDARD - guideline_reason (optional): Guidance for AI enrichment
POST
/
v2
/
attributes
/
import
Import attributes from CSV
curl --request POST \
--url https://commerceos.aiagents.fabric.inc/api/v2/attributes/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'domain: <domain>' \
--form file='@example-file' \
--form 'name=Spring attributes import'import requests
url = "https://commerceos.aiagents.fabric.inc/api/v2/attributes/import"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "name": "Spring attributes import" }
headers = {
"domain": "<domain>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', 'Spring attributes import');
const options = {method: 'POST', headers: {domain: '<domain>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://commerceos.aiagents.fabric.inc/api/v2/attributes/import', 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/attributes/import",
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=\"name\"\r\n\r\nSpring attributes import\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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/attributes/import"
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=\"name\"\r\n\r\nSpring attributes import\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("domain", "<domain>")
req.Header.Add("Authorization", "Bearer <token>")
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/attributes/import")
.header("domain", "<domain>")
.header("Authorization", "Bearer <token>")
.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=\"name\"\r\n\r\nSpring attributes import\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerceos.aiagents.fabric.inc/api/v2/attributes/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["domain"] = '<domain>'
request["Authorization"] = 'Bearer <token>'
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=\"name\"\r\n\r\nSpring attributes import\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"import_id": "e2716438-b763-4be8-82d2-36abe0cb92b1",
"name": "attribute_test.csv",
"status": "PENDING",
"total_rows": 36,
"processed_rows": 0,
"created_count": 0,
"updated_count": 0,
"skipped_count": 0,
"failed_count": 0,
"input_filename": "attribute_test.csv",
"input_file_url": null,
"error_file_url": null,
"error_message": null,
"errors": [],
"started_at": null,
"completed_at": null,
"created_at": "2026-03-12T18:04:03.879876Z"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}{
"errors": "<array>",
"message": "Bad request",
"type": "CLIENT_ERROR"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.
Example:
"vessel.com"
Body
multipart/form-data
Response
Import accepted for asynchronous processing
Identifier for the attribute import job.
Example:
"e2716438-b763-4be8-82d2-36abe0cb92b1"
Import name.
Example:
"attribute_test.csv"
Example:
"PENDING"
Example:
36
Example:
0
Example:
0
Example:
0
Example:
0
Example:
0
Example:
"attribute_test.csv"
Example:
[]
Example:
"2026-03-12T18:04:03.879876Z"
Example:
null
Example:
null
Example:
null
Example:
null
Example:
null
Was this page helpful?
