Hi Thomas,
Yes this is a bash script was going to right to be able to change around
all the 700 invoices have just imported over XML from freshbooks.
Change it around but still same issue tried removing
TOKEN=mytoken
curl --request PUT
-H "Authorization: Bearer $TOKEN "
–verbose
https://api.freeagent.com/v2/invoices/:611227/transitions/mark_as_sent
should the : not be there (have tried without and with) also replaced the
ID just by putting text into header. *
Verbose output: *
Communications Ltd.; OU=EssentialSSL Wildcard; CN=*.freeagent.com
-
start date: 2013-03-05 00:00:00 GMT
-
expire date: 2015-03-05 23:59:59 GMT
-
subjectAltName: api.freeagent.com matched
-
issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA
Limited; CN=EssentialSSL CA
PUT /v2/invoices/611227/transitions/mark_as_sent HTTP/1.1
User-Agent: curl/7.21.0 (i486-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o
zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
Host: api.freeagent.com
Authorization: Bearer TOCKET
Accept: application/xml
< HTTP/1.1 411 Length Required
< Server: nginx/1.0.15
< Date: Sat, 13 Apr 2013 18:41:59 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 181
< Connection: close
<
411 Length Required
411 Length Required
nginx/1.0.15
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
Thank youOn Sat, Apr 13, 2013 at 6:17 PM, Thomas Haggett thomas@freeagent.comwrote:
Hey,
I think that, since you’re setting the “Content-Type” header, the server
is expecting a payload and, therefore, demanding you include a
“Content-Length” header (which is a requirement of the HTTP/1.1 spec). In
this case, a payload is not require, so you should be able to just drop the
Content type header from your call.
It also looks like the ID value isn’t being specified correctly - I’m
presuming this is a script, so the “$id” will be replaced by a integer.
This will leave an extra colon, that will probably be rejected by the
server.
Hope this helps,
Thomas
On Saturday, 13 April 2013, Christian Kortenhorst wrote:
Hi am am looking for some help have 700 invoices that need to mark as
sent tried to us curl but must be missing something
TOKEN=MYTOKEN
id=611227
curl --request PUT
-H "Authorization: Bearer $TOKEN "
-H “Accept: application/xml”
-H “Content-Type: application/xml”
–verbose
https://api.freeagent.com/v2/invoices/:$id/transitions/mark_as_sent
response I get is
411 Length Required
411 Length Required
nginx/1.0.15
Any help would be great.
–
You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
CK Computer Solutions
For all your computer needs
For all support questions please email support@cksolutions.ie
Sign up to news letter on homepage http://cksolutions.ie
http://cksolutions.ie%20
Christian Kortenhorst
mob: +353-(0)87-6183349
work: +353-(0)1-4853765
christian@cksolutions.ie | twitter: cksolutions | web: http://cksolutions.ie
review CK Solutions: http://goog_745474669Google Maps
linkedin: Christian Kortenhorst - CK Computer Solutions | LinkedIn
youtube: http://www.youtube.com/itsupportdublin
locate us: http://short.ie/cksoluitonsGoogle Maps
blog: Blog – CK Solutions