> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# List Form Fields

GET https://your_store.example.com/api/storefront/form-fields

Gets form fields.

> #### Note
> * Substitute your storefront domain for `yourstore.example.com`. 
> * The Send a Test Request feature is not currently supported for this endpoint.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/storefront/form-fields/get-form-fields

## Request

### Query parameters

- `filter` (list of enum, optional) — Filter the form fields returned.
  - Allowed values: `customerAccount`, `shippingAddress`, `billingAddress`

## Response

### 200

Returns an object with form fields groups.

- `customerAccount` (list of FormField, optional) — List of form fields for the group
- `shippingAddress` (list of FormField, optional) — List of form fields for the group
- `billingAddress` (list of FormField, optional) — List of form fields for the group

## Types

### FormField

Form Field

- `id` (string, optional) — Field unique ID
- `name` (string, optional) — Field name
- `custom` (boolean, optional) — Whether this is a custom field or system built-in field.
- `label` (string, optional) — User-friendly label
- `required` (boolean, optional) — Whether this field is required or not
- `default` (string, optional) — The field unique ID
- `type` (enum, optional) — Type of the value hold by the field
  - Allowed values: `integer`, `string`, `array`, `date`
- `fieldType` (enum, optional) — Type of the field
  - Allowed values: `checkbox`, `text`, `date`, `multiline`, `radio`, `dropdown`
- `min` (string, optional) — The minimum valid value for the field (integer and date type only).
- `max` (string, optional) — The minimum valid value for the field (integer and date type only).
- `maxLength` (integer, optional) — The maximum length for the value (string type only).
- `secret` (boolean, optional) — Whether the field represents a password field (password field type only).
- `requirements` (FormFieldRequirements, optional) — Password requirements (password field type only).
- `options` (FormFieldOptions, optional) — Extra data for radio, dropdown and checkbox field types.

### FormFieldRequirements

Password requirements (password field type only).

- `alpha` (string, optional) — Regex expression for the required alpha characters.
- `description` (string, optional) — Description for the password requirements.
- `minlength` (integer, optional) — Minimum password length.
- `numeric` (string, optional) — Regex expression for the required numeric characters.

### FormFieldOptions

Extra data for radio, dropdown and checkbox field types.

- `helperLabel` (string, optional) — Placeholder text for dropdown field type.
- `items` (list of FormFieldOptionsItemsItems, optional) — List of possible values for this field.

### FormFieldOptionsItemsItems

- `label` (string, optional)
- `value` (string, optional)

## Examples

**Response**

```json
{
  "customerAccount": [
    {
      "id": "string",
      "name": "string",
      "custom": true,
      "label": "string",
      "required": true,
      "default": "string",
      "type": "integer",
      "fieldType": "checkbox",
      "min": "string",
      "max": "string",
      "maxLength": 1,
      "secret": true,
      "requirements": {
        "alpha": "[A-Za-z]",
        "description": "Passwords must be at least 7 characters and contain both alphabetic and numeric characters.",
        "minlength": 1,
        "numeric": "[0-9]"
      },
      "options": {
        "helperLabel": "string",
        "items": [
          {
            "label": "string",
            "value": "string"
          }
        ]
      }
    }
  ],
  "shippingAddress": [
    {
      "id": "string",
      "name": "string",
      "custom": true,
      "label": "string",
      "required": true,
      "default": "string",
      "type": "integer",
      "fieldType": "checkbox",
      "min": "string",
      "max": "string",
      "maxLength": 1,
      "secret": true,
      "requirements": {
        "alpha": "[A-Za-z]",
        "description": "Passwords must be at least 7 characters and contain both alphabetic and numeric characters.",
        "minlength": 1,
        "numeric": "[0-9]"
      },
      "options": {
        "helperLabel": "string",
        "items": [
          {
            "label": "string",
            "value": "string"
          }
        ]
      }
    }
  ],
  "billingAddress": [
    {
      "id": "string",
      "name": "string",
      "custom": true,
      "label": "string",
      "required": true,
      "default": "string",
      "type": "integer",
      "fieldType": "checkbox",
      "min": "string",
      "max": "string",
      "maxLength": 1,
      "secret": true,
      "requirements": {
        "alpha": "[A-Za-z]",
        "description": "Passwords must be at least 7 characters and contain both alphabetic and numeric characters.",
        "minlength": 1,
        "numeric": "[0-9]"
      },
      "options": {
        "helperLabel": "string",
        "items": [
          {
            "label": "string",
            "value": "string"
          }
        ]
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://your_store.example.com/api/storefront/form-fields"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://your_store.example.com/api/storefront/form-fields';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://your_store.example.com/api/storefront/form-fields"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://your_store.example.com/api/storefront/form-fields")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://your_store.example.com/api/storefront/form-fields")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your_store.example.com/api/storefront/form-fields');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://your_store.example.com/api/storefront/form-fields");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://your_store.example.com/api/storefront/form-fields")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```