Import products with embeddings
POST
/api/products/import
const url = 'https://example.com/api/products/import';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"content":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/products/import \ --header 'Content-Type: application/json' \ --data '{ "content": "example" }'Request Body required
Section titled “Request Body required ”CSV file contents to parse, embed, and upsert.
Media type application/json
CSV file contents for product import.
object
content
required
string
Example generated
{ "content": "example"}Responses
Section titled “ Responses ”Number of products imported.
Media type application/json
object
count
required
integer
errors
required
Array<object>
object
index
integer
sku
string
message
required
string
Example generated
{ "count": 1, "errors": [ { "index": 1, "sku": "example", "message": "example" } ]}The import body was invalid.
Media type application/json
Plain error payload (single error string).
object
error
required
string
Example generated
{ "error": "example"}The import failed while embedding or writing products.
Media type application/json
Plain error payload (single error string).
object
error
required
string
Example generated
{ "error": "example"}