400 bad request - create transaction

hii i got this error when trying to create some transaction 

  "error": {
    "id": "400",
    "name": "bad_request",
    "detail": "either 'transaction' object or 'transactions' array must be supplied"


but i've been trying correct format like this:
  "transaction": {
    "account_id": "e382f0f2-07b4-4f18-bcc0-219ad923445f",
    "date": "2020-09-30",
    "amount": 4800000,
    "payee_name": "JavaScript Courses",
    "category_id": "39d01853-7b93-4fb9-8f73-581350a0dbac",
    "memo": "learning javascript basic es6",
    "cleared": "uncleared",
    "approved": true


actually this happens just on my insomnia (api testing), on this swagger (https://api.youneedabudget.com/v1#/Transactions/createTransaction) work fine

1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hey Maroon Thunder ! We tried this transaction as you posted it and it worked for us. Since you tried it on the endpoint documentation page and it worked there as well, it means the formatting isn't the problem.

    Are you supplying the JSON as a parameter to the POST request? 

Like Follow
  • 3 mths agoLast active
  • 1Replies
  • 37Views
  • 2 Following