Custom Variables
Retrieves all custom variables for the specified store.
The ID of the store to retrieve custom variables for.
411486491630370816
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-08-01T19:19:39.486Z",
"updated_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"updated_at": "2025-08-01T19:19:39.486Z"
}
]
Creates a new custom variable for the specified store. Custom variables allow customers to provide additional input when purchasing products.
The ID of the store to create the custom variable in.
411486491630370816
Unified request model for creating or updating custom variables. Contains all the configurable properties of a custom variable.
Unique identifier string for programmatic reference. Must contain only letters, numbers, underscores, and hyphens.
Display name shown to customers.
Description explaining the purpose of this custom variable.
Defines the type of input method for a custom variable.
Optional regex pattern for validating customer input. Only applies to text and number types. Ignored for dropdown types.
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-08-01T19:19:39.486Z",
"updated_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"updated_at": "2025-08-01T19:19:39.486Z"
}
Retrieves a specific custom variable by ID from the specified store.
The ID of the store the custom variable belongs to.
411486491630370816
The ID of the custom variable to retrieve.
411486491630370816
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-08-01T19:19:39.486Z",
"updated_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"updated_at": "2025-08-01T19:19:39.486Z"
}
Deletes a custom variable from the specified store. This will also delete all associated options and cannot be undone.
The ID of the store the custom variable belongs to.
411486491630370816
The ID of the custom variable to delete.
411486491630370816
DELETE /v1/stores/{storeId}/custom-variables/{customVariableId} HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Accept: */*
No content
Performs a partial update of a custom variable using field mask. Only the fields specified in the request will be updated.
The ID of the store the custom variable belongs to.
411486491630370816
The ID of the custom variable to update.
411486491630370816
Unified request model for creating or updating custom variables. Contains all the configurable properties of a custom variable.
Unique identifier string for programmatic reference. Must contain only letters, numbers, underscores, and hyphens.
Display name shown to customers.
Description explaining the purpose of this custom variable.
Defines the type of input method for a custom variable.
Optional regex pattern for validating customer input. Only applies to text and number types. Ignored for dropdown types.
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-08-01T19:19:39.486Z",
"updated_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"updated_at": "2025-08-01T19:19:39.486Z"
}
Was this helpful?