API Documentation

API Endpoint

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
Requestsreturns survey_field_options

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
Responses200
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 options
GET/api/v2/survey_field_options


GET /api/v2/survey_field_options/1
Requestsreturns survey_field_option

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
Responses200
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 option
GET/api/v2/survey_field_options/{id}

URI Parameters
HideShow
id
number (required) Example: 1

survey field option id


POST /api/v2/survey_field_options
Requestscreates survey when params validreturns errors when params invalid

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
    }
  }
}
Responses201
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
    }
  }
}
Responses422
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 option
POST/api/v2/survey_field_options

URI Parameters
HideShow
survey_field_id
number (required) Example: 1

survey field id

name
string (required) Example: Survey+Field+Option+name

survey field option name


PATCH /api/v2/survey_field_options/1
Requestsupdates survey field option when validreturns error

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"
    }
  }
}
Responses200
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
    }
  }
}
Responses422
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 option
PATCH/api/v2/survey_field_options/{id}

URI Parameters
HideShow
id
number (required) Example: 1

survey field option id


PATCH /api/v2/survey_field_options/1/archive
Requestsarchives survey field option

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
Responses200
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 option
PATCH/api/v2/survey_field_options/{id}/archive

URI Parameters
HideShow
id
number (required) Example: 1

survey field option id


Generated by aglio on 02 Aug 2025