Get books over gRPC
Returns multiple Catalog books by identifier through the book.v1 gRPC contract.
GetBooksGrpc invokes the internal book.v1.BookGrpcService/GetBooks gRPC unary RPC on 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 to fetch compact commercial summaries (ID, name, price, sale price, and stock status) for multiple books in a single round trip. Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets,
Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs calls this RPC to enrich basket items on read, and Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle,
creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs calls it during checkout and order detail enrichment.
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 | gRPC unary RPC (book.v1.BookGrpcService/GetBooks), Protobuf edition = "2023" |
| Gateway Endpoint | Internal gRPC RPC book.v1.BookGrpcService/GetBooks (not exposed via API Gateway) |
| Authentication & Authorization | Internal service-to-service anonymous read |
| Idempotency / Concurrency | Read-only and naturally idempotent |
| Rate Limit / Caching | Deduplicates book_ids, resolves hits per ID in L1 + Redis L2, and batch-queries PostgreSQL only for misses |
| Contract Version | 1.0.0 |
GetBooks silently omits unknown book IDs rather than returning NotFound, and returns an empty GetBooksResponse when book_ids is empty. Callers must reconcile returned books against requested book_ids.
Request & Response Contract
Request Message (GetBooksRequest)
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
book_ids | string[] (uuid[]) | Yes | Tag 1 (repeated); valid UUIDs | List of book UUIDs to fetch (deduplicated server-side) |
Success Response (GetBooksResponse)
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
books | GetBookResponse[] | Yes | Tag 1 (repeated) | Matched book summaries in deduplicated request order |
books[].id | string (uuid) | Yes | Tag 1 | Book UUID |
books[].name | string | Yes | Tag 2 | Book title |
books[].price | DecimalValue | Yes | Tag 3 (int64 units, sfixed32 nanos) | Regular unit price |
books[].price_sale | DecimalValue | No | Tag 4 (omitted when no sale applies) | Promotional sale price |
books[].status | BookStatus | Yes | Tag 5 (BOOK_STATUS_IN_STOCK = 1, BOOK_STATUS_OUT_OF_STOCK = 2) | Current stock availability status |
Behavior & Side Effects
- Per-ID cache batching: Resolves cached book summaries first and batch-queries PostgreSQL only for cache misses, populating cache entries for subsequent reads.
- No state mutation: Pure read RPC with no database writes or integration events.
Error Responses
| Status / Code | Condition | Client Recovery Action |
|---|---|---|
Unknown (2) | Any entry in book_ids is not a valid UUID | Validate all UUIDs before calling |
Unavailable (14) | Catalog API is unreachable | Retry within the budgeted resilience policy |
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, persistence, and gRPC services.
- BookEntityv1.0.0BookCanonical sellable title in the product catalog, encapsulating descriptive metadata, pricing, stock availability, taxono...Ownercatalog-experience-teamOpen docs — Book entity model.
- Get basketQueryv1.0.0Get basketReturns the current basket and its item details.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs — Basket API endpoint that enriches items via
GetBooks. - Get orderQueryv1.0.0Get orderReturns Order details, including the recorded item quantities and prices.Ownercommerce-fulfillment-teamSchemaDiagramOpen docs — Ordering API endpoint that enriches order line-item names via
GetBooks. - Get book over gRPCQueryv1.0.0Get book over gRPCReturns one Catalog book by identifier through the book.v1 gRPC contract.Ownercatalog-experience-teamSchemaDiagramOpen docs — Single-book compact gRPC RPC.
Get books over gRPC schema
BOOK_STATUS_UNSPECIFIED BOOK_STATUS_IN_STOCK BOOK_STATUS_OUT_OF_STOCKBOOK_STATUS_UNSPECIFIED BOOK_STATUS_IN_STOCK BOOK_STATUS_OUT_OF_STOCK