> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/openapply/public-rest-apis/v3/fields.md).

# Fields

This page describes APIs relating to fields.

## Get searchable field keys

> Returns searchable keys for students and parents. Use record\_type=student or parent to scope.

```json
{"openapi":"3.0.1","info":{"title":"openapply","version":"3.0.0"},"tags":[{"name":"Fields","description":"This page describes APIs relating to fields."}],"servers":[{"url":"https://api.openapply.com","description":"CAN region auth server"},{"url":"https://api.openapply.cn","description":"CN region auth server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/api/v3/fields":{"get":{"summary":"Get searchable field keys","tags":["Fields"],"operationId":"getSearchableFieldKeys","description":"Returns searchable keys for students and parents. Use record_type=student or parent to scope.","parameters":[{"name":"record_type","in":"query","required":false,"schema":{"type":"string","enum":["student","parent"]}}],"responses":{"200":{"description":"successful","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}}}}
```

## Get field detail

> Returns detail of a field, including children/options when applicable.

```json
{"openapi":"3.0.1","info":{"title":"openapply","version":"3.0.0"},"tags":[{"name":"Fields","description":"This page describes APIs relating to fields."}],"servers":[{"url":"https://api.openapply.com","description":"CAN region auth server"},{"url":"https://api.openapply.cn","description":"CN region auth server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/api/v3/fields/{id}":{"get":{"summary":"Get field detail","tags":["Fields"],"operationId":"getFieldDetail","description":"Returns detail of a field, including children/options when applicable.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Field ID"}],"responses":{"200":{"description":"successful","content":{"application/json":{"schema":{"type":"object","properties":{"field":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"required":{"type":"boolean"},"office_use":{"type":"boolean"},"item_type":{"type":"string","nullable":true},"parent":{"type":"integer","nullable":true},"options":{"type":"array","items":{"type":"object","additionalProperties":true}},"children":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["id","kind","label","name","slug","required"]}}}}}},"404":{"description":"field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```

## Create an option

> Create an option under a custom single/multi option field.

```json
{"openapi":"3.0.1","info":{"title":"openapply","version":"3.0.0"},"tags":[{"name":"Fields","description":"This page describes APIs relating to fields."}],"servers":[{"url":"https://api.openapply.com","description":"CAN region auth server"},{"url":"https://api.openapply.cn","description":"CN region auth server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/api/v3/fields/{field_id}/options":{"post":{"summary":"Create an option","tags":["Fields"],"operationId":"createFieldOption","description":"Create an option under a custom single/multi option field.","parameters":[{"name":"field_id","in":"path","schema":{"type":"integer"},"description":"Field ID","required":true}],"responses":{"201":{"description":"created","content":{"application/json":{"schema":{"type":"object","properties":{"option":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"active":{"type":"boolean"},"field_id":{"type":"integer"}},"required":["id","name","position","active","field_id"]}}}}}},"404":{"description":"field not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"422":{"description":"built-in field type cannot be modified","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"option":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"integer"},"active":{"type":"boolean"}},"required":["name"]}},"required":["option"]}}}}}}}}
```

## Delete an option

> Delete an option if it is not referenced by existing records.

```json
{"openapi":"3.0.1","info":{"title":"openapply","version":"3.0.0"},"tags":[{"name":"Fields","description":"This page describes APIs relating to fields."}],"servers":[{"url":"https://api.openapply.com","description":"CAN region auth server"},{"url":"https://api.openapply.cn","description":"CN region auth server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/api/v3/fields/{field_id}/options/{id}":{"delete":{"summary":"Delete an option","tags":["Fields"],"operationId":"deleteFieldOption","description":"Delete an option if it is not referenced by existing records.","parameters":[{"name":"field_id","in":"path","schema":{"type":"integer"},"description":"Field ID","required":true},{"name":"id","in":"path","schema":{"type":"integer"},"description":"Option ID","required":true}],"responses":{"200":{"description":"deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"422":{"description":"option in use","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```

## Update an option

> Update an option name, position, and active status.

```json
{"openapi":"3.0.1","info":{"title":"openapply","version":"3.0.0"},"tags":[{"name":"Fields","description":"This page describes APIs relating to fields."}],"servers":[{"url":"https://api.openapply.com","description":"CAN region auth server"},{"url":"https://api.openapply.cn","description":"CN region auth server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/api/v3/fields/{field_id}/options/{id}":{"patch":{"summary":"Update an option","tags":["Fields"],"operationId":"updateFieldOption","description":"Update an option name, position, and active status.","parameters":[{"name":"field_id","in":"path","schema":{"type":"integer"},"description":"Field ID","required":true},{"name":"id","in":"path","schema":{"type":"integer"},"description":"Option ID","required":true}],"responses":{"200":{"description":"updated","content":{"application/json":{"schema":{"type":"object","properties":{"option":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"position":{"type":"integer"},"active":{"type":"boolean"},"field_id":{"type":"integer"}},"required":["id","name","position","active","field_id"]}}}}}},"404":{"description":"option not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"option":{"type":"object","properties":{"name":{"type":"string"},"position":{"type":"integer"},"active":{"type":"boolean"}}}},"required":["option"]}}}}}}}}
```
