Job Attachments

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
giggida
Posts: 8
Joined: Thu Jun 02, 2022 4:57 pm

Job Attachments

Post by giggida » Thu Jun 02, 2022 5:07 pm

I am using a dev company to assist me in extracting the 'Attachments' from a Job and post to a third party software.

What is the method to extract the ACTUAL attachment itself?

I hope I am asking the right question here :D
robbertcha
Posts: 416
Joined: Thu Apr 15, 2021 10:07 pm

Re: Job Attachments

Post by robbertcha » Thu Jun 02, 2022 10:28 pm

Hi,

All of the attachment handlers support a /view/ route for accessing the file directly:

Code: Select all

 /api/v1.0/companies/{companyID}/jobs/{jobID}/attachments/{attachmentID}/view/
In addition, the file can be retrieved in base64 format:

Code: Select all

 /api/v1.0/companies/{companyID}/jobs/{jobID}/attachments/{attachmentID}?display=Base64
Robbert
API Developer | simPRO Software Group
demo
Posts: 17
Joined: Sat May 14, 2022 12:24 pm

Re: Job Attachments

Post by demo » Wed Jun 08, 2022 4:29 am

Hello Simpro,

I am facing an issue when I am getting Jobs Attachments from this API with Job ID: "/api/v1.0/companies/{companyID}/jobs/{jobID}/attachments/files/". So I am getting only ID and FileName in the response like this:

{
"ID": "aZFL00w7o-rIgjUGGrHZwXCy1CR7QXc6CbUQVxVLMqE",
"Filename": "61676 QA Questionnaire-20220607-29629.pdf"
}

Then I am using this API to get View of the attachments:

/api/v1.0/companies/{companyID}/jobs/{jobID}/attachments/{attachmentID}/view/

Then I am getting an Invalid Route error. How to use this API? Please give me a reference if you have one for it because I am stuck for a long time.

Thank You
robbertcha
Posts: 416
Joined: Thu Apr 15, 2021 10:07 pm

Re: Job Attachments

Post by robbertcha » Wed Jun 08, 2022 6:26 am

Hi,

So sorry for providing the incorrect endpoints, it should be

Code: Select all

/api/v1.0/companies/{companyID}/jobs/{jobID}/attachments/files/{fileID}/view/
and

Code: Select all

 /api/v1.0/companies/{companyID}/jobs/{jobID}/attachments/files/{fileID}?display=Base64
Please check it again and let us know if you're still facing the same issue, thank you
Robbert
API Developer | simPRO Software Group
Post Reply