Hi,
As far as our testing has gone, it does not seem to be possible to both delete all lines and insert new lines in the same PUT operation.
We recommend that you either first insert the new lines and delete the old lines or in the other order.
Example:
PUT journalTransaction/000090
{
"journalTransactionLines": [
{
"operation": "Delete",
"lineNumber": {
"value": 1
}
},
{
"operation": "Delete",
"lineNumber": {
"value": 2
}
},
{
"operation": "Delete",
"lineNumber": {
"value": 3
}
}
]
}
Followed by PUT journalTransaction/000090:
{
"journalTransactionLines": [
{
"operation": "Insert",
"lineNumber": {
"value": 0
},
"accountNumber": {
"value": "1920"
},
"project": {
"value": "X"
},
"transactionDescription": {
"value": "Testing"
},
"creditAmountInCurrency": {
"value": 400
}
},
{
"operation": "Insert",
"lineNumber": {
"value": 0
},
"accountNumber": {
"value": "2000"
},
"project": {
"value": "X"
},
"transactionDescription": {
"value": "Testing"
},
"debitAmountInCurrency": {
"value": 200
}
},
{
"operation": "Insert",
"lineNumber": {
"value": 0
},
"accountNumber": {
"value": "1060"
},
"project": {
"value": "X"
},
"transactionDescription": {
"value": "Testing"
},
"debitAmountInCurrency": {
"value": 200
}
}
]
}
... View more