openapi: 3.2.0 info: title: Happy Buyers External Universal Categories API description: 'External API for Happy Buyers organization metadata and inventory data. Requests are authenticated with an API key in the hca-api-key header. Results are scoped to the organization attached to that key. List endpoints use limit/offset pagination and return totalCount plus hasMore. ' version: v1 servers: - url: https://api.happycabbage.ai description: External API security: - ApiKeyAuth: [] tags: - name: Universal Categories description: Canonical product category metadata across POS systems paths: /external/v1/universal-categories: get: tags: - Universal Categories summary: List universal categories description: Returns canonical product categories. Results are global categories and are available to any authenticated external API key. operationId: getUniversalCategories parameters: - name: limit in: query description: Maximum number of categories to return. Maximum is 100. required: false schema: maximum: 100 minimum: 0 type: integer format: int32 default: 100 example: 100 - name: offset in: query description: Zero-based result offset for pagination. required: false schema: minimum: 0 type: integer format: int32 default: 0 example: 0 - name: search in: query description: Case-insensitive category name or label search text. required: false schema: type: string example: flower - name: sortTarget in: query description: Field to sort by. required: false schema: type: string enum: - LABEL example: LABEL - name: sortDirection in: query description: Sort direction. Prefer ASC or DESC; lowercase values are deprecated aliases. required: false schema: type: string enum: - asc - desc - ASC - DESC - ASC_NULLS_FIRST - ASC_NULLS_LAST - DESC_NULLS_FIRST - DESC_NULLS_LAST example: ASC responses: '401': description: Missing, malformed, or invalid API key '200': description: Paged universal category results content: application/json: schema: $ref: '#/components/schemas/LimitOffsetResponseUniversalCategoryResponse' '400': description: Invalid query parameter components: schemas: LimitOffsetResponseUniversalCategoryResponse: type: object properties: limit: type: integer description: Maximum number of records requested for this page. format: int32 example: 100 offset: type: integer description: Zero-based result offset used for this page. format: int32 example: 0 totalCount: type: integer description: Total number of matching records before pagination is applied. format: int32 example: 250 results: type: array description: Records for the current page. items: $ref: '#/components/schemas/UniversalCategoryResponse' hasMore: type: boolean description: True when more records are available after this page. example: true UniversalCategoryResponse: type: object properties: name: type: string description: Canonical category machine name. example: flower id: type: integer description: Canonical category ID. format: int32 example: 12 label: type: string description: Canonical category display label. example: Flower description: Records for the current page. securitySchemes: ApiKeyAuth: type: apiKey description: External API key issued by Happy Buyers. Send the key in the hca-api-key header. name: hca-api-key in: header