ATUM REST API

Product categories

ATUM extends the official WC's product categories endpoint (/wp-json/wc/v3/products/categories) with some extra info. You can identify the ATUM data with the corresponding labels.

This page only describes the ATUM additions. For the rest of properties and operations (create, retrieve, update, delete and batch), please check the WooCommerce REST API docs.

Product category properties

These fields are added to every product category returned by the endpoint, along with the WC's properties.

AttributeTypeDescription
is_defaultstringReturns yes for the store's default product category. This field isn't included in the rest of categories. ATUM read-only
barcodestringThe category's barcode. Only included when the ATUM's Barcodes module is enabled and the user that owns the API keys has the atum_view_barcode capability. ATUM read-only

List all product categories

This API helps you to view all the product categories, including the ATUM data.

HTTP request

GET/wp-json/wc/v3/products/categories
curl https://example.com/wp-json/wc/v3/products/categories \
	-u consumer_key:consumer_secret
JSON response example
[
    {
        "id": 15,
        "name": "Clothing",
        "slug": "clothing",
        "parent": 0,
        "description": "",
        "display": "default",
        "image": null,
        "menu_order": 0,
        "count": 12,
        "barcode": "CAT-CLOTHING",
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc/v3/products/categories/15"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc/v3/products/categories"
                }
            ]
        }
    },
    {
        "id": 9,
        "name": "Uncategorized",
        "slug": "uncategorized",
        "parent": 0,
        "description": "",
        "display": "default",
        "image": null,
        "menu_order": 0,
        "count": 3,
        "is_default": "yes",
        "barcode": "",
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc/v3/products/categories/9"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc/v3/products/categories"
                }
            ]
        }
    }
]

The ATUM fields are also included when retrieving, creating, updating or deleting a single category and in the batch responses.

On this page