Category List
This page describes the request data identifiers and response structure required to build a category list page.
Data Identifier
{
"dataID": "GET_CATEGORY_LIST",
"page": 1,
"list_per_page": 20,
"block_per_page": 5,
"parent_seq": 1,
"status": "ACTIVE",
"search_keyword": ""
}
| Key | Description |
|---|---|
| dataID | Data identifier GET_CATEGORY_LIST |
| page | Page number. Leave empty to get every row without paging. |
| list_per_page | Rows per page (default 20) |
| block_per_page | Page links per block (default 7) |
| parent_seq | Only the direct children of this category. Empty = all categories. |
| status | Status filter ACTIVE / INACTIVE |
| search_keyword | Partial match on name |
| tree | Y also returns category_tree: every category ordered depth-first. |
| seq | Category being edited. Used to fill exclude_parent_seq |
HTML
<div class="card shadow-sm">
<div class="card-header d-flex justify-content-between align-items-center">
<strong>Categories</strong>
<span class="badge bg-secondary">{{ output.total_count }} total</span>
</div>
<table class="table table-hover mb-0 align-middle">
<thead class="table-light">
<tr><th>#</th><th>Code</th><th>Name</th><th>Depth</th><th>Order</th><th>Status</th></tr>
</thead>
<tbody>
<tr v-for="row in output.category_list">
<td>{{ row.seq }}</td>
<td><code>{{ row.code }}</code></td>
<td>{{ row.name }}</td>
<td>{{ row.depth }}</td>
<td>{{ row.sort_order }}</td>
<td><span class="badge bg-success">{{ row.status }}</span></td>
</tr>
</tbody>
</table>
</div>
Response Result
{
"search_keyword": "",
"pagination": {
"total_result_num": 2,
"total_page_num": 1,
"page": "1",
"start_page": 1,
"end_page": 1,
"prev_page": 1,
"next_page": 1
},
"category_list": [
{
"seq": 2,
"parent_seq": 1,
"code": "TSHIRTS",
"name": "T-Shirts",
"depth": 1,
"sort_order": 1,
"status": "ACTIVE",
"extra_data": null,
"created_by": 3,
"updated_by": 3,
"create_date": "2026-10-04 11:57:33",
"modify_date": null,
"delete_flg": "N"
},
{
"seq": 3,
"parent_seq": 1,
"code": "HOODIES",
"name": "Hoodies",
"depth": 1,
"sort_order": 2,
"status": "ACTIVE",
"extra_data": null,
"created_by": 3,
"updated_by": 3,
"create_date": "2026-10-04 11:57:33",
"modify_date": null,
"delete_flg": "N"
}
],
"total_count": 2,
"total_category_count": 2,
"exclude_parent_seq": []
}
| Key | Description |
|---|---|
| search_keyword | Search keyword that was applied |
| pagination | Paging info (when page is sent) |
| category_list | Categories, ordered by sort_order then seq |
| category_list[n].seq | Category number (number) |
| category_list[n].parent_seq | Parent category number. null for a root |
| category_list[n].code | Category code |
| category_list[n].name | Category name |
| category_list[n].depth | Depth. 0 for a root |
| category_list[n].sort_order | Order among siblings |
| category_list[n].status | ACTIVE / INACTIVE |
| category_list[n].create_date | Created at |
| category_list[n].modify_date | Modified at. null if never modified |
| total_count | Total rows matching the filter |
| total_category_count | Same as total_count (kept for older clients) |
| category_tree | Only when tree=Y. Every category, flattened depth-first |
| exclude_parent_seq | With seq: that category and its descendants. Otherwise [] |
- On an edit screen, send seq to get that category and its descendants in exclude_parent_seq. Remove them from the parent picker to prevent loops.
- Screen example: for a storefront side menu, call once with status=ACTIVE and no parent_seq, then group rows by parent_seq. Pass parent_seq when you only need one submenu.
- When a category is clicked, pass its seq as category_seq to GET_PRODUCT_LIST to show its products.
- Error codes — errors also come back as HTTP 200. Check result:false, then error_code (string) and error_message.
- This read API needs no sign-in. With no match it returns an empty array and total_count 0.
Example
<script setup>
const requestData = {"dataID": "GET_CATEGORY_LIST", "page": 1, "list_per_page": 20, "parent_seq": 1, "status": "ACTIVE"};
const { output } = await useNuxtApp().$connector(requestData);
</script>
<template>
<div class="card shadow-sm">
<div class="card-header d-flex justify-content-between align-items-center">
<strong>Categories</strong>
<span class="badge bg-secondary">{{ output.total_count }} total</span>
</div>
<table class="table table-hover mb-0 align-middle">
<thead class="table-light">
<tr><th>#</th><th>Code</th><th>Name</th><th>Depth</th><th>Order</th><th>Status</th></tr>
</thead>
<tbody>
<tr v-for="row in output.category_list" :key="row.seq">
<td>{{ row.seq }}</td>
<td><code>{{ row.code }}</code></td>
<td>{{ row.name }}</td>
<td>{{ row.depth }}</td>
<td>{{ row.sort_order }}</td>
<td><span class="badge bg-success">{{ row.status }}</span></td>
</tr>
</tbody>
</table>
</div>
</template>
<?php
$requestData = [
'dataID' => 'GET_CATEGORY_LIST',
'page' => 1,
'list_per_page' => 20,
'parent_seq' => 1, // children of "Apparel"
'status' => 'ACTIVE',
];
$output = $connector->request($requestData);
?>
<table class="table table-hover align-middle">
<thead><tr><th>#</th><th>Code</th><th>Name</th><th>Order</th><th>Status</th></tr></thead>
<tbody>
<?php foreach ($output['category_list'] as $row) { ?>
<tr>
<td><?= $row['seq'] ?></td>
<td><code><?= htmlspecialchars($row['code']) ?></code></td>
<td><?= htmlspecialchars($row['name']) ?></td>
<td><?= $row['sort_order'] ?></td>
<td><span class="badge bg-success"><?= $row['status'] ?></span></td>
</tr>
<?php } ?>
</tbody>
</table>
<p class="text-secondary">Total: <?= $output['total_count'] ?></p>
User Discussions
ADD- There are no posts yet.