# 通过JSON文件导入商品 通过指定的URL从JSON文件将商品导入商店。关于从JSON文件导入的更多信息,请参阅文档。 Endpoint: POST /v1/projects/{project_id}/import/from_external_file Version: 2.0.0 Security: basicAuth ## Path parameters: - `project_id` (integer, required) 项目ID。您可以在您的发布商帐户项目名称旁边找到。 Example: 44056 ## Request fields (application/json): - `connector_external_id` (string, required) 指定导入项操作类型的固定值。 Enum: "import_items" - `file_url` (string, required) 包含JSON格式数据的文件的URL。该文件应托管在具有公共访问权限的存储服务上。您可以在发布商帐户的[商店 > 虚拟物品 > 目录管理 > 导入商品 (JSON)](https://publisher.xsolla.com/0/projects/0/storefront/import-export/import-items)部分中下载文件模板。 Example: "https://my-bucket.s3.amazonaws.com/items.json" - `mode` (string) 导入操作: Enum: "create", "create_and_update", "sync" ## Response 201 fields (application/json): - `import_id` (string) 导入操作ID。如果在导入JSON文件时遇到困难,请将此ID报告给您的客户成功经理或发送电子邮件至csm@xsolla.com。 Example: "af9f3638a16e11ef880da2cd677d2d24" ## Response 401 fields (application/json): - `errorCode` (integer) Example: 1020 - `errorMessage` (string) Example: "[0401-1020]: Error in Authentication method occurred" - `statusCode` (integer) Example: 401 ## Response 422 fields (application/json): - `errorCode` (integer) Example: 1803 - `errorMessage` (string) Example: "[0410-1803]: File content-type doesn't allowed. Allowed content types: application/json; current content type: text/plain" - `statusCode` (integer) Example: 422 - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x"