OBAPI OBAPI

Categories

Shared classification and tagging system. Categories can be applied to multiple object types.

Endpoints

  • GET /obapi/v1/categories -- list
  • GET /obapi/v1/categories/{id} -- single

Parameters

page, per_page, type, parent_id, sort

Category types

Value Description
product Product categories
thirdparty Third-party categories
contact Contact categories
member Member categories
project Project categories

Response (list)

{
    "items": [
        {
            "id": "10",
            "label": "Electronics",
            "type": "product",
            "parent_label": "",
            "color": "#3498DB"
        },
        {
            "id": "11",
            "label": "Sensors",
            "type": "product",
            "parent_label": "Electronics",
            "color": "#2ECC71"
        },
        {
            "id": "20",
            "label": "Key accounts",
            "type": "thirdparty",
            "parent_label": "",
            "color": "#E74C3C"
        }
    ],
    "pagination": { "..." }
}

Response (single)

{
    "category": {
        "id": "11",
        "label": "Sensors",
        "description": "Electronic sensors and probes",
        "color": "#2ECC71",
        "type": "product",
        "parent_id": "10",
        "parent_label": "Electronics"
    }
}

Notes

  • Categories support hierarchy via parent_id.
  • color is a hex color code for UI display.
  • Use type parameter to filter categories by object type.