Search... K
Appearance
Welcome!
Welcome to the new PCRecruiter API documentation website!
We plan to use this area to announce upcoming changes and additions to our API, so please keep an eye out here for future announcements.
Get Started!
Appearance
The attachments endpoint is used to view attachments for the 3 primary record types in PCRecruiter, Candidates, Companies and Positions. This endpoint can be used to view a list of attachments for a specific record and retrieve the attachment id of a specific attachment. When querying the attachments endpoint, you will want to ensure to include the record type for attachments you are searching for. The available record types are Candidates, Companies and Positions. Ex: /Candidates/attachments
Once the id of an attachment has been retrieved, another call to the attachments endpoint can be made to retrieve the data within the attachment. All attachments in the response will be a base64 encoded URL where the attachment can be viewed.
GET /rest/api/globalV2/attachments/
Authorization: BEARER {SessionId}{
"method": "GET",
"url": "https://www2.pcrecruiter.net/rest/api/globalV2/attachments/{record id}",
"headers": {
"Content-Type": "application/json"
"Authorization": "BEARER Token"
},
"path"{
"record id": record id,
}
}{
"TotalRecords": 1,
"Results":\[
{
"AttachmentId": {attachment Id},
"Name": "File\_name",
"Type": "Resume",
"Description": "Attachment Description",
"Size": 456263,
"Date": "2018-12-05T16:54:10"
}
\]
}TIP
This API call is used to retrieve a full list of the attachments for the record id specified in the query. The response includes the AttachmentId which can be used to retrieve the base64 URL for an exact attachment. The record id will be the CandidateId, CompanyId or JobId based on which record type you are looking for. You can view the resources for Candidates, Companies and Positions to view more on how to retrieve the record id for a specific record.
GET /rest/api/Candidates/{record id}/attachments/{attachment id}
Authorization: BEARER {SessionId}{
"method": "GET",
"url": "https://www2.pcrecruiter.net/rest/api/Candidates/{record id}/attachments/{attachment id}",
"headers": {
"Content-Type": "application/json",
"Authorization": "BEARER Token"
},
"path":{
"record id": record id,
"attachment id": attachment id
}
}{
"AttachmentId": {attachment id},
"Name": "{attachment name}",
"Type": "Resume",
"Description": "Attachment Description",
"Size": 456263,
"Date": "2018-12-05T16:54:10",
"Data": "aHR0cHM6Ly93d3cucGNyZWNydWl0ZXIubmV0L2FwaWRvY3NfdjIv
IyEvYXR0YWNobWVudHMvR2V0QXR0YWNobWVudF9nZXRfMA=="
}TIP
This API call is similar to the first with the addition of the attachment id appended to the end of the request. This tells PCRecruiter to retrieve data for only that specific attachment. Included in the response is the data parameter which will be the base64 URL of the attachment which can be viewed once decoded.
GET /rest/api/Candidates/attachments/
Authorization: BEARER {SessionId}{
"method": "GET",
"url": "https://www2.pcrecruiter.net/rest/api/Candidates/attachments",
"headers": {
"Content-Type": "application/json",
"Authorization": "BEARER Token"
},
}{
"TotalRecords": 2,
"Results":\[
{
"AttachmentId": {attachment id},
"Name": "{attachment name}",
"Type": "HTML",
"Description": "Attachment Description",
"Size": 3261,
"Date": "2018-08-28T15:14:36"
},
{
"AttachmentId": {attachment id},
"Name": File\_name,
"Type": "Profile",
"Description": "Attachment Description",
"Size": 19850,
"Date": "2018-10-12T15:44:52"
}
\]
}TIP
This call to attachments does not specify a record id but does specify a record type. This will return all attachments for that record type. This does not return a record id in the response, so it is suggested to retrieve the record id from the corresponding record type endpoint if this information is needed.
POST /rest/api/Candidates/{record id}/attachments
Authorization: BEARER {SessionId}
{
"Name": "{attachment name}",
"Type": "Upload",
"Description": "{attachment description}",
"Date": "",
"Data": "UENSZWNydWl0ZXIKTWFpbiBTZXF1ZW5jZSBUZWNobm9sb2d5C
jQ0MjAgU2hlcndpbiBSb2FkCldpbGxvdWdoYnksIE9
oaW8gNDQwOTQKKDQ0MCkgOTQ2LTUyMTQ="
}{
"method": "POST",
"url": "https://www2.pcrecruiter.net/rest/api/Candidates/{record id}/attachments",
"headers": {
"Content-Type": "application/json",
"Authorization": "BEARER Token"
},
"body": {
"Name": "attachment name",
"Type": "Upload",
"Description": "attachment description",
"Date": "",
"Data": "BASE64 encoded string"
},
"path" {
"record id": "record id"
},
}{
"AttachmentId": "{attachment id}"
}TIP
This call creates a new attachment for the record id listed in the API call URL. You can similarly use a PUT call to update an attachment using the same parameters and adding the attachment id to the end of the URL. It should be noted that the data should be base64 encoded in the data parameter. When retrieving an attachment that was added via POST, the base64 result will be the attachment instead of a URL that can be used to view the attachment.