Get Simpro All Jobs

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
harpreet
Posts: 7
Joined: Wed Jul 04, 2018 9:44 am

Get Simpro All Jobs

Post by harpreet » Thu Sep 27, 2018 9:49 am

Hello,
I was using jobs endpoint of your API.
/api/v1.0/companies/{companyID}/jobs/

It was giving me full set of all available jobs, but today i'm getting only 30 jobs from same endpoint.
I can't get all the jobs as I have no way to use the paging with same endpoint. I have check the documentation again and could not find any API help me to get pagination.
Please help me to get all jobs from your endpoint.

Thanks
rick.lan
Posts: 274
Joined: Wed May 30, 2018 6:14 am

Re: Get Simpro All Jobs

Post by rick.lan » Fri Sep 28, 2018 12:39 am

Hi harpreet,

Once you sent the request, the pagination information should be showing in the response header, something like this:

Code: Select all

Link →<https://client.simprosuite.com/api/v1.0/companies/0/jobs/?page=2>; rel="next", <https://client.simprosuite.com/api/v1.0/companies/0/jobs/?page=904>; rel="last", <https://client.simprosuite.com/api/v1.0/companies/0/jobs/?page=1>; rel="first"
you can then parse that information to retrieve the next page.

kind regards,

Rick
Rick Lan
API Developer | simPRO Software Group
harpreet
Posts: 7
Joined: Wed Jul 04, 2018 9:44 am

Re: Get Simpro All Jobs

Post by harpreet » Fri Sep 28, 2018 5:37 am

Thanks Rick , your help did work.

Now I want to get last hour modified jobs. Can you please help?
rick.lan
Posts: 274
Joined: Wed May 30, 2018 6:14 am

Re: Get Simpro All Jobs

Post by rick.lan » Wed Oct 03, 2018 12:26 am

Hi harpreet,

sorry for the late reply, you can add

Code: Select all

If-Modified-Since
to header, e.g.

Code: Select all

If-Modified-Since: Wed, 21 Oct 2016 07:28:00 GMT
This will give you all modified jobs since 21/Oct/2016 7:28:00.

Please note that we are adding this feature gradually so not all the routes support this header.

cheers,

Rick
Rick Lan
API Developer | simPRO Software Group
Post Reply