Page 1 of 1

Job Attachments

Posted: Thu Jun 02, 2022 5:07 pm
by giggida
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

Re: Job Attachments

Posted: Thu Jun 02, 2022 10:28 pm
by robbertcha
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

Re: Job Attachments

Posted: Wed Jun 08, 2022 4:29 am
by demo
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

Re: Job Attachments

Posted: Wed Jun 08, 2022 6:26 am
by robbertcha
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