getProductCategoryTree

Method returns product categories tree

Usage URL: https://magboss.pl/api/getProductCategoryTree.json?key=YOURAPIKEY

Query params

(put those in your URL, e.g. ?id=123)

  • fkparent

    integer

    Identifier of parent category. If you specify one, method return only one level of categories. Value zero (0) = root category.

  • lang

    string

    Language of result. ISO 2 Letter Language Codes ie

    Example: en, pl, cs

  • id

    integer

    Internal identifier of product category.

  • modified

    datetime (YYYY-MM-DD HH:MM:SS)

    When last modified.

  • name

    string

    Name of category

  • fkparent

    integer

    Identifier of parent category. Zero '0' is root category.

  • order

    integer

    Order of category

  • countpublished

    integer

    Count of all published products in this category

  • visible

    boolean (1 = true, 0 = false)

    Whether category is visible

  • children

    object

    Array of categories that belong to this one. Children have same structure as parent

Example URL: https://magboss.pl/api/getProductCategoryTree.json?key=YOURAPIKEY&lang=en&fkparent=3302

[
  {
    "id": 4002,
    "modified": "2020-12-28 14:46:23",
    "name": "Accessories",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 3,
    "visible": 1,
    "children": [
    ]
  },
  {
    "id": 8755,
    "modified": "2020-12-04 14:27:48",
    "name": "Dental Flosses",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  },
  {
    "id": 8757,
    "modified": "2020-12-04 14:27:48",
    "name": "Dentures and Braces Care",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  },
  {
    "id": 8764,
    "modified": "2020-12-04 14:27:48",
    "name": "Fresh Breath",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  },
  {
    "id": 8754,
    "modified": "2020-12-04 14:27:48",
    "name": "Irrigator Nozzles",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  },
  {
    "id": 8753,
    "modified": "2020-12-04 14:27:48",
    "name": "Irrigators",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  },
  {
    "id": 8758,
    "modified": "2020-12-04 14:27:48",
    "name": "Mouthwashes",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  },
  {
    "id": 8763,
    "modified": "2020-12-04 14:27:48",
    "name": "Other",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  },
  {
    "id": 8756,
    "modified": "2020-12-04 14:27:48",
    "name": "Pastes",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  },
  {
    "id": 8765,
    "modified": "2020-12-04 14:27:48",
    "name": "Plaque Disclosing",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  },
  {
    "id": 3381,
    "modified": "2021-06-21 16:03:13",
    "name": "Sonic brushes",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 6,
    "visible": 1,
    "children": [
    ]
  },
  {
    "id": 8759,
    "modified": "2020-12-04 14:27:48",
    "name": "Toothbrush",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 3,
    "visible": 1,
    "children": [
      {
        "id": 8760,
        "modified": "2020-12-04 14:27:48",
        "name": "Electric",
        "fkparent": 8759,
        "order": 0,
        "countpublished": 3,
        "visible": 1,
        "children": [
        ]
      },
      {
        "id": 8761,
        "modified": "2020-12-04 14:27:48",
        "name": "Manual",
        "fkparent": 8759,
        "order": 0,
        "countpublished": 0,
        "visible": 0,
        "children": [
        ]
      }
    ]
  },
  {
    "id": 3303,
    "modified": "2021-06-21 15:53:49",
    "name": "Toothbrush Replacement Heads",
    "fkparent": 3302,
    "order": 2,
    "countpublished": 2,
    "visible": 1,
    "children": [
    ]
  },
  {
    "id": 8762,
    "modified": "2020-12-04 14:27:48",
    "name": "Whitening",
    "fkparent": 3302,
    "order": 0,
    "countpublished": 0,
    "visible": 0,
    "children": [
    ]
  }
]
Example URL: https://magboss.pl/api/getProductCategoryTree.xml?key=YOURAPIKEY&lang=en&id=3302

<?xml version="1.0" encoding="utf-8"?>
<root>
	<item>
		<id>4002</id>
		<modified>2020-12-28 14:46:23</modified>
		<name>Accessories</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>3</countpublished>
		<visible>1</visible>
		<children> </children>
	</item>
	<item>
		<id>8755</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Dental Flosses</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
	<item>
		<id>8757</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Dentures and Braces Care</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
	<item>
		<id>8764</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Fresh Breath</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
	<item>
		<id>8754</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Irrigator Nozzles</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
	<item>
		<id>8753</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Irrigators</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
	<item>
		<id>8758</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Mouthwashes</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
	<item>
		<id>8763</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Other</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
	<item>
		<id>8756</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Pastes</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
	<item>
		<id>8765</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Plaque Disclosing</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
	<item>
		<id>3381</id>
		<modified>2021-06-21 16:03:13</modified>
		<name>Sonic brushes</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>6</countpublished>
		<visible>1</visible>
		<children> </children>
	</item>
	<item>
		<id>8759</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Toothbrush</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>3</countpublished>
		<visible>1</visible>
		<children>
			<item>
				<id>8760</id>
				<modified>2020-12-04 14:27:48</modified>
				<name>Electric</name>
				<fkparent>8759</fkparent>
				<order>0</order>
				<countpublished>3</countpublished>
				<visible>1</visible>
				<children> </children>
			</item>
			<item>
				<id>8761</id>
				<modified>2020-12-04 14:27:48</modified>
				<name>Manual</name>
				<fkparent>8759</fkparent>
				<order>0</order>
				<countpublished>0</countpublished>
				<visible>0</visible>
				<children> </children>
			</item>
		</children>
	</item>
	<item>
		<id>3303</id>
		<modified>2021-06-21 15:53:49</modified>
		<name>Toothbrush Replacement Heads</name>
		<fkparent>3302</fkparent>
		<order>2</order>
		<countpublished>2</countpublished>
		<visible>1</visible>
		<children> </children>
	</item>
	<item>
		<id>8762</id>
		<modified>2020-12-04 14:27:48</modified>
		<name>Whitening</name>
		<fkparent>3302</fkparent>
		<order>0</order>
		<countpublished>0</countpublished>
		<visible>0</visible>
		<children> </children>
	</item>
</root>