Skip to content

Árvore de Categoria Específica

GET /publics/products/categories/{categoryId}/tree

Retorna estrutura hierárquica de uma categoria específica com suas subcategorias, irmãs e pais

Parâmetros da URL

ParâmetroTipoObrigatórioDescrição
categoryIdintegerSimID único da categoria

Estrutura do Response

1{
2 "current": {
3 "id": 10,
4 "name": "Smartphones",
5 "url": "/categoria/smartphones"
6 },
7 "children": [
8 {
9 "id": 101,
10 "name": "iPhone",
11 "url": "/categoria/iphone"
12 },
13 {
14 "id": 102,
15 "name": "Samsung Galaxy",
16 "url": "/categoria/samsung-galaxy"
17 }
18 ],
19 "sisters": [
20 {
21 "id": 11,
22 "name": "Tablets",
23 "url": "/categoria/tablets"
24 },
25 {
26 "id": 12,
27 "name": "Notebooks",
28 "url": "/categoria/notebooks"
29 }
30 ],
31 "parent": [
32 {
33 "id": 1,
34 "name": "Eletrônicos",
35 "url": "/categoria/eletronicos"
36 }
37 ]
38}

Árvore de Categorias

GET /publics/products/categories/tree

Retorna estrutura hierárquica completa de categorias ativas

Estrutura do Response

1[
2 {
3 "id": 1,
4 "name": "Eletrônicos",
5 "url": "/categoria/eletronicos",
6 "children": [
7 {
8 "id": 10,
9 "name": "Smartphones",
10 "url": "/categoria/smartphones",
11 "children": [
12 {
13 "id": 101,
14 "name": "iPhone",
15 "url": "/categoria/iphone",
16 "children": []
17 },
18 {
19 "id": 102,
20 "name": "Samsung Galaxy",
21 "url": "/categoria/samsung-galaxy",
22 "children": []
23 }
24 ]
25 },
26 {
27 "id": 11,
28 "name": "Tablets",
29 "url": "/categoria/tablets",
30 "children": [
31 {
32 "id": 111,
33 "name": "iPad",
34 "url": "/categoria/ipad",
35 "children": []
36 }
37 ]
38 }
39 ]
40 },
41 {
42 "id": 2,
43 "name": "Roupas",
44 "url": "/categoria/roupas",
45 "children": [
46 {
47 "id": 20,
48 "name": "Masculino",
49 "url": "/categoria/masculino",
50 "children": [
51 {
52 "id": 201,
53 "name": "Camisetas",
54 "url": "/categoria/camisetas-masculinas",
55 "children": []
56 }
57 ]
58 }
59 ]
60 }
61]

Uappi is the most productive way to
build, deploy, and monitor software.

;