Skip to main content

ImportParser

Validates and parses CSV files into a data structure which can then be used to created new entities. This is used internally by the Importer.

Signature

parseProducts

method(input: string | Stream, mainLanguage: LanguageCode = this.configService.defaultLanguageCode) => Promise<ParseResult<ParsedProductWithVariants>>

Parses the contents of the product import CSV file and returns a data structure which can then be used to populate Vendure using the FastImporterService.

The intermediate representation of an OptionGroup after it has been parsed by the ImportParser.

Signature

code

propertystring

An optional explicit code for the option group, parsed from the CSV name:code syntax. When two products specify the same code, they will share the option group.

translations

propertyArray<{ languageCode: LanguageCode; name: string; values: string[]; }>

The intermediate representation of a Facet after it has been parsed by the ImportParser.

Signature

translations

propertyArray<{ languageCode: LanguageCode; facet: string; value: string; }>

The intermediate representation of a ProductVariant after it has been parsed by the ImportParser.

Signature

sku

propertystring

price

propertynumber

taxCategory

propertystring

stockOnHand

propertynumber

trackInventory

propertyGlobalFlag

assetPaths

propertystring[]

facets

propertyParsedFacet[]

translations

propertyArray<{ languageCode: LanguageCode; optionValues: string[]; customFields: { [name: string]: string; }; }>

The intermediate representation of a Product after it has been parsed by the ImportParser.

Signature

assetPaths

propertystring[]

optionGroups

facets

propertyParsedFacet[]

translations

propertyArray<{ languageCode: LanguageCode; name: string; slug: string; description: string; customFields: { [name: string]: string; }; }>

The data structure into which an import CSV file is parsed by the ImportParser parseProducts() method.

Signature

product

variants

The result returned by the ImportParser parseProducts() method.

Signature

results

propertyT[]

errors

propertystring[]

processed

propertynumber
Was this chapter helpful?
Report Issue
Edited Mar 13, 2026ยทEdit this page