> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# QueryCustomFieldSuggestions

# Package: customFields

# Namespace: CustomFieldSuggestions

# Method link: https://dev.wix.com/docs/api-reference/crm/members-contacts/members/member-management/custom-fields/custom-field-suggestions/query-custom-field-suggestions?apiView=SDK.md

## Permission Scopes:
Read Members: SCOPE.DC-MEMBERS.READ-MEMBERS

## Introduction

Retrieves a list of suggestions for both custom fields and existing fields available from the Wix Members Area, given the provided paging, filtering, and sorting.

Query Custom Field Suggestions runs with these defaults, which you can override:
- `createdDate` is sorted in `ASC` order
- `paging.limit` is `100`
- `paging.offset` is `0`

To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/getting-started/field-projection.md).

---

## REST API

### Schema

```
 Method: queryCustomFieldSuggestions
 Description: Retrieves a list of suggestions for both custom fields and existing fields available from the Wix Members Area, given the provided paging, filtering, and sorting.  Query Custom Field Suggestions runs with these defaults, which you can override: - `createdDate` is sorted in `ASC` order - `paging.limit` is `100` - `paging.offset` is `0`  To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/getting-started/field-projection.md).
 URL: https://www.wixapis.com/members/v1/custom-field-suggestions/query
 Method: POST
 Method parameters:
   param name: query | type: Query    
        - name: filter | type: Value | description: Filter object.  Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-filter-section).  
           - ONE-OF: 
              - name: nullValue | type:  | description:   
              - name: numberValue | type: number | description:   
              - name: stringValue | type: string | description:   
              - name: boolValue | type: boolean | description:   
              - name: structValue | type: object | description:   
              - name: listValue | type: ListValue | description:   
                 - name: values | type: array<Value> | description:   
        - name: paging | type: Paging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
           - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, format int32
           - name: offset | type: integer | description: Number of items to skip in the current sort order.  | validation: minimum 0, format int32
        - name: sorting | type: array<Sorting> | description: Sort object.  Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-sort-section).  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
           - name: origin | type: AddressLocation | description: Origin point for geo-distance sorting on a GEO field results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).  
              - name: latitude | type: number | description: Address latitude.  | validation: format double
              - name: longitude | type: number | description: Address longitude.  | validation: format double
 Query fields:
   - field: name | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: fieldType | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryCustomFieldSuggestionsResponse
  - name: suggestions | type: array<CustomFieldSuggestion> | description: Custom field suggestion.  
     - name: name | type: string | description: Custom field name.  | validation: maxLength 150
     - name: defaultPrivacy | type: Privacy | description: Privacy level of the custom field.  
         - enum:
         -     UNKNOWN: Unknown privacy. This value isn't used.
         -     PUBLIC: The information appears on the members' public profile pages.
         -     PRIVATE: Only the member can see this information.
     - name: fieldType | type: Type | description: Type of information to provide for members.  
         - enum:
         -     UNKNOWN: Unknown field type. This value isn't used.
         -     TEXT: A text box to write text.
         -     NUMBER: Only a number can be entered into the field.
         -     DATE: Only a date can be entered into the field.
         -     URL: Only a URL can be entered into the field.
         -     SOCIAL: Only a link from the selected social media platform can be entered into the field.
     - name: socialType | type: Type | description: Social network type.  
         - enum:
         -     UNKNOWN: Unknown social type. This value isn't used.
         -     FACEBOOK: Facebook social media platform.
         -     INSTAGRAM: Instagram social media platform.
         -     LINKEDIN: LinkedIn social media platform.
         -     TWITTER: X (formerly Twitter) social media platform.
         -     YOUTUBE: Youtube social media platform.
         -     PINTEREST: Pinterest social media platform.
         -     TIKTOK: TikTok social media platform.
         -     DEVIANTART: DeviantArt social media platform.
         -     SOUNDCLOUD: SoundCloud social media platform.
         -     TUMBLR: Tumblr social media platform.
         -     VIMEO: Vimeo social media platform.
         -     VKONTAKTE: VKontakte social media platform.
         -     ODNOKLASSNIKI: Odnoklassniki social media platform.
         -     OTHER: Other social media platform.
     - name: fieldOrigin | type: Origin | description: Field origin.  
         - enum:
         -     UNKNOWN: Unknown field origin. This value isn't used.
         -     CUSTOM: Custom field created by a Wix user.
         -     CONTACT: Contact type of field. These are default fields that are already provided by Members Area, such as: "birth date", "position", "company".
         -     SYSTEM: System fields, such as: "first name", "last name", "email", "phone", "address", and  "title". Some system fields are only available from the dashboard.
     - name: customFieldId | type: string | description: Custom field GUID.  | validation: format GUID
  - name: metadata | type: PagingMetadata | description: Metadata for the paginated results.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  


```

### Examples

### Query Custom Field Suggestions
```curl
curl -X POST \
  https://www.wixapis.com/members/v1/custom-field-suggestions/query \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'Authorization: <AUTH>'
  -d '{
    "query": {
        "sorting": [],
        "filter": {
            "memberId" : "9e4f34b3-ebb8-49ee-a342-057d7e70cf5d"
        }
    }
  },
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.members.customFieldSuggestions.queryCustomFieldSuggestions(query)
 Description: Retrieves a list of suggestions for both custom fields and existing fields available from the Wix Members Area, given the provided paging, filtering, and sorting.  Query Custom Field Suggestions runs with these defaults, which you can override: - `createdDate` is sorted in `ASC` order - `paging.limit` is `100` - `paging.offset` is `0`  To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/getting-started/field-projection.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: CustomFieldSuggestionQuery   | required: true 
        - name: filter | type: Value | description: Filter object.  Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-filter-section).  
           - ONE-OF: 
              - name: nullValue | type:  | description:   
              - name: numberValue | type: number | description:   
              - name: stringValue | type: string | description:   
              - name: boolValue | type: boolean | description:   
              - name: structValue | type: object | description:   
              - name: listValue | type: ListValue | description:   
                 - name: values | type: array<Value> | description:   
        - name: paging | type: Paging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
           - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, format int32
           - name: offset | type: integer | description: Number of items to skip in the current sort order.  | validation: minimum 0, format int32
        - name: sorting | type: array<Sorting> | description: Sort object.  Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-sort-section).  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
           - name: origin | type: AddressLocation | description: Origin point for geo-distance sorting on a GEO field results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).  
              - name: latitude | type: number | description: Address latitude.  
              - name: longitude | type: number | description: Address longitude.  
 Query fields:
   - field: name | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: fieldType | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryCustomFieldSuggestionsResponse>
  - name: suggestions | type: array<CustomFieldSuggestion> | description: Custom field suggestion.  
     - name: name | type: string | description: Custom field name.  | validation: maxLength 150
     - name: defaultPrivacy | type: Privacy | description: Privacy level of the custom field.  
         - enum:
         -     UNKNOWN: Unknown privacy. This value isn't used.
         -     PUBLIC: The information appears on the members' public profile pages.
         -     PRIVATE: Only the member can see this information.
     - name: fieldType | type: Type | description: Type of information to provide for members.  
         - enum:
         -     UNKNOWN: Unknown field type. This value isn't used.
         -     TEXT: A text box to write text.
         -     NUMBER: Only a number can be entered into the field.
         -     DATE: Only a date can be entered into the field.
         -     URL: Only a URL can be entered into the field.
         -     SOCIAL: Only a link from the selected social media platform can be entered into the field.
     - name: socialType | type: Type | description: Social network type.  
         - enum:
         -     UNKNOWN: Unknown social type. This value isn't used.
         -     FACEBOOK: Facebook social media platform.
         -     INSTAGRAM: Instagram social media platform.
         -     LINKEDIN: LinkedIn social media platform.
         -     TWITTER: X (formerly Twitter) social media platform.
         -     YOUTUBE: Youtube social media platform.
         -     PINTEREST: Pinterest social media platform.
         -     TIKTOK: TikTok social media platform.
         -     DEVIANTART: DeviantArt social media platform.
         -     SOUNDCLOUD: SoundCloud social media platform.
         -     TUMBLR: Tumblr social media platform.
         -     VIMEO: Vimeo social media platform.
         -     VKONTAKTE: VKontakte social media platform.
         -     ODNOKLASSNIKI: Odnoklassniki social media platform.
         -     OTHER: Other social media platform.
     - name: fieldOrigin | type: Origin | description: Field origin.  
         - enum:
         -     UNKNOWN: Unknown field origin. This value isn't used.
         -     CUSTOM: Custom field created by a Wix user.
         -     CONTACT: Contact type of field. These are default fields that are already provided by Members Area, such as: "birth date", "position", "company".
         -     SYSTEM: System fields, such as: "first name", "last name", "email", "phone", "address", and  "title". Some system fields are only available from the dashboard.
     - name: customFieldId | type: string | description: Custom field GUID.  | validation: format GUID
  - name: metadata | type: PagingMetadata | description: Metadata for the paginated results.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  


```

### Examples

### queryCustomFieldSuggestions
```javascript
import { customFieldSuggestions } from '@wix/members';

async function queryCustomFieldSuggestions(query) {
  const response = await customFieldSuggestions.queryCustomFieldSuggestions(query);
};
```

### queryCustomFieldSuggestions (with elevated permissions)
```javascript
import { customFieldSuggestions } from '@wix/members';
import { auth } from '@wix/essentials';

async function myQueryCustomFieldSuggestionsMethod(query) {
  const elevatedQueryCustomFieldSuggestions = auth.elevate(customFieldSuggestions.queryCustomFieldSuggestions);
  const response = await elevatedQueryCustomFieldSuggestions(query);
}
```

### queryCustomFieldSuggestions (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { customFieldSuggestions } from '@wix/members';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { customFieldSuggestions },
  // Include the auth strategy and host as relevant
});


async function queryCustomFieldSuggestions(query) {
  const response = await myWixClient.customFieldSuggestions.queryCustomFieldSuggestions(query);
};
```

---