Product export

Function catalog/export (http://<DOMAIN>/api/catalog/export/)

Parameters:

  • token - authorization key obtained through the auth function
  • expr - condition of goods selection
    • parent - path to the section (Toys\Educational toys\Toys for Kids) OR
    • parent.id - section id for selection (or parent.id: {"id": [1,2,3,4]})
    • display_in_showcase - 0 or 1 for selection of products that are included
    • article - selection of products by article (string or array, for example: ['SKU-1-BLACK', 'MF-2010']). Not a mandatory parameter
  • offset - offset relative to the beginning of the goods selection
  • limit - number of exported items (by default 500 records, more than 500 records cannot be exported to avoid server overload). It works together with the offset parameter. For example: offset=20&limit=10 - will output goods from the 20th to the 30th.
  • includedParams - list of fields to be selected (only the fields specified by you will be selected: parent_article, article, parent). see example below.
  • excludedParams - list of fields that should be excluded from export (also excluded are the fields specified in includedParams, if this parameter is filled). see example below.


Response:

  • status - status of function execution
    • OK - export was successful
    • EXCEPTION - an error occurred
  • products - exported goods
    • products[i].title.en - value in English
    • products[i].title.ro - value in Romanian
    • products[i].article - product article
    • products[i].parent_article - article of the parent product
    • products[i].article_for_display - model article
    • products[i].creation_time - date of product addition
    • products[i].title - product name
    • products[i].display_in_showcase - display item (1|0)
    • products[i].price - Price of the product
    • products[i].price_old - Old price of the product
    • products[i].discount - relative discount for the product
    • products[i].parent - path to the \ section (Developmental Toys\ Toys for Kids) (mandatory parameter).
    • products[i].brand - brand name
    • products[i].description - product description
      • products[i].description.en - value in English
      • products[i].description.ro - value in Romanian
    • products[i].we_recommended - we recommend (1|0)
    • products[i].icons - Icons (["Sale", "Novelty", "Hit"])
    • products[i].seo_title - SEO title for the product
      • products[i].seo_title.en - value in English
      • products[i].seo_title.ro - value in Romanian
    • products[i].seo_keywords - SEO keywords for the product
      • products[i].seo_keywords.en - value in English
      • products[i].seo_keywords.ro - value in Romanian
    • products[i].seo_description - SEO description for the product
      • products[i].seo_description.en - value in English
      • products[i].seo_description.ro - value in Romanian
    • products[i].characteristics[] - product characteristics
    • products[i].characteristics.material - Material
    • products[i].characteristics.weight - Weight
    • products[i].characteristics.consist - Composition
    • products[i].characteristics.country - Country
    • products[i].characteristics.gender - Gender
    • products[i].characteristics.age - Age
    • products[i].characteristics.physics - Physical development (specify values with ;)
    • products[i].characteristics.brain - Mental development (specify values with ;)
    • products[i].characteristics.social - Social development (specify values with ;)
    • products[i].images - links to images of the modification
    • products[i].gallery_common - links to images common for all modifications
    • products[i].gallery_360 - links to 360 gallery images
    • products[i].slug - product alias or null if it is not specified
    • products[i].link - absolute link with domain to the product or null if it is not specifie
    • products[i].accessories - accessories for the product (array). Overwrite existing accessoriesproducts[i].accessories[n] - product article in a simple string
      • products[i].accessories[n].article - explicit product article
      • products[i].accessories[n].page - the path to the \ section (Toys\Educational toys\Toys for Kids).
      • products[i].accessories[n].page.id - section identifier
    • products[i].gifts - gifts for the product (array). Will work only if gifts are enabled on the site. Overwrite existing gifts
      • products[i].gifts[n] - product article in a simple string
      • products[i].gifts[n].article - explicit product article
      • products[i].gifts[n].page - the path to the section (Toys\Educational toys\Toys for Kids).
      • products[i].gifts[n].page.id - section id
    • products[i].residues - product residues in warehouses. It works only if the site has enabled the accounting of residues in warehouses.
    • products[i].residues[n].warehouse - Name for warehouse synchronization (value of "Name for synchronization" property in warehouse)
    • products[i].residues[n].quantity - quantity of goods in the warehouse
    • products[i].unit_of_measurement - unit value
      • products[i].unit_of_measurement.id - unit value identifier in the reference book
      • products[i].unit_of_measurement.value - unit value


Important note:

If a parameter has a value translation - it will be output in the format
"param": { "id":1, "value": { "lang_abbr_1" : "value_1", "lang_abbr_2" : "value_2"}}

The exported parameters may vary depending on the parameters of the product-specific data template


Query example http://<DOMAIN>/api/catalog/export/


{
       "expr" : {
           "parent":"Mac",
           "article": ["sdgasdgsa", "asfasgasdg"]
       },
       "limit" : 5,
       "token":"7189d5c9f5f469e8dbfdea1c2c33698c"
}

Response example

{
    "status": "OK",
    "response": {
        "products": [
            {
                "parent_article": "sdgasdgsa",
                "article": "sdgasdgsa",
                "mod_title": {
                    "en": "dgasdgasdg",
                    "ro": "dgasdgasdg"
                },
                "price": 150,
                "price_old": 0,
                "presence": {
                    "id": 2,
                    "value": {
                        "en": "Out of stock",
                        "ro": "Stoc epuizat"
                    }
                },
                "display_in_showcase": 1,
                "discount": 0,
                "quantity": 0,
                "short_description": {
                    "en": "",
                    "ro": ""
                },
                "color": {
                    "id": 22,
                    "value": {
                        "en: "Gold",
                        "ro": "Gold"
                    }
                },
                "title": {
                    "en": "MacBook Air 11.6\" 128 GB",
                    "ro": "MacBook Air 11.6\" 128 GB"
                },
                "currency": {
                    "id": 2,
                    "value": ""
                },
                "parent": {
                    "id": 1124,
                    "value": "Mac"
                },
                "brand": {
                    "id": 0,
                    "value": null
                },
                "popularity": 0,
                "description": {
                    "en": "",
                    "ro": ""
                },
                "g_size": {
                    "id": 0,
                    "value": null
                },
                "seo_title": {
                    "en": "",
                    "ro": ""
                },
                "seo_keywords": {
                    "en": "",
                    "ro": ""
                },
                "seo_description": {
                    "en": "",
                    "ro": ""
                },
                "h1_title": {
                    "en": "",
                    "ro": ""
                },
                "alt_parent": [
                    {
                        "id": 1681,
                        "value": "development colossus cluster 86070119 \/ boob bang builder 83177342 \/ portal cake 57566500"
                    }
                ],
                "icons": [
                    {
                        "id": 4,
                        "value": {
                            "en": "Sale",
                            "ro": "Reducere"
                        }
                    },
                    {
                        "id": 3,
                        "value": {
                            "en": "New",
                            "ro": "Nou"
                        }
                    }
                ],
                "characteristics": {
                    "mod1": {
                        "id": 0,
                        "value": null
                    },
                    "mod2": {
                        "id": 0,
                        "value": null
                    },
                    "mod3": {
                        "id": 0,
                        "value": null
                    },
                    "mod4": {
                        "id": 0,
                        "value": null
                    },
                    "mod5": {
                        "id": 0,
                        "value": null
                    },
                    "mod6": {
                        "id": 0,
                        "value": null
                    },
                    "mod7": []
                },
                "images": [],
                "gallery_common": [],
                "gallery_360": []
            },
            {
                "parent_article": "asfasgasdg",
                "article": "asfasgasdg",
                "mod_title": {
                    "en": "efhsdfh",
                    "ro": "efhsdfh"
                },
                "price": 12000,
                "price_old": 0,
                "presence": {
                    "id": 2,
                    "value": {
                        "en": "Out of stock",
                        "ro": "Stoc epuizat"
                    }
                },
                "display_in_showcase": 1,
                "discount": 0,
                "quantity": 0,
                "short_description": {
                    "en": "",
                    "ro": ""
                },
                "color": {
                    "id": 0,
                    "value": null
                },
                "title": {
                    "en": "MacBook Air 13.3\" 128 ГБ",
                    "ro": ""
                },
                "currency": {
                    "id": 1,
                    "value": ""
                },
                "parent": {
                    "id": 1124,
                    "value": "Mac"
                },
                "brand": {
                    "id": 0,
                    "value": null
                },
                "popularity": 0,
                "description": {
                    "en": "",
                    "ro": ""
                },
                "g_size": {
                    "id": 0,
                    "value": null
                },
                "seo_title": {
                    "en": "",
                    "ro": ""
                },
                "seo_keywords": {
                    "en": "",
                    "ro": ""
                },
                "seo_description": {
                    "en": "",
                    "ro": ""
                },
                "h1_title": {
                    "en": "",
                    "ro": ""
                },
                "alt_parent": [
                    {
                        "id": 1681,
                        "value": "development colossus cluster 86070119 \/ boob bang builder 83177342 \/ portal cake 57566500"
                    }
                ],
                "icons": [],
                "characteristics": {
                    "mod1": {
                        "id": 0,
                        "value": null
                    },
                    "mod2": {
                        "id": 0,
                        "value": null
                    },
                    "mod3": {
                        "id": 0,
                        "value": null
                    },
                    "mod4": {
                        "id": 0,
                        "value": null
                    },
                    "mod5": {
                        "id": 0,
                        "value": null
                    },
                    "mod6": {
                        "id": 0,
                        "value": null
                    },
                    "mod7": []
                },
                "images": [],
                "gallery_common": [],
                "gallery_360": []
            }
        ]
    }
}

An example of a query for an address (http://<DOMAIN>/api/catalog/export/) using the includedParams parameter


{
       "limit" : 5,
       "token":"7189d5c9f5f469e8dbfdea1c2c33698c",
	   "includedParams": ["price", "price_old", "title"]
}

Respionse example

{
    "status": "OK",
    "response": {
        "products": [
            {
                "parent_article": "2318262",
                "article": "2318262",
                "price": 649,
                "price_old": 0,
                "title": {
                    "en": "Stainless Steel Case with Milanese Loop",
                    "ro": "Stainless Steel Case with Milanese Loop"
                },
                "parent": {
                    "id": 1006,
                    "value": "Watch"
                }
            },
            {
                "parent_article": "2317217",
                "article": "2317217",
                "price": 550,
                "price_old": 650,
                "title": {
                    "en": "Stainless Steel Case with Black Sport Band",
                    "ro": "Stainless Steel Case with Black Sport Band"
                },
                "parent": {
                    "id": 1006,
                    "value": "Watch"
                }
            },
            {
                "parent_article": "MD827",
                "article": "MD827",
                "price": 599,
                "price_old": 0,
                "title": {
                    "en": "Apple EarPods with Remote and Mic",
                    "ro": "Apple EarPods with Remote and Mic"
                },
                "parent": {
                    "id": 1008,
                    "value": "Accessories"
                }
            },
            {
                "parent_article": "MD564",
                "article": "MD564",
                "price": 79,
                "price_old": 0,
                "title": {
                    "en": "USB SuperDrive",
                    "ro": "USB SuperDrive"
                },
                "parent": {
                    "id": 1008,
                    "value": "Accessories"
                }
            },
            {
                "parent_article": "MB829",
                "article": "MB829",
                "price": 69,
                "price_old": 0,
                "title": {
                    "en": "Magic Mouse",
                    "ro": "Magic Mouse"
                },
                "parent": {
                    "id": 1032,
                    "value": "Аксессуары \/ Клавиатуры и мыши"
                }
            }
        ]
    }
}


An example of a query for an address (http://<DOMAIN>/api/catalog/export/) using the excludedParams parameter:

{
	"token": "7189d5c9f5f469e8dbfdea1c2c33698c"
    "limit": 1,
    "excludedParams": ["price", "price_old", "description"]
}

Response example

{
    "status": "OK",
    "response": {
        "products": [
            {
                "parent_article": "2318262",
                "article": "2318262",
                "mod_title": {
                    "en": "",
                    "ro": ""
                },
                "presence": {
                    "id": 1,
                    "value": {
                        "en": "In stock",
                        "ro": "În stoc"
                    }
                },
                "display_in_showcase": 1,
                "discount": 0,
                "quantity": 3,
                "short_description": {
                    "en": "jfhblagfue",
                    "ro": ""
                },
                "color": {
                    "id": 20,
                    "value": {
                        "en": "Green",
                        "ro": "Verde"
                    }
                },
                "currency": {
                    "id": 4,
                    "value": "EUR"
                },
                "title": {
                    "en": "Stainless Steel Case with Milanese Loop",
                    "ro": "Stainless Steel Case with Milanese Loop"
                },
                "parent": {
                    "id": 1006,
                    "value": "Watch"
                },
                "brand": {
                    "id": 88,
                    "value": {
                        "en": "Air Jordan",
                        "ro": "Air Jordan"
                    }
                },
                "popularity": 0,
                "seo_title": {
                    "en": "",
                    "ro": ""
                },
                "seo_keywords": {
                    "en": "",
                    "ro": ""
                },
                "seo_description": {
                    "en": "",
                    "ro": ""
                },
                "h1_title": {
                    "en": "",
                    "ro": ""
                },
                "alt_parent": [],
                "icons": [
                    {
                        "id": 3,
                        "value": {
                            "en": "New",
                            "ro": "Nou"
                        }
                    }
                ],
                "select": [],
                "characteristics": {
                    "country": {
                        "en": "",
                        "ro": ""
                    },
                    "sezon": 0,
                    "iq": {
                        "id": 0,
                        "value": null
                    }
                },
                "images": [
                    "http:\/\/my.cartum.dev\/content\/images\/36\/58113884470528.jpg",
                    "http:\/\/my.cartum.dev\/content\/images\/36\/22344377057419.jpg",
                    "http:\/\/my.cartum.dev\/content\/images\/36\/96673477606640.jpg",
                    "http:\/\/my.cartum.dev\/content\/images\/36\/92563395698865.jpg"
                ],
                "gallery_common": [],
                "gallery_360": [],
                "slug": "stainless-steel-case-with-milanese-loop\/69",
                "link": "http:\/\/my.cartum.dev\/stainless-steel-case-with-milanese-loop\/69\/"
            }
        ]
    }
}


Example of a query for an address (http://<DOMAIN>/api/catalog/export/) using the includedParams and excludedParams parameters:

{
    "limit" : 1,
    "includedParams": ["price", "title", "color"],
    "excludedParams": ["price", "price_old", "description"]
}

Response example

{
    "status": "OK",
    "response": {
        "products": [
            {
                "parent_article": "2318262",
                "article": "2318262",
                "color": {
                    "id": 20,
                    "value": {
                        "en": "Green",
                        "ro": "Verde"
                    }
                },
                "title": {
                    "en": "Stainless Steel Case with Milanese Loop",
                    "ro": "Stainless Steel Case with Milanese Loop"
                },
                "parent": {
                    "id": 1006,
                    "value": "Watch"
                }
            }
        ]
    }
}