I’m trying to trigger the sending of an invoice via API.
According to the swagger API docs I tried this GET request:
/api/v1/invoices//email/
but was responded with: “You are not authorized to view or perform this action”
Doing the same via web UI works and looking at the API used by the web UI doesn’t seem to call the same GET request but instead a POST request to /api/v1/emails
ah sorry I didn’t notice the forum filtered my url.
This is what I wrote. /api/v1/invoices/<invoiceid>/email/
so yeah, I had the invoice ID in there.
Just tried the POST api and that one worked, but that requires the information for the email text and I don’t want to hardcode that into my API script.
The other option would be to get the text being sent in the POST request via API. The question would then be how do I get the Information for the email body and subject via API?