Catalog Service

Build Status Dependencies Coverage Status

A microservice for catalog and offer management.

Features

  • It provides a gRPC interface for handling CRUD operations, catalog and offer functionality.

API

This microservice exposes the following gRPC endpoints:

Manufacturer

A Manufacturer resource.

io.restorecommerce.manufacturer.Manufacturer

Field Type Label Description

id

string

optional

Manufacturer ID, unique, key

meta

io.restorecommerce.meta.Meta

optional

Meta info

name

string

optional

Name

description

string

optional

description

A list of Manufacturer resources.

io.restorecommerce.manufacturer.ManufacturerList

Field Type Label Description

items

io.restorecommerce.manufacturer.Manufacturer

required

List of Manufacturers

total_count

number

optional

number of Manufacturers

subject

io.restorecommerce.auth.Subject

required

Subject details

PriceGroup

A PriceGroup resource.

io.restorecommerce.price_group.PriceGroup

Field Type Label Description

id

string

optional

PriceGroup ID, unique, key

meta

io.restorecommerce.meta.Meta

optional

Meta info

name

string

optional

Name

description

string

optional

description

A list of PriceGroup resources.

io.restorecommerce.price_group.PriceGroupList

Field Type Label Description

items

io.restorecommerce.price_group.PriceGroup

required

List of PriceGroups

total_count

number

optional

number of PriceGroups

subject

io.restorecommerce.auth.Subject

required

Subject details

ProductCategory

A ProductCategory resource.

io.restorecommerce.product_category.ProductCategory

Field Type Label Description

id

string

required

ProductCategory ID, unique, key

meta

io.restorecommerce.meta.Meta

required

Meta info

name

string

required

Name

description

string

optional

description

price_group_id

io.restorecommerce.price_group.PriceGroup.id

required

price group identifier

image

io.restorecommerce.image.Image

optional

Image

parent

io.restorecommerce.product_category.Parent

optional

Parent reference

io.restorecommerce.product_category.Parent

Field Type Label Description

parent_id

string

optional

parent product category identifier

A list of ProductCategory resources.

io.restorecommerce.product_category.ProductCategoryList

Field Type Label Description

items

io.restorecommerce.product_category.ProductCategory

required

List of Product Categories

total_count

number

optional

number of Product Categories

subject

io.restorecommerce.auth.Subject

required

Subject details

ProductPrototype

A ProductPrototype resource.

io.restorecommerce.product_prototype.ProductPrototype

Field Type Label Description

id

string

optional

ProductPrototype ID, unique, key

meta

io.restorecommerce.meta.Meta

optional

Meta info

name

string

optional

Name

description

string

optional

description

category_id

io.restorecommerce.product_category.ProductCategory.id

optional

price group identifier

A list of ProductPrototype resources.

io.restorecommerce.product_prototype.ProductPrototypeList

Field Type Label Description

items

io.restorecommerce.product_prototype.ProductPrototype

required

List of Product Prototypes

total_count

number

optional

number of Product Prototypes

subject

io.restorecommerce.auth.Subject

required

Subject details

Product

A Product resource.

io.restorecommerce.product.Product

Field Type Label Description

id

string

required

Product ID, unique, key

meta

io.restorecommerce.meta.Meta

required

Meta info

product

io.restorecommerce.product.IndividualProduct

optional

Individual Product details

bundle

io.restorecommerce.product.Bundle

optional

Bundle of Products

active

boolean

optional

flag to indicate if product is active

tags

[ ] string

optional

product tags

associations

[ ] io.restorecommerce.product.Association

optional

Product Association

data

google.protobuf.Any

optional

additional configurable data

io.restorecommerce.product.Association

Field Type Label Description

type

enum

optional

Product Association type Miscellaneous, Accessory or Recommendation

tags

[ ] string

optional

product tags

data

google.protobuf.Any

optional

additional configurable data

io.restorecommerce.product.IndividualProduct

Field Type Label Description

name

string

optional

Product name

description

string

optional

Product description

manufacturer_id

string

optional

Manufacturer identifier

taric_code

string

optional

Taric code

prototype_id

string

optional

Prodcut Prototype identifier

category_id

string

optional

Prodcut Category identifier

tax_ids

[ ] string

optional

list of tax identifiers

gtin

string

optional

Global Trade Item Number

physical

io.restorecommerce.product.PhysicalProduct

optional

Physical Product

virtual

io.restorecommerce.product.VirtualProduct

optional

Virtual Product

io.restorecommerce.product.PhysicalProduct

Field Type Label Description

variants

[ ] io.restorecommerce.product.PhysicalVariant

optional

Physical Product Variants

io.restorecommerce.product.PhysicalVariant

Field Type Label Description

id

string

optional

Physical variant id

name

string

optional

Physical variant name

description

string

optional

Physical variant description

stock_level

number

optional

Product Stock Level

price

number

optional

Product Variant Price

sale

boolean

optional

flag to indicate if Product Variant is for sale

sale_price

number

optional

Product Variant Sale Price

image

[ ] io.restorecommerce.image.Image

optional

Product Variant Images

File

[ ] io.restorecommerce.file.File

optional

Product Variant Files

stock_keeping_unit

string

optional

Prodcut Variant SKU

template_variant

string

optional

Template Variant

package

io.restorecommerce.product.Package

optional

Product Package

attributes

[ ] io.restorecommerce.attribute.Attribute

optional

Product Variant Attributes

io.restorecommerce.product.Package

Field Type Label Description

size_in_cm

io.restorecommerce.geometry.BoundingBox3D

optional

Package Size

weight_in_kg

number

optional

Package Weight in Kg

rotatable

boolean

optional

flag to denote if Package is rotatable

io.restorecommerce.product.VirtualProduct

Field Type Label Description

variants

[ ] io.restorecommerce.product.VirtualVariant

optional

Virtual Product Variants

io.restorecommerce.product.VirtualVariant

Field Type Label Description

id

string

optional

Virtual variant id

name

string

optional

Virtual variant name

description

string

optional

Virtual variant description

stock_level

number

optional

Virtual Stock Level

price

number

optional

Virtual Variant Price

sale

boolean

optional

flag to indicate if Virtual Variant is for sale

sale_price

number

optional

Virtual Variant Sale Price

image

[ ] io.restorecommerce.image.Image

optional

Virtual Variant Images

File

[ ] io.restorecommerce.file.File

optional

Virtual Variant Files

stock_keeping_unit

string

optional

Virtual Variant SKU

template_variant

string

optional

Template Variant

attributes

[ ] io.restorecommerce.attribute.Attribute

optional

Virtual Variant Attributes

io.restorecommerce.product.Bundle

Field Type Label Description

name

string

optional

Bundle name

description

string

optional

Bundle description

image

[ ] io.restorecommerce.image.Image

optional

Bundled Product Images

product

[ ] io.restorecommerce.product.BundleProduct

optional

Bundled Products

price

number

optional

Bundle price

pre_packaged

io.restorecommerce.product.Package

optional

Bundled pre packaged

io.restorecommerce.product.BundleProduct

Field Type Label Description

prodcut_id

string

optional

Bundled Product identifier

variant_id

string

optional

Bundled Variant identifier

quantity

number

optional

Bundled Product quantity

tax_ratio

number

optional

Discount in relation to the bundle price

A list of Product resources.

io.restorecommerce.product.ProductList

Field Type Label Description

items

io.restorecommerce.product.Product

required

List of Products

total_count

number

optional

number of Products

CRUD Operations

The microservice exposes the below CRUD operations for creating or modifying Product, ProductPrototype, ProductCategory, PriceGroup, Manufacturer, Bundle and Offer resources.

io.restorecommerce.product.ProductService

Method Name Request Type Response Type Description

Create

io.restorecommerce.product.ProductList

io.restorecommerce.product.ProductList

Create a list of Product resources

Read

io.restorecommerce.resourcebase.ReadRequest

io.restorecommerce.product.ProductList

Read a list of Product resources

Update

io.restorecommerce.product.ProductList

io.restorecommerce.product.ProductList

Update a list of Product resources

Delete

io.restorecommerce.resourcebase.DeleteRequest

Empty

Delete a list of Prodeuct resources

Upsert

io.restorecommerce.product.ProductList

io.restorecommerce.product.ProductList

Create or Update a list of Product resources

io.restorecommerce.product_prototype.ProductPrototypeService

Method Name Request Type Response Type Description

Create

io.restorecommerce.product_prototype.ProductPrototypeList

io.restorecommerce.product_prototype.ProductPrototypeList

Create a list of ProductPrototype resources

Read

io.restorecommerce.resourcebase.ReadRequest

io.restorecommerce.product_prototype.ProductPrototypeList

Read a list of ProductPrototype resources

Update

io.restorecommerce.product_prototype.ProductPrototypeList

io.restorecommerce.product_prototype.ProductPrototypeList

Update a list of ProductPrototype resources

Delete

io.restorecommerce.resourcebase.DeleteRequest

Empty

Delete a list of ProductPrototype resources

Upsert

io.restorecommerce.product_prototype.ProductPrototypeList

io.restorecommerce.product_prototype.ProductPrototypeList

Create or Update a list of ProductPrototype resources

io.restorecommerce.product_category.ProductCategoryService

Method Name Request Type Response Type Description

Create

io.restorecommerce.product_category.ProductCategoryList

io.restorecommerce.product_category.ProductCategoryList

Create a list of ProductCategory resources

Read

io.restorecommerce.resourcebase.ReadRequest

io.restorecommerce.product_category.ProductCategoryList

Read a list of ProductCategory resources

Update

io.restorecommerce.product_category.ProductCategoryList

io.restorecommerce.product_category.ProductCategoryList

Update a list of ProductCategory resources

Delete

io.restorecommerce.resourcebase.DeleteRequest

Empty

Delete a list of ProductCategory resources

Upsert

io.restorecommerce.product_category.ProductCategoryList

io.restorecommerce.product_category.ProductCategoryList

Create or Update a list of ProductCategory resources

io.restorecommerce.price_group.PriceGroupService

Method Name Request Type Response Type Description

Create

io.restorecommerce.price_group.PriceGroupList

io.restorecommerce.price_group.PriceGroupList

Create a list of PriceGroup resources

Read

io.restorecommerce.resourcebase.ReadRequest

io.restorecommerce.price_group.PriceGroupList

Read a list of PriceGroup resources

Update

io.restorecommerce.price_group.PriceGroupList

io.restorecommerce.price_group.PriceGroupList

Update a list of PriceGroup resources

Delete

io.restorecommerce.resourcebase.DeleteRequest

Empty

Delete a list of PriceGroup resources

Upsert

io.restorecommerce.price_group.PriceGroupList

io.restorecommerce.price_group.PriceGroupList

Create or Update a list of PriceGroup resources

io.restorecommerce.manufacturer.ManufacturerService

Method Name Request Type Response Type Description

Create

io.restorecommerce.manufacturer.ManufacturerList

io.restorecommerce.manufacturer.ManufacturerList

Create a list of Manufacturer resources

Read

io.restorecommerce.resourcebase.ReadRequest

io.restorecommerce.manufacturer.ManufacturerList

Read a list of Manufacturer resources

Update

io.restorecommerce.manufacturer.ManufacturerList

io.restorecommerce.manufacturer.ManufacturerList

Update a list of Manufacturer resources

Delete

io.restorecommerce.resourcebase.DeleteRequest

Empty

Delete a list of Manufacturer resources

Upsert

io.restorecommerce.manufacturer.ManufacturerList

io.restorecommerce.manufacturer.ManufacturerList

Create or Update a list of Manufacturer resources

For the detailed protobuf message structure of io.restorecommerce.resourcebase.ReadRequest and io.restorecommerce.resourcebase.DeleteRequest refer resource-base-interface.

Events

Emitted

List of events emitted by this microservice for below topics:

Topic Name Event Name Description

io.restorecommerce.products.resource

productCreated

product created

productModified

product modified

productDeleted

product deleted

Topic Name Event Name Description

io.restorecommerce.product_prototypes.resource

productPrototypeCreated

product prototype created

productPrototypeCreatedModified

product prototype created modified

productPrototypeCreatedDeleted

product prototype created deleted

Topic Name Event Name Description

io.restorecommerce.product_categorys.resource

productCategoryCreated

product category created

productCategoryModified

product category modified

productCategoryDeleted

product category deleted

Topic Name Event Name Description

io.restorecommerce.price_groups.resource

priceGroupCreated

price group created

priceGroupModified

price group modified

priceGroupDeleted

price group deleted

Topic Name Event Name Description

io.restorecommerce.manufacturers.resource

manufacturerCreated

manufacturer created

manufacturerModified

manufacturer modified

manufacturerDeleted

manufacturer deleted

Topic Name Event Name Description

io.restorecommerce.bundles.resource

bundleCreated

bundle created

bundleModified

bundle modified

bundleDeleted

bundle deleted

Topic Name Event Name Description

io.restorecommerce.offers.resource

offerCreated

offer created

offerModified

offer modified

offerDeleted

offer deleted

Consumed

This microservice consumes messages for the following events by topic:

Topic Name Event Name Description

io.restorecommerce.command

restoreCommand

for triggering for system restore

resetCommand

for triggering system reset

healthCheckCommand

to get system health check

versionCommand

to get system version