Mark as sent

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.

Hey,

No, the “:” shouldn’t be there - the URL should be:

https://api.freeagent.com/v2/invoices/611227/transitions/mark_as_sent

Have you tried specifying a content-length of 0?

curl -I -XPUT -H “Content-Length: 0” -H “Authorization: Bearer $TOKEN” https://api.freeagent.com/v2/invoices/611227/transitions/mark_as_sent

Thomas.On 13 Apr 2013, at 19:46, Christian Kortenhorst christian@cksolutions.ie wrote:

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:

  • About to connect() to api.freeagent.com port 443 (#0)
  • Trying 109.73.126.94… connected
  • Connected to api.freeagent.com (109.73.126.94) port 443 (#0)
  • successfully set certificate verify locations:
  • CAfile: none
    CApath: /etc/ssl/certs
  • SSLv3, TLS handshake, Client hello (1):
  • SSLv3, TLS handshake, Server hello (2):
  • SSLv3, TLS handshake, CERT (11):
  • SSLv3, TLS handshake, Server finished (14):
  • SSLv3, TLS handshake, Client key exchange (16):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSL connection using RC4-SHA
  • Server certificate:
  •    subject: OU=Domain Control Validated; OU=Hosted by XILO 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
    
  •    SSL certificate verify ok.
    

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 you

On Sat, Apr 13, 2013 at 6:17 PM, Thomas Haggett thomas@freeagent.com wrote:
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

Christian Kortenhorst
mob: +353-(0)87-6183349
work: +353-(0)1-4853765
christian@cksolutions.ie | twitter: cksolutions | web: http://cksolutions.ie

review CK Solutions: Google Maps
linkedin: Christian Kortenhorst - CK Computer Solutions | LinkedIn
youtube: http://www.youtube.com/itsupportdublin
locate us: Google Maps
blog: Blog – CK Solutions


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.

Thanks for that it works a treat. (however I had laready downloaded iMacro to click though all invoices and mark as Sent (will know for next time).

Ah good, thanks for the follow-up. On the face of it, it looks odd, but if I recall correctly the HTTP specification expects a payload for POST and PUT requests - you have to be explicit if you’re not including one.

Glad thats all working for you :slight_smile:

Thomas.> On Mon, Apr 15, 2013 at 4:24 PM, Thomas Haggett thomas@freeagent.com wrote:

Hey,

No, the “:” shouldn’t be there - the URL should be:

https://api.freeagent.com/v2/invoices/611227/transitions/mark_as_sent

Have you tried specifying a content-length of 0?

curl -I -XPUT -H “Content-Length: 0” -H “Authorization: Bearer $TOKEN” https://api.freeagent.com/v2/invoices/611227/transitions/mark_as_sent

Thomas.

On 13 Apr 2013, at 19:46, Christian Kortenhorst christian@cksolutions.ie wrote:

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:

  • About to connect() to api.freeagent.com port 443 (#0)
  • Trying 109.73.126.94… connected
  • Connected to api.freeagent.com (109.73.126.94) port 443 (#0)
  • successfully set certificate verify locations:
  • CAfile: none
    CApath: /etc/ssl/certs
  • SSLv3, TLS handshake, Client hello (1):
  • SSLv3, TLS handshake, Server hello (2):
  • SSLv3, TLS handshake, CERT (11):
  • SSLv3, TLS handshake, Server finished (14):
  • SSLv3, TLS handshake, Client key exchange (16):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSL connection using RC4-SHA
  • Server certificate:
  •    subject: OU=Domain Control Validated; OU=Hosted by XILO 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
    
  •    SSL certificate verify ok.
    

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 you

On Sat, Apr 13, 2013 at 6:17 PM, Thomas Haggett thomas@freeagent.com wrote:
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

Christian Kortenhorst
mob: +353-(0)87-6183349
work: +353-(0)1-4853765
christian@cksolutions.ie | twitter: cksolutions | web: http://cksolutions.ie

review CK Solutions: Google Maps
linkedin: Christian Kortenhorst - CK Computer Solutions | LinkedIn
youtube: http://www.youtube.com/itsupportdublin
locate us: Google Maps
blog: Blog – CK Solutions


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

Christian Kortenhorst
mob: +353-(0)87-6183349
work: +353-(0)1-4853765
christian@cksolutions.ie | twitter: cksolutions | web: http://cksolutions.ie

review CK Solutions: Google Maps
linkedin: Christian Kortenhorst - CK Computer Solutions | LinkedIn
youtube: http://www.youtube.com/itsupportdublin
locate us: Google Maps
blog: Blog – CK Solutions


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.

Hi Thomas,

Thanks for that it works a treat. (however I had laready downloaded iMacro
to click though all invoices and mark as Sent (will know for next time).

Thank youOn Mon, Apr 15, 2013 at 4:24 PM, Thomas Haggett thomas@freeagent.comwrote:

Hey,

No, the “:” shouldn’t be there - the URL should be:

https://api.freeagent.com/v2/invoices/611227/transitions/mark_as_sent

Have you tried specifying a content-length of 0?

curl -I -XPUT -H “Content-Length: 0” -H “Authorization: Bearer $TOKEN”
https://api.freeagent.com/v2/invoices/611227/transitions/mark_as_sent

Thomas.

On 13 Apr 2013, at 19:46, Christian Kortenhorst christian@cksolutions.ie wrote:

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: *

  • About to connect() to api.freeagent.com port 443 (#0)
  • Trying 109.73.126.94… connected
  • Connected to api.freeagent.com (109.73.126.94) port 443 (#0)
  • successfully set certificate verify locations:
  • CAfile: none
    CApath: /etc/ssl/certs
  • SSLv3, TLS handshake, Client hello (1):
  • SSLv3, TLS handshake, Server hello (2):
  • SSLv3, TLS handshake, CERT (11):
  • SSLv3, TLS handshake, Server finished (14):
  • SSLv3, TLS handshake, Client key exchange (16):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSL connection using RC4-SHA
  • Server certificate:
  •    subject: OU=Domain Control Validated; OU=Hosted by XILO
    

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

  •    SSL certificate verify ok.
    

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 you

On 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_745474669/Google 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


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

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: *

  • About to connect() to api.freeagent.com port 443 (#0)
  • Trying 109.73.126.94… connected
  • Connected to api.freeagent.com (109.73.126.94) port 443 (#0)
  • successfully set certificate verify locations:
  • CAfile: none
    CApath: /etc/ssl/certs
  • SSLv3, TLS handshake, Client hello (1):
  • SSLv3, TLS handshake, Server hello (2):
  • SSLv3, TLS handshake, CERT (11):
  • SSLv3, TLS handshake, Server finished (14):
  • SSLv3, TLS handshake, Client key exchange (16):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSL connection using RC4-SHA
  • Server certificate:
  •    subject: OU=Domain Control Validated; OU=Hosted by XILO
    

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

  •    SSL certificate verify ok.
    

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

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,
ThomasOn 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 <javascript:_e({},
‘cvml’, ‘freeagent_api%2Bunsubscribe@googlegroups.com’);>.
To post to this group, send email to freeagent_api@googlegroups.com<javascript:_e({}, ‘cvml’, ‘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.

Hi Phil,

I’m afraid you can’t use status to mark an invoice as sent when you create
it. Instead you can PUT a request to the mark_as_sent invoice transaction
endpoint to change the status of the invoice after it has been created.
This is documented on the API docs which you can view at
FreeAgent Developer Dashboard.

I hope this helps.

Regards,
Harry MillsOn Mon, Apr 15, 2013 at 4:15 PM, phil dowling philipdowling@gmail.comwrote:

Hi All

Is it possible to set an invoice to “mark as sent” automatically upon
creation using the xml (SEE STATUS BELOW)

e.g.

<?xml version="1.0" encoding="UTF-8"?>
                <invoice>
                    <contact>

https://api.freeagent.com/v2/contacts/0001
2001-12-12T00:00:00+00:00
2001-12-17T00:00:00+00:00
003
GBP
1.0
0.0
MARK AS SENT
false
5


Test InvoiceItem
Hours
0.0
0.0


Thanks in advance


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.