# Importar artículos mediante un archivo JSON

Importa artículos a la tienda desde un archivo JSON mediante la URL especificada. Consulte la documentación para obtener más información sobre la importación desde un archivo JSON.

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

## Path parameters:

  - `project_id` (integer, required)
    ID del proyecto. Encontrará este parámetro en su cuenta junto al nombre del proyecto y en la barra de direcciones del navegador cuando se trabaja en un proyecto. La URL tiene el siguiente formato: https://xsolla.com/for//account//projects/.
    Example: 44056

## Request fields (application/json):

  - `connector_external_id` (string, required)
    Valor fijo que especifica el tipo de operación para importar artículos.
    Enum: "import_items"

  - `file_url` (string, required)
    La URL de un archivo con datos en formato JSON. El archivo debe estar alojado en un servicio de almacenamiento con acceso público. Puede descargar la plantilla del archivo en su [cuenta](/es/api/catalog/business-accounts) en la sección Importar catálogo&gt; Importar &gt; Importar artículos (JSON).
    Example: "https://my-bucket.s3.amazonaws.com/items.json"

  - `mode` (string)
    Acciones de importación:

Valores posibles:
- create — Añadir nuevos artículos.
- create_and_update — Añadir nuevos artículos y actualizar los existentes.
- sync — Añadir nuevos artículos, actualizar los existentes y deshabilitar los que faltan.
    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"


