Visit Main Site
Join Partner Program
Login
     
Introduction
Authentication
Documentation
Category
GET
POST
PUT
DELETE
Products
GET
POST
PUT
DELETE
Carts
GET
POST
PATCH
DELETE
Variations
GET
POST
PUT
DELETE
Currency
GET
POST
PUT
DELETE
Tax
Tax Profile
GET
POST
PUT
DELETE
Tax Rule
GET
POST
PUT
DELETE
Tax Code
GET
POST
PUT
DELETE
Tax Zone
GET
POST
PUT
DELETE
Discount
GET
POST
PUT
DELETE
Shipping
Shipping Profile
GET
POST
PUT
DELETE
Shipping Rate
GET
POST
PUT
DELETE
Shipping Rules
GET
POST
PUT
DELETE
Customer
GET
POST
PUT
DELETE
Orders
GET
POST
PATCH
Blog
GET
POST
PUT
DELETE
Settings
GET
» Category PUT API Documentation

Updating a Specific Category

Endpoint:   PUT /admin/categories/{category_id}

Purpose

The PUT/admin/categories/{category_id} API allows administrators to update existing product categories with modified attributes such as availability, visibility, SEO configurations, and product associations. This API helps ensure that category details remain accurate and aligned with business needs, enabling updates to category names, product relationships, access restrictions, and marketing settings. The ability to modify metadata, analytics configurations, and sorting preferences allows for a flexible approach to category management.

Path Parameters

Field
Type
Description
category_id
integer
The unique identifier of the categories

Query Parameters 

This endpoint does not have any query parameters.

Use Case

Administrators use PUT/admin/categories/{category_id} to update product categories when changes are needed due to seasonal promotions, marketing adjustments, or modifications in product offerings. This API allows businesses to refine category settings, update customer access permissions, and modify SEO attributes to improve search rankings. Additionally, updates to analytics tracking, protection settings, and availability details enable more precise control over category visibility and customer targeting.

Request Body

Parameter Type Description
name string The name of the category.
availability boolean Indicates whether the category is currently available or active.
available_for string / enum Specifies who the category is available for (e.g., customer, selected).
products array / object List of products associated with the category, including their details.
JSON
"category": {
    "name": "CATEGORY_NAME",
    "title": "CATEGORY_TITLE",
    "heading": "CATEGORY_HEADING",
    "parent_category": { "id": "PARENT_CATEGORY_ID" },
    "layout": { "id": "LAYOUT_ID" },
    "product_page": { "id": "PRODUCT_PAGE_ID" },
    "product_layout": { "id": "PRODUCT_LAYOUT_ID" },
    "available": true,
    "available_on_date_range": true,
    "available_from_date": "AVAILABLE_FROM_DATE",
    "available_to_date": "AVAILABLE_TO_DATE",
    "available_for": "AVAILABLE_FOR",
    "available_selected_categories": [
        "CATEGORY_ID_1",
        "CATEGORY_ID_2"
    ],
    "password_protected": true,
    "password": "CATEGORY_PASSWORD",
    "summary": "SUMMARY",
    "description": "DESCRIPTION",
    "products": [
        "PRODUCT_ID_1",
        "PRODUCT_ID_2",
        "PRODUCT_ID_3",
        "PRODUCT_ID_4",
        "PRODUCT_ID_5"
    ],
    "shipping_profile": { "id": "SHIPPING_PROFILE_ID" },
    "tax_profile": { "id": "TAX_PROFILE_ID" },
    "disable_tracking": true
}

Response

The API returns the updated category object, confirming that modifications have been successfully applied. The response includes key attributes such as category name, SKU, availability status, parent category details, SEO metadata, and access control settings. It also reflects changes to product associations, tax and shipping profiles, and analytics configurations. The updated timestamp ensures administrators can track modifications, making it easier to manage category updates and maintain an optimized product catalog.

PUT
https://{your_site_domain}/api/v4/admin/categories/{category_id}
Try It Out
JSON
{
    "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": IMAGE_BACKGROUND_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"
    }
}
Terms and Conditions
Privacy Policy

© 2024 WebCommander | All Rights Reserved

contact@webcommander.com
1300 797 571

WebCommander
About Us
Features
Pricing
Compare
Partners
Contact Us
Resource
Find a Partner
Help Centre
Community
Blog
Solutions
Inventory Management
Omnichannel Sales
Ecommerce Automation
B2B Ecommerce
Headless Commerce
Website Design and Performance