> 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`). > - 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.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 | 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. - name: offset | type: integer | description: Number of items to skip in the current sort order. - name: sorting | type: array | 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. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC Return type: QueryCustomFieldSuggestionsResponse - name: suggestions | type: array | description: Custom field suggestion. - name: name | type: string | description: Custom field name. - 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. - name: metadata | type: PagingMetadata | description: Metadata for the paginated results. - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - name: total | type: integer | description: Total number of items that match the query. - 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: ' -d '{ "query": { "sorting": [], "filter": { "memberId" : "9e4f34b3-ebb8-49ee-a342-057d7e70cf5d" } } }, ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.customFields.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 | 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. - name: offset | type: integer | description: Number of items to skip in the current sort order. - name: sorting | type: array | 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. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC Return type: PROMISE - name: suggestions | type: array | description: Custom field suggestion. - name: name | type: string | description: Custom field name. - 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. - name: metadata | type: PagingMetadata | description: Metadata for the paginated results. - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - name: total | type: integer | description: Total number of items that match the query. - 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-hosted) Self-hosted 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); }; ``` ---