GET /v2/attachments/{entityId} lists the Attachments of one owner: a Candidate, a Requisition, an Engagement or a Compliance Response. It returns the file details, not the files; download a file with GET /v2/attachments/{attachmentId}/download.
Results are paged (50 per page by default), newest first. Only Attachments with status Pending or Complete are listed.
Status
When
200 OK
The owner was found. The list may be empty.
400 Bad Request
A parameter is invalid, the owner is not one your Organization can reach, or your Organization cannot be used.
500 Internal Server Error
entityTypeCode is 3, 5–12, 14 or 15, or pageNumber is below 1.
2. Before you start
Your Organization comes from your credentials. Every request is authenticated with an API Key and Secret, and each key is tied to one Organization. That Organization is supplied automatically when the request is submitted. You do not send it as a parameter.
In messages, {org} is the id of the Organization tied to your API Key.
3. Query parameters
Parameter
Type
Required
Rules
Where to get values
entityId (route)
integer
Yes
Greater than 0. The owner's id.
GET /v2/candidates → candidateId; GET /v2/requisitions → requisitionId; GET /v2/engagements → engagementId
Default 1. Send 1 or more; other values are not checked.
Supplied by you
pageSize
integer
No
Default 50. Send 1 or more; there is no maximum and other values are not checked.
Supplied by you
Response fields
data holds the page:
Field
Type
Meaning
pageNumber, pageSize
integer
The page returned.
totalCount
integer
Attachments across all pages.
totalPages
integer
Pages at this pageSize.
attachments
list of objects
The Attachments on this page, newest first.
Each item in attachments:
Field
Type
Meaning
attachmentId
integer
Use it to download the file.
attachmentName
text
The original file name.
attachmentType
text
For example ResumeCV, CoverLetter, Contract.
attachmentStatus
text
Pending or Complete.
entityId
integer
The owner's id, as sent.
entityType
text
For example Candidate, Requisition.
attachmentUseType
text
Generic or Justification for an Engagement Attachment; null otherwise.
uploadedDate
date and time
When the file was uploaded.
4. Rules that depend on your Organization
If entityTypeCode is ...
Your Organization can reach the owner when ...
Otherwise
1 Candidate
Client Region: it is your Direct Candidate, or a Vendor you work with submitted it. Parent Client: it belongs to one of your Client Regions. Vendor: it belongs to a Client Region you work with.
Candidate with ID '{id}' does not belong to the organization '{org}'.
13 Requisition
Parent Client: it belongs to one of your Client Regions. Vendor: it belongs to a Client Region you work with. A Client Region API Key is always refused.
Requisition with ID '{id}' does not belong to the organization '{org}'.
4 Engagement
The Engagement is one your Organization can see.
Engagement with ID '{id}' was not found for the organization '{org}'.
2 Compliance Response
entityId is a Compliance Item of your Parent Client (for a Vendor: the Parent Client of a Client Region you work with). The Attachments returned are those of the Compliance Response with the same id.
Compliance item with ID '{id}' does not belong to the organization '{org}'.
5. Error reference
Every failure returns the standard response with successfalse and datanull.
Request
Message
What it means
How to fix
entityId must be a positive integer.
entityId is 0 or less.
Send the owner's id.
entityTypeCode must be a positive integer. Use lookups/available for options.
entityTypeCode is missing, 0 or less.
Send 1, 2, 4 or 13.
Organization not found. / Organization is not active. / Organization must be of type Client or Vendor.
Your Organization cannot be used. statusCode is 403.
Check your API Key and Secret.
The vendor organization {org} does not have an active relationships with any client organizations.
Your Vendor works with no Client Region. statusCode is 403.
Ask the Client Region to set up the relationship.
Owner (message is The provided EntityId: {entityId} is not valid for the organization: {org}.; the reason is in errors)
Message
What it means
How to fix
EntityTypeCode '{code}' is not a supported attachment target. Supported values: {values}.
entityTypeCode is not 1–15.
Send 1, 2, 4 or 13.
Candidate with ID '{id}' does not belong to the organization '{org}'.
Second page of a Requisition's Attachments (Parent Client)
GET /v2/attachments/2001?entityTypeCode=13&pageNumber=2&pageSize=10
200 OK, same shape. A page past the last one returns an empty attachments list.
Owner not reachable
GET /v2/attachments/1002?entityTypeCode=1
400 Bad Request:
{
"success": false,
"message": "The provided EntityId: 1002 is not valid for the organization: 3001.",
"statusCode": 400,
"errors": [
"Candidate with ID '1002' does not belong to the organization '3001'."
],
"data": null
}
The list accepts entityTypeCode1, 2, 4 and 13; download accepts 1 only. A Vendor may list any Candidate's Attachments in a Client Region it works with, but downloads only those of its own Candidates.
List vs upload
description is stored on upload but not returned here.