attribute-templates

Create a new attribute template

post/v1/directories/{directoryId}/attribute-templates

Request

  • Base URL: https://api.epicdirectories.com
  • URL: https://api.epicdirectories.com/v1/directories/{directoryId}/attribute-templates
  • Auth: HTTP bearer

Path parameters

directoryIdstring required

Request body

listingTypestring

Listing type this template applies to (null = all types)

keystring required

Unique key for the attribute

labelstring required

Human-readable label

type'string' | 'text' | 'number' | 'boolean' | 'enum' | 'multi' | 'multi_enum' | 'date' | 'datetime' | 'range' | 'url' | 'email' | 'phone' | 'richtext' | 'json' required

Attribute data type

isFilterableboolean

Whether this attribute can be used in filters

isSortableboolean

Whether this attribute can be used for sorting

isSeoRelevantboolean

Whether this attribute is relevant for SEO

enumValuesstring[]

Allowed values for enum/multi_enum types

settingsobject

Additional settings (validation rules, display hints, etc.)

Example request

{
  "enumValues": [
    "option1",
    "option2"
  ],
  "settings": {
    "min": 0,
    "max": 100,
    "unit": "USD"
  }
}

Response

Attribute template created successfully

Changes

No recorded changes to this operation across all 1 revision of this API.