Open2b versione 7.2

export-products

Export products.

Request

Admin SDK
Admin.api('batch.export-products', request, function(response) { … });
HTTP POST
/api/v8/batch.export-products
{
  "columns" : [ "sku", "upc", "departments[en]", "salePrice[2]" ], // columns to export - string(1…) (required)
  "options" : { // options
    "delimiter" : ",", // field delimiter, can be ";", "," or "|", if not provided it uses "," - string(1)
    "hasPrice" : true, // only export products and items with price, if not provided it uses false - bool
    "listSeparator" : "|", // list separator, required for columns with multiple values - string(1…)
    "stripNewLines" : false, // strip new lines from field values, if not provided it uses false - bool
    "useBOM" : false // use a BOM character at the start of the file, if not provided it uses false - bool
  }
}

Response

{
  "status" : "ok",
  "task" : 14 // task (id) - int(1…)
}

Errors

Field Type Description
id Task Task <id> does not exist
app LimitReached Maximum number of processing tasks has been reached
columns Malformed '<column>' is not a well formed column name
columns Malformed '<language>' is not a valid language code
columns Malformed A column is repeated
columns Malformed Column 'sku' is missing
columns NotFound Column '<column>' does not exist
options Malformed 'hasPrice' requires at least one price column
options Malformed 'listSeparator' is required by column '<column>'

Available columns

Columns that can be exported. language, when required by a column, is a language code.

Column Example Description
attribute[<code>][<position>][<language>]
attribute[Color][1][en]
Attribute value. code is the attribute's code, position is the attribute's value position (starting from 1).
attributes[<code>][<language>]
attributes[Color][en]
Attribute values, joined as a single string using the listDelimiter passed as option to the method call. code is the attribute's code.
code
code
Product code.
department[<depth>][<language>]
department[1][en]
Product's department. depth can be from 1 to 5, where 1 is the top level department.
departments[<language>]
departments[en]
Product's departments, joined as a single string using the listDelimiter passed as option to the method call.
shortDescription[<language>]
shortDescription[en]
Product's short description.
longDescription[<language>]
longDescription[en]
Product's long description.
moreDescription[<language>]
moreDescription[en]
Product's "more" description.
ean
ean
EAN of the item.
gtin
gtin
GTIN of the item.
isbn
isbn
ISBN of the item.
name[<language>]
name[en]
Product name.
option[<code>][<language>]
option[Color][en]
Option of the item. If the attribute with code code is a variant for the product, this column represents the item option.
producer
producer
Producer code of the product.
shippingCost.net[<shipping>][<group>]
shippingCost.net[DHL][Reseller]
Shipping cost (tax excluded) for the shipping method with code shipping and the customer group with code group.
shippingCost.gross[<shipping>][<group>]
shippingCost.gross[DHL][Reseller]
Shipping cost (tax included) for the shipping method with code shipping and the customer group with code group.
sku
sku
SKU of the item.
stock
stock
Quantity in stock.
upc
upc
UPC code.
image[<index>]
image[1]
Zoom or large image at index index, starting from 1.
image.original[<index>]
image.original[1]
Original image at index index, starting from 1.
image.large[<index>]
image.large[1]
Large image at index index, starting from 1.
image.medium[<index>]
image.medium[1]
Medium image at index index, starting from 1.
image.small[<index>]
image.small[1]
Small image at index index, starting from 1.
image.thumbnail[<index>]
image.thumbnail[1]
Thumbnail image at index index, starting from 1.
image.zoom[<index>]
image.zoom[1]
Zoom image at index index, starting from 1.
price.net[<list>]
price.net[SALE]
Price (tax excluded) for the price list list.
price.gross[<list or group>][<tax area>]
price.gross[SALE][Europe]
Price (tax included) for the given price list or customer group code.
listPrice[<group>]
listPrice[Reseller]
List price (tax included or excluded depending on the customer group) for the customer group with code group.
listPrice.net[<group>]
listPrice.net[Reseller]
List price (tax excluded) for the customer group with code group.
listPrice.gross[<group>]
listPrice.gross[Reseller]
List price (tax included) for the customer group with code group.
salePrice[<group>]
salePrice[Reseller]
Sale price (tax included or excluded depending on the customer group) for the customer group with code group.
salePrice.net[<group>]
salePrice.net[Reseller]
Sale price (tax excluded) for the customer group with code group.
salePrice.gross[<group>]
salePrice.gross[Reseller]
Sale price (tax included) for the customer group with code group.