Custom Variables

Get custom variables

get

Retrieves all custom variables for the specified store.

Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequired

The ID of the store to retrieve custom variables for.

Example: 411486491630370816
Responses
200

OK

application/json
get
/v1/stores/{storeId}/custom-variables
GET /v1/stores/{storeId}/custom-variables HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "id": "411486491630370816",
    "store_id": "411486491630370816",
    "identifier": "text",
    "name": "text",
    "description": "text",
    "type": "dropdown",
    "value_regex": "text",
    "options": [
      {
        "id": "411486491630370816",
        "store_id": "411486491630370816",
        "custom_variable_id": "411486491630370816",
        "name": "text",
        "value": "text",
        "price": 1,
        "price_type": "fixed",
        "is_default": true,
        "sort_order": 1
      }
    ],
    "created_by": {
      "type": "anonymous",
      "id": "411486491630370816"
    },
    "created_at": "2025-11-19T15:39:47.233Z",
    "updated_by": {
      "type": "anonymous",
      "id": "411486491630370816"
    },
    "updated_at": "2025-11-19T15:39:47.233Z"
  }
]

Create custom variable

post

Creates a new custom variable for the specified store. Custom variables allow customers to provide additional input when purchasing products.

Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequired

The ID of the store to create the custom variable in.

Example: 411486491630370816
Body

Unified request model for creating or updating custom variables. Contains all the configurable properties of a custom variable.

identifierstringRequired

Unique identifier string for programmatic reference. Must contain only letters, numbers, underscores, and hyphens.

namestringRequired

Display name shown to customers.

descriptionstring | nullableOptional

Description explaining the purpose of this custom variable.

typestring · enumRequired

Defines the type of input method for a custom variable.

Possible values:
value_regexstring | nullableOptional

Optional regex pattern for validating customer input. Only applies to text and number types. Ignored for dropdown types.

Responses
200

OK

application/json
post
/v1/stores/{storeId}/custom-variables
POST /v1/stores/{storeId}/custom-variables HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 213

{
  "identifier": "text",
  "name": "text",
  "description": "text",
  "type": "dropdown",
  "value_regex": "text",
  "options": [
    {
      "id": "411486491630370816",
      "name": "text",
      "value": "text",
      "price": 1,
      "price_type": "fixed",
      "is_default": true
    }
  ]
}
{
  "id": "411486491630370816",
  "store_id": "411486491630370816",
  "identifier": "text",
  "name": "text",
  "description": "text",
  "type": "dropdown",
  "value_regex": "text",
  "options": [
    {
      "id": "411486491630370816",
      "store_id": "411486491630370816",
      "custom_variable_id": "411486491630370816",
      "name": "text",
      "value": "text",
      "price": 1,
      "price_type": "fixed",
      "is_default": true,
      "sort_order": 1
    }
  ],
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "created_at": "2025-11-19T15:39:47.233Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2025-11-19T15:39:47.233Z"
}

Get custom variable

get

Retrieves a specific custom variable by ID from the specified store.

Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequired

The ID of the store the custom variable belongs to.

Example: 411486491630370816
customVariableIdstring · flake-idRequired

The ID of the custom variable to retrieve.

Example: 411486491630370816
Responses
200

OK

application/json
get
/v1/stores/{storeId}/custom-variables/{customVariableId}
GET /v1/stores/{storeId}/custom-variables/{customVariableId} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": "411486491630370816",
  "store_id": "411486491630370816",
  "identifier": "text",
  "name": "text",
  "description": "text",
  "type": "dropdown",
  "value_regex": "text",
  "options": [
    {
      "id": "411486491630370816",
      "store_id": "411486491630370816",
      "custom_variable_id": "411486491630370816",
      "name": "text",
      "value": "text",
      "price": 1,
      "price_type": "fixed",
      "is_default": true,
      "sort_order": 1
    }
  ],
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "created_at": "2025-11-19T15:39:47.233Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2025-11-19T15:39:47.233Z"
}

Delete custom variable

delete

Deletes a custom variable from the specified store. This will also delete all associated options and cannot be undone.

Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequired

The ID of the store the custom variable belongs to.

Example: 411486491630370816
customVariableIdstring · flake-idRequired

The ID of the custom variable to delete.

Example: 411486491630370816
Responses
delete
/v1/stores/{storeId}/custom-variables/{customVariableId}
DELETE /v1/stores/{storeId}/custom-variables/{customVariableId} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*

No content

Update custom variable

patch

Performs a partial update of a custom variable using field mask. Only the fields specified in the request will be updated.

Authorizations
AuthorizationstringRequired

An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.

Path parameters
storeIdstring · flake-idRequired

The ID of the store the custom variable belongs to.

Example: 411486491630370816
customVariableIdstring · flake-idRequired

The ID of the custom variable to update.

Example: 411486491630370816
Body

Unified request model for creating or updating custom variables. Contains all the configurable properties of a custom variable.

identifierstringRequired

Unique identifier string for programmatic reference. Must contain only letters, numbers, underscores, and hyphens.

namestringRequired

Display name shown to customers.

descriptionstring | nullableOptional

Description explaining the purpose of this custom variable.

typestring · enumRequired

Defines the type of input method for a custom variable.

Possible values:
value_regexstring | nullableOptional

Optional regex pattern for validating customer input. Only applies to text and number types. Ignored for dropdown types.

Responses
200

OK

application/json
patch
/v1/stores/{storeId}/custom-variables/{customVariableId}
PATCH /v1/stores/{storeId}/custom-variables/{customVariableId} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 213

{
  "identifier": "text",
  "name": "text",
  "description": "text",
  "type": "dropdown",
  "value_regex": "text",
  "options": [
    {
      "id": "411486491630370816",
      "name": "text",
      "value": "text",
      "price": 1,
      "price_type": "fixed",
      "is_default": true
    }
  ]
}
{
  "id": "411486491630370816",
  "store_id": "411486491630370816",
  "identifier": "text",
  "name": "text",
  "description": "text",
  "type": "dropdown",
  "value_regex": "text",
  "options": [
    {
      "id": "411486491630370816",
      "store_id": "411486491630370816",
      "custom_variable_id": "411486491630370816",
      "name": "text",
      "value": "text",
      "price": 1,
      "price_type": "fixed",
      "is_default": true,
      "sort_order": 1
    }
  ],
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "created_at": "2025-11-19T15:39:47.233Z",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2025-11-19T15:39:47.233Z"
}

Last updated

Was this helpful?