Sending invoices from API
I have created an invoice via the API and added line items to it.
Now the question is: how can I tell the system to send the invoice via the API?
Now the question is: how can I tell the system to send the invoice via the API?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?This is undocumented but here is how to do it:
The method is called "sending" so call it via:
https://...../invoices/id/sending.html?method_of_sending=email&email_self=true&send_to_contact=true&
Allowed values for the method_of_sending param: pdf_download, none, email_attachment, email.
email_self true/false (send yourself a copy of the email)
send_to_contact true/false (send a copy to the contact.
Notice the mime type is html. I'll have to add an xml response and document this method. Until that time, you can ignore the html response. If you want to pdf_download, just save the file as a pdf. -
Inappropriate?Here's what I'm doing:
I'm GETting
https://<<mybiz>>.lessaccounting.com/invoices/522017/sending.html?method_of_sending=email&email_self=true&send_to_contact=true&api_key=<<mykey>>
However, HTML response is: 500 internap server error
"Something's not right.
We've been notified about this issue and we'll take a look at it shortly. "
Should I be posting (which I tried and doesn't seem to work)? Or, is something wrong with my GET?
</mykey></mybiz> -
Inappropriate?also, if i POST to the URL above, it appears I just get the login screen within the HTML return.
-
Inappropriate?I've never tried doing this, that's why it's undocumented.
I just tried it and here's what you'll have to do. Change .html to .js. the html is returning a 302 but the js is returning javascript.
And yes, you're right, you'll have to do it as a POST.
I'll try to get an XML version up soon. -
Inappropriate?Ok, I have an xml version ready to go into tonight's deploy. I'm not sure I'll have the docs ready, but it'll be .xml instead of .js. Look for it (hopefully) before 10PM EST tonight.
-
Inappropriate?We are very close... with the .JS, I receive the message "you need to be logged in to do that". So, I think we need the restful API to do this right. I'll be on the lookout for your .xml version :)
-
Inappropriate?Yeah, you just need to submit the credentials to get that to work. The docs are almost done.
-
Inappropriate?Terriffic news! I tried the new sending.xml at 8pm tonight, and it worked perfectly! First, you are amazing responsive. Second, this is great and will save me alot of time! I'm a command line guy!
Loading Profile...



EMPLOYEE