Email an Invoice via V2 API

Hi Simon,

Emailing an invoice does work although the documentation could be
clearer and the error messages are not at all helpful. To send an
email make a call like the following example:

POST https://api.freeagent.com/v2/invoices/1/send_email

With the following JSON:

{
“invoice”: {
“email”: {
“to”: “you@example.com”,
“from”: “me@example.com”,
“subject”: “Subject”,
“body”: “Body”
}
}
}

The email parameters are optional so if your contact already has an
email address and if you have email templates set up you shouldn’t
have to supply those parameters. Unfortunately at the moment you do
have to supply something so if you don’t want to override any of the
parameters send the following:

{
“invoice”: {
“email”: {}
}
}

We will improve this so that it works with blank input and the errors
are clearer.

Kind regards,

GraemeOn 3 October 2012 11:44, Simon Moxon simon.moxon@gmail.com wrote:

Using the V2 API I don’t seem to be able to call the ‘send email’ function, has anyone managed it?

Posting (what I believe to be the correct JSON) to the following url results in a ‘Resource not found’ error.

https://api.freeagent.com/v2/invoices/:id/send_email

Is it possible to send e-mails via the API (as this specific function seems to be missing from the official v2 ruby library too)?


You received this message because you are subscribed to the Google Groups “FreeAgent API” group.
To view this discussion on the web visit https://groups.google.com/d/msg/freeagent_api/-/cS1QUbDPPjAJ.
To post to this group, send email to freeagent_api@googlegroups.com.
To unsubscribe from this group, send email to freeagent_api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/freeagent_api?hl=en.

Graeme Boyd
Senior Software Engineer

Web. freeagent.com Blog. The FreeAgent Blog - FreeAgent
Twitter. @freeagent Facebook. FreeAgent | Edinburgh

40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny Scotland SC316774