POST /v2/attachments uploads one file and links it to one owner as an Attachment. The request is multipart/form-data: the file plus a few form fields. One file per request; there is no batch form.
Who can call it
Notes
Client Region
Its own Candidates: Direct Candidates and Candidates submitted by its Vendors.
Parent Client
Candidates of its Client Regions.
Vendor
Candidates it submitted, in Client Regions it works with.
Only a Candidate's Resume/CV can be uploaded today: entityTypeCode1 with attachmentTypeCode1. Every other combination is refused (see section 4).
Status
When
201 Created
The file was stored and linked to the Candidate.
400 Bad Request
A check failed, the request was not sent over HTTPS, or the upload could not be completed.
413 Payload Too Large
The file is larger than the size limit (10 MB by default, set by the API configuration), or the whole request body is over 10 MB (refused before any check, with no JSON body).
500 Internal Server Error
entityTypeCode2 (Compliance Response) was sent.
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.
The request must use HTTPS.
Send the body as multipart/form-data. Form field names are not case-sensitive.
clientOrgId and vendorOrgId are accepted in the query string but are not used: the Candidate decides the Client Region and Vendor.
In messages, {org} is the id of the Organization tied to your API Key.
3. Request body
Form fields
Field
Type
Required
Rules
Where to get values
file
file
Yes
Not empty, at most 10 MB by default. See File rules.
Supplied by you
entityId
integer
Yes
The owner's id. For a Candidate: a Candidate your Organization can reach (see section 4).
GET /v2/candidates → candidateId
entityTypeCode
integer
Yes
1 Candidate. Values 2–15 exist but cannot be uploaded today.
GET /v2/lookups/attachment-entity-types
attachmentTypeCode
integer
Yes
1 Resume/CV. Values 2–13 exist but cannot be uploaded for a Candidate today.
GET /v2/lookups/attachment-type
attachmentUseTypeCode
integer
No
1 Generic (default), 2 Justification. Checked, but not stored for a Candidate Attachment.
GET /v2/lookups/attachment-use-type
description
text
No
Up to 40 characters. Stored with the Attachment.
Supplied by you
File rules
Rule
Detail
Extension and content type
The file name's extension and the part's Content-Type must be one of the pairs below.
Content
The first bytes must match the format of the extension. A .txt or .csv file must not start like a PDF, Office, ZIP, RTF, executable or gzip file.
File name
Up to 100 characters, with an extension. No .., / or \; no control characters; none of ! % @ * ' $ < > #. The name before the extension must not be CON, PRN, AUX, NUL, COM1–COM4 or LPT1–LPT4.
The accepted content types and blocked extensions are set by the API configuration; the lists above are the defaults.
4. Rules that depend on your Organization or permissions
If ...
Then ...
What to change
your API Key belongs to a Client Region
The Candidate must belong to your Client Region and be a Direct Candidate or submitted by one of your Vendors. Otherwise "Candidate validation failed. Ensure entity exists and belongs to the correct organization."
Send a Candidate of your Client Region.
your API Key belongs to a Parent Client
The Candidate must belong to one of your Client Regions. Otherwise the same message.
Send a Candidate of one of your Client Regions.
your API Key belongs to a Vendor
The Candidate must have been submitted by you, in a Client Region you work with. Otherwise the same message.
Send one of your own Candidates.
your API Key belongs to a Vendor and entityTypeCode is 13 (Requisition)
"Requisition attachments not allowed for Vendor requests."
Vendors cannot add Requisition Attachments.
entityTypeCode is 1 and attachmentTypeCode is not 1
The upload is refused: "Attachment linking not implemented for the given entity and attachment type.", or "An error occurred while uploading the attachment." for 2 (Cover Letter).
Send 1 (Resume/CV).
entityTypeCode is 4 (Engagement) or 13 (Requisition) and the owner is found
"An error occurred while uploading the attachment."
Not available yet.
entityTypeCode is 2 (Compliance Response)
500 Internal Server Error.
Not available yet.
entityTypeCode is 3, 5–12, 14 or 15
"Validate Entity Type code failed, missing value."
Not available yet.
your Organization is not found, inactive, or not a Client or Vendor
400 with the Organization message in message and statusCode403 in the body.
Check your API Key and Secret.
5. Error reference
Checks run in this order and stop at the first group that fails: form fields, HTTPS, file present and size, your Organization, file rules, entityTypeCode, attachmentTypeCode, attachmentUseTypeCode, description, file content, owner. A file-rule failure lists every broken file rule at once.
Form fields (400)
These come back in the standard validation error object, keyed by field name.
Message
What it means
How to fix
EntityTypeCode must be a positive integer.
Missing or 0 or less.
Send 1.
AttachmentTypeCode must be a positive integer.
Missing or 0 or less.
Send 1.
The field Description must be a string or array type with a maximum length of '40'.
description is too long.
Send 40 characters or fewer.
Request
Message
What it means
How to fix
HTTPS is required for file uploads.
The request was sent over HTTP.
Use HTTPS.
No file provided.
No file part, or the file is empty.
Send a file with content.
File is too large. (413)
Larger than the size limit.
Send a smaller file.
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.
File (message is File validation failed.; the reasons are in errors)