API creating transaction results in error 422 #9440
Replies: 4 comments
-
Sorry, I can't replicate this. Submitting the body from your issue works as expected.
|
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick response and trying it. It looks like curl also works fine for me. I was trying to use PowerShell. I'm not sure what it could be doing to mangle it. Not an issue with Firefly by the looks of it. If you leave this open I'll try to figure it out in case anyone else is using PowerShell, then close it. |
Beta Was this translation helpful? Give feedback.
-
Alright I did a packet capture and was able to find the issue. Both Invoke-RestMethod and Invoke-WebRequest do not include the header As far as Firefly goes, it would be nice if the error was more accurately attributed to the headers, and didn't refer to the description. Thanks again for looking at it with me! |
Beta Was this translation helpful? Give feedback.
-
But it does, I'm not sure you identified the problem correctly.
Result:
|
Beta Was this translation helpful? Give feedback.
-
Support guidelines
I've found a bug and checked that ...
Description
When I attempt to create a transaction with the API, I am receiving an odd error. I cannot figure this out. It's likely something I'm doing incorrectly, but I believe I'm following the documentation properly.
Error:
{"jsonapi":{"version":"1.0"},"errors":[{"detail":"Need at least one transaction.","source":{"pointer":"\/transactions\/0\/description"},"status":"422"}]}
With debug enabled, I see:
Debug information
Debug information generated at 2024-11-05 16:35:13 for Firefly III version v6.1.21.
en_US.UTF-8: ✅
Expected behaviour
Transaction is created
Steps to reproduce
Send POST request with the following parameters:
API Endpoint:
{{URL}}/api/v1/transactions
Body:
Header:
Additional info
No response
Beta Was this translation helpful? Give feedback.
All reactions