Create a search profile

Creates a new search profile (scope, searchable fields, displayed fields, facets, sort, limits, boosted/featured contents). Rejects a duplicate slug with 400. Optionally marks the new profile as the site's default.

Required permissions
search.profiles.create
POST/search/profiles
Base URLhttps://api.lynkow.com/v1

Request body
required

  • name
    string
    required

    Required. Display name. 1-200 characters

  • slug
    string
    required

    Required. URL-friendly identifier, unique per site and locale. 1-100 characters

  • sort
    array<string>

    Max 10 characters. Array of strings

  • scope
    object
    • excludeIds
      array<string>
    • includeIds
      array<string>
    • excludeTags
      array<string>
    • includeTags
      array<string>
    • metaFilters
      array<object>
      • op
        enum
        required

        One of: =!=innotIn

      • key
        string
        required
      • value
        any
    • excludeTypes
      array<string>
    • includeTypes
      array<string>
    • excludeLocales
      array<string>
    • includeLocales
      array<string>
    • excludeCategories
      array<string>
    • includeCategories
      array<string>
    • includePathPrefixes
      array<string>
  • facets
    array<string>

    Max 20 characters. Array of strings

  • isPublic
    boolean

    Whether this search profile is exposed on the public storefront search API. Boolean

  • maxLimit
    number

    Between 1 and 500

  • isDefault
    boolean

    Boolean

  • description
    union

    Description text

  • defaultLimit
    number

    Between 1 and 100

  • displayedFields
    array<string>

    Min 1 character. Array of strings

  • searchableFields
    array<enum>

    Min 1 character. Array of strings

  • boostedContentIds
    array<string>

    Content UUIDs to rank higher in results (max 100). Max 100 characters. Array of strings

  • featuredContentIds
    array<string>

    Content UUIDs pinned to the top of results regardless of relevance (max 100). Max 100 characters. Array of strings

Feedback

Was this page helpful?