Issue
-
Noticed that products have two ID fields, when you fetch them via headless API
id
productId
id
is visible on the UI andproductId
is not.-
When you try to get products via headless API using
id
, it does not work:
E.g.:GET /o/headless-commerce-admin-catalog/v1.0/products/{id}
Environment
- Commerce 4.0 (DXP 7.4) reposted so far
Resolution
- When headless APIs are used, the
productId
is the only ID that the endpoint is using and looking for.
Additional Information
-
It is done by design. There is a related ticket already, to make the
productId
more clear on the UI as well: https://issues.liferay.com/browse/COMMERCE-8913
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In