put https://{subdomain}.pinpointhq.com/api/v1/candidates/
Adding or updating Custom Attributes on a candidate
Custom Field - IMPORTANTIt is important to read about Custom Fields and their
resource_typeandfield_typeand how they must be confirmed before you can create Custom Attributes alongsidecandidates.
custom_attributescreated forcandidatesmust have be associated withcustom_fieldsthat have aresource_typeofcandidate. The appropriate value for the newcustom_attributemust also align with thefield_typeof thecustom_field.
Adding Custom Attributes to the request body
- You must add
custom_attributesto therelationshipssection of the request body and give each one atemp-id.- These
temp-idmust match thetemp-idthat you assign the correspondingcustom_attributethat you create in theincludedsection of the request body.- The
includedsection 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_attributeis 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]..."
}
]
}
}
}