to get a personalized navigation.
to get a personalized navigation.
Hello
We have a call on an purchasereceipt that gives us a strange reply.
We are trying to add specific lines form a purchaseOrder to the purchaseReceipt.
https://integration.visma.net/API/controller/api/v1/PurchaseReceipt/*/action/addpurchaseorderlines
But all we are getting is
"
Hi,
Could you please send us the JSON request you are sending now as well as the result of GET purchaseOrder/101830?
Thank you.
Hello
I made the JSON request shorter, because i still get the same error here
{
"PurchaseOrderLines": [
{
"OrderNbr": "101830",
"Lines": [
{
"LineNbr": "46"
}
]
}
]
}
Here comes a very stripped down version of the purchaseOrder, it's > 150lines.
{
"orderType": "RegularOrder",
"orderNbr": "101830",
"hold": false,
"status": "Open",
"date": "2021-04-01T00:00:00",
"promisedOn": "2021-04-01T00:00:00",
"supplier": {},
"location": {},
"owner": {},
"currency": "SEK",
"branch": {},
"lines": [
{
"lineNbr": 46,
"branch": {},
"inventory": {
"number": "XXXX",
"description": "XXXX"
},
"lineType": "GoodsForInventory",
"lineDescription": "XXXXXX",
"uom": "STYCK",
"orderQty": 4.0,
"qtyOnReceipts": 0.0,
"discountPercent": 0.0,
"discountAmount": 0.0,
"manualDiscount": false,
"discountCode": {},
"amount": 182.0,
"receivedAmt": 0.0,
"minReceipt": 0.0,
"maxReceipt": 100.0,
"completeOn": 100.0,
"receiptAction": "AcceptButWarn",
"requested": "2021-04-01T00:00:00",
"promised": "2021-04-01T00:00:00",
"completed": false,
"canceled": false
}
],
"purchaseReceipts": [],
"lastModifiedDateTime": "2021-04-01T16:04:36.18",
"note": ""
}
Hi,
It does not look like there is an issue based on what you have sent.
Could you please try to add this line manually in the UI to see if you can find it in the list or get any warnings/errors when adding it?
If you are still having issues in the UI as well, could you please check what type of inventoryItem it is and describe the steps you have taken so far so we can try to reproduce this in our local enviroment?
Also, if you get errors, please send us a screenshot from the UI.
Thank you.
Hello
The customer did it direcly in the UI, and everything worked.
Does the API do somehting extra?
(this is code that has been running for the past year without issues).
Hi,
Ok, we are not able to see any issues with the JSON's you have sent us and are not able to reproduce this in our local enviroments.
As far as we know, there should not be a difference in the validation made in the UI when using the action "addPurchaseOrderLine" and when doing it via the API.
Has this happened to any other purchaseOrderLines?
What type is the inventoryItem? Non-stock or stock?
As we are not able to reproduce this at this moment with the information provided, could you please let us know if it happens again so that we can try to replicate the issue on our end?
Thank you.
Copyright © 2022 Visma.com. All rights reserved.