Update category
Updates an existing category in the Catalog.
/api/v1/categoriesUpdateCategory updates the display name of an existing category in Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid
discovery, and authoritative book metadata.
PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs (PUT /catalog/api/v1/categories) and returns 204 No Content. Callers pass both id and name in the JSON request body rather than as a path parameter.
Overview
| Property | Value |
|---|---|
| Bounded Context | Catalog |
| Owner Service | Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs |
| Protocol / Format | HTTP PUT, application/json request and empty response (204 No Content) |
| Gateway Endpoint | PUT /catalog/api/v1/categories (service path /api/v1/categories) |
| Authentication & Authorization | Microsoft Entra ID JWT — business_user policy (role business_user or admin and scopes catalog_read, catalog_write) |
| Idempotency / Concurrency | Naturally idempotent for repeated requests with the same id and name; no x-request-id header is enforced |
| Rate Limit / Caching | Global concurrency (100) and fixed-window (30 req/min) limiters plus per-user token bucket; invalidates category and book caches |
| Contract Version | 1.0.0 (ApiVersions.V1) |
Request & Response Contract
Request Body (application/json)
Leading and trailing whitespace is trimmed from string properties during deserialization.
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
id | string (uuid) | Yes | Non-empty UUID | Identifier of the category to update |
name | string | Yes | Non-empty, max 50 characters, unique | Replacement display name for the category |
Behavior & Side Effects
- Persistence & uniqueness: Updates the CategoryEntityv1.0.0CategorySingle-level taxonomy classification grouping books by subject or genre within the product catalog.Ownercatalog-experience-teamOpen docs display name; category names are unique-indexed, so renaming to an existing category’s name fails with
500 Internal Server Error. - Cache invalidation: Clears
catalog:categories:v1and invalidatesbookandbooks:listcache tags. - Vector index queueing: Database triggers enqueue all linked book IDs for asynchronous vector embedding refresh by Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs.
Error Responses
| Status / Code | Condition | Client Recovery Action |
|---|---|---|
400 Bad Request | id is empty or invalid UUID, or name is missing, empty, whitespace-only, or exceeds 50 characters | Fix the request body; do not retry unchanged input |
401 Unauthorized | Missing, expired, or invalid Entra ID JWT | Acquire a valid Entra ID access token and retry |
403 Forbidden | Token lacks role business_user or admin, or lacks scopes catalog_read and catalog_write | Request the required Entra ID app role and scopes |
404 Not Found | No category exists with the supplied id | Verify the UUID; do not treat 404 as a completed update |
429 Too Many Requests | Rate limit quota exceeded (Retry-After header included) | Wait for the Retry-After interval before retrying |
500 Internal Server Error | Duplicate name violating the unique constraint or unhandled server error (traceId included) | Check for a conflicting category name and inspect logs using traceId |
Related Documentation
- Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs — Service overview, routing, and authorization policies.
- CategoryEntityv1.0.0CategorySingle-level taxonomy classification grouping books by subject or genre within the product catalog.Ownercatalog-experience-teamOpen docs — Category entity model.
- Create categoryCommandv1.0.0Create categoryCreates a category in the Catalog.Ownercatalog-experience-teamSchemaDiagramOpen docs — Create a new category record.
- Delete categoryCommandv1.0.0Delete categoryDeletes an existing category from the Catalog.Ownercatalog-experience-teamSchemaDiagramOpen docs — Permanently delete a category with no active books.
Update category schema
Payload for updating a category.
not allowedIdentifier of the category to update.
New display name for the category.
1