My Products
Help
kashyap
PARTNER

Error creating inventory issue. Error: 'LocationID' is not found.

by kashyap

[2023.10.04 12:03:21] Request for Issue Inventory:

 

[{"warehouseId":{"value":null},"locationId":{"value":"1                             "},"tranType":{"value":"Issue"},"operation":"Insert","inventoryNumber":{"value":"HC1026MS"},"quantity":{"value":"1.00"},"description":{"value":"Duell Sale 3895"},"unitCost":{"value":"666.00"}}]

[2023.10.04 12:03:23] Response Header ::

HTTP  500 {"date":["Wed, 04 Oct 2023 10:03:23 GMT"],"server":["Nginx"],"strict-transport-security":["max-age=31536000; includeSubDomains","max-age=31536000; includeSubDomains"],"content-type":["application\/json; charset=utf-8"],"ipp-request-id":["37346fee-ed4c-4c12-8a27-9b2e8cf0f0dd"],"x-content-type-options":["application\/json"],"pragma":["no-cache"],"x-handled-by":["Visma-PX.Export\/AuthenticationManagerModule"],"referrer-policy":["origin-when-cross-origin"],"vnfinstanceid":["ERP_NO_REAL_0034"],"cache-control":["no-cache,no-cache"],"feature-policy":["geolocation 'none'; vr 'none'; payment 'none'; midi 'none'; microphone 'none'; fullscreen 'none'; encrypted-media 'none'; camera 'none'; autoplay 'none';"],"expires":["-1"],"x-xss-protection":["1;mode=block"],"set-cookie":["LegacyUI=0; path=\/; secure; HttpOnly,UserBranch=13; path=\/; secure; HttpOnly,Locale=TimeZone=GMTE0000U&Culture=en-GB; path=\/; secure; HttpOnly,UserDisplayName=; expires=Tue, 03-Oct-2023 10:03:21 GMT; path=\/; secure; HttpOnly"],"connection":["close"],"transfer-encoding":["chunked"]}

[2023.10.04 12:03:23] Response::

 

VismaId: 37346fee-ed4c-4c12-8a27-9b2e8cf0f0dd. Error creating inventory issue. Error: 'LocationID' is not found.

 

3 REPLIES 3
Yıldırım
VISMA

by Yıldırım

Hello, you have some syntax errors in your payload. We've edited the JSON based on your inputs that you can see below.

Additionally, you have to send "WarehouseID"  in the request because this is a mandatory field for the Inventory Issue. 


Issues.jpg

POST:  /controller/api/v1/inventoryissue

{
    "issueLines": [
        {
            "warehouseId": {
                "value": "1"
            },
            "unitCost": {
                "value": 666
            },
            "tranType": {
                "value": "Issue"
            },
            "operation": "Insert",
            "inventoryNumber": {
                "value": "HC1026MS"
            },
            "locationId": {
                "value": "1"
            },
            "quantity": {
                "value": 1
            },
            "description": {
                "value": "InventoryIssueLine"
            }
        }
    ],
    "date": {
        "value": "2023-10-06"
    },
    "description": {
        "value": "testInventoryIssue"
    }
}



kashyap
PARTNER

by kashyap

Duell system using same request payload as you have provided, I have not added object "issueLines" in the payload.

 

Posting you a latest error:

Request: 


{
  "issueLines": [
    {
      "warehouseId": {
        "value": "1"
      },
      "locationId": {
        "value": "1                             "
      },
      "tranType": {
        "value": "Issue"
      },
      "operation": "Insert",
      "inventoryNumber": {
        "value": "80711"
      },
      "quantity": {
        "value": "2.00"
      },
      "description": {
        "value": "Duell Sale 3936"
      },
      "unitCost": {
        "value": "73.00"
      }
    }
  ],
  "hold": {
    "value": false
  },
  "date": {
    "value": "2023-10-07 17:34:47"
  },
  "postPeriod": {
    "value": "202310"
  },
  "description": {
    "value": "Duell Sale 3936"
  }
}

 

 

Response:


{
  "message": "VismaId: bc14612e-8a08-4e8d-8d83-bb6ea72dee93. Error creating inventory issue. Error: 'LocationID' is not found."
}
Yıldırım
VISMA

by Yıldırım

There is a trailing space in the "Location" value in your payload, you can start with removing that. Additionally, you can check that transaction in the UI line, to make sure there is a location available for the selected warehouse.