How do you use post to create a new invoice with API and XML

Hi James,

Have you read over Tamlyn Rhodes’s blog post from the list a few months ago?

http://outlandishideas.co.uk/blog/2012/04/freeagent-api-php-oauth2/

Hope this helps,

-JOn Wednesday, April 10, 2013 2:52:04 PM UTC+1, james stevenson wrote:

I am having the same issue, after being able to authorise my app with my
account, I receive a token in the url? what do I do with this? and how do I
create a new contact and an invoice

If we had some examples using php curl this would help alot.

On Thursday, October 18, 2012 5:54:48 PM UTC+1, Go Mike wrote:

I am pretty familiar with certain code and webstie design as I have
created a few websites. But this is my first time using API.

I’ve seen the example on this page https://dev.freeagent.com/docs/invoices

What I am wondering is where do you put the oAuth or user in the formula
so it goes to your account? It fails to mention this on the page.

How do you execute it with XML, just load the page on your FTP?

If I could see an example that’d be great, I can take it from there.

Thanks

Hi Ben,

I am runing on Windows 7. I tried downloading curl but the executable file
reads that this is not a proper WIN32 program. Really stuck here.

MikeOn Friday, October 26, 2012 10:10:19 PM UTC+1, Ben wrote:

Mike,

What operating system are you using? curl is already installed on some
OSes (for instance, OSX).

You can download it for just about any OS here:
http://curl.haxx.se/download.html, but if you’re on a Unix system, I’d
recommend just using your package manager.

Best wishes,
Ben

On Fri, Oct 26, 2012 at 5:28 PM, Go Mike <to...@goscotlandtours.com<javascript:> wrote:

Hi Ben,

Thanks for this, could you tell me the best place to download Curl?

On Thursday, October 18, 2012 10:48:01 PM UTC+1, Ben wrote:

Hi Mike,

Once you get an Access Token (see directions here https://dev.freeagent.
**com/docs/quick_start https://dev.freeagent.com/docs/quick_start)
you can access an account by including the token in the HTTP headers.

The specifics of how to set these headers depends on which HTTP library
you use, but here is an example of doing so with curl on on the command
line: https://dev.freeagent.**com/docs/using_curlhttps://dev.freeagent.com/docs/using_curl

Does that help?

Best wishes,
Ben

On Thu, Oct 18, 2012 at 5:54 PM, Go Mike to...@goscotlandtours.comwrote:

I am pretty familiar with certain code and webstie design as I have
created a few websites. But this is my first time using API.

I’ve seen the example on this page https://dev.freeagent.com/**docs/invoices
https://dev.freeagent.com/docs/invoices

What I am wondering is where do you put the oAuth or user in the
formula so it goes to your account? It fails to mention this on the page.

How do you execute it with XML, just load the page on your FTP?

If I could see an example that’d be great, I can take it from there.

Thanks


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/-/ZjRkqqkKyScJhttps://groups.google.com/d/msg/freeagent_api/-/ZjRkqqkKyScJ
.
To post to this group, send email to freeag...@googlegroups.com
.
To unsubscribe from this group, send email to freeagent_ap…@**
googlegroups.com.

For more options, visit this group at http://groups.google.com/**
group/freeagent_api?hl=enhttp://groups.google.com/group/freeagent_api?hl=en
.

Ben Brinckerhoff
Senior Engineer
FreeAgent
0131 543 3183

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/**freeagentapphttp://facebook.com/freeagentapp

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


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/-/fYgVJL-KQ4IJ.

To post to this group, send email to freeag...@googlegroups.com<javascript:>
.
To unsubscribe from this group, send email to
freeagent_ap...@googlegroups.com <javascript:>.
For more options, visit this group at
http://groups.google.com/group/freeagent_api?hl=en.

Ben Brinckerhoff
Senior Engineer
FreeAgent
0131 543 3183

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/freeagentapp

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

Hi Mike,

If you head over to http://curl.haxx.se/download.html and download the Win32 Generic binary file.

You’ll need to put it somewhere on your Windows path - I’d suggest you copy it (you’ll need administrator privileges) to C:\Windows\System32. You can then open up a command prompt by pressing Windows + R to bring up the Run box and type in “cmd” and pressing enter.

Once the box is up, you’ll be able to use curl straight away.

Hope this helps!

Kindest regards,

Ryan Stenhouse

@ryanstenhouse / github.com/HHRyOn Sunday, 28 October 2012 at 21:02, Go Mike wrote:

Hi Ben,

I am runing on Windows 7. I tried downloading curl but the executable file reads that this is not a proper WIN32 program. Really stuck here.

Mike

On Friday, October 26, 2012 10:10:19 PM UTC+1, Ben wrote:

Mike,

What operating system are you using? curl is already installed on some OSes (for instance, OSX).

You can download it for just about any OS here: http://curl.haxx.se/download.html, but if you’re on a Unix system, I’d recommend just using your package manager.

Best wishes,
Ben

On Fri, Oct 26, 2012 at 5:28 PM, Go Mike <to...@goscotlandtours.com (javascript:)> wrote:

Hi Ben,

Thanks for this, could you tell me the best place to download Curl?

On Thursday, October 18, 2012 10:48:01 PM UTC+1, Ben wrote:

Hi Mike,

Once you get an Access Token (see directions here https://dev.freeagent.com/docs/quick_start) you can access an account by including the token in the HTTP headers.

The specifics of how to set these headers depends on which HTTP library you use, but here is an example of doing so with curl on on the command line: https://dev.freeagent.com/docs/using_curl

Does that help?

Best wishes,
Ben

On Thu, Oct 18, 2012 at 5:54 PM, Go Mike to...@goscotlandtours.com wrote:

I am pretty familiar with certain code and webstie design as I have created a few websites. But this is my first time using API.

I’ve seen the example on this page https://dev.freeagent.com/docs/invoices (https://dev.freeagent.com/docs/invoices)

What I am wondering is where do you put the oAuth or user in the formula so it goes to your account? It fails to mention this on the page.

How do you execute it with XML, just load the page on your FTP?

If I could see an example that’d be great, I can take it from there.

Thanks


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/-/ZjRkqqkKyScJ.
To post to this group, send email to freeag...@googlegroups.com.
To unsubscribe from this group, send email to freeagent_ap...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/freeagent_api?hl=en.


Ben Brinckerhoff
Senior Engineer

FreeAgent
0131 543 3183

Web. freeagent.com (http://www.freeagent.com/)
Blog. freeagent.com/blog (http://freeagent.com/blog)

Twitter. @freeagent (https://twitter.com/#!/freeagent)
Facebook. facebook.com/freeagentapp (http://facebook.com/freeagentapp)

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


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/-/fYgVJL-KQ4IJ.

To post to this group, send email to freeag...@googlegroups.com (javascript:).
To unsubscribe from this group, send email to freeagent_ap...@googlegroups.com (javascript:).
For more options, visit this group at http://groups.google.com/group/freeagent_api?hl=en.


Ben Brinckerhoff
Senior Engineer

FreeAgent
0131 543 3183

Web. freeagent.com (http://www.freeagent.com/)
Blog. freeagent.com/blog (http://freeagent.com/blog)

Twitter. @freeagent (https://twitter.com/#!/freeagent)
Facebook. facebook.com/freeagentapp (http://facebook.com/freeagentapp)

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


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/-/UPxPOcYt27IJ.
To post to this group, send email to freeagent_api@googlegroups.com (mailto:freeagent_api@googlegroups.com).
To unsubscribe from this group, send email to freeagent_api+unsubscribe@googlegroups.com (mailto:freeagent_api+unsubscribe@googlegroups.com).
For more options, visit this group at http://groups.google.com/group/freeagent_api?hl=en.

Hi Mike,

Once you get an Access Token (see directions here
https://dev.freeagent.com/docs/quick_start) you can access an account by
including the token in the HTTP headers.

The specifics of how to set these headers depends on which HTTP library you
use, but here is an example of doing so with curl on on the command line:
https://dev.freeagent.com/docs/using_curl

Does that help?

Best wishes,
BenOn Thu, Oct 18, 2012 at 5:54 PM, Go Mike tours@goscotlandtours.com wrote:

I am pretty familiar with certain code and webstie design as I have
created a few websites. But this is my first time using API.

I’ve seen the example on this page https://dev.freeagent.com/docs/invoices

What I am wondering is where do you put the oAuth or user in the formula
so it goes to your account? It fails to mention this on the page.

How do you execute it with XML, just load the page on your FTP?

If I could see an example that’d be great, I can take it from there.

Thanks


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/-/ZjRkqqkKyScJ.
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.

Ben Brinckerhoff
Senior Engineer
FreeAgent
0131 543 3183

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/freeagentapp

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

Mike,

What operating system are you using? curl is already installed on some OSes
(for instance, OSX).

You can download it for just about any OS here:
http://curl.haxx.se/download.html, but if you’re on a Unix system, I’d
recommend just using your package manager.

Best wishes,
BenOn Fri, Oct 26, 2012 at 5:28 PM, Go Mike tours@goscotlandtours.com wrote:

Hi Ben,

Thanks for this, could you tell me the best place to download Curl?

On Thursday, October 18, 2012 10:48:01 PM UTC+1, Ben wrote:

Hi Mike,

Once you get an Access Token (see directions here https://dev.freeagent.*
*com/docs/quick_start https://dev.freeagent.com/docs/quick_start) you
can access an account by including the token in the HTTP headers.

The specifics of how to set these headers depends on which HTTP library
you use, but here is an example of doing so with curl on on the command
line: https://dev.freeagent.**com/docs/using_curlhttps://dev.freeagent.com/docs/using_curl

Does that help?

Best wishes,
Ben

On Thu, Oct 18, 2012 at 5:54 PM, Go Mike to...@goscotlandtours.comwrote:

I am pretty familiar with certain code and webstie design as I have
created a few websites. But this is my first time using API.

I’ve seen the example on this page https://dev.freeagent.com/**docs/invoices
https://dev.freeagent.com/docs/invoices

What I am wondering is where do you put the oAuth or user in the formula
so it goes to your account? It fails to mention this on the page.

How do you execute it with XML, just load the page on your FTP?

If I could see an example that’d be great, I can take it from there.

Thanks


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/-/ZjRkqqkKyScJhttps://groups.google.com/d/msg/freeagent_api/-/ZjRkqqkKyScJ
.
To post to this group, send email to freeag...@googlegroups.com
.
To unsubscribe from this group, send email to freeagent_ap…@**
googlegroups.com.

For more options, visit this group at http://groups.google.com/**
group/freeagent_api?hl=enhttp://groups.google.com/group/freeagent_api?hl=en
.

Ben Brinckerhoff
Senior Engineer
FreeAgent
0131 543 3183

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/**freeagentapp http://facebook.com/freeagentapp

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


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/-/fYgVJL-KQ4IJ.

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.

Ben Brinckerhoff
Senior Engineer
FreeAgent
0131 543 3183

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/freeagentapp

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

Hi Ben,

Thanks for this, could you tell me the best place to download Curl?On Thursday, October 18, 2012 10:48:01 PM UTC+1, Ben wrote:

Hi Mike,

Once you get an Access Token (see directions here
https://dev.freeagent.com/docs/quick_start) you can access an account by
including the token in the HTTP headers.

The specifics of how to set these headers depends on which HTTP library
you use, but here is an example of doing so with curl on on the command
line: https://dev.freeagent.com/docs/using_curl

Does that help?

Best wishes,
Ben

On Thu, Oct 18, 2012 at 5:54 PM, Go Mike <to...@goscotlandtours.com<javascript:> wrote:

I am pretty familiar with certain code and webstie design as I have
created a few websites. But this is my first time using API.

I’ve seen the example on this page https://dev.freeagent.com/docs/invoices

What I am wondering is where do you put the oAuth or user in the formula
so it goes to your account? It fails to mention this on the page.

How do you execute it with XML, just load the page on your FTP?

If I could see an example that’d be great, I can take it from there.

Thanks


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/-/ZjRkqqkKyScJ.
To post to this group, send email to freeag...@googlegroups.com<javascript:>
.
To unsubscribe from this group, send email to
freeagent_ap...@googlegroups.com <javascript:>.
For more options, visit this group at
http://groups.google.com/group/freeagent_api?hl=en.

Ben Brinckerhoff
Senior Engineer
FreeAgent
0131 543 3183

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/freeagentapp

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