Page 1 of 1

Retrieving Contract Records All Question

Posted: Tue Feb 04, 2020 3:55 am
by Tiago Valente
Hi SIMPRO,

I've looked at the API documentation and it appears you have to pass in each get to the API with the individual customer ID to get the contracts pertaining to that customer.

Is it possible to just call the entire table? Or this the only way of getting contracts?

/api/v1.0/companies/{companyID}/customers/{customerID}/contracts/

http://developer.simprogroup.com/apidoc ... d558e57567

Re: Retrieving Contract Records All Question

Posted: Tue Feb 04, 2020 4:22 am
by Muqeet
Hi Tiago,

Currently that's the only way to load customer contracts, one at a time. We could work on an endpoint which would list all contracts with customer IDs in future, like /customerInvoices, etc

I am moving this topic to feature requests.

Re: Retrieving Contract Records All Question

Posted: Tue Feb 04, 2020 4:42 am
by Tiago Valente
Thank you

I'll loop each of the records.

Will the contracts be specific to the company IDs or that's irrelevant? Jobs are specific to the company IDs for instance

Re: Retrieving Contract Records All Question

Posted: Tue Feb 04, 2020 5:44 am
by Muqeet
There is no relevance between contracts and companies. Contract is directly related to a customer.

Re: Retrieving Contract Records All Question

Posted: Tue Feb 04, 2020 9:48 pm
by Tiago Valente
Thought so, thanks for confirming

Re: Retrieving Contract Records All Question

Posted: Tue Oct 26, 2021 5:24 am
by gavinhodge
Hi, I'd like to add my +1 to this feature request. I have a customer wanting to export an up-to-date list of contracts, and it's not currently practical via the API when a request per-customer is required.

Thanks in advance,
Gavin.