Skip to main content
POST
/
{locale}
/
shop
/
xml-import
/
validate
curl -X POST "https://staging-api.loyalty.lt/lt/shop/xml-import/validate" \
  -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 validation completed",
  "data": {
    "is_valid": true,
    "product_count": 250,
    "structure": {
      "detected_path": "products/product",
      "sample_fields": [
        {
          "name": "id",
          "value": "12345",
          "has_children": false
        },
        {
          "name": "name",
          "value": "Samsung Galaxy S24",
          "has_children": false
        },
        {
          "name": "price",
          "value": "899.00",
          "has_children": false
        },
        {
          "name": "categories",
          "value": "Complex element",
          "has_children": true
        }
      ]
    },
    "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.

Validate XML

Validate an XML feed structure without actually importing the data. Use this to test your XML format before running a full import.
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 feed to validateExample: "https://example.com/products.xml"

Response

success
boolean
Indicates if validation completed
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/validate" \
  -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 validation completed",
  "data": {
    "is_valid": true,
    "product_count": 250,
    "structure": {
      "detected_path": "products/product",
      "sample_fields": [
        {
          "name": "id",
          "value": "12345",
          "has_children": false
        },
        {
          "name": "name",
          "value": "Samsung Galaxy S24",
          "has_children": false
        },
        {
          "name": "price",
          "value": "899.00",
          "has_children": false
        },
        {
          "name": "categories",
          "value": "Complex element",
          "has_children": true
        }
      ]
    },
    "errors": []
  }
}

Detected Paths

The validator checks for these common XML structures:
Path PatternExample
product<product>...</product>
item<item>...</item>
products/product<products><product>...</product></products>
items/item<items><item>...</item></items>
offer<offer>...</offer>
offers/offer<offers><offer>...</offer></offers>

Error Codes

CodeNameDescription
1100VALIDATION_FAILEDInvalid request parameters
1701XML_VALIDATION_ERRORXML structure validation failed

Import from URL

Import products from URL

Field Mappings

View supported XML fields