> For the complete documentation index, see [llms.txt](https://docs.simplio3d.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.simplio3d.com/api-reference/open-api/contact-form/form-fields.md).

# Form Fields

## <mark style="color:green;">GET</mark> /configurator-form-fields

#### Fetch All Configurator Form Fields

To retrieve all configurator form fields in Simplio3D, use the following GET API endpoint:

```
GET /open-api/v1/configurator-form-fields
```

**Parameters**

* `configurator_id` (required): The unique identifier for the configurator.

**Response**

A successful response returns a JSON object containing:

* `id`: The field ID.
* `name`: The field name.
* `type`: The field type (e.g., first name, last name, email, phone, text, select).
* `options`: Available options for select-type fields (if applicable).
* `default`: The default value for the field.
* `required`: Boolean indicating if the field is mandatory.

**Example**

```json
{
  "fields": [
    {
      "id": "123",
      "name": "Shipping",
      "type": "Dropdown",
      "options": ["UPS", "FedEx", "No shipping"],
      "default": "Red",
      "required": true
    },
    {
      "id": "124",
      "name": "Size",
      "type": "text",
      "default": "Medium",
      "required": false
    }
  ]
}
```

Use this endpoint to programmatically fetch and manage form fields for configurators in your application.

**NOTE:** Ensure you have the necessary authorization credentials (e.g., Bearer Token) to access this endpoint which is taken from the 'Share' tab encryption token found at the bottom of the page.

## Fetch all configurator form fields

> Get a list of configurator form fields.

```json
{"openapi":"3.0.0","info":{"title":"Simplio3D-Open REST API","version":"1.0.0"},"tags":[{"name":"Configurator Form Fields","description":"API Endpoints for managing configurator form fields"}],"servers":[{"url":"https://app.simplio3d.com","description":"API Open Base URL"},{"url":""}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter token in format (Bearer <your_token>)"}},"schemas":{"ConfiguratorFormFieldsResource":{"title":"Configurator Form Fields Resource","description":"Schema for configurator form fields","properties":{"id":{"type":"integer"},"configurator_id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"},"mandatory_status":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"settings":{"type":"string"},"show_title":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}}},"paths":{"/api/open-api/v1/configurator-form-fields":{"get":{"tags":["Configurator Form Fields"],"summary":"Fetch all configurator form fields","description":"Get a list of configurator form fields.","operationId":"2aaa572dfccb0767c458102759879129","parameters":[{"name":"order_by","in":"query","description":"Column to order results by (e.g., 'created_at')","required":false,"schema":{"type":"string"}},{"name":"order","in":"query","description":"Sorting order (asc or desc)","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"per_page","in":"query","description":"Number of records per page (-1 for all records)","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"Number of page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConfiguratorFormFieldsResource"}}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}}}}}}
```

## The ConfiguratorFormFieldsResource object

```json
{"openapi":"3.0.0","info":{"title":"Simplio3D-Open REST API","version":"1.0.0"},"components":{"schemas":{"ConfiguratorFormFieldsResource":{"title":"Configurator Form Fields Resource","description":"Schema for configurator form fields","properties":{"id":{"type":"integer"},"configurator_id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"},"mandatory_status":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"settings":{"type":"string"},"show_title":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}}}}
```

## <mark style="color:green;">GET</mark> /configurator/form-fields

#### Simplio3D API: Get Configurator Form Field by ID

The `GET` endpoint allows you to retrieve details about a specific form field used in configurators by providing the field's ID. This is useful for applications needing to dynamically access, display, or modify form fields based on current configuration requirements.

**Endpoint**

```
GET /api/configurator/form-fields/{fieldId}
```

**Parameters**

* `fieldId` (string): The unique identifier of the form field you want to retrieve.

**Response**

The response will contain the details of the form field, including:

* `id`: The ID of the form field.
* `name`: The name of the form field.
* `type`: The type of the form field (e.g., Dropdown, Text).
* `options`: An array of options available for Dropdown types.
* `default`: The default value for the form field.
* `required`: A boolean indicating if the field is required.

**Example Request**

```http
GET /api/configurator/form-fields/123
```

**Example Response**

```json
{
  "id": "123",
  "name": "Shipping",
  "type": "Dropdown",
  "options": ["UPS", "FedEx", "No shipping"],
  "default": "UPS",
  "required": true
}
```

This endpoint is essential for managing and displaying dynamic form fields within your application, ensuring you have up-to-date configurations.

**NOTE:** Ensure you have the necessary authorization credentials (e.g., Bearer Token) to access this endpoint which is taken from the 'Share' tab encryption token found at the bottom of the page.

## Get configurator form field by ID

> Get a specific configurator form field by ID.

```json
{"openapi":"3.0.0","info":{"title":"Simplio3D-Open REST API","version":"1.0.0"},"tags":[{"name":"Configurator Form Fields","description":"API Endpoints for managing configurator form fields"}],"servers":[{"url":"https://app.simplio3d.com","description":"API Open Base URL"},{"url":""}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter token in format (Bearer <your_token>)"}},"schemas":{"ConfiguratorFormFieldsResource":{"title":"Configurator Form Fields Resource","description":"Schema for configurator form fields","properties":{"id":{"type":"integer"},"configurator_id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string"},"mandatory_status":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"settings":{"type":"string"},"show_title":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}}},"paths":{"/api/open-api/v1/configurator-form-fields/{id}":{"get":{"tags":["Configurator Form Fields"],"summary":"Get configurator form field by ID","description":"Get a specific configurator form field by ID.","operationId":"7d4405f70cfee9b5fba320783a3001f0","parameters":[{"name":"id","in":"path","description":"ID of the configurator form field","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfiguratorFormFieldsResource"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Configurator form field not found"},"500":{"description":"Server error"}}}}}}
```
