Hi,
I can create invoice by API, but when I want to create credit memo, it ends with error. Everything is exactly according to documentation. Even it ends with error, when I try it in Developer SKY API Console.
Error message is confusing as well → there is no “Credit memo amount” field in the documentation. Even, I've tried different combination of this name….
I've spent a lot of time with it, but without success…
Any recommendation?
Thanks a lot.
Petr
--------
{
"Error": "Failed to save credit memo",
"Details": [
"Credit memo amount' is required."
],
"ErrorPath": "capcreditmemo.-1.creditmemoamount"
}
--------
request:
{
"vendor_id": 2,
"date": "2019-03-20T12:00:00Z",
"amount": 100,
"balance": 0,
"credit_memo_number": "8439712005",
"description": "my description",
"post_status": "DoNotPost",
"post_date": "2019-03-20T12:00:00Z",
"distributions": [
{
"distribution_splits": [
{
"ui_project_id": "711150010",
"transaction_code_values": [],
"amount": 113.0,
"percent": 100.0,
"account_class": "Unrestricted Net Assets"
}
],
"amount": 113.0,
"percent": 100.0,
"description": "first line",
"account_number": "1011100-1",
"type_code": "Debit"
},
{
"distribution_splits": [
{
"ui_project_id": "711150099",
"transaction_code_values": [],
"amount": 113.0,
"account_class": "Unrestricted Net Assets"
}
],
"amount": 113.0,
"percent": 100.0,
"description": "first line",
"account_number": "2041320-1",
"type_code": "Credit",
"custom_fields": []
}
]
}