katycomputer Posted December 4, 2017 Report Share Posted December 4, 2017 The API document provides this example for adding invoices, how do I add clients via curl / API? curl https://yourdomain.com/installpath/api/invoices/add.json -u username:key -d 'vars[client_id]=1' -d 'vars[date_billed]=2013-11-20T16:43:00-07:00' -d 'vars[date_due]=2013-11-20T16:43:00-07:00' -d 'vars[currency]=USD' -d 'vars[lines][0][description]=Line item #1' -d 'vars[lines][0][amount]=5.99' -d 'vars[lines][1][description]=Line item #2' -d 'vars[lines][1][amount]=3.75' -d 'vars[lines][1][qty]=2' -d 'vars[delivery][0]=email' Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted December 4, 2017 Report Share Posted December 4, 2017 curl https://yourdomain.com/installpath/api/clients/add.json -u username:key Params to pass : http://source-docs.blesta.com/class-Clients.html#_add https://docs.blesta.com/display/user/Creating+Clients#CreatingClients-CreatingClients Quote Link to comment Share on other sites More sharing options...
0 katycomputer Posted December 4, 2017 Author Report Share Posted December 4, 2017 Thanks Michael. So if I am reading the documents correctly, first I need to add client, then the contact & user. How do we make sure these all get linked? Quote Link to comment Share on other sites More sharing options...
0 activa Posted December 4, 2017 Report Share Posted December 4, 2017 I think the clients.add will do the job for you . Quote Link to comment Share on other sites More sharing options...
0 katycomputer Posted December 4, 2017 Author Report Share Posted December 4, 2017 Activa, thanks - I'll experiment more when I get "The authorization details given appear to be invalid." issue resolved. Quote Link to comment Share on other sites More sharing options...
Question
katycomputer
The API document provides this example for adding invoices, how do I add clients via curl / API?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.