# 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。このパラメータは、パブリッシャーアカウントのプロジェクト名の横、またはプロジェクトの作業中にブラウザのアドレスバーで確認できます。URLの形式は以下の通りです：https://publisher.xsolla.com//projects/。
    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)
    インポート操作：

指定可能な値：
- create — 新しいアイテムを追加します。
- create_and_update — 新しいアイテムを追加し、既存のアイテムを更新します。
- sync — 新しいアイテムの追加、既存のアイテムの更新を行い、存在しないアイテムを無効化します。
    Enum: "create", "create_and_update", "sync"

## Response 201 fields (application/json):

  - `import_id` (string)
    Import operation ID. If you encounter difficulties importing the JSON file, report this ID to your Customer Success Manager or send an email to csm@xsolla.com.
    Example: "af9f3638a16e11ef880da2cd677d2d24"

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

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

## Response 422 fields (application/json):

  - `errorCode` (integer)
    Example: 1803

  - `statusCode` (integer)
    Example: 422

  - `errorMessage` (string)
    Example: "[0410-1803]: File content-type doesn't allowed. Allowed content types: application/json; current content type: text/plain"

  - `transactionId` (string)
    Example: "x-x-x-x-transactionId-mock-x-x-x"


