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

New Discussion

Delete & Update invoices through API

Binod   ( User )

Commented 5 years ago

Hello guys,

I can create an invoice through API by passing json to .../api/invoices. But I can't find a way to delete and update an invoice through API. Please tell me how to do that. Thanks.

Denis Dulici   ( Admin )

Commented 5 years ago

Hello Binod,

You should use the DELETE and PATCH methods. It's a resource based RESTful API:


Binod   ( User )

Commented 5 years ago

Thanks for your reply.

But I get this error for DELETE and PATCH methods.

 "message": "405 Method Not Allowed",

 "status_code": 405,

 "debug": {

        "line": 251,

What should I pass to update and delete?

(to create invoice I sent a json data)

Binod   ( User )

Commented 5 years ago

Problem solved.

UPDATE and DELETE works for .../api/invoices/(invoice_id).

Douglas Cooper   ( User )

Commented 4 years ago

Hi how do I get the show invoice function working using the API in postman?

I keep getting the following:


    "message": "get_class() expects parameter 1 to be object, null given",

    "status_code": 500,

Please login or register to leave a response.

Showing 1 to 5 of 5 discussions