Storefront Form Fields

Read form fields on BigCommerce-hosted storefronts. To work with headless storefronts, use the GraphQL Storefront API.

The REST Storefront API uses CORS (opens in a new tab) headers for authentication, and therefore has no required scopes. You do not need to send any BigCommerce-specific tokens with your requests to these endpoints.

For info about authenticating BigCommerce APIs, see Authentication and Example Requests.

Get Form Fields

GET /form-fields

Request

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.

Parameters

  • store_domain in path - string
  • filter in query - array
    Type: array[string]

    Allowed: customerAccount | shippingAddress | billingAddress

example

const options = {method: 'GET', headers: {'Content-Type': 'application/json'}};

fetch('https://yourstore.example.com/api/storefront/form-fields', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));

Response

Returns an object with form fields groups.

Body

object | application/json
Group of form field groups
  • customerAccount
    array[object]

    List of form fields for the group
  • shippingAddress
    array[object]

    List of form fields for the group
  • billingAddress
    array[object]

    List of form fields for the group

example

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

See something you can improve? Edit this file on GitHub

Did you find what you were looking for?