Skip to main content
POST
/
{locale}
/
shop
/
xml-import
/
from-file
curl -X POST "https://staging-api.loyalty.lt/lt/shop/xml-import/from-file" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret" \
  -F "[email protected]"
{
  "success": true,
  "code": 200,
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "XML import completed successfully",
  "data": {
    "products_created": 150,
    "products_updated": 45,
    "offers_created": 150,
    "offers_updated": 45,
    "errors": []
  }
}

Import from File

Upload and import products from an XML file. Maximum file size is 10MB.
This endpoint requires Shop API authentication using X-API-Key and X-API-Secret headers.

Path Parameters

locale
string
required
Language code (e.g., en, lt)

Authentication

X-API-Key
string
required
API key from Partners Portal
X-API-Secret
string
required
API secret from Partners Portal

Request Body (multipart/form-data)

xml_file
file
required
XML file to import
  • Max size: 10 MB
  • Allowed types: application/xml, text/xml
validate_only
boolean
default:"false"
If true, only validates XML structure without importing

Response

success
boolean
Indicates if import was successful
code
integer
HTTP status code or error code
request_id
string
Unique request identifier (UUID)
message
string
Status message
data
object
curl -X POST "https://staging-api.loyalty.lt/lt/shop/xml-import/from-file" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret" \
  -F "[email protected]"
{
  "success": true,
  "code": 200,
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "XML import completed successfully",
  "data": {
    "products_created": 150,
    "products_updated": 45,
    "offers_created": 150,
    "offers_updated": 45,
    "errors": []
  }
}

Limits

LimitValue
Maximum file size10 MB
Allowed MIME typesapplication/xml, text/xml

Error Codes

CodeNameDescription
1100VALIDATION_FAILEDInvalid file or parameters
1700XML_IMPORT_FAILEDImport process failed
1706XML_FILE_TOO_LARGEFile exceeds 10MB limit