productcatalog.proto
path protobuffet/example/productcatalog/v1/productcatalog.proto
package protobuffet.example.productcatalog.v1
Messages
Empty
Represents no data required.
| Name | Type | Description |
|---|
GetProductRequest
Request to get a single product.
| Name | Type | Description |
|---|---|---|
id | string | Identifier to use for product lookup. |
ListProductsResponse
Response containing a list of retrieved products.
| Name | Type | Description |
|---|---|---|
products | repeated Product | List of products. |
Product
Represents a single product within our catalog. Each product should be visible by default, unavailable products are not represented by this object.
| Name | Type | Description |
|---|---|---|
id | string | Identifier for this product. |
name | string | Name of this product. Often provided by the retailer or some third-party. |
description | string | Description of this product. Often provided by the retailer or some third-party. |
picture | string | Picture of this product. Often provided by some third-party. |
price_usd | protobuffet.example.common.types.v1.Money | Price of this product at this given time. Calculations can vary with time, so caching should respect this. |
categories | repeated string | Categories such as "vintage" or "gardening" that can be used to look up other related products. |
SearchProductsRequest
Request to search for products given a query.
| Name | Type | Description |
|---|---|---|
query | string | Query of terms to search for within the catalog. See implementation docs for formatting. |
SearchProductsResponse
Response containing a list of product search results.
| Name | Type | Description |
|---|---|---|
results | repeated Product | List of products. |
Services
ProductCatalogService
Product catalog management service. APIs oriented around product lookup for a given context.
ListProducts
| Method | ListProducts |
|---|---|
| Request | Empty |
| Response | ListProductsResponse |
| Description | List all products in the catalog. |
GetProduct
| Method | GetProduct |
|---|---|
| Request | GetProductRequest |
| Response | Product |
| Description | Get a specific product from our catalog. |
SearchProducts
| Method | SearchProducts |
|---|---|
| Request | SearchProductsRequest |
| Response | SearchProductsResponse |
| Description | Search for products within the catalog matching a given query. |