Forum

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

New Discussion

How to use REST API

Stojan   ( User )

Commented 3 years ago

Update released, you can take a new version ;)

Mathieu Ici   ( User )

Commented 3 years ago

Thank you so much @Stojan, your Postman collection allowed me to figure out everything I needed to make my REST API calls.

Stojan   ( User )

Commented 3 years ago

that is my goal ;)

Timo Brüntjen   ( User )

Commented 3 years ago

Thanx a lot, this really helped out! Is there a future release which will be able to get POST for invoices?

Stojan   ( User )

Commented 3 years ago

Tnx. It will be ;)

Martijn Mellema   ( User )

Commented 3 years ago

post request with: {{akaunting_url}}/documents?company_id={{akaunting_company_id}}&search=type:invoice you can post

setting[title] text
setting[subheading]
setting[company_logo][id] 9
setting[company_logo][name] ".png
setting[company_logo][size] 5585
setting[company_logo][type] image/png
setting[company_logo][download] false

document_number 000010-000
order_number
item_backup[0][name]
item_backup[0][quantity]
item_backup[0][description]
pre_discount
discount
type invoice
status draft
amount 0
notes
footer test here
issued_at 2021-05-10 00:00:00
due_at 2021-05-10 00:00:00
currency_code EUR
recurring_frequency no
recurring_interval 0
recurring_custom_frequency
recurring_count 0
category_id 2
currency_rate 1
contact_id 2
contact_name name
contact_email [email protected]
contact_tax_number
contact_phone
contact_address text here

Luca Pierabella   ( User )

Commented 3 years ago

hey this is super cool , I lost a day trying to find something like this in the documentation
https://drive.google.com/file/d/1ykZ-GNYpQPh7CcI8B3dAZCEXwadWzdT2/view?usp=sharing

why it is not there???? or maybe i missed it?

Deividson Damasio   ( User )

Commented 3 years ago

Hi guys.


I found some search filter in examples written in

https://github.com/akaunting/akaunting/blob/master/app/Traits/SearchString.php

"Get the value of a name in the search string"

# Search all Invoices for customer

curl --request GET \
--url 'https://app.akaunting.com/api/documents?company_id=1&search=type:invoice contact_id:1' \
--header 'Authorization: Basic YOUR_STRING_BASE64'

curl --request GET \
--url 'https://app.akaunting.com/api/documents?company_id=1&search=type:invoice contact_tax_number:12345678911' \
--header 'Authorization: Basic YOUR_STRING_BASE64'

# Search all Invoices in a date range

curl --request GET \
--url 'https://app.akaunting.com/api/documents?company_id=1&limit=100&page=1&search=type:invoice due_at>=2021-10-01 due_at

Deividson Damasio   ( User )

Commented 3 years ago

...

# Search all Invoices in a date range

curl --request GET \
--url 'https://app.akaunting.com/api/documents?company_id=1&limit=100&page=1&search=type:invoice due_at>=2021-10-01 due_at<=2021-10-31' \
--header 'Authorization: Basic YOUR_STRING_BASE64'

This isn't documented here https://developer.akaunting.com/documentation/restful-api

Luca Pierabella   ( User )

Commented 3 years ago

Hi, @Stojan can you update the postman collection with a sample on how to upload an attachment with a post request..in an Invoice for example?
Thanks

Please login or register to leave a response.

Showing 21 to 30 of 62 discussions