Xsolla-logo

Import items via JSON fileServer-sideAdmin

post/v1/projects/{project_id}/import/from_external_file

Imports items into the store from a JSON file via the specified URL. Refer to the documentation for more information about import from a JSON file.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
Request Body schema: application/json
connector_external_id
required
string

A fixed value that specifies the type of operation for importing items.

Value: "import_items"
file_url
required
string

The URL of a file with data in JSON format. The file should be hosted on a storage service with public access. You can download the file template in Publisher Account in the Store > Virtual Items > Catalog Management > Import Items (JSON) section.

mode
string
Default: "create_and_update"

Import actions:

Enum: Description
create

Add new items.

create_and_update

Add new items and update existing ones.

sync

Add new, update existing, and disable missing items.

Responses
201

The file has been successfully imported and is being processed.

401

Basic authentication not passed or wrong. Make sure you used basic authentication or correct credentials.

422

Validation error caused by incorrect parameters of the request body, file properties, or file content.

Request samples
application/json
{}
Response samples
application/json
{
  • "import_id": "af9f3638a16e11ef880da2cd677d2d24"
}