post https://{subdomain}.pinpointhq.com/api/v1/custom_fields
Request format
In order to create an custom field you must send a JSON:API spec JSON object representing a custom field.
Attributes
Attribute Name | Data type | Required |
---|---|---|
name | string | Yes |
field_type | string (one of: varchar , text , integer , decimal , date , boolean , single_select , multi_select ) | Yes |
resource_type | string (one of: job , application , job_seeker , offer ) | Yes |
sample_value | string | Yes |
options | array | Only when using the single select or multi_select field_type |
description | string | No |
position | integer | No |
required | boolean | No (defaults to false if not provided) |
Field types
Type | Description |
---|---|
varchar | Used when you expect the response to be a short amount of text (limit is 255 characters) |
text | Used when you expect the response to be a large amount of text |
integer | Used when you expect a whole number as the response |
decimal | Used when you expect a decimal as the response |
date | Used when you expect a date as the response |
boolean | Used when you expect true or false as the response |
single_select | Used when you want to enforce one option from a predefined list as the response |
multi_select | Used when you want to enforce one or more options from a predefined list as the response |
Resource types
The resource type relates to the resource that the custom field belongs to. For example if it's job
then you will be able to create custom_attributes
on a job
for this custom_field
Examples
{
"data": {
"type": "custom_fields",
"attributes": {
"name": "Job Custom Field",
"field_type": "varchar",
"sample_value": "Field sample value",
"resource_type": "job"
}
}
}
{
"data": {
"type": "custom_fields",
"attributes": {
"name": "Select Custom Field",
"field_type": "single_select",
"options": ["Option one", "Option two"],
"sample_value": "Option one",
"resource_type": "job"
}
}
}
{
"data": {
"type": "custom_fields",
"attributes": {
"name": "Select Custom Field",
"field_type": "varchar",
"sample_value": "Field value",
"resource_type": "job",
"description": "Field description",
"position": 1,
"required": true,
}
}
}