Page 1 of 1

Retrieving invoices taking more time

Posted: Thu Oct 28, 2021 11:51 am
by sathish
Hi Team,

We're retrieving invoices from Simpro API for one of our clients. Recently retrieving invoices taking more time and some of the invoices are missing. If i reload the API again, then I can get the missed invoice. Below are the API Methods we use to retrieve invoices using GetHeader to retrieve invoices from the start date .

URL: https://'.$this->simpro_server.'/api/v1.0/companies/'.$this->company_id.'/customerInvoices/?columns=ID,Customer,RecurringInvoice,Status,Stage,IsPaid,IsCredit,Jobs,Total&IsCredit=false&pageSize=250'

It is a multi-company setup & we've to loop each company invoices with a start date of 2-4 days before. We have to fetch all invoices and check for the custom status name "Coins Import"

And retrieve specific Job information for the invoiced job - https://'.$this->simpro_server.'/api/v1.0/companies/'.$company_id.'/jobs/'.$job_no.'?columns=Customer,OrderNo,DateIssued,DueDate,RequestNo

And retrieve specific customer invoice - https://'.$this->simpro_server.'/api/v1.0/companies/'.$companyID.'/jobs/'.$jobID.'/invoices/'.$invoiceID.'?columns=ID,DateIssued,PaymentTerms

To do all in a loop, we're missing some invoices. Is there any quick way to retrieve the invoice information? i.e like Webhooks

I can reply the client name in PM.

Regards,
Sathish Kumar.R

Re: Retrieving invoices taking more time

Posted: Fri Oct 29, 2021 7:21 am
by Muqeet
Hello Satish,

Unfortunately I can't help you with the specific workflow you have. It seems like extremely resource intensive task, may be reduced the number of invoices in a single request down to 100 from 250...

Also, there are no webhooks available for invoices.