Skip to content

Magento V2 Special Price XML

The XML format documented here is used for the import of special prices into Magento, via the Import Special Prices to Magento V2 task.

A special price is the discounted price of a product, optionally limited to a date range.

Sample XML

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfSpecialPrice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SpecialPrice>
    <sku>24-MB01</sku>
    <price>10</price>
    <store_id>0</store_id>
    <price_from>2026-11-15</price_from>
    <price_to>2026-11-18</price_to>
  </SpecialPrice>
</ArrayOfSpecialPrice>

Special Price

Magento Field XML Field Type Input Notes
SKU sku string Required The SKU of the product to price. The product must already exist in Magento
Special Price price decimal Required The discounted price
Store View store_id int Optional The ID of the store view the price applies to. Defaults to 0, which applies the price to all store views
Special Price From Date price_from string Optional The date the price applies from, in yyyy-MM-dd format. Leave empty to apply the price immediately
Special Price To Date price_to string Optional The date the price applies until, in yyyy-MM-dd format. Leave empty to apply the price indefinitely

Common Fields

The following fields are supported on every record we import into Magento. They are used by Zynk rather than sent to Magento.

XML Field Type Input Notes
external_id string Optional The unique ID of the record in the external system. Stored in Zynk's internal DB and used to track records already imported. Required when the Prevent Reprocessing setting is enabled on the task
store_code string Optional The store view code to send this record to, overriding the Store View Code setting on the task for this record only
match element Optional Match an existing record on a field and value other than the default. See Matching Records in Magento v2
matches element Optional As match, but matching on more than one field. See Matching Records in Magento v2

Errors

Records which fail to import are written to the Fail File in the same format as the input file, with the reason for the failure added in an errors element. There is no need to send this element yourself.

The name of each error tells you at which stage the record failed:

Name Meaning
Pre-Validation Zynk checked the record before sending it and found a problem, e.g. a required field is missing or a related record could not be found. The record was not sent to Magento
Prevent Reprocessing A record with the same external_id has already been imported, and the Prevent Reprocessing setting is enabled on the task
Error Magento rejected the record, or Zynk could not match the record to the data already in Magento. The description contains the message returned by Magento
Upload Error An unexpected error occurred while sending the record to Magento
<SpecialPrice>
  <sku>24-MB99</sku>
  <errors>
    <error>
      <name>Pre-Validation</name>
      <description>The sku could not be found in Magento v2.</description>
    </error>
  </errors>
</SpecialPrice>