When trying to develop an integration to import several product warehouse availability, the BatchEngineImportTask fails
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- Blocking bug evident when trying to use the warehouse item batch headless API.
- Steps to reproduce:
- Create a warehouse with external reference code CR41
- Execute a POST to /o/headless-commerce-admin-inventory/v1.0/warehouses/warehouseItems/batch with the following json body
-
[
{
"externalReferenceCode": "T001",
"sku": "T001",
"quantity": "10",
"warehouseExternalReferenceCode": "CR41"
},
{
"externalReferenceCode": "T002",
"sku": "T002",
"quantity": "100",
"warehouseExternalReferenceCode": "CR23"
}
]
-
Expected Result: The API will create two brand new warehouse items.
-
Actual Result: The BatchEngineImportTask fails with the following error:
-
{
"className": "com.liferay.headless.commerce.admin.inventory.dto.v1_0.WarehouseItem",
"contentType": "JSON",
"endTime": "2025-01-26T20:56:52Z",
"errorMessage": "javax.ws.rs.NotSupportedException: One of the following parameters must be specified: [externalReferenceCode]",
"executeStatus": "FAILED",
"externalReferenceCode": "a08b1174-bc94-1538-940e-xxxx",
"failedItems": [],
"id": 121,
"importStrategy": "ON_ERROR_FAIL",
"operation": "CREATE",
"processedItemsCount": 0,
"startTime": "2025-01-26T20:56:52Z",
"totalItemsCount": 2
Environment
Resolution
- This is a known bug and has been addressed on LPD-50226.
- Please request a hotfix including LPD-50226.
Did this article resolve your issue ?