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 URL
Import products and offers from an external XML feed URL. This is useful for syncing your product catalog from e-commerce platforms or ERP systems.
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
URL to the XML feedExample: "https://example.com/products.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-url" \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d '{
"xml_url": "https://example.com/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": []
}
}
Security
The API includes SSRF protection. The following URLs are blocked:
localhost, 127.0.0.1, 0.0.0.0
- Private IP ranges (10.x.x.x, 192.168.x.x, 172.16-31.x.x)
- Cloud metadata endpoints (169.254.x.x)
Error Codes
| Code | Name | Description |
|---|
| 1100 | VALIDATION_FAILED | Invalid request parameters |
| 1700 | XML_IMPORT_FAILED | Import process failed |
| 1701 | XML_VALIDATION_ERROR | XML structure validation failed |
Import from File
Upload and import XML file
Validate XML
Validate XML structure only
Field Mappings
View supported XML fields