Hello Arne,
in the first place, the syntax of the JSON you've shared is incorrect. Data should be passed with key & value pairs. Please see the swagger documentation (POST /controller/api/v2/salesorder - Example Value ) and the example JSON below.
{
"orderType": {
"value": "SO"
},
"hold": {
"value": true
},
"date": {
"value": "2021-08-01T00:00:00"
},
"requestOn": {
"value": "2021-08-31T00:00:00"
},
"customer": {
"value": "10034"
},
"description": {
"value": "Inngående ordre fra eBoks"
},
"soBillingAddress": {
"value": {
"overrideAddress": {
"value": true
},
"addressLine3": {
"value": "0"
}
}
},
"lines": [
{
"operation": "Insert",
"alternateID": {
"value": "6796"
},
"subaccount": [],
"externalLink": " ",
"inventoryNumber": {
"value": "1"
},
"uom": {
"value": "STK"
},
"quantity": {
"value": 1.0
},
"note": {
"value": "6796 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB"
}
},
{
"operation": "Insert",
"alternateID": {
"value": "11252"
},
"subaccount": [],
"externalLink": " ",
"inventoryNumber": {
"value": "122"
},
"uom": {
"value": "STK"
},
"quantity": {
"value": 2.44
},
"note": {
"value": "11251 | | 5798002040708 | Plads betales for: 000 MB | Plads total: 000 MB"
}
}
]
}
It appears that the error might be related to one of the inventories ("inventoryNumber") used in the JSON. Please make sure none of them have a status other than "Active" in the Financials ERP UI. (Stock Items:ScreenId=IN202500) & (Non-stock Items:ScreenId=IN202000)
... View more