Blogs

Updating Products

with the Liferay Batch API

Jeffrey Handa
Jeffrey Handa
3 minutes de lecture

Introduction

This is a quick follow up to my last post where I discussed how to use Liferay's batch APIs to import products. I've had a few people asking how they could leverage the batch APIs to update products. The confusion stems from the fact that there is no batch version of a PUT or PATCH endpoint available when browsing the endpoints in the API explorer. Well never fear, even without a PUT or PATCH, we can still update existing products in Liferay.

External Reference Codes

Many Liferay entities, and most Commerce entities support an external reference code or ERC. The ERC is very useful in integration scenarios because it allows you to keep a reference to a unique identifier in an external system inside of Liferay. Sure, in the past you could have used a Custom Field to store this reference, but you would have had to handle all of the logic of looking up the ERC and comparing it in your custom code. With an ERC, their are often headless endpoints that use ERC instead of Liferay's internal IDs and even if there isn't a headless endpoint that specifically uses the ERC, it can still be used to ensure you're updating the right entity.

Now before we go any further, I need to revisit my last blog and correct one point. In that blog I mentioned that the only attributes you needed to provide Liferay in order to create a product through the headless APIs was:

Commentaires sur la page

Related Assets...

Related Assets...

Affichage des résultats 1 - 1 parmi 1.

More Blog Entries...

Himanshu Chauhan
novembre 20, 2026
Tony Lim
novembre 19, 2026