Problem with the sending invoice API

26 views
Skip to first unread message

Peter Braswell

unread,
Oct 20, 2013, 7:38:23 PM10/20/13
to less-acco...@googlegroups.com
All,
I'm having issues with sending an invoice through the LA API.  The invoice that I'm sending is valid.  I'm using curl with the following command:


The invoice definitely exists.  My API key and credentials are all correct (as per the success of other calls) but the call returns an HTML page that says (among other things):

<p>The page you're looking for doesn't exist. Maybe you entered it wrong? We're going to look into this issue. Don't fret, we love you.</p>

What am I doing wrong??

TIA,
Peter

Steven Bristol

unread,
Oct 21, 2013, 8:20:01 AM10/21/13
to less-acco...@googlegroups.com
I think you have two problems:

1. You should be doing a post. So "-X POST" instead of get.
2. You must use basic auth so add either "--anyauth" or "--basic"

steve

Peter Braswell

unread,
Oct 21, 2013, 8:55:38 AM10/21/13
to less-acco...@googlegroups.com, st...@lessaccounting.com
Steven,
Thanks for the correction.  This makes sense (POST) but I was following the API doco, so it looks like there's a problem there.  From the API doco:

HTTP Verb/URL:GET https://<business_name>.lessaccounting.com/invoices/1/sending.xml

POST-ing worked just fine.  I feel dumb not just trying that before I posted the question.

Many thanks,
Peter

Steven Bristol

unread,
Oct 21, 2013, 9:36:12 AM10/21/13
to less-acco...@googlegroups.com
On Mon, Oct 21, 2013 at 8:55 AM, Peter Braswell <peter.b...@gmail.com> wrote:
Steven,
Thanks for the correction.  This makes sense (POST) but I was following the API doco, so it looks like there's a problem there.  From the API doco:

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/invoices/1/sending.xml

POST-ing worked just fine.  I feel dumb not just trying that before I posted the question.

Many thanks,
Peter


I'll get the docs fixed.​​
Reply all
Reply to author
Forward
0 new messages