Skip to main content
POST
/
{locale}
/
shop
/
xml-import
/
from-url
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": []
  }
}

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

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

xml_url
string
required
URL to the XML feedExample: "https://example.com/products.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-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

CodeNameDescription
1100VALIDATION_FAILEDInvalid request parameters
1700XML_IMPORT_FAILEDImport process failed
1701XML_VALIDATION_ERRORXML structure validation failed

Import from File

Upload and import XML file

Validate XML

Validate XML structure only

Field Mappings

View supported XML fields