Retrieving invoices taking more time
Posted: Thu Oct 28, 2021 11:51 am
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
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