{"action":"closed","issue":{"url":"https://api.github.com/repos/TiendaNube/api-docs/issues/24","repository_url":"https://api.github.com/repos/TiendaNube/api-docs","labels_url":"https://api.github.com/repos/TiendaNube/api-docs/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/TiendaNube/api-docs/issues/24/comments","events_url":"https://api.github.com/repos/TiendaNube/api-docs/issues/24/events","html_url":"https://github.com/TiendaNube/api-docs/issues/24","id":173993760,"number":24,"title":"Category resource does not return subcategories","user":{"login":"ckozus","id":12102,"avatar_url":"https://avatars.githubusercontent.com/u/12102?v=3","gravatar_id":"","url":"https://api.github.com/users/ckozus","html_url":"https://github.com/ckozus","followers_url":"https://api.github.com/users/ckozus/followers","following_url":"https://api.github.com/users/ckozus/following{/other_user}","gists_url":"https://api.github.com/users/ckozus/gists{/gist_id}","starred_url":"https://api.github.com/users/ckozus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckozus/subscriptions","organizations_url":"https://api.github.com/users/ckozus/orgs","repos_url":"https://api.github.com/users/ckozus/repos","events_url":"https://api.github.com/users/ckozus/events{/privacy}","received_events_url":"https://api.github.com/users/ckozus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-30T11:23:05Z","updated_at":"2016-09-01T21:08:38Z","closed_at":"2016-09-01T21:08:38Z","body":"Hi there,\r\n\r\nI'm getting the category tree for a store and the subcategories information seems to be missing.\r\n\r\nThe current category tree looks like this:\r\n\r\n![screen shot 2016-08-30 at 8 20 00 am](https://cloud.githubusercontent.com/assets/12102/18087252/9600a510-6e8a-11e6-8e06-f1bcfc4374a9.png)\r\n\r\nTo get all the categories I use this request:\r\n\r\ncurl -H 'Authentication: bearer xxxxxxxxxx https://api.tiendanube.com/v1/180262/categories\r\n\r\nand get the following json:\r\n\r\n`\t[\r\n    {\r\n        \"id\": 1540191,\r\n        \"name\": {\r\n            \"es\": \"Encendido\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"encendido\"\r\n        },\r\n        \"parent\": 0,\r\n        \"subcategories\": [\r\n            null\r\n        ],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:19:31+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540197,\r\n        \"name\": {\r\n            \"es\": \"Baterias\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"baterias\"\r\n        },\r\n        \"parent\": 1540191,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:20:49+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540192,\r\n        \"name\": {\r\n            \"es\": \"Filtros\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"filtros\"\r\n        },\r\n        \"parent\": 0,\r\n        \"subcategories\": [\r\n            null,\r\n            null,\r\n            null,\r\n            null\r\n        ],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:19:31+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540198,\r\n        \"name\": {\r\n            \"es\": \"De Aire\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"de-aire\"\r\n        },\r\n        \"parent\": 1540192,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:20:49+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540199,\r\n        \"name\": {\r\n            \"es\": \"De Aceite\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"de-aceite\"\r\n        },\r\n        \"parent\": 1540192,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:20:49+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540200,\r\n        \"name\": {\r\n            \"es\": \"De Habitaculo\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"de-habitaculo\"\r\n        },\r\n        \"parent\": 1540192,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:20:49+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540201,\r\n        \"name\": {\r\n            \"es\": \"De Nafta\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"de-nafta\"\r\n        },\r\n        \"parent\": 1540192,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:20:49+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540193,\r\n        \"name\": {\r\n            \"es\": \"Frenos\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"frenos\"\r\n        },\r\n        \"parent\": 0,\r\n        \"subcategories\": [\r\n            null\r\n        ],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:19:31+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540202,\r\n        \"name\": {\r\n            \"es\": \"Pastillas de Freno\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"pastillas-de-freno\"\r\n        },\r\n        \"parent\": 1540193,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:22:30+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540194,\r\n        \"name\": {\r\n            \"es\": \"Motor\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"motor\"\r\n        },\r\n        \"parent\": 0,\r\n        \"subcategories\": [\r\n            null,\r\n            null\r\n        ],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:19:31+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540203,\r\n        \"name\": {\r\n            \"es\": \"Aditivos y Lubricantes\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"aditivos-y-lubricantes\"\r\n        },\r\n        \"parent\": 1540194,\r\n        \"subcategories\": [\r\n            null,\r\n            null\r\n        ],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:22:30+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540204,\r\n        \"name\": {\r\n            \"es\": \"Aceite de Motor\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"aceite-de-motor\"\r\n        },\r\n        \"parent\": 1540203,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:22:30+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540205,\r\n        \"name\": {\r\n            \"es\": \"Liquido Refrigerante\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"liquido-refrigerante\"\r\n        },\r\n        \"parent\": 1540203,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:22:30+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540206,\r\n        \"name\": {\r\n            \"es\": \"Bombas\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"bombas\"\r\n        },\r\n        \"parent\": 1540194,\r\n        \"subcategories\": [\r\n            null,\r\n            null,\r\n            null\r\n        ],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:22:30+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540241,\r\n        \"name\": {\r\n            \"es\": \"De Aceite\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"de-aceite1\"\r\n        },\r\n        \"parent\": 1540206,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:36:17+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540242,\r\n        \"name\": {\r\n            \"es\": \"De Agua\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"de-agua\"\r\n        },\r\n        \"parent\": 1540206,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:36:17+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540243,\r\n        \"name\": {\r\n            \"es\": \"De Nafta\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"de-nafta1\"\r\n        },\r\n        \"parent\": 1540206,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:36:17+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540195,\r\n        \"name\": {\r\n            \"es\": \"Suspensi\\u00f3n y Direcci\\u00f3n\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"suspension-y-direccion\"\r\n        },\r\n        \"parent\": 0,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:20:01+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    },\r\n    {\r\n        \"id\": 1540196,\r\n        \"name\": {\r\n            \"es\": \"Transmisi\\u00f3n\"\r\n        },\r\n        \"description\": {\r\n            \"es\": \"\"\r\n        },\r\n        \"handle\": {\r\n            \"es\": \"transmision\"\r\n        },\r\n        \"parent\": 0,\r\n        \"subcategories\": [],\r\n        \"seo_title\": {\r\n            \"es\": null\r\n        },\r\n        \"seo_description\": {\r\n            \"es\": null\r\n        },\r\n        \"created_at\": \"2016-08-29T14:20:01+00:00\",\r\n        \"updated_at\": \"2016-08-29T14:36:18+00:00\"\r\n    }`\r\n\r\nIf you rake a look, all the subcategories fields are not correctly filled. Some of the, have an array of null elements where it should have the ids of the children categories.\r\n\r\nI hope this helps.\r\n\r\nBest,\r\nCarlos."}}
{"actor":{"display_login":"fonse"}}