Import products from CSV
Upload a UTF-8 CSV with a header row. Columns: name, sku, upc, length, width, height, dimension_unit, weight, weight_unit, image_url. Valid rows are created while invalid rows return field-level errors.
POST
/products/csvAuthorization
X-API-KeyAPI key · headerrequiredAPI key in format `sk_*`. Scoped to your partner account; server-side use only.
Header parameters
Idempotency-KeystringrequiredUnique key for safe retries. Reusing a key on the same endpoint returns the original result.
max length 255
Request body
requiredmultipart/form-datafilestringrequiredResponses
200Rows processed independently.
createdProduct[]requiredShow propertiesHide properties
Array of
ProductdimensionsDimensionsrequiredShow propertiesHide properties
heightnumberrequiredlengthnumberrequiredunitstringrequiredAllowed:
incmwidthnumberrequiredimage_urlstring<uri> | nullnamestringrequiredskustringrequiredUnique within the partner organization.
upcstring | nullweightWeightrequiredShow propertiesHide properties
unitstringrequiredAllowed:
ozgvaluenumberrequiredcreated_atstring<date-time>requiredproduct_idstring<uuid>requiredupdated_atstring<date-time>requirederrorsCsvRowError[]requiredShow propertiesHide properties
Array of
CsvRowErrorcodeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedfieldsobjectrequiredmessagestringrequiredrowintegerrequiredOne-based CSV data-row number, excluding the header.
min 1
totalsCsvBatchTotalsrequiredShow propertiesHide properties
createdintegerrequiredmin 0
failedintegerrequiredmin 0
submittedintegerrequiredmin 0
400Validation failed.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
401Missing, invalid, expired, or environment-mismatched API key.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
429Rate limit exceeded for this API key.
codeErrorCoderequiredStable machine-readable error vocabulary for v1.
Allowed:
validation_errorstate_conflictenvironment_mismatchunsupported_destinationinvalid_api_keynot_foundrate_limitedextraobjectrequiredStructured details such as field errors or SKU availability.
messagestringrequiredHuman-readable summary.
Try it
Server
Authorization
Parameters
Bodymultipart/form-data
Request
curl -X POST "https://api.vault.stashtab.gg/v1/products/csv" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Idempotency-Key: string" \
-H "Content-Type: multipart/form-data" \
-d '{
"file": "string"
}'const response = await fetch("https://api.vault.stashtab.gg/v1/products/csv", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Idempotency-Key": "string",
"Content-Type": "multipart/form-data"
},
body: JSON.stringify({
"file": "string"
})
});Response
{
"created": [
{
"dimensions": {
"height": 0,
"length": 0,
"unit": "in",
"width": 0
},
"image_url": "http://example.com",
"name": "string",
"sku": "string",
"upc": "string",
"weight": {
"unit": "oz",
"value": 0
},
"created_at": "2019-08-24T14:15:22Z",
"product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"errors": [
{
"code": "validation_error",
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"message": "string",
"row": 1
}
],
"totals": {
"created": 0,
"failed": 0,
"submitted": 0
}
}{
"code": "validation_error",
"extra": {},
"message": "string"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}{
"code": "validation_error",
"extra": {},
"message": "string"
}