Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

[API] Can't delete invoices

Flo   ( User )

Commented 5 years ago

Hello,

I'm trying to delete an existing invoice via the API but I get the following error:

{"message":"No query results for model [App\\Models\\Income\\Invoice].","status_code":500,"debug":{"line":395,"file":"\/home\/www\/acc.fam-heft.de\/web\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Builder.php", […]

So it seems like the middleware can't correctly access the model?
The strange thing is it works for GET requests, so this works:

GET /api/invoices/1?company_id=1 (returns JSON of the invoice)

while this doesn't work:

DELETE /api/invoices/1?company_id=1

Update (PATCH/PUT) doesn't work either.
Any suggestions on how to fix this?

James   ( User )

Commented 5 years ago

Did you ever find a way to do this? I'm getting the same issue.

Flo   ( User )

Commented 5 years ago

No, I'm afraid I didn't.

I've given up Akaunting integration for now.

Lennart Behr   ( User )

Commented 4 years ago

// PUSH
I'm currently facing the exact same issues with customers.
Can't use DELETE @ /api/customers/{id}?company_id={company_id} either.

Please login or register to leave a response.

Showing 1 to 4 of 4 discussions