# Artikel aus JSON-Datei importieren

Importiert Artikel aus einer JSON-Datei über die angegebene URL in den Shop. Weitere Informationen zum Import aus einer JSON-Datei finden Sie in der [Dokumentation](https://developers.xsolla.com/de/doc/shop-builder/how-to/json-import/).

Endpoint: POST /v1/projects/{project_id}/import/from_external_file
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    Projekt-ID. Dieser Parameter wird im [Kundenportal](https://publisher.xsolla.com/0/projects/0/) neben dem Projektnamen angezeigt sowie in der Adressleiste des Browsers, wenn Sie im Kundenportal ein Projekt geöffnet haben. Die URL hat das folgende Format: `https://publisher.xsolla.com/<merchant_id>/projects/<project_id>`.

## Request fields (application/json):

  - `connector_external_id` (string, required)
    Ein Fixwert, der den Vorgangstyp für den Artikelimport festlegt.
    Enum: "import_items"

  - `file_url` (string, required)
    Die URL einer Datei mit Daten im JSON-Format. Die Datei sollte auf einem öffentlich zugänglichen Speicherdienst gehostet sein. Die Dateivorlage steht im Kundenportal unter [Store > Virtuelle Gegenstände > Katalog verwalten > Artikel importieren (JSON)](https://publisher.xsolla.com/0/projects/0/storefront/import-export/import-items) zum Download bereit.
    Example: https://my-bucket.s3.amazonaws.com/items.json

  - `mode` (string)
    Importaktionen:
Mögliche Werte:
- `create` – neue Artikel hinzufügen.
- `create_and_update` – neue hinzufügen und bestehende aktualisieren.
- `sync` – neue hinzufügen, bestehende aktualisieren, fehlende deaktivieren.
    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

