Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Vehicles

XML Specification for promoting your ads on Locanto

Version 1.5
Last Updated 04/05/2018

Locanto is a service of Yalwa GmbH - Bahnstr. 2 - 65205 Wiesbaden – Germany


XML FEED SPECIFICATION
The following chart provides you with the structure and requirements for setting up your XML file for
submission to Locanto.
Remember, Locanto prioritizes complete ads: This means, the more tags you use, the more likely your
ads are to be seen by our users.

Tag Mandatory Values Length Description


id ✓ text 20 your ad’s unique ID reference
title ✓ text 64 title of the ad
description ✓ text 4.000 main description of the ad
url ✓ URL ∞ contact URL for the advertiser
email ✓ email - contact email for the advertiser (preferred)
city ✓ text 50 city name
country ✓ text 2 iso 3166-1 alpha-2 country code
one of our sub-categories (see chart on page
category ✓ integer 3/5 ciphers
6)
make ✓ text - make of the vehicle
model ✓ text - model of the vehicle
vehicle power in horse power, kilowatts or
power ✓ text -
both
price ✓ float - price of the vehicle
currency ✓ text 3 currency code
maximum 5. For multiple pictures add a
image_url ✓ URL -
header for each one.
mobile_url recommended URL ∞ useful for mobile devices
tag recommended text 16 up to 3 tags
street recommended text 100 street name and number
zip recommended text 10 zip (postal) code
state, region, etc. MANDATORY tag if
state recommended text 50
more than one city has the same name.
latitude recommended float - latitude in decimal degrees
longitude recommended float - longitude in decimal degrees
is_new recommended integer - 0 = used, 1 = new
year recommended integer 4 ciphers production year of the car
warranty recommended integer - warranty of the vehicle (months)
mileage recommended integer - vehicle mileage in kilometers or miles
1 = diesel, 2 = fuel, 3 = electric
fuel recommended integer -
4 = hybrid, 5 = LPG, 6 = other
car's fuel consumption including unit
fuel_consumption Recommended Text -
measure
energy_size recommended integer - engine size in cubic centimeters (cc)
emissions recommended text - car's CO2 emissions including unit measure
1 = automatic, 2= manual, 3 = semi-
transmission recommended integer -
automatic
gears recommended integer - only if transmission is manual
doors recommended integer - number of doors of the car
seats recommended integer 2.3 ciphers number of seats of the car
color recommended text - exterior color
body_type recommended text - type of car based on their body
free-text information about vehicle's
extras recommended text 1.000
equipment
advertiser recommended integer - 1 = private advertiser, 2 = car dealer
car_dealer recommended text 64 company name
ad_type recommended integer - 1 = offered, 2 = wanted ad
SAMPLE XML
Once you have adapted your XML file based on the requirements above, here is how it should look:

<?xml version="1.0" encoding="UTF-8"?>


<locanto>
<ad>
<id>13872444</id>
<title><![CDATA[BMW 330i 2010]]></title>
<description><![CDATA[2 year old BMW, in good condition, recent MOT. Features
include: all leather interior and power steering.]]></description>
<url><![CDATA[http://www.exampleurl.com/yourcar]]></url>
<mobile_url><![CDATA[http://m.exampleurl.com/yourlisting]]></mobile_url>
<email><![CDATA[advertiser@email.com]]></email>
<image_url><![CDATA[http://www.exampleurl.com/yourimage_1.jpg]]></image>
<tag><![CDATA[BMW 330i]]></tag>
<tag><![CDATA[used car]]></tag>
<tag><![CDATA[London]]></tag>
<street><![CDATA[0 Baker Street]]></street>
<zip><![CDATA[W1U 8ED]]></zip>
<city><![CDATA[London]]></city>
<state><![CDATA[Greater London]]></city>
<country><![CDATA[UK]]></country>
<latitude>51.520249</latitude>
<longitude>-0.156737</longitude>
<category>902</category>
<make><![CDATA[BMW]]></make>
<model><![CDATA[330i]]></model>
<price>15000</price>
<currency><![CDATA[GBP]]></currency>
<is_new>0</is_new>
<year>2012</year>
<warranty>18</warranty>
<mileage>8500</mileage>
<fuel>2</fuel>
<fuel_consumption>54mpg</fuel_consumption>
<power>128 kW (178 HP)</power>
<engine_size>1956 cc</engine_size>
<emissions>181 g/km</emissions>
<transmission>2</transmission>
<gears>5</gears>
<doors>4</doors>
<seats>5</seats>
<colour><![CDATA[red]]></colour>
<body_type><![CDATA[saloon]]></body_type>
<extras><![CDATA[Cruise control, Follow me home headlights, VDC with hill holder
(ABS + ASR + EBD + Brake assist), Head restraints for all seats, Air quality
control system and Trip computer]]></extras>
<advertiser>2</advertiser>
<car_dealer><![CDATA[Greater London Group]]></car_dealer>
<ad_type>1</ad_type>
</ad>
CATEGORY ID NUMBERS FOR VEHICLES
The Vehicles category can be broken down into sub-categories. The category tag in the chart on page 2
should be used to indicate under which sub-category your ad falls.

Category and Sub-categories Category ID#


boats 901
used cars 902
trucks / lorries 903
motorcycles / motorbikes 904
caravans / motorhomes / rv's / trailers 905
car parts / accessories 906
classic cars 908
construction machinery 910
ILLEGAL XML CHARACTERS
As you probably already know, it is important that the characters used in the XML file (e.g. the <>
surrounding each of the tags) are used consistently throughout. In the event the text used between
specific tags contains these types of characters (e.g. within the description text), the XML parser will
have trouble reading them and ensuring your ad is displayed exactly as you wanted. Here are two
ways you can avoid this:

Method 1: Using an Entity Reference


Here you simply replace the “illegal” characters with their corresponding entity references:

Entity Reference Illegal Character Description of Character


&lt; < Less Than
&gt; > Greater Than
&amp; & Ampersand
&apos; ' Apostrophe
&quot; “ Quotation Mark

Method 2: CDATA Section


This allows you to use whichever characters between the tags you want, as long as you enclose the text
within CDATA sections. A CDATA section begins with "<![CDATA[" and ends with "]]>":

Condition Example
Without CDATA <example>comment</example>
With CDATA <example><![CDATA[comment]]></example>

Examples: Assume you wanted to write: <description>This car is < that car</description>

1. Using the entity reference method, the correct solution would be:
<description>This car is &lt; that car</description>
2. Using the CDATA method, the correct solution would be:
<description><![CDATA["This car is < that car"]]></description>
HOW WE ACCESS YOUR FEED
Locanto can import feeds stored on HTTP/ HTTPS or FTP/FTPS servers. After you have configured
your system to generate feeds on a daily basis and we have approved the formatting of your XML file,
send us the file URL to your feed. If your file is password protected, please also provide us with the
necessary credentials. If you make changes to your XML file (e.g. add/edit/delete an ad), we will
automatically update your feed.
IMPORTANT: If the feed is larger than 100 MB, we recommend you compress the file; preferably
with a .gz extension.

How to contact our Team


If you encounter any problems or have any questions regarding submitting an XML feed to Locanto,
contact our team at partners@locanto.com

You might also like