XM
Powered By GitBook
Retrieve Product Category Tree
Path:
1
GET https://{baseurl}/api-category/v1/category/tree?id={Category ID}
Copied!
Retrieves the product category tree.

Headers

Content-Type : application/json
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }
Authorization: The JWT Authorization token from the Login API.

Parameters

Type : query
Name : The ID of the category to retrieve the category tree.
Required: true

Sample Request

1
GET https://{baseurl}/api-category/v1/category/tree?id=60c698280567a40009a72d1f
Copied!

Sample Response

Response Code: 200
Message: OK
Description: You will see this paginated response when the query parameters are page and size.
1
{
2
"id": "60c698280567a40009a72d1f",
3
"name": "New Hierarchy 6",
4
"attributes": [
5
{
6
"id": "60ab953d0ce58c0008bdae24",
7
"name": "Category Status",
8
"description": "",
9
"type": "BOOLEAN",
10
"value": ""
11
},
12
{
13
"id": "60ab952d0ce58c0008bdae21",
14
"name": "Category Created Date",
15
"description": "",
16
"type": "DATETIME",
17
"value": ""
18
},
19
{
20
"id": "60ab951b0ce58c0008bdae1e",
21
"name": "Category Id",
22
"description": "",
23
"type": "DECIMAL",
24
"value": ""
25
},
26
{
27
"id": "60ab950e0ce58c0008bdae1b",
28
"name": "Category Name",
29
"description": "",
30
"type": "TEXT",
31
"value": ""
32
}
33
],
34
"children": [
35
{
36
"id": "60c698369e8ce300097bb60c",
37
"name": "Bedding",
38
"attributes": [
39
{
40
"id": "60ab953d0ce58c0008bdae24",
41
"name": "Category Status",
42
"description": "",
43
"type": "BOOLEAN",
44
"value": "true"
45
},
46
{
47
"id": "60ab952d0ce58c0008bdae21",
48
"name": "Category Created Date",
49
"description": "",
50
"type": "DATETIME",
51
"value": "06-13-2021"
52
},
53
{
54
"id": "60ab951b0ce58c0008bdae1e",
55
"name": "Category Id",
56
"description": "",
57
"type": "DECIMAL",
58
"value": "111"
59
},
60
{
61
"id": "60ab950e0ce58c0008bdae1b",
62
"name": "Category Name",
63
"description": "",
64
"type": "TEXT",
65
"value": "Bedding"
66
}
67
],
68
"children": [
69
{
70
"id": "60c698369e8ce300097bb610",
71
"name": "Sheets + Pillowcases",
72
"attributes": [],
73
"breadcrumbs": [
74
{
75
"id": "60c698280567a40009a72d1f",
76
"name": "New Hierarchy 6",
77
"level": 0
78
},
79
{
80
"id": "60c698369e8ce300097bb60c",
81
"name": "Bedding",
82
"level": 1
83
}
84
],
85
"children": []
86
},
87
{
88
"id": "60c698369e8ce300097bb60f",
89
"name": "Duvets + Shams",
90
"attributes": [],
91
"breadcrumbs": [
92
{
93
"id": "60c698280567a40009a72d1f",
94
"name": "New Hierarchy 6",
95
"level": 0
96
},
97
{
98
"id": "60c698369e8ce300097bb60c",
99
"name": "Bedding",
100
"level": 1
101
}
102
],
103
"children": []
104
},
105
{
106
"id": "60c698369e8ce300097bb60d",
107
"name": "Sub",
108
"attributes": [],
109
"children": [
110
{
111
"id": "60c698369e8ce300097bb60e",
112
"name": "sub prime",
113
"attributes": [],
114
"breadcrumbs": [
115
{
116
"id": "60c698280567a40009a72d1f",
117
"name": "New Hierarchy 6",
118
"level": 0
119
},
120
{
121
"id": "60c698369e8ce300097bb60c",
122
"name": "Bedding",
123
"level": 1
124
},
125
{
126
"id": "60c698369e8ce300097bb60d",
127
"name": "Sub",
128
"level": 2
129
}
130
],
131
"children": []
132
}
133
],
134
"breadcrumbs": [
135
{
136
"id": "60c698280567a40009a72d1f",
137
"name": "New Hierarchy 6",
138
"level": 0
139
},
140
{
141
"id": "60c698369e8ce300097bb60c",
142
"name": "Bedding",
143
"level": 1
144
}
145
]
146
}
147
],
148
"breadcrumbs": [
149
{
150
"id": "60c698280567a40009a72d1f",
151
"name": "New Hierarchy 6",
152
"level": 0
153
}
154
]
155
},
156
{
157
"id": "60c6983e9e8ce300097bb638",
158
"name": "Chairs",
159
"attributes": [],
160
"children": [
161
{
162
"id": "60c6983e9e8ce300097bb639",
163
"name": "Task Chairs",
164
"attributes": [],
165
"children": [
166
{
167
"id": "60c6983e9e8ce300097bb63a",
168
"name": "Computer Chairs",
169
"attributes": [],
170
"breadcrumbs": [
171
{
172
"id": "60c698280567a40009a72d1f",
173
"name": "New Hierarchy 6",
174
"level": 0
175
},
176
{
177
"id": "60c698369e8ce300097bb60c",
178
"name": "Bedding",
179
"level": 1
180
},
181
{
182
"id": "60c698369e8ce300097bb60d",
183
"name": "Sub",
184
"level": 2
185
},
186
{
187
"id": "60c6983e9e8ce300097bb638",
188
"name": "Chairs",
189
"level": 2
190
},
191
{
192
"id": "60c6983e9e8ce300097bb639",
193
"name": "Task Chairs",
194
"level": 3
195
}
196
],
197
"children": []
198
}
199
],
200
"breadcrumbs": [
201
{
202
"id": "60c698280567a40009a72d1f",
203
"name": "New Hierarchy 6",
204
"level": 0
205
},
206
{
207
"id": "60c698369e8ce300097bb60c",
208
"name": "Bedding",
209
"level": 1
210
},
211
{
212
"id": "60c698369e8ce300097bb60d",
213
"name": "Sub",
214
"level": 2
215
},
216
{
217
"id": "60c6983e9e8ce300097bb638",
218
"name": "Chairs",
219
"level": 2
220
}
221
]
222
}
223
],
224
"breadcrumbs": [
225
{
226
"id": "60c698280567a40009a72d1f",
227
"name": "New Hierarchy 6",
228
"level": 0
229
},
230
{
231
"id": "60c698369e8ce300097bb60c",
232
"name": "Bedding",
233
"level": 1
234
},
235
{
236
"id": "60c698369e8ce300097bb60d",
237
"name": "Sub",
238
"level": 2
239
}
240
]
241
},
242
{
243
"id": "60c6983a9e8ce300097bb61d",
244
"name": "Furniture",
245
"attributes": [],
246
"children": [
247
{
248
"id": "60c6983a9e8ce300097bb621",
249
"name": "Bedroom",
250
"attributes": [],
251
"breadcrumbs": [
252
{
253
"id": "60c698280567a40009a72d1f",
254
"name": "New Hierarchy 6",
255
"level": 0
256
},
257
{
258
"id": "60c698369e8ce300097bb60c",
259
"name": "Bedding",
260
"level": 1
261
},
262
{
263
"id": "60c698369e8ce300097bb60d",
264
"name": "Sub",
265
"level": 2
266
},
267
{
268
"id": "60c6983e9e8ce300097bb638",
269
"name": "Chairs",
270
"level": 2
271
},
272
{
273
"id": "60c6983e9e8ce300097bb639",
274
"name": "Task Chairs",
275
"level": 3
276
},
277
{
278
"id": "60c6983a9e8ce300097bb61d",
279
"name": "Furniture",
280
"level": 3
281
}
282
],
283
"children": []
284
},
285
{
286
"id": "60c6983a9e8ce300097bb61e",
287
"name": "Living",
288
"attributes": [],
289
"children": [
290
{
291
"id": "60c6983a9e8ce300097bb61f",
292
"name": "Lounge Chair",
293
"attributes": [],
294
"breadcrumbs": [
295
{
296
"id": "60c698280567a40009a72d1f",
297
"name": "New Hierarchy 6",
298
"level": 0
299
},
300
{
301
"id": "60c698369e8ce300097bb60c",
302
"name": "Bedding",
303
"level": 1
304
},
305
{
306
"id": "60c698369e8ce300097bb60d",
307
"name": "Sub",
308
"level": 2
309
},
310
{
311
"id": "60c6983e9e8ce300097bb638",
312
"name": "Chairs",
313
"level": 2
314
},
315
{
316
"id": "60c6983e9e8ce300097bb639",
317
"name": "Task Chairs",
318
"level": 3
319
},
320
{
321
"id": "60c6983a9e8ce300097bb61d",
322
"name": "Furniture",
323
"level": 3
324
},
325
{
326
"id": "60c6983a9e8ce300097bb61e",
327
"name": "Living",
328
"level": 4
329
}
330
],
331
"children": []
332
},
333
{
334
"id": "60c6983a9e8ce300097bb620",
335
"name": "Sectional",
336
"attributes": [],
337
"breadcrumbs": [
338
{
339
"id": "60c698280567a40009a72d1f",
340
"name": "New Hierarchy 6",
341
"level": 0
342
},
343
{
344
"id": "60c698369e8ce300097bb60c",
345
"name": "Bedding",
346
"level": 1
347
},
348
{
349
"id": "60c698369e8ce300097bb60d",
350
"name": "Sub",
351
"level": 2
352
},
353
{
354
"id": "60c6983e9e8ce300097bb638",
355
"name": "Chairs",
356
"level": 2
357
},
358
{
359
"id": "60c6983e9e8ce300097bb639",
360
"name": "Task Chairs",
361
"level": 3
362
},
363
{
364
"id": "60c6983a9e8ce300097bb61d",
365
"name": "Furniture",
366
"level": 3
367
},
368
{
369
"id": "60c6983a9e8ce300097bb61e",
370
"name": "Living",
371
"level": 4
372
}
373
],
374
"children": []
375
},
376
{
377
"id": "60c6983a9e8ce300097bb622",
378
"name": "Sofas",
379
"attributes": [],
380
"breadcrumbs": [
381
{
382
"id": "60c698280567a40009a72d1f",
383
"name": "New Hierarchy 6",
384
"level": 0
385
},
386
{
387
"id": "60c698369e8ce300097bb60c",
388
"name": "Bedding",
389
"level": 1
390
},
391
{
392
"id": "60c698369e8ce300097bb60d",
393
"name": "Sub",
394
"level": 2
395
},
396
{
397
"id": "60c6983e9e8ce300097bb638",
398
"name": "Chairs",
399
"level": 2
400
},
401
{
402
"id": "60c6983e9e8ce300097bb639",
403
"name": "Task Chairs",
404
"level": 3
405
},
406
{
407
"id": "60c6983a9e8ce300097bb61d",
408
"name": "Furniture",
409
"level": 3
410
},
411
{
412
"id": "60c6983a9e8ce300097bb61e",
413
"name": "Living",
414
"level": 4
415
}
416
],
417
"children": []
418
}
419
],
420
"breadcrumbs": [
421
{
422
"id": "60c698280567a40009a72d1f",
423
"name": "New Hierarchy 6",
424
"level": 0
425
},
426
{
427
"id": "60c698369e8ce300097bb60c",
428
"name": "Bedding",
429
"level": 1
430
},
431
{
432
"id": "60c698369e8ce300097bb60d",
433
"name": "Sub",
434
"level": 2
435
},
436
{
437
"id": "60c6983e9e8ce300097bb638",
438
"name": "Chairs",
439
"level": 2
440
},
441
{
442
"id": "60c6983e9e8ce300097bb639",
443
"name": "Task Chairs",
444
"level": 3
445
},
446
{
447
"id": "60c6983a9e8ce300097bb61d",
448
"name": "Furniture",
449
"level": 3
450
}
451
]
452
},
453
{
454
"id": "60c6983a9e8ce300097bb623",
455
"name": "Dinning",
456
"attributes": [],
457
"breadcrumbs": [
458
{
459
"id": "60c698280567a40009a72d1f",
460
"name": "New Hierarchy 6",
461
"level": 0
462
},
463
{
464
"id": "60c698369e8ce300097bb60c",
465
"name": "Bedding",
466
"level": 1
467
},
468
{
469
"id": "60c698369e8ce300097bb60d",
470
"name": "Sub",
471
"level": 2
472
},
473
{
474
"id": "60c6983e9e8ce300097bb638",
475
"name": "Chairs",
476
"level": 2
477
},
478
{
479
"id": "60c6983e9e8ce300097bb639",
480
"name": "Task Chairs",
481
"level": 3
482
},
483
{
484
"id": "60c6983a9e8ce300097bb61d",
485
"name": "Furniture",
486
"level": 3
487
},
488
{
489
"id": "60c6983a9e8ce300097bb61e",
490
"name": "Living",
491
"level": 4
492
}
493
],
494
"children": []
495
}
496
],
497
"breadcrumbs": [
498
{
499
"id": "60c698280567a40009a72d1f",
500
"name": "New Hierarchy 6",
501
"level": 0
502
},
503
{
504
"id": "60c698369e8ce300097bb60c",
505
"name": "Bedding",
506
"level": 1
507
},
508
{
509
"id": "60c698369e8ce300097bb60d",
510
"name": "Sub",
511
"level": 2
512
},
513
{
514
"id": "60c6983e9e8ce300097bb638",
515
"name": "Chairs",
516
"level": 2
517
},
518
{
519
"id": "60c6983e9e8ce300097bb639",
520
"name": "Task Chairs",
521
"level": 3
522
}
523
]
524
}
525
]
526
}
Copied!
Error Code: 401
Message: Unauthorized
Description: You will see this error when the Authorization (JWT token from the Login APIs) is not valid.
1
{
2
"code": "INVALID_AUTHORIZATION_TOKEN",
3
"message": "Invalid Authorization Token"
4
}
Copied!

Change Log

    June - 2021 First Updated
Last modified 3mo ago
Copy link
Contents
Change Log