Hi
I am trying to mark an invoice as scheduled to send via Make.com. The invoice is generated, and I can grab the invoice ID, but I get a 400 error when the Make api module is as the image. I hope this is a very simple formatting or syntax issue.
I have tried with and without the https://api.freeagent.com in the URL
Hi Barry
Welcome to our API forum! Thank you for your post.
I can see that you’re trying to use the url api.freeagent.com/v2/invoices/<id>/transitions
, and passing the transition into the body of the request, but if you take a look at our documentation around updating an invoice, you can see that you need to make a PUT request to a URL which contains the transition you want to action, e.g. api.freeagent.com/v2/invoices/<id>/transitions/mark_as_scheduled
, rather than passing in the transition into the body of the request.
I hope this helps, and please let me know if you have any other questions around this.
Kind regards,
Katie
1 Like
Hi
Thank you. If I use the url v2/invoices/ (the api… bit is already built into Make.com) I get a result for all invoices and individual invoices when I put in their ID, so I know that Make is talking to the account. however, as soon as I use PUT, POST or DELETE (even a simple DELETE a specific invoice for which the GET method works) it get a runtime error:
RuntimeError
[400] Invalid JSON
Origin
FreeAgent.
Is it possible the problem is at Make’s end?
Thanks, Barry
Hi Barry,
Thank you for your reply. From a test using the OAuth Google Playground, I was able to make a successful PUT request to the /transitions/mark_as_sent endpoint for my test account, so it may well be an issue on Make’s end.
If you wanted to check whether these requests work for your account via the OAuth Google Playground too, we have a quick start guide that details how to set that up and test it out. This might help to confirm whether it’s definitely an issue on Make’s side. If you’re seeing the same errors on the OAuth Google Playground, then we can look into what might be causing that to happen in your account.
I hope this helps,
Katie