Skip to content

API · campaign-import ​

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.

3 query · 0 mutation.

Query ​

campaignImportCheck ​

Kiểm tra file (BR-IM-05): classifies the file against current, writes nothing (DEC-CV3-07). Requires deal.manage.

query · quyền: deal.manage

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

Trả về CampaignImportResult!

FieldKiểuMô tả
modeCampaignImportMode!
rowCountInt!Data rows read (Tổng dòng = valid + error); 0 when fileError is set.
fileErrorCampaignImportFileError
rows[CampaignImportRow!]!Valid rows in the order of the list after import (REPLACE: kept products fill the other positions); empty when fileError is set.
rowErrors[CampaignImportRowError!]!
groupsCampaignImportGroups!
removed[CampaignImportRemoved!]!
kept[CampaignImportKept!]!REPLACE only (DEC-CV3-22), empty otherwise: the list after import = rows and kept merged by position (1..n, no gap); a client that applies only rows drops these products.
errorFileB64StringFile lỗi = the original file plus the column 'Lỗi' (BR-IM-06), base64 .xlsx; null without row errors.

campaignImportPreflight ​

Số dòng sản phẩm of the chosen file (DEC-CV3-23): the caller's own READY upload, else not_found. Requires deal.manage.

query · quyền: deal.manage

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

Trả về CampaignImportPreflight!

FieldKiểuMô tả
okBoolean!True when the file passes the whole-file gate.
rowCountInt!Data rows (header and blank rows not counted), 1..1.000 when ok; 0 when fileError is set.
fileErrorCampaignImportFileErrornot_xlsx | wrong_template | no_rows | too_many_rows (duplicates always empty); null when ok.

campaignImportTemplate ​

Tải file mẫu Mua chung / Mua định kỳ (.xlsx). Requires deal.manage.

query · quyền: deal.manage

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

Trả về CampaignImportTemplate!

FieldKiểuMô tả
fileNameString!
contentB64String!The .xlsx bytes, base64.

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17