Merchandiser files are available in two formats: Delimited Merchandiser File and XML Merchandiser File.
Delimited Merchandiser File
The delimited Merchandiser file is a text file that uses the pipe delimiter (|). Each record is terminated by a New Line/Carriage Return. LinkShare will populate the file with all the fields that advertisers are required to provide and also any other information provided by the advertiser. If there is no data for a field, its position is preserved in the file by its delimiter. The file has three sections: Header, Product Data, and Trailer.
Header Section
The first record in the Merchandiser file is the header, and like all other records in the file, it is pipe delimited. The header starts with the following characters “HDR," followed by a pipe delimiter. This record is terminated with a carriage return. The header contains advertiser information and also the time stamp for when the file was deposited in your FTP account.
MID: The numeric value LinkShare assigns to uniquely identify each advertiser.
Name: The name of the advertiser. This is advertiser-defined and may change.
Time Stamp: The time that the file was deposited in your FTP account. The format is yyyy-mm-dd/hh:mm:ss
Example: HDR|1234|CDLinkShare|2000-02-14/20:30:40
Product Data Section
This section contains individual product data records. Each line has data for one product. The product data record has two parts the primary section and the attribute section.
Primary Section
The primary section provides basic information about each product. The first 29 fields define this section. Eight fields in this section are required fields and always have data. The required fields are as follows: Product ID, Product Name, SKU Number, Primary Category, Product URL, Product Image URL, Short Product Description, and Retail Price. The details of all the fields in this section are explained in Merchandiser Guidelines Appendix A.
Attribute Section
The attribute section provides detailed information about each product based on certain product class definitions. The last 10 fields contain this information. The number of fields in the attribute section will depend on the Class ID for the specific product. The Class ID identifies the specific product category for the product and the attributes allow the advertiser to append additional information to the product. For example, Class ID 40 identifies the product category Computer Hardware. For this Class ID, the fields are Product ID, Platform, RAM, Hard Drive, Processor, Monitor Size, and so on. LinkShare currently has 14 predefined Class IDs available and each Class ID has a predetermined set of attribute fields. The Merchandiser Guidelines Appendix B provides details on fields for each Class ID.
NOTE: All Class IDs will not have 10 attribute fields and not all attribute fields are required to have data. If a field is not used, then its position is preserved by its delimiter. The Merchandiser Guidelines Appendix D provides you with sample records.
Trailer Section
The last record of the Merchandiser file is the trailer that begins with the characters “TRL,” followed by a pipe delimiter. The trailer provides you with the information regarding the number of product records contained in the Merchandiser file.
Example: TRL|45826
XML Merchandiser File
The Merchandiser file is also available as an XML-formatted file. The XML Schema and the XML Data Definition Dictionary that specify the XML-formatted file are available in The Merchandiser Guidelines Appendix C.
Merchandiser File Names
The Merchandiser file name has three parts, each part separated by an underscore: Advertiser Program ID, Publisher Channel ID, and File Type.
• The Advertiser Program ID or MID is a unique ID that LinkShare uses to identify the advertiser. This is always numeric.
• The Publisher Channel ID or SID is a unique ID that LinkShare uses to identify the Publisher Channel. This is always numeric.
• The file type “mp” defines that the file is a Merchandiser file.
The file name extensions tell you the type of Merchandiser file it is. The delimited Merchandiser file has a .txt extension and the XML-formatted Merchandiser file has an .xml extension.
The files are all compressed and hence there is .gz after the file type extension. In addition, there is the .lmp that is used to indicate this is a placeholder file. In order to download a file, you will have to discard this part of the name.
Examples:
2385_112_mp.txt.gz.lmp
2385 is the Advertiser Program ID
112 is the Publisher Channel ID
mp indicates that it is a Merchandiser file
.txt indicates that this is a delimited Merchandiser file.
Downloading Merchandiser Files
You can download the Merchandiser file from your account using any FTP client software. You will have to make sure that you use the “Get” command to download the file. The mget command will not work.
Example: get 2385_112_mp.txt.gz
NOTE: You should not attempt to download the .lmp files as these are mere placeholders.
Merchandiser-by-Category
Merchandiser-by-Category is a new feature that allows you to download Merchandiser files for specific product categories instead of downloading the full product file. This means that if you are a publisher who only needs products in the Electronics product category, you can now download the feed just for Electronic products. You will see a folder for each advertiser you are eligible to get the Merchandiser files from. The folder name will be the MID of the advertiser. The folder will contain three types of files: Full Merchandiser File, Product Category List File, and Category-Specific Merchandiser file.
Full Merchandiser File
This is the same Merchandiser file for the advertiser that is available in your root folder. It contains all the products that the advertiser has and is available in both text and XML formats. The file will be named MID_SID_mp.txt.gz.lmp for the text format and MID_SID_mp.xml.gz.lmp for the XML format.
Examples:
2385_112_mp_txt.gz.lmp
2385_112_mp_xml.gz.lmp
Product Category List File
This is a new text file that lists the ID and product category name as specified by the advertiser. The file is named as MID_category_list.txt where MID is the Advertiser ID. Each product category is listed on one line and the file is pipe delimited.
Example:
2385_category_list.txt
Sample contents
10|Lawn and Garden
11|Toys
12|Outlet
15|Electronics
Category-Specific Merchandiser File
This Merchandiser file is for a specific product category. The file is named as MID_SID_XX_cmp.txt.gz.lmp for the text format and MID_SID_XX_cmp.xml.gz.lmp for the XML format. XX is the numeric ID for the specific product category.
Example:
2385_112_15_cmp_txt.gz.lmp
2385_112_15_cmp_xml.gz.lmp
The above files would be Merchandiser files for the Electronics product category. The contents of the file are formatted identically to the full Merchandiser files.
We suggest that you download the product category file first and use it to determine the categories that you are interested in downloading. Once you have determined the ID of the categories that you want to download, you should be able to create a script that will download the files for just those categories by automatically replacing the XX with the product category ID.
NOTE: Categorizing of products is done by the advertisers. It is possible that advertisers will place their products into the wrong categories. In such cases, please feel free to contact the advertisers and have them update their product categories.
For more information, please read the best practices on downloading the merchandiser data feed files.
