Getting All Categories
Endpoint: GET /admin/categories
Purpose
The GET /admin/categories
API retrieves the complete list of product categories in the system, giving administrators full visibility and control. Unlike public-facing endpoints, this admin API returns all categories, including those marked as hidden, restricted, or password-protected, regardless of customer visibility settings or availability status. It enables administrators to efficiently manage the category hierarchy, adjust visibility rules, and organize product groupings to optimize the browsing experience for various customer segments and business needs.
Path Parameters
No path parameters for this endpoint.
Query Parameters
Parameter | Type | Description |
---|---|---|
limit | Integer | Number of products per request. |
offset | Integer | Starting point for pagination. |
order_by | String | Field to sort results by. |
direction | String | Sort order by ascending or descending. |
Use Case
GET /admin/categories
allows administrators to view and manage all categories, even those hidden from regular users. This is essential for organizing inventory, updating category metadata, and maintaining an efficient e-commerce structure without affecting the customer-facing catalog.
Request Body
No data is required for the request body.
Response
The API returns a list of categories with essential details, including category name, SKU, availability status, visibility settings, parent category relationships, SEO metadata, and associated products. GET /admin/categories
provides administrators with a comprehensive view of all categories, including restricted and password-protected ones. The response supports pagination to ensure efficient data retrieval, particularly for large catalogs. Additionally, category details such as layout configurations, product associations, and metadata enhance e-commerce functionality by enabling precise category management and SEO optimization.
{
"categories": [
{
"id": CATEGORY_ID,
"name": "CATEGORY_NAME",
"sku": "CATEGORY_SKU",
"title": "CATEGORY_TITLE",
"heading": "CATEGORY_HEADING",
"url": "CATEGORY_URL",
"available": CATEGORY_AVAILABLE,
"visible": CATEGORY_VISIBLE,
"parent_category": {
"id": PARENT_CATEGORY_ID,
"name": "PARENT_CATEGORY_NAME",
"is_in_trash": PARENT_CATEGORY_IS_IN_TRASH,
"is_parent_in_trash": PARENT_CATEGORY_IS_PARENT_IN_TRASH,
"is_disposable": PARENT_CATEGORY_IS_DISPOSABLE
},
"layout": {},
"product_page": {
"id": PRODUCT_PAGE_ID,
"name": "PRODUCT_PAGE_NAME"
},
"product_layout": {
"id": PRODUCT_LAYOUT_ID,
"name": "PRODUCT_LAYOUT_NAME"
},
"available_on_date_range": AVAILABLE_ON_DATE_RANGE,
"available_from_date": "AVAILABLE_FROM_DATE",
"available_to_date": "AVAILABLE_TO_DATE",
"available_for": "AVAILABLE_FOR",
"selected_categories": [],
"password_protected": PASSWORD_PROTECTED,
"password": "PASSWORD",
"image_url": IMAGE_URL,
"background_image_url": BACKGROUND_IMAGE_URL,
"summary": "CATEGORY_SUMMARY",
"description": "CATEGORY_DESCRIPTION",
"products": [
{
"id": PRODUCT_ID,
"name": "PRODUCT_NAME"
}
],
"shipping_profile": {},
"tax_profile": {},
"disable_tracking": DISABLE_TRACKING,
"seo_configs": [],
"transaction_no": TRANSACTION_NO,
"is_disposable": IS_DISPOSABLE,
"is_in_trash": IS_IN_TRASH,
"is_parent_in_trash": IS_PARENT_IN_TRASH,
"created_by": {},
"created_on": "CREATED_ON_TIMESTAMP",
"updated_on": "UPDATED_ON_TIMESTAMP"
}
],
"pagination": {
"records": PAGINATION_RECORDS,
"limit": PAGINATION_LIMIT,
"offset": PAGINATION_OFFSET,
"previous_page": "PREVIOUS_PAGE_URL",
"next_page": "NEXT_PAGE_URL"
}
}
Getting Specific Category
Endpoints: GET /admin/categories/{category_id}
Purpose
The GET /admin/categories/{category_id}
API returns comprehensive details about any category in the system, including those that are hidden, restricted, or password-protected. This endpoint is designed for administrators, providing full access to category data such as its name, status, associated products, metadata, and internal settings. It supports effective category management, enables updates to category information, and helps maintain the overall organization and structure of the store.
Path Parameters
Field | Type | Description |
---|---|---|
category_id | integer | The unique identifier of the category. |
Query Parameters
This endpoint does not have any query parameters.
Use Case
The GET /admin/categories/{category_id}
API allows administrators to access the full details of any category in the system, including those hidden or restricted from customers. It provides complete visibility into category settings, metadata, and associated products, enabling administrators to manage configurations, update information, and organize product listings efficiently for optimal store management.
Request Body
No data is required for the request body.
Response
The GET /admin/categories/{category_id}
API returns full category details, including the name, SKU, availability, parent category, associated products, metadata, hidden settings, password protection, and internal management fields. Unlike the customer-facing GET /categories/{id}, which exposes only publicly available data, this admin endpoint provides administrators with complete access to all category information for effective management and backend control.
{
"category": {
"id": CATEGORY_ID,
"name": "CATEGORY_NAME",
"sku": "CATEGORY_SKU",
"title": "CATEGORY_TITLE",
"heading": "CATEGORY_HEADING",
"url": "CATEGORY_URL",
"available": CATEGORY_AVAILABLE,
"visible": CATEGORY_VISIBLE,
"parent_category": {
"id": PARENT_CATEGORY_ID,
"name": "PARENT_CATEGORY_NAME",
"is_in_trash": PARENT_CATEGORY_IS_IN_TRASH,
"is_parent_in_trash": PARENT_CATEGORY_IS_PARENT_IN_TRASH,
"is_disposable": PARENT_CATEGORY_IS_DISPOSABLE
},
"layout": {},
"product_page": {
"id": PRODUCT_PAGE_ID,
"name": "PRODUCT_PAGE_NAME"
},
"product_layout": {
"id": PRODUCT_LAYOUT_ID,
"name": "PRODUCT_LAYOUT_NAME"
},
"available_on_date_range": AVAILABLE_ON_DATE_RANGE,
"available_from_date": "AVAILABLE_FROM_DATE",
"available_to_date": "AVAILABLE_TO_DATE",
"available_for": "AVAILABLE_FOR",
"selected_categories": [],
"password_protected": PASSWORD_PROTECTED,
"password": "PASSWORD",
"image_url": IMAGE_URL,
"background_image_url": BACKGROUND_IMAGE_URL,
"summary": "CATEGORY_SUMMARY",
"description": "CATEGORY_DESCRIPTION",
"products": [
{
"id": PRODUCT_ID,
"name": "PRODUCT_NAME"
}
],
"shipping_profile": {},
"tax_profile": {},
"disable_tracking": DISABLE_TRACKING,
"seo_configs": [],
"transaction_no": TRANSACTION_NO,
"is_disposable": IS_DISPOSABLE,
"is_in_trash": IS_IN_TRASH,
"is_parent_in_trash": IS_PARENT_IN_TRASH,
"created_by": {},
"created_on": "CREATED_ON_TIMESTAMP",
"updated_on": "UPDATED_ON_TIMESTAMP"
}
}