Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-2522

Post warehouseItems doesn't set externalReferenceCode

    Details

      Description

      We call the "headless-commerce-admin-inventory/v1.0/warehouses/{id}/warehouseItems" API setting the field "externalReferenceCode" but the field is not evaluated in liferay.

      Call example:

      http://localhost:8080/o/headless-commerce-admin-inventory/v1.0/warehouses/37490/warehouseItems

      with body:

      {
       "externalReferenceCode" : "230min93017",
       "quantity" : 12,
       "sku" : "min93017"
      }

      Liferay API response:

      {
       "id": 39544,
       "quantity": 12,
       "reservedQuantity": 0,
       "sku": "min93017",
       "warehouseExternalReferenceCode": "380RI2021",
       "warehouseId": 37490
      }

      Following the api call:

      http://localhost:8080/o/headless-commerce-admin-inventory/v1.0/warehouseItems/by-externalReferenceCode/230min93017

      Liferay response:

      {
       "errorDescription": "Warehouse item not found",
       "message": "Unable to find WarehouseItem with externalReferenceCode: 230min93017",
       "status": 400
      }

      We look on the db table ciwarehouseitem and the field "externalreferencecode" is set to "null"

        Attachments

          Activity

            People

            Assignee:
            tai.nguyen Tai Nguyen
            Reporter:
            giovanni.ciganotto Giovanni Ciganotto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                2.0.7