API Documentation
Survey Field Options ¶
Survey Field Options ¶
Survey field options
define the choices available for survey fields
with the select
or multiple select
data types.
Supported filter params
-
survey_field_id
-
archived (‘true’ or ‘false’)
GET /api/v2/survey_field_options
Requests
GET /api/v2/survey_field_options
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "11",
"type": "survey_field_options",
"attributes": {
"name": "Milestone",
"archived_at": null,
"position": 1,
"color_id": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2319"
}
},
"survey_field": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/survey_field_options?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/survey_field_options?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}
Get survey field optionsGET/api/v2/survey_field_options
GET /api/v2/survey_field_options/1
Requests
GET /api/v2/survey_field_options/13
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "13",
"type": "survey_field_options",
"attributes": {
"name": "High",
"archived_at": null,
"position": 1,
"color_id": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2320"
}
},
"survey_field": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Gets a survey field optionGET/api/v2/survey_field_options/{id}
URI Parameters
- id
number
(required) Example: 1survey field option id
POST /api/v2/survey_field_options
Requests
POST /api/v2/survey_field_options
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "survey_field_options",
"attributes": {
"name": "Survey field option",
"survey_field_id": 29
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "14",
"type": "survey_field_options",
"attributes": {
"name": "Survey field option",
"archived_at": null,
"position": 1,
"color_id": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2321"
}
},
"survey_field": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/survey_field_options
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "survey_field_options",
"attributes": {
"survey_field_id": 30
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}
Creates a survey field optionPOST/api/v2/survey_field_options
URI Parameters
- survey_field_id
number
(required) Example: 1survey field id
- name
string
(required) Example: Survey+Field+Option+namesurvey field option name
PATCH /api/v2/survey_field_options/1
Requests
PATCH /api/v2/survey_field_options/15
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "survey_field_options",
"attributes": {
"name": "New name"
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "15",
"type": "survey_field_options",
"attributes": {
"name": "New name",
"archived_at": null,
"position": 1,
"color_id": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2323"
}
},
"survey_field": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
PATCH /api/v2/survey_field_options/16
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "survey_field_options",
"attributes": {
"name": null
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}
Updates a survey field optionPATCH/api/v2/survey_field_options/{id}
URI Parameters
- id
number
(required) Example: 1survey field option id
PATCH /api/v2/survey_field_options/1/archive
Requests
PATCH /api/v2/survey_field_options/17/archive
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "17",
"type": "survey_field_options",
"attributes": {
"name": "High",
"archived_at": "2025-08-02T06:23:59.000+02:00",
"position": 1,
"color_id": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2325"
}
},
"survey_field": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Archives a survey field optionPATCH/api/v2/survey_field_options/{id}/archive
URI Parameters
- id
number
(required) Example: 1survey field option id
Generated by aglio on 02 Aug 2025