GET /v2/attachments/{attachmentId}/download — User Guide
1. Overview
GET /v2/attachments/{attachmentId}/download returns the file of one Attachment. Only Candidate Attachments can be downloaded today (entityTypeCode1).
Who can call it
What it can download
Client Region
Attachments of its own Candidates.
Parent Client
Attachments of Candidates in its Client Regions.
Vendor
Attachments of Candidates it submitted, in Client Regions it works with.
Status
When
200 OK
The body is the file.
400 Bad Request
A parameter is invalid, or your Organization cannot be used.
404 Not Found
The Attachment does not exist, is not one you can reach, is not a Candidate Attachment, or its file is missing.
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.
Get attachmentId from GET /v2/attachments/{entityId}?entityTypeCode=1 → attachmentId.
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
attachmentId (route)
integer
Yes
Greater than 0.
GET /v2/attachments/{entityId} → attachmentId
entityTypeCode
integer
Yes
1 Candidate. Values 2–15 exist but cannot be downloaded today.
GET /v2/lookups/attachment-entity-types
Successful response
Header
Value
Content-Type
The content type sent when the file was uploaded; application/octet-stream when none is stored.
Content-Disposition
attachment with the original file name; attachment_{attachmentId} when none is stored.
4. Rules that depend on your Organization
If ...
Then ...
What to change
your API Key belongs to a Client Region
The Attachment must belong to a Candidate of your Client Region.
Use an Attachment of your own Candidate.
your API Key belongs to a Parent Client
The Attachment must belong to a Candidate in one of your Client Regions.
Use an Attachment of a Candidate in your Client Regions.
your API Key belongs to a Vendor
The Attachment must belong to a Candidate you submitted, in a Client Region you work with.
Use an Attachment of your own Candidate.
any of the above fails
404 with "Attachment with ID '{attachmentId}' is not accessible from organization '{org}'." in errors.
your Organization is not found, inactive, or not a Client or Vendor
400 with the Organization message and statusCode403 in the body.
Check your API Key and Secret.
5. Error reference
Failures return the standard JSON response with successfalse and datanull, not a file.
Request (400)
Message
What it means
How to fix
attachmentId must be a positive integer.
attachmentId is 0 or less.
Send the Attachment's id.
entityType must be a positive integer. Use lookups/available for options.
entityTypeCode is missing, 0 or less.
Send 1.
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.
Attachment (404)
message
errors
What it means
How to fix
The provided AttachmentId: {attachmentId} is not found for the organization: {org}.
EntityTypeCode '{code}' is not a supported attachment target. Supported values: {values}.
entityTypeCode is not 1.
Send 1.
The provided AttachmentId: {attachmentId} is not found for the organization: {org}.
Attachment with ID '{attachmentId}' is not accessible from organization '{org}'.
The Attachment is not linked to a Candidate you can reach.
{
"success": false,
"message": "The provided AttachmentId: 5002 is not found for the organization: 3001.",
"statusCode": 404,
"errors": [
"Attachment with ID '5002' is not accessible from organization '3001'."
],
"data": null
}
Not a Candidate Attachment
GET /v2/attachments/5003/download?entityTypeCode=13
404 Not Found, with errors holding EntityTypeCode '13' is not a supported attachment target. Supported values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15.
7. Differences by request
Case
Difference
Client Region vs Parent Client vs Vendor
Only which Candidates' Attachments can be reached; see section 4.
Download vs list
Download accepts entityTypeCode1 only; the list also accepts 2, 4 and 13. A Vendor can list Attachments of other Vendors' Candidates but cannot download them.