# 获取商品导入状态

检索将商品导入项目的进度信息。此API调用检索通过API或发布商帐户执行的最后一次导入的数据。

Endpoint: GET /v1/admin/projects/{project_id}/connectors/import_items/import/status
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    项目ID。您可以在发布商帐户的项目名称旁找到此参数；使用项目时，也可以在浏览器地址栏中找到此参数。URL格式如下：https://publisher.xsolla.com//projects/。
    Example: 44056

## Response 200 fields (application/json):

  - `status` (string)
    导入状态。

可能值：
- initialized — 导入已启动。
- process — 导入正在进行中。
- done — 导入成功。
- error — 由于错误，导入未完成或仅部分完成。
    Enum: "initialized", "process", "done", "error"

  - `date_created` (string)
    创建导入操作的时间戳（采用GMT+3 时区）。
    Example: "2024-11-19T14:27:31+03:00"

  - `date_updated` (string)
    由于错误而导致导入中断的时间戳（采用GMT+3 时区）。
    Example: "2024-11-19T15:27:31+03:00"

  - `date_completed` (string)
    导入操作完成的时间戳（采用GMT+3 时区）。如果导入因错误而中断且未导入任何商品，则返回空字符串。
    Example: "2024-11-19T15:27:31+03:00"

  - `progress` (integer)
    导入执行的进度（以百分比表示）。
    Example: 100

  - `error` (string)
    一般导入错误的描述。

  - `error_code` (string)
    一般导入错误的错误代码。

  - `result` (object)
    包含特定商品SKU的导入结果和导入错误数据的对象。
    Example: {"errors_count":2,"total_entities_count":10,"errors_by_sku":[{"sku":"com.xsolla.sword_1","type":"virtual_items","error_code":4055,"error_message":"[0401-4055]: Item default price not set"},{"sku":"","type":null,"error_code":1817,"error_message":"[0410-1817]: SKU can't be empty"}]}

  - `result.errors_count` (integer)
    导入过程中出现错误的商品数。
    Example: 2

  - `result.total_entities_count` (integer)
    导入的商品总数。
    Example: 10

  - `result.errors_by_sku` (array)
    包含特定商品SKU的导入错误数据的对象数组。
    Example: [{"sku":"com.xsolla.sword_1","type":"virtual_items","error_code":4055,"error_message":"[0401-4055]: Item default price not set"},{"sku":"","type":null,"error_code":1817,"error_message":"[0410-1817]: SKU can't be empty"}]

  - `result.errors_by_sku.sku` (string)
    导入商品的SKU。
    Example: "sku_1"

  - `result.errors_by_sku.type` (string)
    商品类型。
    Enum: "virtual_good", "virtual_currency", "virtual_currency_packages", "bundle"

  - `result.errors_by_sku.error_code` (integer)
    特定商品SKU的导入错误代码。
    Example: 1001

  - `result.errors_by_sku.error_message` (string)
    特定商品SKU的导入错误描述。
    Example: "Something went wrong"

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

  - `errorMessage` (string)
    Example: "[0401-1020]: Error in Authentication method occurred"


