> 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 # SearchPrograms # Package: programs # Namespace: ProgramsService # Method link: https://dev.wix.com/docs/api-reference/business-management/online-programs/programs/program/search-programs.md ## Permission Scopes: Wix Multilingual - Nile Wrapper Domain Events Read: SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ ## Introduction Retrieves a list of programs according to search criteria --- ## REST API ### Schema ``` Method: searchPrograms Description: Retrieves a list of programs according to search criteria URL: https://www.wixapis.com/v3/programs/search Method: POST Method parameters: param name: search | type: CursorSearch - name: cursorPaging | type: CursorPaging | 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: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | 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). - name: sort | type: array | description: List of sort objects. 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 - name: aggregations | type: array | description: Aggregations are a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation. - ONE-OF: - name: includeOptions | type: IncludeMissingValuesOptions | description: Options for including missing values. - name: addToBucket | type: string | description: Specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... - name: sortType | type: SortType | description: Whether to sort by number of matches or value of the field. - enum: - COUNT: Sort by number of matches. - VALUE: Sort by value of the field alphabetically. - name: sortDirection | type: SortDirection | description: Whether to sort in ascending or descending order. - enum: - DESC: Sort in descending order. - ASC: Sort in ascending order. - name: limit | type: integer | description: How many aggregations to return. Can be between 1 and 250. 10 is the default. - name: missingValues | type: MissingValues | description: Whether to include or exclude missing values from the aggregation results. Default: `EXCLUDE`. - enum: - EXCLUDE: Exclude missing values from the aggregation results. - INCLUDE: Include missing values in the aggregation results. - name: range | type: RangeAggregation | description: Range aggregation. - name: buckets | type: array | description: List of range buckets, where during aggregation each entity will be placed in the first bucket its value falls into, based on the provided range bounds. - name: from | type: number | description: Inclusive lower bound of the range. Required if `to` is not provided. - name: to | type: number | description: Exclusive upper bound of the range. Required if `from` is not provided. - name: scalar | type: ScalarAggregation | description: Scalar aggregation. - name: type | type: ScalarType | description: Define the operator for the scalar aggregation. - enum: - COUNT_DISTINCT: Count of distinct values. - MIN: Minimum value. - MAX: Maximum value. - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation. - name: interval | type: Interval | description: Interval for date histogram aggregation. - enum: - YEAR: Yearly interval - MONTH: Monthly interval - WEEK: Weekly interval - DAY: Daily interval - HOUR: Hourly interval - MINUTE: Minute interval - SECOND: Second interval - name: nested | type: NestedAggregation | description: Nested aggregation. - name: nestedAggregations | type: array | description: Flattened list of aggregations, where each next aggregation is nested within previous one. - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation. - name: range | type: RangeAggregation | description: Range aggregation. - name: scalar | type: ScalarAggregation | description: Scalar aggregation. - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation. - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results. - name: type | type: NestedAggregationType | description: Type of aggregation, client must provide matching aggregation field below. - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value. - RANGE: An aggregation, where user can define set of ranges - each representing a bucket. - SCALAR: A single-value metric aggregation. For example, min, max, sum, avg. - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.). - name: fieldPath | type: string | description: Field to aggregate by, use dot notation to specify json path. - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results. - name: type | type: AggregationType | description: Type of aggregation, client must provide matching aggregation field below. - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value. - RANGE: An aggregation, where user can define set of ranges - each representing a bucket. - SCALAR: A single-value metric aggregation. For example, min, max, sum, avg. - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one. - name: fieldPath | type: string | description: Field to aggregate by, use dot notation to specify json path. - name: search | type: SearchDetails | description: Free text to match in searchable fields. - name: mode | type: Mode | description: Defines how separate search terms in `expression` are combined. - enum: - OR: Any of the search terms must be present. - AND: All search terms must be present. - name: expression | type: string | description: Search term or expression. - name: fields | type: array | description: Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path. - name: fuzzy | type: boolean | description: Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm). - name: timeZone | type: string | description: UTC offset or IANA time zone. Valid values are ISO 8601 UTC offsets, such as +02:00 or -06:00, and IANA time zone GUIDs, such as Europe/Rome. Affects all filters and aggregations returned values. You may override this behavior in a specific filter by providing timestamps including time zone. For example, `"2023-12-20T10:52:34.795Z"`. Return type: SearchProgramsResponse - name: programs | type: array | description: Found programs - name: id | type: string | description: Program GUID. - name: revision | type: string | description: - name: createdDate | type: string | description: - name: updatedDate | type: string | description: - name: status | type: Status | description: current program state in v2 format - enum: - DRAFT: not published program, visible only on BM - PUBLISHED: program visible regarding to restrictions - ENDED: program isn't available to join. - ARCHIVED: closed program. Joins and sections/steps are not available for participants. - name: categoryIds | type: array | description: assigned categories - name: description | type: Description | description: general program info. - ONE-OF: - name: image | type: Image | description: WixMedia image - name: id | type: string | description: WixMedia image GUID. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. - name: width | type: integer | description: Original image width. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: video | type: VideoV2 | description: WixMedia video - name: id | type: string | description: WixMedia GUID. - name: resolutions | type: array | description: Available resolutions for the video, starting with the optimal resolution. - name: url | type: string | description: Video URL. - name: height | type: integer | description: Video height. - name: width | type: integer | description: Video width. - name: format | type: string | description: Video format for example, mp4, hls. - name: filename | type: string | description: Video filename. - name: title | type: string | description: - name: details | type: string | description: - name: timeline | type: Timeline | description: timeline type -> Self-paced, time-restricted. - name: selfPaced | type: boolean | description: are sections/steps evaluated every day? Or can UoU participate in a self paced mode? - name: startDate | type: string | description: everyone starts on this day - name: durationInDays | type: integer | description: duration of program in days (if applicable). - name: restrictions | type: Restrictions | description: participant limitation, step-completion pace and etc. - name: maxParticipants | type: integer | description: limit of active participants in the program. - name: hideFutureSteps | type: boolean | description: hide steps in the Pending state. - name: resolveStepsInOrder | type: boolean | description: allow participants complete steps in the certain order. - name: shareProgress | type: boolean | description: allow program participants to share their progress in group - name: accessType | type: AccessType | description: access restrictions options regarding visibility. - enum: - PUBLIC: join without approvals - PRIVATE: send a join request to the owner and get an approval from him. - SECRET: join possible only after owner invite. - name: price | type: Money | description: single-payment price. - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD). - name: seo | type: Seo | description: seo settings. - name: slug | type: string | description: program slug expression - name: seoData | type: SeoSchema | description: schema used by Seo team - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: url | type: PageUrl | description: program url - name: base | type: string | description: The base URL. For premium sites, this is the domain. For free sites, this is the site URL. For example, `mysite.wixsite.com/mysite`. - name: path | type: string | description: The relative path for the page within the site. For example, `/product-page/a-product`. - name: imageUrl | type: string | description: image url from description media - name: imageAlt | type: string | description: alt text of image - name: courseWorkload | type: string | description: Approximate SEO program duration in Iso-8601 - name: rewards | type: array | description: rewards to be assigned after reaching some of the program milestones. - name: trigger | type: Trigger | description: on which action rewards must be assigned. - enum: - JOINED_TO_PROGRAM: member joins the program - STEP_COMPLETED: at least one step completed - ALL_STEPS_COMPLETED: all steps are completed. - name: badgeIds | type: array | description: badges participant will get on program complete - name: certificate | type: Certificate | description: certificate for program. Currently is program GUID - name: id | type: string | description: Certificate for program completion. Currently is program GUID - name: connectedDate | type: string | description: date it was connected to program - name: socialGroupId | type: string | description: connected social group. - name: extendedFields | type: ExtendedFields | description: extensible field - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: shouldSendInvoice | type: boolean | description: if true -> invoice is sent to the customer who purchased the program via single payment; else -> payment confirmation email is sent - name: videoStepsSettings | type: VideoStepsSettings | description: settings related to video steps in programs - name: autoNavigate | type: boolean | description: automatically switch to next video step after finishing current one - name: requiredCompletionPercentage | type: number | description: how many percents of video need to be watched to complete step - name: contentSummary | type: ContentSummary | description: number of content entities in program - name: stepCount | type: integer | description: number of steps in program - name: sectionCount | type: integer | description: number of sections in program - name: ownerUserId | type: string | description: user id of owner, who created this program - name: pagingMetadata | type: CursorPagingMetadata | description: paging - name: count | type: integer | description: Number of items returned in current page. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. - name: aggregationData | type: AggregationData | description: aggregation - name: results | type: array | description: key = aggregation name (as derived from search request). - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results. - name: results | type: array | description: List of value aggregations. - name: value | type: string | description: Value of the field. - name: count | type: integer | description: Count of entities with this value. - name: ranges | type: RangeResults | description: Range aggregation results. - name: results | type: array | description: List of ranges returned in same order as requested. - name: from | type: number | description: Inclusive lower bound of the range. - name: to | type: number | description: Exclusive upper bound of the range. - name: count | type: integer | description: Count of entities in this range. - name: scalar | type: ScalarResult | description: Scalar aggregation results. - name: type | type: ScalarType | description: Type of scalar aggregation. - enum: - COUNT_DISTINCT: Count of distinct values. - MIN: Minimum value. - MAX: Maximum value. - name: value | type: number | description: Value of the scalar aggregation. - name: groupedByValue | type: GroupByValueResults | description: Group by value aggregation results. - name: results | type: array | description: List of value aggregations. - name: value | type: string | description: Value of the field. - name: nestedResults | type: NestedAggregationResults | description: Nested aggregations. - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results. - name: ranges | type: RangeResults | description: Range aggregation results. - name: scalar | type: ScalarResult | description: Scalar aggregation results. - name: name | type: string | description: User-defined name of aggregation, matches the one provided in request. - name: type | type: AggregationType | description: Type of aggregation that matches result. - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value. - RANGE: An aggregation, where user can define set of ranges - each representing a bucket. - SCALAR: A single-value metric aggregation. For example, min, max, sum, avg. - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one. - name: fieldPath | type: string | description: Field to aggregate by, matches the one provided in request. - name: dateHistogram | type: DateHistogramResults | description: Date histogram aggregation results. - name: results | type: array | description: List of date histogram aggregations. - name: value | type: string | description: Date in ISO 8601 format. - name: count | type: integer | description: Count of documents in the bucket. - name: nested | type: NestedResults | description: Nested aggregation results. - name: results | type: array | description: List of nested aggregations. - name: results | type: Map | description: List of nested aggregations. - ONE-OF: - name: value | type: ValueResult | description: Value aggregation result. - name: value | type: string | description: Value of the field. - name: count | type: integer | description: Count of entities with this value. - name: range | type: RangeResult | description: Range aggregation result. - name: from | type: number | description: Inclusive lower bound of the range. - name: to | type: number | description: Exclusive upper bound of the range. - name: count | type: integer | description: Count of entities in this range. - name: scalar | type: ScalarResult | description: Scalar aggregation result. - name: value | type: number | description: Value of the scalar aggregation. - name: dateHistogram | type: ValueResult | description: Date histogram aggregation result. - name: name | type: string | description: User-defined name of aggregation as derived from search request. - name: type | type: AggregationType | description: Type of aggregation that must match provided kind as derived from search request. - name: fieldPath | type: string | description: Field to aggregate by as derived from search request. ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.programs.ProgramsService.searchPrograms(search) Description: Retrieves a list of programs according to search criteria # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: search Method parameters: param name: search | type: CursorSearch | required: true - name: cursorPaging | type: CursorPaging | 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: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | 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). - name: sort | type: array | description: List of sort objects. 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 - name: aggregations | type: array | description: Aggregations are a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation. - ONE-OF: - name: includeOptions | type: IncludeMissingValuesOptions | description: Options for including missing values. - name: addToBucket | type: string | description: Specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... - name: sortType | type: SortType | description: Whether to sort by number of matches or value of the field. - enum: - COUNT: Sort by number of matches. - VALUE: Sort by value of the field alphabetically. - name: sortDirection | type: SortDirection | description: Whether to sort in ascending or descending order. - enum: - DESC: Sort in descending order. - ASC: Sort in ascending order. - name: limit | type: integer | description: How many aggregations to return. Can be between 1 and 250. 10 is the default. - name: missingValues | type: MissingValues | description: Whether to include or exclude missing values from the aggregation results. Default: `EXCLUDE`. - enum: - EXCLUDE: Exclude missing values from the aggregation results. - INCLUDE: Include missing values in the aggregation results. - name: range | type: RangeAggregation | description: Range aggregation. - name: buckets | type: array | description: List of range buckets, where during aggregation each entity will be placed in the first bucket its value falls into, based on the provided range bounds. - name: from | type: number | description: Inclusive lower bound of the range. Required if `to` is not provided. - name: to | type: number | description: Exclusive upper bound of the range. Required if `from` is not provided. - name: scalar | type: ScalarAggregation | description: Scalar aggregation. - name: type | type: ScalarType | description: Define the operator for the scalar aggregation. - enum: - COUNT_DISTINCT: Count of distinct values. - MIN: Minimum value. - MAX: Maximum value. - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation. - name: interval | type: Interval | description: Interval for date histogram aggregation. - enum: - YEAR: Yearly interval - MONTH: Monthly interval - WEEK: Weekly interval - DAY: Daily interval - HOUR: Hourly interval - MINUTE: Minute interval - SECOND: Second interval - name: nested | type: NestedAggregation | description: Nested aggregation. - name: nestedAggregations | type: array | description: Flattened list of aggregations, where each next aggregation is nested within previous one. - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation. - name: range | type: RangeAggregation | description: Range aggregation. - name: scalar | type: ScalarAggregation | description: Scalar aggregation. - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation. - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results. - name: type | type: NestedAggregationType | description: Type of aggregation, client must provide matching aggregation field below. - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value. - RANGE: An aggregation, where user can define set of ranges - each representing a bucket. - SCALAR: A single-value metric aggregation. For example, min, max, sum, avg. - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.). - name: fieldPath | type: string | description: Field to aggregate by, use dot notation to specify json path. - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results. - name: type | type: AggregationType | description: Type of aggregation, client must provide matching aggregation field below. - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value. - RANGE: An aggregation, where user can define set of ranges - each representing a bucket. - SCALAR: A single-value metric aggregation. For example, min, max, sum, avg. - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one. - name: fieldPath | type: string | description: Field to aggregate by, use dot notation to specify json path. - name: search | type: SearchDetails | description: Free text to match in searchable fields. - name: mode | type: Mode | description: Defines how separate search terms in `expression` are combined. - enum: - OR: Any of the search terms must be present. - AND: All search terms must be present. - name: expression | type: string | description: Search term or expression. - name: fields | type: array | description: Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path. - name: fuzzy | type: boolean | description: Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm). - name: timeZone | type: string | description: UTC offset or IANA time zone. Valid values are ISO 8601 UTC offsets, such as +02:00 or -06:00, and IANA time zone GUIDs, such as Europe/Rome. Affects all filters and aggregations returned values. You may override this behavior in a specific filter by providing timestamps including time zone. For example, `"2023-12-20T10:52:34.795Z"`. Return type: PROMISE - name: programs | type: array | description: Found programs - name: _id | type: string | description: Program GUID. - name: revision | type: string | description: - name: _createdDate | type: Date | description: - name: _updatedDate | type: Date | description: - name: status | type: Status | description: current program state in v2 format - enum: - DRAFT: not published program, visible only on BM - PUBLISHED: program visible regarding to restrictions - ENDED: program isn't available to join. - ARCHIVED: closed program. Joins and sections/steps are not available for participants. - name: categoryIds | type: array | description: assigned categories - name: description | type: Description | description: general program info. - ONE-OF: - name: image | type: string | description: WixMedia image - name: video | type: string | description: WixMedia video - name: title | type: string | description: - name: details | type: string | description: - name: timeline | type: Timeline | description: timeline type -> Self-paced, time-restricted. - name: selfPaced | type: boolean | description: are sections/steps evaluated every day? Or can UoU participate in a self paced mode? - name: startDate | type: string | description: everyone starts on this day - name: durationInDays | type: integer | description: duration of program in days (if applicable). - name: restrictions | type: Restrictions | description: participant limitation, step-completion pace and etc. - name: maxParticipants | type: integer | description: limit of active participants in the program. - name: hideFutureSteps | type: boolean | description: hide steps in the Pending state. - name: resolveStepsInOrder | type: boolean | description: allow participants complete steps in the certain order. - name: shareProgress | type: boolean | description: allow program participants to share their progress in group - name: accessType | type: AccessType | description: access restrictions options regarding visibility. - enum: - PUBLIC: join without approvals - PRIVATE: send a join request to the owner and get an approval from him. - SECRET: join possible only after owner invite. - name: price | type: Money | description: single-payment price. - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD). - name: seo | type: Seo | description: seo settings. - name: slug | type: string | description: program slug expression - name: seoData | type: SeoSchema | description: schema used by Seo team - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: url | type: string | description: program url - name: imageUrl | type: string | description: image url from description media - name: imageAlt | type: string | description: alt text of image - name: courseWorkload | type: string | description: Approximate SEO program duration in Iso-8601 - name: rewards | type: array | description: rewards to be assigned after reaching some of the program milestones. - name: trigger | type: Trigger | description: on which action rewards must be assigned. - enum: - JOINED_TO_PROGRAM: member joins the program - STEP_COMPLETED: at least one step completed - ALL_STEPS_COMPLETED: all steps are completed. - name: badgeIds | type: array | description: badges participant will get on program complete - name: certificate | type: Certificate | description: certificate for program. Currently is program GUID - name: _id | type: string | description: Certificate for program completion. Currently is program GUID - name: connectedDate | type: Date | description: date it was connected to program - name: socialGroupId | type: string | description: connected social group. - name: extendedFields | type: ExtendedFields | description: extensible field - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: shouldSendInvoice | type: boolean | description: if true -> invoice is sent to the customer who purchased the program via single payment; else -> payment confirmation email is sent - name: videoStepsSettings | type: VideoStepsSettings | description: settings related to video steps in programs - name: autoNavigate | type: boolean | description: automatically switch to next video step after finishing current one - name: requiredCompletionPercentage | type: number | description: how many percents of video need to be watched to complete step - name: contentSummary | type: ContentSummary | description: number of content entities in program - name: stepCount | type: integer | description: number of steps in program - name: sectionCount | type: integer | description: number of sections in program - name: ownerUserId | type: string | description: user id of owner, who created this program - name: pagingMetadata | type: CursorPagingMetadata | description: paging - name: count | type: integer | description: Number of items returned in current page. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. - name: aggregationData | type: AggregationData | description: aggregation - name: results | type: array | description: key = aggregation name (as derived from search request). - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results. - name: results | type: array | description: List of value aggregations. - name: value | type: string | description: Value of the field. - name: count | type: integer | description: Count of entities with this value. - name: ranges | type: RangeResults | description: Range aggregation results. - name: results | type: array | description: List of ranges returned in same order as requested. - name: from | type: number | description: Inclusive lower bound of the range. - name: to | type: number | description: Exclusive upper bound of the range. - name: count | type: integer | description: Count of entities in this range. - name: scalar | type: ScalarResult | description: Scalar aggregation results. - name: type | type: ScalarType | description: Type of scalar aggregation. - enum: - COUNT_DISTINCT: Count of distinct values. - MIN: Minimum value. - MAX: Maximum value. - name: value | type: number | description: Value of the scalar aggregation. - name: groupedByValue | type: GroupByValueResults | description: Group by value aggregation results. - name: results | type: array | description: List of value aggregations. - name: value | type: string | description: Value of the field. - name: nestedResults | type: NestedAggregationResults | description: Nested aggregations. - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results. - name: ranges | type: RangeResults | description: Range aggregation results. - name: scalar | type: ScalarResult | description: Scalar aggregation results. - name: name | type: string | description: User-defined name of aggregation, matches the one provided in request. - name: type | type: AggregationType | description: Type of aggregation that matches result. - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value. - RANGE: An aggregation, where user can define set of ranges - each representing a bucket. - SCALAR: A single-value metric aggregation. For example, min, max, sum, avg. - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one. - name: fieldPath | type: string | description: Field to aggregate by, matches the one provided in request. - name: dateHistogram | type: DateHistogramResults | description: Date histogram aggregation results. - name: results | type: array | description: List of date histogram aggregations. - name: value | type: string | description: Date in ISO 8601 format. - name: count | type: integer | description: Count of documents in the bucket. - name: nested | type: NestedResults | description: Nested aggregation results. - name: results | type: array | description: List of nested aggregations. - name: results | type: Map | description: List of nested aggregations. - ONE-OF: - name: value | type: ValueResult | description: Value aggregation result. - name: value | type: string | description: Value of the field. - name: count | type: integer | description: Count of entities with this value. - name: range | type: RangeResult | description: Range aggregation result. - name: from | type: number | description: Inclusive lower bound of the range. - name: to | type: number | description: Exclusive upper bound of the range. - name: count | type: integer | description: Count of entities in this range. - name: scalar | type: ScalarResult | description: Scalar aggregation result. - name: value | type: number | description: Value of the scalar aggregation. - name: dateHistogram | type: ValueResult | description: Date histogram aggregation result. - name: name | type: string | description: User-defined name of aggregation as derived from search request. - name: type | type: AggregationType | description: Type of aggregation that must match provided kind as derived from search request. - name: fieldPath | type: string | description: Field to aggregate by as derived from search request. ``` ### Examples ### searchPrograms ```javascript import { programs } from '@wix/online-programs'; async function searchPrograms(search) { const response = await programs.searchPrograms(search); }; ``` ### searchPrograms (with elevated permissions) ```javascript import { programs } from '@wix/online-programs'; import { auth } from '@wix/essentials'; async function mySearchProgramsMethod(search) { const elevatedSearchPrograms = auth.elevate(programs.searchPrograms); const response = await elevatedSearchPrograms(search); } ``` ### searchPrograms (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 { programs } from '@wix/online-programs'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { programs }, // Include the auth strategy and host as relevant }); async function searchPrograms(search) { const response = await myWixClient.programs.searchPrograms(search); }; ``` ---