Treez Custom Subcategory API

The Custom Subcategory API from Treez — 1 operation(s) for custom subcategory.

Operations 4

GET /{ver}/custom-subcategory Custom Subcategories - Read #
POST /{ver}/custom-subcategory Custom Subcategories - Create #
PATCH /{ver}/custom-subcategory Custom Subcategories - Update #
DELETE /{ver}/custom-subcategory Custom Subcategories - Delete #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/treez-custom-subcategory-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

treez-custom-subcategory-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: catalog Custom Subcategory API
  version: 3.1.0
servers:
- url: https://api-prod.treez.io/service/catalog
security:
- {}
tags:
- name: Custom Subcategory
paths:
  /{ver}/custom-subcategory:
    get:
      summary: Custom Subcategories - Read
      description: Returns the organization's live custom subcategories, each enriched with the global subcategory and category it maps to. All records are returned when `ids` is omitted. For building a picker, prefer Subcategories - Resolved Read.
      operationId: catalog-categories-read-1-1-1
      parameters:
      - name: ids
        in: query
        description: (optional) The `id` GUID(s) of the custom subcategories to return. Repeat the parameter for multiple ids (`?ids=a&ids=b`). Exclude to return all values.
        schema:
          type: array
          items:
            type: string
      - in: path
        name: ver
        schema:
          type: string
          default: v3
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                  - id: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                    organizationId: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                    displayName: Disposable
                    productSubCategoryId: a5940bac-4853-46ed-aa04-a6d7eb271623
                    productSubCategoryName: All In One
                    productCategoryId: 8b0d2c4e-6f1a-4b3c-9d7e-2a5f8c1b4d60
                    productCategoryName: Cartridge
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      example: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                    organizationId:
                      type: string
                      example: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                    displayName:
                      type: string
                      example: Disposable
                    productSubCategoryId:
                      type: string
                      example: a5940bac-4853-46ed-aa04-a6d7eb271623
                    productSubCategoryName:
                      type: string
                      example: All In One
                    productCategoryId:
                      type: string
                      example: 8b0d2c4e-6f1a-4b3c-9d7e-2a5f8c1b4d60
                    productCategoryName:
                      type: string
                      example: Cartridge
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    message: Event Schema Validation Failed
                    errorType: Validation
                    errorMsgs:
                    - '"productSubCategoryId" must be a valid GUID'
                    - '"productSubCategoryId" must be a valid GUID'
                    failed:
                    - entity:
                        key_0: 4708.6358186846
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                    - entity:
                        key_0: string
                        key_1: false
                        key_2: 9514.105203063558
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                        key_2:
                          code: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
                        key_3:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                        key_4:
                          code: CUSTOM_SUBCATEGORY_IN_USE
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Event Schema Validation Failed
                  errorType:
                    type: string
                    example: Validation
                  errorMsgs:
                    type: array
                    items:
                      type: string
                      example: '"productSubCategoryId" must be a valid GUID'
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        entity:
                          type: object
                          properties:
                            key_0:
                              type: number
                              example: 4708.6358186846
                              default: 0
                        errors:
                          type: array
                          items:
                            type: string
                            example: string
                        errorDetails:
                          type: object
                          properties:
                            key_0:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                            key_1:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
      x-internal: false
      tags:
      - Custom Subcategory
    post:
      summary: Custom Subcategories - Create
      description: Creates one or more custom subcategories for the organization. Each custom maps to exactly one global subcategory (`productSubCategoryId`), which is fixed at create. Creating a custom hides (shadows) its global subcategory from the product picker; the custom's `displayName` shows instead. `displayName` must be unique within the category, case-insensitive, against every global subcategory name and the org's other customs. It may match the name of the global subcategory it maps to, but no other. Requires the Catalog Management - Custom Subcategories feature to be enabled for the organization.
      operationId: catalog-categories-read-1-1-1-2
      parameters:
      - in: path
        name: ver
        schema:
          type: string
          default: v3
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                        organizationId:
                          type: string
                          example: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                        displayName:
                          type: string
                          example: Disposable
                        productSubCategoryId:
                          type: string
                          example: a5940bac-4853-46ed-aa04-a6d7eb271623
              examples:
                OK:
                  summary: OK
                  value:
                    data:
                    - id: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                      organizationId: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                      displayName: Disposable
                      productSubCategoryId: a5940bac-4853-46ed-aa04-a6d7eb271623
        '206':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties: {}
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        entity:
                          type: object
                          properties:
                            displayName:
                              type: string
                              example: Gummy
                            productSubCategoryId:
                              type: string
                              example: f6e25c9a-27f3-41a7-9037-b5e0c2f3e652
                        errors:
                          type: array
                          items:
                            type: string
                            example: Custom subcategory name cannot match a Treez subcategory name
              examples:
                Partial Content:
                  summary: Partial Content
                  value:
                    data: []
                    failed:
                    - entity:
                        displayName: Gummy
                        productSubCategoryId: f6e25c9a-27f3-41a7-9037-b5e0c2f3e652
                      errors:
                      - Custom subcategory name cannot match a Treez subcategory name
          description: Partial Content
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Event Schema Validation Failed
                  errorType:
                    type: string
                    example: Validation
                  errorMsgs:
                    type: array
                    items:
                      type: string
                      example: '"productSubCategoryId" must be a valid GUID'
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        entity:
                          type: object
                          properties:
                            key_0:
                              type: number
                              example: 4708.6358186846
                              default: 0
                        errors:
                          type: array
                          items:
                            type: string
                            example: string
                        errorDetails:
                          type: object
                          properties:
                            key_0:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                            key_1:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
              examples:
                Bad Request:
                  summary: Bad Request
                  value:
                    message: Event Schema Validation Failed
                    errorType: Validation
                    errorMsgs:
                    - '"productSubCategoryId" must be a valid GUID'
                    - '"productSubCategoryId" must be a valid GUID'
                    failed:
                    - entity:
                        key_0: 4708.6358186846
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                    - entity:
                        key_0: string
                        key_1: false
                        key_2: 9514.105203063558
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                        key_2:
                          code: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
                        key_3:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                        key_4:
                          code: CUSTOM_SUBCATEGORY_IN_USE
      x-internal: false
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  displayName:
                    type: string
                  productSubCategoryId:
                    type: string
                required:
                - displayName
                - productSubCategoryId
      tags:
      - Custom Subcategory
    patch:
      summary: Custom Subcategories - Update
      description: Renames one or more custom subcategories. `displayName` is the only mutable field; the global subcategory a custom maps to cannot be changed. The same uniqueness rules as create apply, and keeping the current name is allowed. Requires the `Catalog Management - Custom Subcategories` feature to be enabled for the organization.
      operationId: catalog-categories-read-1-1-1-2-1
      parameters:
      - in: path
        name: ver
        schema:
          type: string
          default: v3
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                        organizationId:
                          type: string
                          example: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                        displayName:
                          type: string
                          example: Disposable
                        productSubCategoryId:
                          type: string
                          example: a5940bac-4853-46ed-aa04-a6d7eb271623
              examples:
                OK:
                  summary: OK
                  value:
                    data:
                    - id: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                      organizationId: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                      displayName: Disposable
                      productSubCategoryId: a5940bac-4853-46ed-aa04-a6d7eb271623
        '206':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                        organizationId:
                          type: string
                          example: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                        displayName:
                          type: string
                          example: Disposable
                        productSubCategoryId:
                          type: string
                          example: a5940bac-4853-46ed-aa04-a6d7eb271623
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        entity:
                          type: object
                          properties:
                            key_0:
                              type: integer
                              example: 7670
                              default: 0
                        errors:
                          type: array
                          items:
                            type: string
                            example: string
                        errorDetails:
                          type: object
                          properties:
                            key_0:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
              examples:
                Partial Content:
                  summary: Partial Content
                  value:
                    data:
                    - id: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                      organizationId: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                      displayName: Disposable
                      productSubCategoryId: a5940bac-4853-46ed-aa04-a6d7eb271623
                    - id: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                      organizationId: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                      displayName: Disposable
                      productSubCategoryId: a5940bac-4853-46ed-aa04-a6d7eb271623
                    failed:
                    - entity:
                        key_0: 7670
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
                    - entity:
                        key_0: 3306.947577323918
                        key_1: false
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
                        key_2:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
          description: Partial Content
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Event Schema Validation Failed
                  errorType:
                    type: string
                    example: Validation
                  errorMsgs:
                    type: array
                    items:
                      type: string
                      example: '"productSubCategoryId" must be a valid GUID'
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        entity:
                          type: object
                          properties:
                            key_0:
                              type: number
                              example: 4708.6358186846
                              default: 0
                        errors:
                          type: array
                          items:
                            type: string
                            example: string
                        errorDetails:
                          type: object
                          properties:
                            key_0:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                            key_1:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
              examples:
                Bad Request:
                  summary: Bad Request
                  value:
                    message: Event Schema Validation Failed
                    errorType: Validation
                    errorMsgs:
                    - '"productSubCategoryId" must be a valid GUID'
                    - '"productSubCategoryId" must be a valid GUID'
                    failed:
                    - entity:
                        key_0: 4708.6358186846
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                    - entity:
                        key_0: string
                        key_1: false
                        key_2: 9514.105203063558
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                        key_2:
                          code: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
                        key_3:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                        key_4:
                          code: CUSTOM_SUBCATEGORY_IN_USE
      x-internal: false
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  displayName:
                    type: string
                  productSubCategoryId:
                    type: string
                required:
                - displayName
                - productSubCategoryId
      tags:
      - Custom Subcategory
    delete:
      summary: Custom Subcategories - Delete
      description: 'Soft-deletes one or more custom subcategories. A custom that is still assigned to products is rejected with a structured `CUSTOM_SUBCATEGORY_IN_USE` error; reassign those products first (Product - Update with a new `customSubCategoryId`, or `customSubCategoryId: null`). Deleting the last custom over a global subcategory makes that global subcategory visible in the picker again. Requires the Catalog Management - Custom Subcategories feature to be enabled for the organization.'
      operationId: catalog-categories-read-1-1-1-2-1-1
      parameters:
      - in: path
        name: ver
        schema:
          type: string
          default: v3
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                        organizationId:
                          type: string
                          example: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                        displayName:
                          type: string
                          example: Disposable
                        productSubCategoryId:
                          type: string
                          example: a5940bac-4853-46ed-aa04-a6d7eb271623
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        entity:
                          type: object
                          properties:
                            key_0:
                              type: integer
                              example: 7670
                              default: 0
                        errors:
                          type: array
                          items:
                            type: string
                            example: string
                        errorDetails:
                          type: object
                          properties:
                            key_0:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
              examples:
                OK:
                  summary: OK
                  value:
                    data:
                    - id: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                      organizationId: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                      displayName: Disposable
                      productSubCategoryId: a5940bac-4853-46ed-aa04-a6d7eb271623
                    - id: c1f4a6d2-3b7e-4c1a-9e2f-5d8b7a6c4e10
                      organizationId: b1226d0b-4940-4edf-aab3-dbd1642f7f69
                      displayName: Disposable
                      productSubCategoryId: a5940bac-4853-46ed-aa04-a6d7eb271623
                    failed:
                    - entity:
                        key_0: 7670
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
                    - entity:
                        key_0: 3306.947577323918
                        key_1: false
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
                        key_2:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
        '206':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties: {}
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        entity:
                          type: object
                          properties:
                            displayName:
                              type: string
                              example: Gummy
                            productSubCategoryId:
                              type: string
                              example: f6e25c9a-27f3-41a7-9037-b5e0c2f3e652
                        errors:
                          type: array
                          items:
                            type: string
                            example: Custom subcategory name cannot match a Treez subcategory name
              examples:
                Partial Content:
                  summary: Partial Content
                  value:
                    data: []
                    failed:
                    - entity:
                        displayName: Gummy
                        productSubCategoryId: f6e25c9a-27f3-41a7-9037-b5e0c2f3e652
                      errors:
                      - Custom subcategory name cannot match a Treez subcategory name
          description: Partial Content
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Event Schema Validation Failed
                  errorType:
                    type: string
                    example: Validation
                  errorMsgs:
                    type: array
                    items:
                      type: string
                      example: '"productSubCategoryId" must be a valid GUID'
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        entity:
                          type: object
                          properties:
                            key_0:
                              type: number
                              example: 4708.6358186846
                              default: 0
                        errors:
                          type: array
                          items:
                            type: string
                            example: string
                        errorDetails:
                          type: object
                          properties:
                            key_0:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                            key_1:
                              type: object
                              properties:
                                code:
                                  type: string
                                  example: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
              examples:
                Bad Request:
                  summary: Bad Request
                  value:
                    message: Event Schema Validation Failed
                    errorType: Validation
                    errorMsgs:
                    - '"productSubCategoryId" must be a valid GUID'
                    - '"productSubCategoryId" must be a valid GUID'
                    failed:
                    - entity:
                        key_0: 4708.6358186846
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                    - entity:
                        key_0: string
                        key_1: false
                        key_2: 9514.105203063558
                      errors:
                      - string
                      - string
                      errorDetails:
                        key_0:
                          code: SUB_CATEGORY_EXCLUSION_ALREADY_EXCLUDED
                        key_1:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                        key_2:
                          code: SUB_CATEGORY_EXCLUSION_CANONICAL_HAS_CUSTOMS
                        key_3:
                          code: SUB_CATEGORY_EXCLUSION_NOT_EXCLUDED
                        key_4:
                          code: CUSTOM_SUBCATEGORY_IN_USE
      x-internal: false
      requestBody:
        content:
          application/json:
            schema:
              type: array
    

# --- truncated at 32 KB (32 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/treez/refs/heads/main/openapi/treez-custom-subcategory-api-openapi.yml