Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > SDKs >

Reconciling batching of invoices (send in a batch)

Started by Gary Plowman -   in SDKs

Hi, we are using the .NET Xero SDK in our application and are refactoring how we post Invoices, Credit Notes and Bank Transactions to post multiple with one API call rather than one-by-one.





We are using the CreateInvoicesAsync/ CreateCreditNotesAsync/ CreateBankTransactionsAsync methods and passing a list of Invoices/Credit Notes/Bank Transactions to be created in Xero. We want to keep track of which item created in Xero maps to which invoice originating in our application. When we create multiple items with one of the above methods, we have observed that if we create 3 items in Xero with one API call (e.g. Invoices A,B & C), the invoices will be created in order matching that of the list we POST to Xero (i.e. the response will contain a list with the invoices in Xero corresponding to invoices A,B,C - the same order is maintained).




Our question is that will this always be the case that when we post many invoices to Xero with one call to CreateInvoicesAsync/ CreateCreditNotesAsync/ CreateBankTransactionsAsync. Will the created items in the response always be in the same order as the items in the original request?
This has not been tested and so we would not recommend you use this as reliable method of matching transactions.
 

Sally C (Community Manager)