put https://{subdomain}.pinpointhq.com/api/v1/candidates/
Adding or updating Custom Attributes on a candidate
Custom Field - IMPORTANT
It is important to read about Custom Fields and their
resource_type
andfield_type
and how they must be confirmed before you can create Custom Attributes alongsidecandidates
.
custom_attributes
created forcandidates
must have be associated withcustom_fields
that have aresource_type
ofcandidate
. The appropriate value for the newcustom_attribute
must also align with thefield_type
of thecustom_field
.
Adding Custom Attributes to the request body
- You must add
custom_attributes
to therelationships
section of the request body and give each one atemp-id
.- These
temp-id
must match thetemp-id
that you assign the correspondingcustom_attribute
that you create in theincluded
section of the request body.- The
included
section is where you will pass all of the attributes and relationships for thecustom_attribute
, to properly create it along side theapplication
. The only required relationship for thecustom_attribute
is thecustom_field
{ "data": { "id": "1", "type": "candidates", "relationships": { "custom_attributes": { "data": [ { "type": "custom_attributes", "temp-id": "temp-id-1", "method": "create" } ] } } }, "included": [ { "type": "custom_attributes", "temp-id": "temp-id-1", "attributes": { "varchar_value": "New attribute submission" }, "relationships": { "custom_field": { "data": { "type": "custom_fields", "id": "25" } } } } ] }
{ "data": { "id": "1", "type": "candidates", "relationships": { "custom_attributes": { "data": [ { "type": "custom_attributes", "id": "84", "method": "update" } ] } } }, "included": [ { "type": "custom_attributes", "id": "84", "attributes": { "varchar_value": "An updated value" } } ] }
Attaching documents
Documents can be supplied with the request by providing a documents_base64
array that contains objects with both of the fields shown below. If only one of the fields is present in the object then that document will not be saved.
Field Name | Description |
---|---|
filename | The name of the file. This is how it will appear within Pinpoint. |
data | A Base64 encoded DataURL |
Validations
- Accepted file formats are
pdf
,doc
, anddocx
,txt
, andrtf
- File size limit is 30 megabytes.
Example
{
"data": {
"type": "candidates",
"id": "1",
"attributes": {
"documents_base64": [
{
"filename": "cv.pdf",
"data": "data:application/pdf;base64,...[DATA]..."
}
]
}
}
}