Products
In order to search for products in Ecommerce Search, they first need to be ingested. Ingestion of products is done through the Ecommerce Search API, at /api/ingestion/segments/{segmentId}/products/
. See the full API reference here.
The Ecommerce Search ingestion API supports multiple sources of data. It is possible to ingest product data from e.g. the PIM, but also provide additional data from a different source. The primary ingestion endpoint is PUT /api/ingestion/segments/{segmentId}/products/create-or-patch
.
Endpoint limits
The product and SKU ingestion endpoints have maximum entity sizes, so ingestion must be batched if there are more entities than the limit.
The /create-or-patch/ endpoint can also be used to patch products, updating specific properties. The intended use is to enable secondary providers of product information. A typical example might be to have a primary provider create products into Ecommerce Search, but have a secondary provider patch commercial parameters onto existing products. When patching, only non-null values are added to the product. E.g. a request with productNo = null
will not overwrite the product number. Note that the products will have to be created before they can be patched.
Changes in the data provider, like the PIM, will not be detected automatically by Ecommerce Search, and must be patched again externally.
Deletion is done in bulk at POST /api/ingestion/segments/{segmentId}/products/delete-bulk
.
Ingesting SKUs follows the same rules as products, but uses /api/ingestion/segments/{segmentId}/skus
instead.
Segmentation
As the endpoint URLs indicate, a set of searchable products exists for each segment. This means that products must be ingested for each segment. Whenever a publication is made for a segment, Ecommerce Search has to build a new index for the segment before it is ready for searching. Depending on the number of products in the segment, this might take some time.
Changes to products or SKUs made through the API are applied immediately. This means that it is possible to affect the search experience without creating a new publication.
Examples
Ingesting products
Given a file with product data, this example shows how to ingest products into Ecommerce Search.
SKUs
Ingesting SKUs
Given a file with SKU data this example shows how to ingest SKUs into Ecommerce Search.