Forum Discussion

abaazzi's avatar
abaazzi
Member
6 years ago

Error (4163) JournalLine_InvalidAccount

Hello,

 

Calling the API  "Sale/CreditRefund" we get back the error Error (4163) JournalLine_InvalidAccount:

 

Request: 

Post http://localhost:8080/AccountRight/************-****-*****-****-******/Sale/CreditRefund

{
"Account": {
"UID": "edfb1479-b314-4468-bf12-2ce1338cb78f"
},
"Invoice": {
"UID": "01ec026a-49ba-48f3-819f-aefb0eab274e"
},
"Customer": {
"UID": "55010cb0-e706-4705-bd0a-b9cbe41855d4"
},
"Number": "U182",
"Date": "2019-10-27T00:00:00",
"Amount": 52.00,
"Memo": "PaymentId #182",
"PaymentMethod": null
}

 

 

Response: 

{
"Errors": [
{
"Name": "ValidationError",
"Message": "JournalLine_InvalidAccount",
"AdditionalDetails": "AccountId:(JournalLine)",
"ErrorCode": 4164,
"Severity": "Error",
"LearnMore": null
},
{
"Name": "ValidationError",
"Message": "JournalLine_AccountNotPostable",
"AdditionalDetails": "AccountId:(JournalLine)",
"ErrorCode": 4165,
"Severity": "Error",
"LearnMore": null
}
],
"Information": "Warning, error messages have not been finalised in this release and may change"
}

1 Reply

Replies have been turned off for this discussion
  • Hello abaazzi

     

    Thanks for getting in touch. The error JournalLine_InvalidAccount when posting to the /Sale/CreditRefund endpoint, can often be caused by a missing linked account in the AccountRight file set up. Your client will need to open their file, then go to Setup > Linked Accounts > Sales Accounts. On this screen, there is a tickbox labelled I track deposits collected from customer, this will need to be ticked and an account selected.

     

    Generally, a Liability type account is used, however your client will need to confirm with their Accountant/Bookkeeper which specific account to select.
    Without this linked account selected, AccountRight is unable to accept the POST through the API of the CreditRefund.

     

    Thanks,