Skip to content

API · product-file ​

Trang sinh tự động

Parse từ schema.graphql (SDL backend export) bằng parser graphql. Mô tả và quyền lấy nguyên văn từ description trong SDL.

2 query · 2 mutation.

Query ​

productImportPreflight ​

Checks a chosen file before 'Kiểm tra dữ liệu': not an .xlsx template or no data row -> invalid_format; more than 1,000 data rows -> too_many_rows. Rows are counted, not validated. The caller's own READY upload only (else not_found); no run is recorded. Requires catalog.write.

query · quyền: catalog.write

Tham sốKiểuMặc địnhMô tả
fileMediaIdID!

Trả về ProductImportPreflight!

FieldKiểuMô tả
okBoolean!True when 'Kiểm tra dữ liệu' may be enabled for this file.
fileErrorProductImportFileErrorinvalid_format or too_many_rows; never any data of the file's rows.

productImportTemplate ​

The .xlsx import template: sheet 1 'Sản phẩm' (the only sheet the import reads) holds the header row, then one format-notes row and one example row that the user deletes before importing (every non-blank row under the header is read as data); sheet 2 'Hướng dẫn' holds the same example row, the format notes and the active units. Requires catalog.write, like the import itself.

query · quyền: catalog.write

Không có tham số.

Trả về ProductImportTemplate!

FieldKiểuMô tả
fileNameString!
mimeTypeString!The .xlsx MIME type.
contentBase64String!The .xlsx bytes, base64. Small and tenant-free, so inline.

Mutation ​

exportProducts ​

Export every product matching the list filters to .xlsx in one step (no page, no selection, no row cap): all product/combo columns except images, creator and last editor by Admin name. Nothing matching -> rowCount 0, file null, no file created. Formula-like text is neutralised. A file over the storage cap is conflict/export_too_large. Requires catalog.read.

mutation · quyền: catalog.read

Tham sốKiểuMặc địnhMô tả
inputExportProductsInput!

Trả về ExportProductsResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
rowCountInt!
fileProductExportFileNull when nothing matches (AC05 'No data to export', no file created).

importProducts ​

Validate or import products from an Excel file (<= 1,000 rows): every row is checked and reported with all of its issues, VALIDATE writes nothing but its run, and the import is all or nothing. Requires catalog.write.

mutation · quyền: catalog.write

Tham sốKiểuMặc địnhMô tả
inputImportProductsInput!

Trả về ImportProductsResult!

FieldKiểuMô tả
aggregateIdID!
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
runProductImportRun!

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17