What?
A really quick article for anyone who got stumped by the same issue: How to send multiple invoices to Xero in one API call?

Why?
Our use-case is in Zoho Deluge which couldn't generate more than 5 invoices in a scheduled task because Xero only allows 5 concurrent connections at one time... And Zoho was trying to send about 7 at a time (as in schedule created 7 Zoho invoices but only 5 Xero invoices). Our solution: Send all Zoho invoices in API call to Xero... apparently it can accept up to 60 invoices in one call.

How?
Crazy simple solution, your JSON needs to have the key "Invoices" and the list of invoices to create:
copyraw
{"Invoices":[... list of invoices ...]}
  1.  {"Invoices":[... list of invoices ...]} 
Category: Xero :: Article: 757

Xero API: Standard PHP/cURL Create Invoice

What?
This is an article documenting a generic script that can be used to push an invoice to the demo Xero environment. Following the steps below will connect you to the Demonstration environment of Xero at no cost to you the developer.

How?
Similar to my ZohoAPI script the process is:
  1. Start with a HTML form to add your client ID/client Secret/scopes and Redirect URI. These get stored in a temporary file to retrieve later.
  2. Then you get a button that will return the "CODE" variable via GET (URL). Clicking on this will get the CODE variable and use it to generate a refresh token.
  3. Then with the refresh token generate an access token.
  4. Then with the access token get a connection "TenantID".
  5. Then with the tenantID we can retrieve records and/or finally create an invoice (accounts receivables).

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

following   order   note   create   list   function   code   need   first   added   name   page   value   files   error   data   display   find   server   case   website   parameter   system   time   client   would   script   using   record   date   joomla   creator   database   uploaded   deluge   solution   field   work   table   zoho   report   source   where   mysql   used   file   license   version   windows   user   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.