to get a personalized navigation.
to get a personalized navigation.
Hi,
We are trying to create a customerledgeritem with voucher. And, somehow we are failing even if our data seems right.
We are submitting this:
{
"CurrencyCode": "NOK",
"CustomerId": "dfe3861c-4d39-4e0c-b6f8-eda01f5c548f",
"DueDate": "2020-01-18",
"InvoiceDate": "2020-01-08",
"InvoiceNumber": "9001",
"IsCreditInvoice": false,
"RemainingAmountInvoiceCurrency": "161.25",
"RoundingsAmountInvoiceCurrency": "0",
"TotalAmountInvoiceCurrency": "161.25",
"VATAmountInvoiceCurrency": "32.25",
"Voucher": {
"VoucherDate": "2020-01-08",
"VoucherText": "Faktura 9001",
"Rows": [
{
"AccountNumber": "1500",
"DebitAmount": "161.25"
},
{
"AccountNumber": "3000",
"CreditAmount": "129"
},
{
"AccountNumber": "2700",
"CreditAmount": "32.25"
}
]
}
}
but getting back:
Receive:
{
"ErrorCode": 2000,
"DeveloperErrorMessage": "ValidateModelAttributeException - The VoucherDate property is required. The VoucherText field is required. ",
"ErrorId": "40b5de11-e16a-4c6d-98c9-4d7112a359a5"
}
It seems that our formatting may be off, but cant quite see what 🙂
Solved! Go to Solution.
Hello,
I just tested this (customerledgeritems/customerledgeritemswithvoucher) endpoint with an exact request body as You provided in the thread (i changed only customerID). It looks that it is working. You can see the request and correct server response in the picture:
Please try to make your request once again. If the problem will still persist, we would need HTTP request/response to analyze that case.
Thank You!
So the issue on our side was that we used the wrong encoding for the submission. Thanks for the confirmation that it was indeed correct.
Copyright © 2022 Visma.com. All rights reserved.