Send invoice using the default template

We are trying to email an invcoie using the default template.

Having looked at some threads here we tried using the following.

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

We get a response 403 forbidden.

The only way we have successfully managed to send an email for an invoice
is to post using xml in the format…

anemailaccounts@domain.co.ukInvoice
ref:ourref

Is there any way to post xml and get the invoice to email using the
default invoice template in freeagent?

We have tried sending empty xml
but
no joy?

Thanks

Hi Gary,

You’re right in that there’s currently no supported way to explicitly tell
the API to send an invoice right now and have it use the “defaults” that
FreeAgent autopopulates in the web app.

What is supported is the scheduling of invoices for a future date. If you
do this, the invoice will be sent using the “defaults”, assuming these are
correctly set up.

The API also supports the use of macros when sending emails, so you can
send something like:

{ “invoice”:
{ “email”:
{ “to”: “[billing_or_contact_email]”,
“subject”: “Invoice: [reference]”,
“body”: “…”,
“from”: “…”
}
}
}

I realise that neither of these solutions are what you’re asking for
specifically, but hopefully they allow you to get some way towards what
you’re trying to achieve.

Cheers,

-JOn Monday, 9 December 2013 12:23:03 UTC, Gary Fairchild wrote:

We are trying to email an invcoie using the default template.

Having looked at some threads here we tried using the following.

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

We get a response 403 forbidden.

The only way we have successfully managed to send an email for an invoice
is to post using xml in the format…

anemailacco...@domain.co.uk <javascript:>Invoice
ref:ourref

Is there any way to post xml and get the invoice to email using the
default invoice template in freeagent?

We have tried sending empty xml
but
no joy?

Thanks

Hi Jonathan,
I have set the invoice date to tomorrow 10th December.
I still cannot set status to mark_as_scheduled on the invoice.
FYI at that point in the process they are marked as draft - could that make a difference?
I can set mark_as_sent but not mark_as_cancelled or mark_as_scheduled----- Original Message -----

From: “Jonathan Barrett” jonathan@freeagent.com
To: “freeagent api” freeagent_api@googlegroups.com
Sent: Monday, December 9, 2013 2:26:23 PM
Subject: Re: Send invoice using the default template

Hi Gary,

For scheduling, the date used is the invoice date (e.g…, set the invoice date for tomorrow, then mark it as scheduled). FreeAgent don’t provide hourly granularity on the date used: when it’s been scheduled to go on a given day, it will be sent as soon as possible for that day.

You may be getting a forbidden error if the date is in the past: double check this and let me know if you’re still seeing problems.

Cheers,

-J

On Monday, 9 December 2013 13:29:24 UTC, Gary Fairchild wrote:

FYI we can mark as sent readily enough but if we simply swap in mark_as_scheduled for mark_as_sent (as per https://dev.freeagent.com/docs/invoices#mark-invoice-as-scheduled ) we get 403 forbidden.

On Monday, December 9, 2013 12:23:03 PM UTC, Gary Fairchild wrote:

We are trying to email an invcoie using the default template.

Having looked at some threads here we tried using the following.

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

We get a response 403 forbidden.

The only way we have successfully managed to send an email for an invoice is to post using xml in the format…

anemail acco...@domain.co.uk Invoice ref:ourref

Is there any way to post xml and get the invoice to email using the default invoice template in freeagent?

We have tried sending empty xml but no joy?

Thanks

You received this message because you are subscribed to a topic in the Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/freeagent_api/c6G4mHerhAw/unsubscribe .
To unsubscribe from this group and all its topics, send an email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api .
For more options, visit https://groups.google.com/groups/opt_out .

Hi Gary,

For scheduling, the date used is the invoice date (e.g…, set the invoice
date for tomorrow, then mark it as scheduled). FreeAgent don’t provide
hourly granularity on the date used: when it’s been scheduled to go on a
given day, it will be sent as soon as possible for that day.

You may be getting a forbidden error if the date is in the past: double
check this and let me know if you’re still seeing problems.

Cheers,

-JOn Monday, 9 December 2013 13:29:24 UTC, Gary Fairchild wrote:

FYI we can mark as sent readily enough but if we simply swap in
mark_as_scheduled for mark_as_sent (as per
https://dev.freeagent.com/docs/invoices#mark-invoice-as-scheduled) we get
403 forbidden.

On Monday, December 9, 2013 12:23:03 PM UTC, Gary Fairchild wrote:

We are trying to email an invcoie using the default template.

Having looked at some threads here we tried using the following.

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

We get a response 403 forbidden.

The only way we have successfully managed to send an email for an invoice
is to post using xml in the format…

anemailacco...@domain.co.uk <javascript:>Invoice
ref:ourref

Is there any way to post xml and get the invoice to email using the
default invoice template in freeagent?

We have tried sending empty xml
but
no joy?

Thanks

Thanks,
I think these some conflicting information going on in the docs and threads
it reads to me as thought you can get the end point to send right away
using the default.

Anyhow, its not imperative for invoices to be emailed right away so we’ll
do the schedule.

Can you give me an example of how to format a date for scheduling the
invoice also (to save us some trial and error) can that date be time
specific i.e. I could set it for later today, or does it have to be a day
in the future like tomorrow?

CheersOn Monday, December 9, 2013 12:52:06 PM UTC, Jonathan Barrett wrote:

Hi Gary,

You’re right in that there’s currently no supported way to explicitly tell
the API to send an invoice right now and have it use the “defaults” that
FreeAgent autopopulates in the web app.

What is supported is the scheduling of invoices for a future date. If you
do this, the invoice will be sent using the “defaults”, assuming these are
correctly set up.

The API also supports the use of macros when sending emails, so you can
send something like:

{ “invoice”:
{ “email”:
{ “to”: “[billing_or_contact_email]”,
“subject”: “Invoice: [reference]”,
“body”: “…”,
“from”: “…”
}
}
}

I realise that neither of these solutions are what you’re asking for
specifically, but hopefully they allow you to get some way towards what
you’re trying to achieve.

Cheers,

-J

On Monday, 9 December 2013 12:23:03 UTC, Gary Fairchild wrote:

We are trying to email an invcoie using the default template.

Having looked at some threads here we tried using the following.

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

We get a response 403 forbidden.

The only way we have successfully managed to send an email for an invoice
is to post using xml in the format…

anemailacco...@domain.co.ukInvoice
ref:ourref

Is there any way to post xml and get the invoice to email using the
default invoice template in freeagent?

We have tried sending empty xml
but
no joy?

Thanks

FYI we can mark as sent readily enough but if we simply swap in
mark_as_scheduled for mark_as_sent (as per
https://dev.freeagent.com/docs/invoices#mark-invoice-as-scheduled) we get
403 forbidden.On Monday, December 9, 2013 12:23:03 PM UTC, Gary Fairchild wrote:

We are trying to email an invcoie using the default template.

Having looked at some threads here we tried using the following.

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

We get a response 403 forbidden.

The only way we have successfully managed to send an email for an invoice
is to post using xml in the format…

anemailaccounts@domain.co.ukInvoice
ref:ourref

Is there any way to post xml and get the invoice to email using the
default invoice template in freeagent?

We have tried sending empty xml
but
no joy?

Thanks