Дата: 24 Юли 2025
Note
XML API is an additional module that is purchased separately from the Seliton license. The XML API consists of two modules, Super XML Import module (needed to import data from a vendor system to the store) and Super XML Export module (needed to export data from the store to multiple other stores). We also have pre-made modules for XML import from various systems. For an up-to-date list of supported systems please visit XML Integrations page. For your system to be able to export data to Seliton, the Super XML Import module must be enabled.
Prerequisites
Before you begin using the XML API, make sure you have the following prerequisites in place:
- A working Seliton installation with the Super XML Import module installed.
- An active Seliton/Summer Cart API module enabled in your Super XML Import module.
- A working API User and password for your Seliton/Summer Cart API module.
- Any development environment that allows you to make a POST request to a web page
Contents
- Overview
- Prerequisites
- Contents
- XML API Overview
- Actions
- postxmlfeed
- getorders
- updateorder
- Structure of XML file
- Top elements
- Store element
- FeedInfo element
- Products element
- Categories element
- Brands element
- Products class element
- Attributes element
- Option groups element
- Multi-language values
- Escaping of HTML in XML file
- FAQ
- Create an API account in Seliton
XML API overview
The XML API is typically located at this address:
http://yourdomain.com/modules/extra/vendors/api.php
The following common parameters are required with each API request:
- action – the action you want API perform (see Actions);
- version – the version of the API you expected is installed, currently 1.0;
- username – your API Username;
- secret – your API Password;
Other parameters may be required depending on the action (see below).
Actions
Currently the API provides three actions at this moment as you can see below.
- postxmlfeed –Insert, Update and Delete following elements in your store: Products, Categories, Brands, Product Classes, Attributes, Option groups with their options.
- getorders – Get orders from your store.
- updateorder – Update order information for an order in your store. You can update order status, order shipping tracking number and fiscal sale number (UNP).
Each action requires an additional parameters in your request to API.
Action postxmlfeed
This API action requires only one additional parameter – xml. In this parameter you should put the content of your XML file. You can see more about your XML file in Structure of XML file chapter.
Parameters:
Parameter | Value |
---|---|
xml | Content of XML file. |
Action getorders
This API action requires one of these two parameters – afterOrderId or orderIds. Parameter dependsonly from your needs. If you request API with afterOrderId is equal to 0 then API will return all orders with ID greater than 0. But if you want information for specific order or few orders you can use orderIds with specific ID of the order or multiple order ID separated with comma.
Parameters:
Parameter | Value |
---|---|
afterOrderId | afterOrderId ID of starting order (integer). |
orderIds | orderIds ID of order or multiple orders separated with comma (string). |
Action update order
This API action supports updating part of the order info – orderStatus, orderShippingTrackingNo, orderFiscalSaleNumber. Order status should be an ID taken from order statuses in store. You can usethe following table for default order statuses with their IDs. Note that the administrator may add, rename or remove order statuses. The system order statuses below will always be available:
Order Status ID | Order Status Name |
---|---|
1 | Unfinished |
2 | Payment failed |
3 | Payment pending |
4 | New |
5 | In progress |
6 | Cancelled |
7 | On hold |
8 | Delivered |
9 | Returned |
10 | Queued |
11 | Fast order |
Parameters:
Parameter | Value |
---|---|
orderId | orderId ID of the order (integer). |
orderStatus | ID of order status (integer) (optional). |
orderShippingTrackingNo | Shipping tracking number (string) (optional). |
orderFiscalSaleNumber | The fiscal sale number (UNP) (string) (optional). |
Structure of XML file
The xml file should follow the described Seliton API structure. If you try to send an incorrect XML file you will get an error. You can see full example of XML structure in file Store.xml inside Examples.zip.
Top elements
Here is a list of the top elements in the XML file. Content encoding must be UTF-8.
<?xml version="1.0" encoding="UTF-8"?> <Response xmlns="http://schemas.summercart.com/dealer/v1"> <Store>…</Store> <FeedInfo>…</FeedInfo> <Products>…</Products> <Categories>…</Categories> <Brands>…</Brands> <ProductClasses>…</ProductClasses> <Attributes>…</Attributes> <OptionGroups>…</OptionGroups> </Response>
In the following articles you will find information about the contents inside of each top element.
Store element
You should put information about the feed (e.g. which store has generated the feed). This element is for feed identification purposes and will not alter anything in the Seliton store.
Example of Store element:
<Store> <StoreName>Name of your store</StoreName> <StoreUrl>http://yourdomain.com/</StoreUrl> </Store>
FeedInfo element
You should provide general information about your feed as provided languages, main currency code, category separator and etc.
Example of FeedInfo element:
<FeedInfo> <LanguageCode> <EN>English</EN> <BG>Български</BG> <TR>Türkçe</TR> </LanguageCode> <CurrencyCode>USD</CurrencyCode> <ContentEncoding>UTF-8</ContentEncoding> <Generator>Name of your firm or generator of xml</Generator> <GenerationTimestamp>2015-03-23T19:47:47+02:00</GenerationTimestamp> <CategoriesSeparator>|</CategoriesSeparator> </FeedInfo>
With this example you sending that your feed includes texts in Bulgarian, English and Turkish languages and all prices in xml file are in USD.
Notes
CategoriesSeparator – This element is required by the API and from its value depends how API will split category branches and make categories tree in your store (string, required).
CurrencyCode – Currency codes must be 3 letter currency code ISO 4217 format (string, required).
GenerationTimestamp - Timestamp of feed generation in ISO 8601 format (string, required).
Products element
This is the most important element in the whole XML file, because it provides information about all your products.
Example of one children in Products element:
<Product> <ProductCode>Unique code of product (string)</ProductCode> <ProductName html="false"> <EN>Name of your product in English</EN> <BG>Name of your product in Bulgarian</BG> <TR>Name of your product in Turkish</TR> </ProductName> <ProductDescription html="true"> <EN> <![CDATA[Short description of your product in English. Always use CDATA because it may broke the XML.]]> </EN> <BG> <![CDATA[Short description of your product in Bulgarian. Always use CDATA because it may broke the XML.]]> </BG> <TR> <![CDATA[Short description of your product in Turkish. Always use CDATA because it may broke the XML.]]> </TR> </ProductDescription> <ProductDetailedDescription html="true"> <EN> <![CDATA[Detailed description of your product in English. Always use CDATA because it may broke the XML.]]> </EN> <BG> <![CDATA[Detailed description of your product in Bulgarian. Always use CDATA because it may broke the XML.]]> </BG> <TR> <![CDATA[Detailed description of your product in Turkish. Always use CDATA because it may broke the XML.]]> </TR> </ProductDetailedDescription> <ProductQuantity>Quantity of product (integer)</ProductQuantity> <ProductPrice currencycode="Currency code" listingprice="Price of product (decimal)">Price of product (decimal)</ProductPrice> <ProductPriceWithDiscount currencycode="Currency code">Price of product with discount applied (decimal) </ProductWeight> <ProductWeight units="kgs">Weight of product (decimal)</ProductWeight> <ProductIsEgood>Is that product an Egood (bool)</ProductIsEgood> <ProductCreatedTimestamp>2015-03-23T19:47:47+02:00</ProductCreatedTimestamp> <Category> <CategoryName> <EN>Name of main category in English</EN> <BG>Name of main category in Bulgarian</BG> <TR>Name of main category in Turkish</TR> </CategoryName> <CategoryBranch> <EN>Category in English|Subcategory in English|Sub-Subcategory in English</EN> <BG>Category in Bulgarian|Subcategory in Bulgarian|Sub-Subcategory in Bulgarian</BG> <TR>Category in Turkish|Subcategory in Turkish|Sub-Subcategory in Turkish</TR> </CategoryBranch> </Category> <BrandID>ID of brand (string)</BrandID> <BrandName> <EN>Name of Brand in English</EN> <BG>Name of Brand in Bulgarian</BG> <TR>Name of Brand in Turkish</TR> </BrandName> <ManufacturerID deprecated="deprecated">ID of brand (string)</ManufacturerID> <ManufacturerName deprecated="deprecated"> <EN>Name of Brand in English</EN> <BG>Name of Brand in Bulgarian</BG> <TR>Name of Brand in Turkish</TR> </ManufacturerName> <ProductImages> <ProductImage> <ImagePath>HTTP Link of Image 1</ImagePath> </ProductImage> <ProductImage> <ImagePath>HTTP Link of Image 2</ImagePath> </ProductImage> </ProductImages> <RelatedProducts> <RelatedProduct> <ProductCode>Unique code of first related product (string)</ProductCode> </RelatedProduct> <RelatedProduct> <ProductCode>Unique code of second related product (string)</ProductCode> </RelatedProduct> </RelatedProducts> <AdditionalCategories> <Category> <CategoryName> <EN>Name of additional category in English</EN> <BG>Name of additional category in Bulgarian</BG> <TR>Name of additional category in Turkish</TR> </CategoryName> <CategoryDescription html="true"> <EN> <![CDATA[Category description of your product in English. Always use CDATA because it may broke the XML.]]> </EN> <BG> <![CDATA[Category description of your product in Bulgarian. Always use CDATA because it may broke the XML.]]> </BG> <TR> <![CDATA[Category description of your product in Turkish. Always use CDATA because it may broke the XML.]]> </TR> </CategoryDescription> <CategoryBranch> <EN>Category in English|Subcategory in English|Sub-Subcategory in English</EN> <BG>Category in Bulgarian|Subcategory in Bulgarian|Sub-Subcategory in Bulgarian</BG> <TR>Category in Turkish|Subcategory in Turkish|Sub-Subcategory in Turkish</TR> </CategoryBranch> <CategorySort>Sort of additional category (integer)</CategorySort> <SEO> <Title> <EN>SEO Title of additional category in English</EN> <BG>SEO Title of additional category in Bulgarian</BG> <TR>SEO Title of additional category in Turkish</TR> </Title> <MetaKeywords> <EN>Meta keywords of additional category in English</EN> <BG>Meta keywords of additional category in Bulgarian</BG> <TR>Meta keywords of additional category in Turkish</TR> </MetaKeywords> <MetaDescription> <EN>Meta description of additional category in English</EN> <BG>Meta description of additional category in Bulgarian</BG> <TR>Meta description of additional category in Turkish</TR> </MetaDescription> </SEO> <CustomUrls> <CustomUrl isCurrent="true"> <CustomUrlText> <EN>en/category</EN> <BG>bg/category</BG> <TR>tr/category</TR> </CustomUrlText> </CustomUrl> </CustomUrls> </Category> </AdditionalCategories> <WholesalePrices> <WholesalePrice> <CustomerGroupName> <EN>Name of customer group 1 in English</EN> <BG>Name of customer group 1 in English</BG> <TR>Name of customer group 1 in English</TR> </CustomerGroupName> <WholesalePriceQuantity>1</WholesalePriceQuantity> <WholesalePriceAmount currencycode="Currency code" listingprice="Price of product for customer group (decimal)">Price of product for customer group (decimal)</WholesalePriceAmount> </WholesalePrice> <WholesalePrice> <CustomerGroupName> <EN>Name of customer group 2 in English</EN> <BG>Name of customer group 2 in English</BG> <TR>Name of customer group 2 in English</TR> </CustomerGroupName> <WholesalePriceQuantity>5</WholesalePriceQuantity> <WholesalePriceAmount currencycode="Currency code" listingprice="Price of product for customer group (decimal)">Price of product for customer group (decimal)</WholesalePriceAmount> </WholesalePrice> </WholesalePrices> <ProductAttributeValues> <ProductAttributeValue> <AttributeCode>Code of Attribute 1</AttributeCode> <ProductAttributeValueText>Value of attribute</ProductAttributeValueText> </ProductAttributeValue> <ProductAttributeValue> <AttributeCode>Code of Attribute 2</AttributeCode> <ProductAttributeValueText> <EN>Multi-language value of attribute</EN> <BG>Multi-language value of attribute</BG> <TR>Multi-language value of attribute</TR> </ProductAttributeValueText> </ProductAttributeValue> </ProductAttributeValues> <ProductDistributorPrice currencycode="USD">6.00</ProductDistributorPrice> <OptionGroups> <OptionGroup refGlobalOptionGroupId="1" scope="(global|local)"> <Option> <OptionName> <EN>Name of option (string)</EN> <BG>Name of option (string)</BG> <TR>Name of option (string)</TR> </OptionName> </Option> </OptionGroup> </OptionGroups> <ProductVariants> <ProductVariant> <ProductVariantCode>Unique code of product variant (string)</ProductVariantCode> <ProductVariantQuantity>Quantity of product variant (integer)</ProductVariantQuantity> <ProductVariantPrice currencycode="Currency code">Price of product variant (decimal)</ProductVariantPrice> <ProductVariantOptions> <Option refGlobalOptionGroupId="1" scope="(global|local)"> <OptionName> <EN>Name of option (string)</EN> <BG>Name of option (string)</BG> <TR>Name of option (string)</TR> </OptionName> </Option> </ProductVariantOptions> </ProductVariant> </ProductVariants> <SEO> <Title> <EN>SEO Title of product in English</EN> <BG>SEO Title of product in Bulgarian</BG> <TR>SEO Title of product in Turkish</TR> </Title> <MetaKeywords> <EN>Meta keywords of product in English</EN> <BG>Meta keywords of product in Bulgarian</BG> <TR>Meta keywords of product in Turkish</TR> </MetaKeywords> <MetaDescription> <EN>Meta description of product in English</EN> <BG>Meta description of product in Bulgarian</BG> <TR>Meta description of product in Turkish</TR> </MetaDescription> </SEO> <CustomUrls> <CustomUrl isCurrent="true"> <CustomUrlText> <EN>en/product</EN> <BG>bg/product</BG> <TR>tr/product</TR> </CustomUrlText> </CustomUrl> </CustomUrls> <ProductIsActive>yes</ProductIsActive> </Product>
Notes
ProductCode – Must be unique (required, string).
ProductName – Name of product (multi-language, required).
ProductDescription and ProductDetailedDescription – Descriptions of product. These elements have additional parameter “html” and it should be “true” when the text of descriptions contains HTML. Consider using CDATA section to escape the text (string, optional).
ProductQuantity – Available quantity of product (integer, optional).
ProductPrice – Price of product for end customers. This element has attribute “currencycode”. Currency codes must be 3 letter currency code ISO 4217 format (decimal, required).
ProductPriceWithDiscount – Price of product for end customers with discount applied (i.e. reduced price). This element has attribute “currencycode”. Currency codes must be 3 letter currency code ISO 4217 format (decimal, optional).
ProductWeight – Weight of product. This element had attribute “units” and default value is “kgs”. Supported values are “kgs” and “lbs” (decimal, required).
ProductIsEgood – Boolean and if the value is “true” then this product is considered “E-good” (non-physical good, optional).
ProductCreatedTimestamp – Timestamp of product creation in ISO 8601 format (optional).
Category – For details of the Category element you can see Categories element (required).
BrandID – ID of brand (integer, optional).
BrandName – Name of brand (string, optional).
ManufacturerID – ID of brand. This element is for backwards compatibility with version 5.0 (deprecated, integer, optional).
ManufacturerName – Name of brand. This element is for backwards compatibility with version 5.0 (deprecated, string, optional).
ProductImages – product images element. For each image create -> ProductImage (optional).
ProductImage -> ImagePath – pass the URL to the image (http, https) and the API will download image automatically. ImagePath also supports Base64 encoded images. IMPORTANT: Once the image has been successfully downloaded it will not be downloaded again. If you change the image make sure you change the URL (string, required).
RelatedProducts – All related products to this product (optional).
RelatedProduct -> ProductCode – Product code of related product (string, required).
AdditionalCategories – If the product belongs to several categories you can add them. Exclude the main product category from this list. Each product must always have main category defined in “Category” element. For more information about the structure you can see Categories element.
WholesalePrices – Information about wholesale prices for this product (optional).
WholesalePrice -> CustomerGroupName – Name of customer group that can purchase the product at this wholesale price (multi-language, required).
WholesalePrice -> WholesalePriceQuantity – Minimum quantity for that price (integer, required).
WholesalePrice -> WholesalePriceAmount – Price of this product for this customer group (decimal, required).
WholesalePriceAmount - has “currencycode” attribute. Currency codes must be 3 letter currency code ISO 4217 format.
ProductAttributeValues - Product attribute values for attributes that apply to this product.
ProductAttributeValues -> ProductAttributeValue – The value of the attribute for this product (string / multi-language, required).
ProductAttributeValue -> AttributeCode – Code of attribute (string, required).
ProductAttributeValueText – Value string. You can find more information about Attributes structure and information them in Attributes element (see also Attributes).
ProductDistributorPrice – This value is distributor price on that store owner bought this product. Set the currency code in attribute “currencycode” (decimal, optional).
SEO -> Title – (multi-language, optional).
SEO -> MetaKeywords – (multi-language, optional).
SEO -> MetaDescription – (multi-language, optional).
CustomUrls – You can define custom URLs to this product in your store. You can send more than one
CustomUrl for each product and you can mark primary URL to this product with attribute
“isCurrent”. Note that values of CustomUrlText values for provided languages must be unique*.
Example:
<CustomUrlText> <EN>en/product</EN> <BG>bg/product</BG> <TR>tr/product</TR> </CustomUrlText>
* As you can see each URL is unique but note that URLs must be unique for whole store. You can’t had product and category with same Custom URL or product and brand. One custom URL can point only to one element in your store, no matter what is the type of element.
OptionGroups – Option groups used for this product.
OptionsGroups -> OptionGroup – Definition of used option group. Set “refGlobalOptionGroupId” if “scope” of OptionGroup is global (see Option groups element). OptionGroup can be global or local.
OptionsGroups -> OptionGroup -> Option – Each option used in this product.
OptionsGroups -> OptionGroup -> Option -> OptionName – Name of option (multi-language).
ProductVariants – Product variants of this product.
ProductVariants -> ProductVariant – Element of each product variant.
ProductVariants -> ProductVariant -> ProductVariantCode – Must be unique for all product variants and can’t set same value as any ProductCode (see ProductCode) (required, string).
ProductVariants -> ProductVariant -> ProductVariantCode -> ProductVariantQuantity – Quantity of product variant (integer, optional).
ProductVariants -> ProductVariant -> ProductVariantCode -> ProductVariantPrice – Price of product variant (decimal, optional). Has “currencycode” attribute. Currency codes must be 3 letter currency code ISO 4217 format.
ProductVariants -> ProductVariant -> ProductVariantCode -> ProductVariantDiscountPrice – Price of product variant with discount applied (decimal, optional). Has “currencycode” attribute. Currency codes must be 3 letter currency code ISO 4217 format.
ProductVariants -> ProductVariant -> ProductVariantCode -> ProductVariantOptions – Options used for this variant (required).
ProductVariants -> ProductVariant -> ProductVariantCode -> ProductVariantOptions -> Option – Used option for this variant (required). Set “refGlobalOptionGroupId” if “scope” of OptionGroup is global (see Option groups element). Option can be global or local.
ProductVariants -> ProductVariant -> ProductVariantCode -> ProductVariantOptions -> Option -> OptionName – Name of used option value (required, multi-language).
ProductIsActive – Set visibility of product. See table below for more information (string, optional).
ProductIsActive | Seliton store visibility | Sellable | Visible in listings | Visible on product page |
---|---|---|---|---|
fully_hidden | No, fully hidden | No | No | No |
yes | Yes | Yes | Yes | Yes |
hidden_sellable | Hidden, but sellable | Yes | No | Yes |
catalog_only | Catalog only | No | Yes | Yes |
archive | Keep as archive for SEO | No | No | Yes |
Categories element
This element is optional and if you skip it, then API will get information about categories and their creation from Products -> Product -> Category elements.
Example of one children of Categories element:
<Category> <CategoryName> <EN>Name of category in English</EN> <BG>Name of category in Bulgarian</BG> <TR>Name of category in Turkish</TR> </CategoryName> <CategoryDescription html="true"> <EN> <![CDATA[Category description in English. Always use CDATA because it may broke the XML.]]> </EN> <BG> <![CDATA[Category description in Bulgarian. Always use CDATA because it may broke the XML.]]> </BG> <TR> <![CDATA[Category description in Turkish. Always use CDATA because it may broke the XML.]]> </TR> </CategoryDescription> <CategoryBranch> <EN>Category in English|Subcategory in English|Sub-Subcategory in English</EN> <BG>Category in Bulgarian|Subcategory in Bulgarian|Sub-Subcategory in Bulgarian</BG> <TR>Category in Turkish|Subcategory in Turkish|Sub-Subcategory in Turkish</TR> </CategoryBranch> <CategorySort>Sort number (integer)</CategorySort> <SEO> <Title> <EN>SEO Title of category in English</EN> <BG>SEO Title of category in Bulgarian</BG> <TR>SEO Title of category in Turkish</TR> </Title> <MetaKeywords> <EN>Meta keywords of category in English</EN> <BG>Meta keywords of category in Bulgarian</BG> <TR>Meta keywords of category in Turkish</TR> </MetaKeywords> <MetaDescription> <EN>Meta description of category in English</EN> <BG>Meta description of category in Bulgarian</BG> <TR>Meta description of category in Turkish</TR> </MetaDescription> </SEO> <CategoryImage> <ImagePath>HTTP link to image</ImagePath> </CategoryImage> <CustomUrls> <CustomUrl isCurrent="true"> <CustomUrlText> <EN>Primary custom URL to category in English</EN> <BG>Primary custom URL to category in Bulgarian</BG> <TR>Primary custom URL to category in Turkish</TR> </CustomUrlText> </CustomUrl> <CustomUrl isCurrent="false"> <CustomUrlText> <EN>Secondary custom URL to category in English</EN> <BG>Secondary custom URL to category in Bulgarian</BG> <TR>Secondary custom URL to category in Turkish</TR> </CustomUrlText> </CustomUrl> </CustomUrls> </Category>
Notes
CategoryBranch – set the full category branch. Any number of subcategories are allowed (multi-language, required).
Example: Top level category name – Category separator – Name of current category
Example: Computers|Notebooks
CategorySort – you may sort the categories in the order of CategorySort (optional, integer). CustomUrls – You can define custom URLs to this category in your store. You can send more than one CustomUrl for each category and you can mark primary URL to this category with attribute “isCurrent”. Note that values of CustomUrlText values for provided languages must be unique*.
Example:
<CustomUrlText> <EN>en/category</EN> <BG>bg/category</BG> <TR>tr/category</TR> </CustomUrlText>
* As you can see each URL is unique, but note that the URLs must be unique for the whole store. You can’t have product and category with same Custom URL or product and brand. One custom URL can point only to one element in your store, no matter what is the type of element.
Brands element
This element is optional as Categories and if you skip it then API will make brands from brands inside Products element.
<Brand> <BrandID>ID (integer)</BrandID> <BrandWebsite>Website of brand</BrandWebsite> <BrandName> <EN>Name of brand in English</EN> <BG>Name of brand in Bulgarian</BG> <TR>Name of brand in Turkish</TR> </BrandName> <BrandDescription> <EN> <![CDATA[Brand description in English. Always use CDATA because it may broke the XML.]]> </EN> <BG> <![CDATA[Brand description in Bulgarian. Always use CDATA because it may broke the XML.]]> </BG> <TR> <![CDATA[Brand description in Turkish. Always use CDATA because it may broke the XML.]]> </TR> </BrandDescription> <SEO> <Title> <EN>SEO Title of brand in English</EN> <BG>SEO Title of brand in Bulgarian</BG> <TR>SEO Title of brand in Turkish</TR> </Title> </SEO> <CustomUrls> <CustomUrl isCurrent="true"> <CustomUrlText> <EN>Prime custom URL to category in English</EN> <BG>Prime custom URL to category in Bulgarian</BG> <TR>Prime custom URL to category in Turkish</TR> </CustomUrlText> </CustomUrl> </CustomUrls> </Brand>
Notes
BrandID – (integer, required).
CustomUrls – You can define custom URLs to this category in your store. You can send more than one
CustomUrl for each category and you can mark primary URL to this category with attribute
“isCurrent”. Note that values of CustomUrlText values for provided languages must be unique*.
Example:
<CustomUrlText> <EN>en/category</EN> <BG>bg/category</BG> <TR>tr/category</TR> </CustomUrlText>
* As you can see each URL is unique but note that the URLs must be unique for the whole store. You can’t have a product and category with same Custom URL or product and brand. One custom URL can point only to one element in your store, no matter what is the type of element.
Product classes element
Product classes are used to assign a specific attributes to a product. Product class contains an information about all attributes included in it.
Example of children element of Product Classes:
<ProductClass> <ProductClassID>ID (integer)</ProductClassID> <ProductClassName> <EN>Product class name in English</EN> <BG>Product class name in Bulgarian</BG> <TR>Product class name in Turkish</TR> </ProductClassName> <Attributes> <AttributeCode>Code of attribute 1</AttributeCode> <AttributeCode>Code of attribute 2</AttributeCode> <AttributeCode>Code of attribute 3</AttributeCode> </Attributes> </ProductClass>
Notes
ProductClassID – To assign correct product class to product (integer, required, see also Products).
ProductClassName – Must not be empty (multi-language, required).
Attributes – You can assign attributes to this Product class by their codes. You can assign any number of attributes (see also Attributes) to a Product class.
Attributes element
With attributes you can define specification of your products (e.g. Amount of RAM or CPU cores). You can assign attribute to Product Class (see also Product Classes) or directly to all products (see also Products) in your store.
Example of children element of Attributes:
<Attribute> <AttributeCode>Code of Attribute</AttributeCode> <AttributeName> <EN>Attribute name in English</EN> <BG>Attribute name in Bulgarian</BG> <TR>Attribute name in Turkish</TR> </AttributeName> <AttributeUnit> <EN>Unit of attribute in English</EN> <BG>Unit of attribute in Bulgarian</BG> <TR>Unit of attribute in Turkish</TR> </AttributeUnit> <AttributeType>(text|text_ml|select|radio|multipleselect|checkbox)</AttributeType> <AttributeValidator>(none|number|isbn|gtin|manufactuer_sku|depth|width|height)</AttributeValidator> <AttributeApplyToAllProducts>(true|false)</AttributeApplyToAllProducts> <AttributeShowAfterDescription>(true|false)</AttributeShowAfterDescription> <AttributeShowInTab>(true|false)</AttributeShowInTab> <AttributeIsSearchable>(true|false)</AttributeIsSearchable> <AttributeIsComparable>(true|false)</AttributeIsComparable> <AttributeIsFilterable>(true|false)</AttributeIsFilterable> <AttributeFilterWidget>...</AttributeFilterWidget> <AttributeFilterWidgetHideIrrelevant>(true|false)</AttributeFilterWidgetHideIrrelevant> <AttributeFilterWidgetShowCounts>(true|false)</AttributeFilterWidgetShowCounts> </Attribute>
Notes
AttributeCode – Code is a string and must be unique. This code will be visible in the URL in the store if this option group is used for filtering products (string, required).
AttributeName – Attribute name (required, multi-language).
AttributeUnit – Value of the unit will be shown right next to the attribute value. For example if you create an attribute named “Size” you may assign a unit of “cm” or “mm” (multi-language, optional).
AttributeType – You must choose from one of pre-defined types. See below for a list of valid types (string).
AttributeValidator – Validators are available only for attributes from type “text”. See below for valid validators. Available validators are: Number, ISBN, GTIN, Manufacturer SKU, Depth, Width and Height (string).
AttributeApplyToAllProducts – If “false” the attribute may be assigned to a product via Product Class. If “true” then this attribute automatically will be assigned to all products in store (boolean).
AttributeShowAfterDescription – If “true” then value of attribute will be shown after product description in product page (boolean).
AttributeShowInTab – If “true” then the value of the attribute will be shown in a separate tab named “Specification” in product page (boolean).
AttributeIsSearchable – If “true” then the attribute will appear in Search page of the store (boolean).
AttributeIsComparable – If “true” then for each product there will be a Compare button/checkboxand the clients of the store can compare products by their attributes (boolean).
AttributeIsFilterable – If “true” then the clients of the store will be able to filter products using this attribute to find best matches for them (boolean).
AttributeFilterWidget – You should set AttributeFilterWidget if AttributeIsFilterable is “true” and this value depends from AttributeType and if the type is “text” then from selected validator in AttributeValidator.
In following table you can see what are available AttributeFilterWidgets depending of AttributeType and AttributeValidator.
AttributeType | AttributeValidator | Available AttributeFilterWidgets |
---|---|---|
text | --- | text |
text | number, depth, width, height | manual_intervals, auto_intervals, drilldown_intervals, slider_interval, text |
text_ml | --- | text |
select | --- | select, links, links_compact, color |
radio | --- | select, links, links_compact, color |
multipleselect | --- | checkboxes_or, checkboxes_and |
checkbox | --- | checkbox |
AttributeFilterWidgetShowCounts – If “true” then next to each filter option the user will see a count of products using this value (boolean).
AttributeFilterWidgetHideIrrelevant – If “true” then when the count of the products using a particular attribute value is 0, that value won’t be shown in the filter (boolean).
Also if AttributeType is one of these: select, radio or multipleselect then the attribute needs option values. You can define values inside each Attribute element.
Example of attribute values:
<Attribute> … <Values> <Value> <Value> <EN>Value in English</EN> <BG>Value in Bulgarian</BG> <TR>Value in Turkish</TR> </Value> <Color>Hex number of color</Color> </Value> </Values> </Attribute>
As you can see there is a parent element named “Values” and inside it you can set each value in “Value” element (multi-language).
If AttributeFilterWidget is “color” then you can send color number inside element “Color”, value of this element must be HEX encoded RGB (e.g. ffffff, 000000, 6c6c6c) (string).
Option Groups element
In Seliton there are two variants of Options groups. You can use Global or Local options groups and the difference is that Global Option Groups can be assigned at any product, while Local Option Groups can be used only in the product where they are defined.
Options Groups element creates only Global option groups.
Example of children element of OptionsGroups:
<OptionGroup type="(priceModifier|variant|userImage|userText)"> <GlobalOptionGroupID>ID (integer)</GlobalOptionGroupID> <OptionGroupCode>Group code</OptionGroupCode> <OptionGroupName> <EN>Name of option group in English</EN> <BG>Name of option group in Bulgarian</BG> <TR>Name of option group in Turkish</TR> </OptionGroupName> <Option> <OptionName> <EN>Name of option 1 in English</EN> <BG>Name of option 1 in Bulgarian</BG> <TR>Name of option 1 in Turkish</TR> </OptionName> </Option> <Option> <OptionName> <EN>Name of option 2 in English</EN> <BG>Name of option 2 in Bulgarian</BG> <TR>Name of option 2 in Turkish</TR> </OptionName> </Option> </OptionGroup>
Notes
OptionGroup type attribute – Available types are priceModified, variant, userImage and userText (string, required).
GlobalOptionGroupID – (integer, required).
OptionGroupCode – Code is string and must be unique. Valid characters are A-Z and 0-9 (only Latin alphabets and digits). This code will be visible in the URL in the store if this option group is used for filtering products (string).
OptionGroupName – (multi-language, required).
Option -> OptionName – (multi-language, required).
If you are using option groups of type “priceModification” there are few additional attributes in each Option element.
<OptionGroup type="priceModifier"> <GlobalOptionGroupID>ID (integer)</GlobalOptionGroupID> <OptionGroupCode>Group code</OptionGroupCode> <OptionGroupName> <EN>Name of option group in English</EN> <BG>Name of option group in Bulgarian</BG> <TR>Name of option group in Turkish</TR> </OptionGroupName> <Option modificationType="(amount|percent)" modificationAmount="0.00"> <OptionName> <EN>Name of option 1 in English</EN> <BG>Name of option 1 in Bulgarian</BG> <TR>Name of option 1 in Turkish</TR> </OptionName> </Option> <Option modificationType="(amount|percent)" modificationAmount="10.00"> <OptionName> <EN>Name of option 2 in English</EN> <BG>Name of option 2 in Bulgarian</BG> <TR>Name of option 2 in Turkish</TR> </OptionName> </Option> </OptionGroup>
Notes
modificationType – Can be amount or percent. You can use different type for each option (string).
modificationAmount – Amount or percent of modification as decimal number. Must be in store base currency (decimal).
Multi-language values
Multi-language values are integrated in API with following structure.
Example:
<Element> <EN>Multi-language value of element for English</EN> <BG>Multi-language value of element for Bulgarian</BG> <TR>Multi-language value of element for Turkish</TR> </Element>
Escaping of HTML in XML file
To generate correct XML file without any errors you must escape all of HTML in it or use CDATA. See below for table with characters that you must escape them when you generate your XML file.
Character | Escape string |
---|---|
< | < |
> | > |
& | & |
“ | " |
‘ | ' |
Here you can find more information about CDATA and how to use it.
Seliton SUPTO XML API Guide
FAQ
In this section you can find information about problem and helpful information about API module.
Create an XML API account in Seliton
- 1. Open your Seliton admin panel.
-
2. Go to “Super XML Import” > “Configuration” > “My XML Imports”, if menu doesn’t exists then module is not installed.
- 3. Then open “Seliton/Summer Cart API” module.
-
4. On this page you will see “Username” and “Secret key”. Fill these fields with values that you want.
- 5. Then “Save”.
Остави мнение/коментар