Documentation Index
Fetch the complete documentation index at: https://docs.loyalty.lt/llms.txt
Use this file to discover all available pages before exploring further.
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
Language code (e.g., en, lt)
Authentication
API key from Partners Portal
API secret from Partners Portal
Request Body (multipart/form-data)
XML file to import
- Max size: 10 MB
- Allowed types:
application/xml, text/xml
If true, only validates XML structure without importing
Response
Indicates if import was successful
HTTP status code or error code
Unique request identifier (UUID)
Number of new products created
Number of existing products updated
Number of new offers created
Number of existing offers updated
List of any errors encountered during import
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 "xml_file=@products.xml"
{
"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
| Limit | Value |
|---|
| Maximum file size | 10 MB |
| Allowed MIME types | application/xml, text/xml |
Error Codes
| Code | Name | Description |
|---|
| 1100 | VALIDATION_FAILED | Invalid file or parameters |
| 1700 | XML_IMPORT_FAILED | Import process failed |
| 1706 | XML_FILE_TOO_LARGE | File exceeds 10MB limit |
Import from URL
Import from external URL
Field Mappings
View supported XML fields