> 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

# SearchJoinApplications

# Package: onlinePrograms

# Namespace: JoinApplicationsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/online-programs/join-applications/search-join-applications.md

## Permission Scopes:
Manage Online Programs: SCOPE.CHALLENGES.MANAGE

## Introduction

Searches join applications using free-text matching across member details, and returns the results with cursor paging.

Free-text search covers `member.email`, `member.firstName`, `member.lastName`, and `member.nickname`. The method also supports filtering, sorting, and aggregations.

To retrieve join applications by their own fields, such as `status` or `programId`, call [Query Join Applications](https://dev.wix.com/docs/api-reference/business-management/online-programs/join-applications/query-join-applications.md).

---

## REST API

### Schema

```
 Method: searchJoinApplications
 Description: Searches join applications using free-text matching across member details, and returns the results with cursor paging.  Free-text search covers `member.email`, `member.firstName`, `member.lastName`, and `member.nickname`. The method also supports filtering, sorting, and aggregations.  To retrieve join applications by their own fields, such as `status` or `programId`, call [Query Join Applications](https://dev.wix.com/docs/api-reference/business-management/online-programs/join-applications/query-join-applications.md).
 URL: https://www.wixapis.com/online-programs/participants/v3/join-applications/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.  | validation: minimum 0, maximum 100, format int32
        - 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.  | validation: maxLength 16000
        - 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<Sorting> | 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).  | validation: maxItems 10
           - 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: aggregations | type: array<Aggregation> | 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.  | validation: maxItems 10
           - 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"] ...  | validation: maxLength 20
                 - 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.  | validation: format int32
                 - 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<RangeBucket> | 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.  | validation: maxItems 50
                    - name: from | type: number | description: Inclusive lower bound of the range. Required if `to` is not provided.  | validation: format double
                    - name: to | type: number | description: Exclusive upper bound of the range. Required if `from` is not provided.  | validation: format double
              - 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<NestedAggregationItem> | description: Flattened list of aggregations, where each next aggregation is nested within previous one.  | validation: minItems 2, maxItems 3
                    - 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.  | validation: maxLength 100
                    - 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.  | validation: maxLength 200
           - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results.  | validation: maxLength 100
           - 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.  | validation: maxLength 200
        - 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.  | validation: maxLength 100
           - name: fields | type: array<string> | description: Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path.  | validation: maxItems 20, maxLength 200
           - 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"`.  | validation: maxLength 50
 Searchable fields:
   - field: id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: member.contactId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: member.email | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: false | searchable: true
   - field: member.firstName | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: false | searchable: true
   - field: member.lastName | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: false | searchable: true
   - field: member.nickname | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: false | searchable: true
   - field: memberId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: participantId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: programId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: paymentStatus | operators: $eq, $in, $nin | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: status | operators: $eq, $in, $nin | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: createdDate | operators: none | sort: ASC, DESC | aggregatable: false | searchable: false
   - field: updatedDate | operators: none | sort: ASC, DESC | aggregatable: false | searchable: false
 Return type: SearchJoinApplicationsResponse
  - name: joinApplications | type: array<JoinApplication> | description: Retrieved join applications.  
     - name: id | type: string | description: Join application GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time a lifecycle, payment, or tag action changes the join application.  This API doesn't provide a generic update method, so `revision` is read-only. Don't specify it when creating or changing a join application.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the join application was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the join application was last updated.  | read-only: true | validation: format date-time
     - name: memberId | type: string | description: GUID of the site member applying or invited to participate in the program.  Required when a Wix user creates an application on a member's behalf. Automatically set to the caller's member GUID when a member creates their own application.  | read-only: true | validation: format GUID
     - name: programId | type: string | description: GUID of the program the join application is for.  | validation: format GUID, immutable
     - name: status | type: Status | description: Current status of the join application.  Read-only for member-initiated applications. A Wix user can set the initial status when creating an application on a member's behalf.  | read-only: true 
         - enum:
         -     INVITED: Member has been invited to join the program and has not yet accepted.
         -     APPROVAL_PENDING: Member's application is awaiting the Wix user's decision.
         -     APPROVED: Application is approved. Payment may still be required before the member is enrolled.
         -     CANCELLED: Member canceled the application. The join application is removed asynchronously.
         -     DECLINED: Wix user declined the application. The join application is removed asynchronously.
         -     SUSPENDED: Connected participant is suspended after the related Pricing Plans subscription expires. A successful new payment resumes the participation flow.
     - name: paymentStatus | type: PaymentStatus | description: Payment status of the join application.  | read-only: true 
         - enum:
         -     NO_PAYMENT_REQUIRED: Payment isn't required because the program is free or the member has an eligible Pricing Plans entitlement.
         -     PAYMENT_PENDING: Payment is required before the member can be enrolled.
         -     PAYMENT_IN_PROGRESS: Payment checkout or a Pricing Plans purchase is in progress.
         -     PENDING_OWNER_APPROVAL: Member submitted an offline payment that awaits the Wix user's decision.
         -     PAYMENT_SUCCESSFUL: Payment completed successfully.
         -     PAYMENT_FAILED: Payment was declined by the payment system or, for an offline payment, by the Wix user.
         -     PAYMENT_CANCELED: Member canceled payment.
     - name: paymentInfo | type: PaymentInfo | description: Wix Payments or Pricing Plans data associated with the join application.  | read-only: true 
        - name: paymentOrderId | type: string | description: Wix Payments order GUID. Populated when the member selects one-time payment at checkout.  | read-only: true | validation: format GUID
        - name: offlineTransactionId | type: string | description: Offline transaction GUID. Populated when the member selects manual payment at checkout.  | read-only: true | validation: format GUID
        - name: paidPlanIds | type: array<string> | description: IDs of the pricing plans connected to the program. Populated when the member selects Pricing Plans at checkout.  | read-only: true | validation: maxItems 100, format GUID
        - name: couponId | type: string | description: GUID of the coupon applied to the payment order. Populated when a coupon is applied with [Apply Coupon](https://dev.wix.com/docs/api-reference/business-management/online-programs/join-applications/apply-coupon.md).  | read-only: true | validation: format GUID
     - name: member | type: Member | description: Snapshot of the member identified by `memberId`, copied from the Members API. It isn't the authoritative member record.  | read-only: true 
        - name: firstName | type: string | description: Member contact's first name.  | read-only: true | validation: maxLength 1000
        - name: lastName | type: string | description: Member contact's last name.  | read-only: true | validation: maxLength 1000
        - name: email | type: string | description: Member's login email.  | read-only: true | validation: format EMAIL
        - name: contactId | type: string | description: Member's contact GUID.  | read-only: true | validation: format GUID
        - name: nickname | type: string | description: Member's nickname.  | read-only: true | validation: maxLength 1000
        - name: profileImageUrl | type: string | description: URL of the member's profile image.  | read-only: true | validation: format WEB_URL
     - name: participantId | type: string | description: GUID of the participant created from the join application.  Populated when `status` is `APPROVED` and `paymentStatus` is `NO_PAYMENT_REQUIRED` or `PAYMENT_SUCCESSFUL`.  | read-only: true | validation: format GUID
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the join application object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
        - 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).  | validation: format map
     - name: tags | type: Tags | description: Tags for categorizing and organizing join applications.  
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - 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.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - 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 results. Returned only when the request specifies aggregations.  
     - name: results | type: array<AggregationResults> | description: key = aggregation name (as derived from search request).  | validation: maxItems 10000
        - ONE-OF: 
           - name: values | type: ValueResults | description: Value aggregation results.  
              - name: results | type: array<ValueAggregationResult> | description: List of value aggregations.  | validation: maxItems 250
                 - name: value | type: string | description: Value of the field.  | validation: maxLength 100
                 - name: count | type: integer | description: Count of entities with this value.  
           - name: ranges | type: RangeResults | description: Range aggregation results.  
              - name: results | type: array<RangeAggregationResult> | description: List of ranges returned in same order as requested.  | validation: maxItems 50
                 - name: from | type: number | description: Inclusive lower bound of the range.  | validation: format double
                 - name: to | type: number | description: Exclusive upper bound of the range.  | validation: format double
                 - 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<NestedValueAggregationResult> | description: List of value aggregations.  | validation: maxItems 1000
                 - name: value | type: string | description: Value of the field.  | validation: maxLength 1000
                 - 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.  | validation: maxLength 100
                    - 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.  | validation: maxLength 200
           - name: dateHistogram | type: DateHistogramResults | description: Date histogram aggregation results.  
              - name: results | type: array<DateHistogramResult> | description: List of date histogram aggregations.  | validation: maxItems 200
                 - name: value | type: string | description: Date in ISO 8601 format.  | validation: maxLength 100
                 - name: count | type: integer | description: Count of documents in the bucket.  
           - name: nested | type: NestedResults | description: Nested aggregation results.  
              - name: results | type: array<Results> | description: List of nested aggregations.  | validation: maxItems 1000
                 - name: results | type: Map<string,NestedResultValue> | description: List of nested aggregations.  | validation: format map
                    - ONE-OF: 
                       - name: value | type: ValueResult | description: Value aggregation result.  
                          - name: value | type: string | description: Value of the field.  | validation: maxLength 1000
                          - name: count | type: integer | description: Count of entities with this value.  | validation: format int32
                       - name: range | type: RangeResult | description: Range aggregation result.  
                          - name: from | type: number | description: Inclusive lower bound of the range.  | validation: format double
                          - name: to | type: number | description: Exclusive upper bound of the range.  | validation: format double
                          - name: count | type: integer | description: Count of entities in this range.  | validation: format int32
                       - 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.  | validation: maxLength 100
        - 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.  | validation: maxLength 200


```

### Examples

### Search join applications by member email
Searches join applications by member email with status filtering and sorting

```curl
curl -X POST \
'https://www.wixapis.com/online-programs/participants/v3/join-applications/search' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "search": {
    "search": {
      "expression": "john@example.com",
      "fields": ["member.email"]
    },
    "filter": {
      "status": {
        "$eq": "APPROVED"
      }
    },
    "sort": [{
      "fieldName": "createdDate",
      "order": "DESC"
    }],
    "cursorPaging": {
      "limit": 50
    }
  }
}'
```

### Search join applications with aggregation
Searches join applications and returns a nested aggregation by program and status

```curl
curl -X POST \
'https://www.wixapis.com/online-programs/participants/v3/join-applications/search' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "search": {
    "search": {
      "expression": "jordan.taylor@example.com",
      "fields": ["member.email"]
    },
    "aggregations": [{
      "name": "byProgramAndStatus",
      "type": "NESTED",
      "fieldPath": "",
      "nested": {
        "nestedAggregations": [
          {
            "name": "programId",
            "type": "VALUE",
            "fieldPath": "programId",
            "value": {}
          },
          {
            "name": "status",
            "type": "VALUE",
            "fieldPath": "status",
            "value": {}
          }
        ]
      }
    }],
    "cursorPaging": {
      "limit": 5
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.joinApplications.searchJoinApplications(search)
 Description: Searches join applications using free-text matching across member details, and returns the results with cursor paging.  Free-text search covers `member.email`, `member.firstName`, `member.lastName`, and `member.nickname`. The method also supports filtering, sorting, and aggregations.  To retrieve join applications by their own fields, such as `status` or `programId`, call [Query Join Applications](https://dev.wix.com/docs/api-reference/business-management/online-programs/join-applications/query-join-applications.md).
 # 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.  | validation: minimum 0, maximum 100, format int32
        - 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.  | validation: maxLength 16000
        - 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<Sorting> | 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).  | validation: maxItems 10
           - 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: aggregations | type: array<Aggregation> | 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.  | validation: maxItems 10
           - 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"] ...  | validation: maxLength 20
                 - 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.  | validation: format int32
                 - 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<RangeBucket> | 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.  | validation: maxItems 50
                    - 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<NestedAggregationItem> | description: Flattened list of aggregations, where each next aggregation is nested within previous one.  | validation: minItems 2, maxItems 3
                    - 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.  | validation: maxLength 100
                    - 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.  | validation: maxLength 200
           - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results.  | validation: maxLength 100
           - 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.  | validation: maxLength 200
        - 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.  | validation: maxLength 100
           - name: fields | type: array<string> | description: Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path.  | validation: maxItems 20, maxLength 200
           - 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"`.  | validation: maxLength 50
 Searchable fields:
   - field: _id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: member.contactId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: member.email | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: false | searchable: true
   - field: member.firstName | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: false | searchable: true
   - field: member.lastName | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: false | searchable: true
   - field: member.nickname | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: false | searchable: true
   - field: memberId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: participantId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: programId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: paymentStatus | operators: $eq, $in, $nin | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: status | operators: $eq, $in, $nin | sort: ASC, DESC | aggregatable: true | searchable: false
   - field: _createdDate | operators: none | sort: ASC, DESC | aggregatable: false | searchable: false
   - field: _updatedDate | operators: none | sort: ASC, DESC | aggregatable: false | searchable: false
 Return type: PROMISE<SearchJoinApplicationsResponse>
  - name: joinApplications | type: array<JoinApplication> | description: Retrieved join applications.  
     - name: _id | type: string | description: Join application GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time a lifecycle, payment, or tag action changes the join application.  This API doesn't provide a generic update method, so `revision` is read-only. Don't specify it when creating or changing a join application.  | read-only: true | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the join application was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the join application was last updated.  | read-only: true 
     - name: memberId | type: string | description: GUID of the site member applying or invited to participate in the program.  Required when a Wix user creates an application on a member's behalf. Automatically set to the caller's member GUID when a member creates their own application.  | read-only: true | validation: format GUID
     - name: programId | type: string | description: GUID of the program the join application is for.  | validation: format GUID, immutable
     - name: status | type: Status | description: Current status of the join application.  Read-only for member-initiated applications. A Wix user can set the initial status when creating an application on a member's behalf.  | read-only: true 
         - enum:
         -     INVITED: Member has been invited to join the program and has not yet accepted.
         -     APPROVAL_PENDING: Member's application is awaiting the Wix user's decision.
         -     APPROVED: Application is approved. Payment may still be required before the member is enrolled.
         -     CANCELLED: Member canceled the application. The join application is removed asynchronously.
         -     DECLINED: Wix user declined the application. The join application is removed asynchronously.
         -     SUSPENDED: Connected participant is suspended after the related Pricing Plans subscription expires. A successful new payment resumes the participation flow.
     - name: paymentStatus | type: PaymentStatus | description: Payment status of the join application.  | read-only: true 
         - enum:
         -     NO_PAYMENT_REQUIRED: Payment isn't required because the program is free or the member has an eligible Pricing Plans entitlement.
         -     PAYMENT_PENDING: Payment is required before the member can be enrolled.
         -     PAYMENT_IN_PROGRESS: Payment checkout or a Pricing Plans purchase is in progress.
         -     PENDING_OWNER_APPROVAL: Member submitted an offline payment that awaits the Wix user's decision.
         -     PAYMENT_SUCCESSFUL: Payment completed successfully.
         -     PAYMENT_FAILED: Payment was declined by the payment system or, for an offline payment, by the Wix user.
         -     PAYMENT_CANCELED: Member canceled payment.
     - name: paymentInfo | type: PaymentInfo | description: Wix Payments or Pricing Plans data associated with the join application.  | read-only: true 
        - name: paymentOrderId | type: string | description: Wix Payments order GUID. Populated when the member selects one-time payment at checkout.  | read-only: true | validation: format GUID
        - name: offlineTransactionId | type: string | description: Offline transaction GUID. Populated when the member selects manual payment at checkout.  | read-only: true | validation: format GUID
        - name: paidPlanIds | type: array<string> | description: IDs of the pricing plans connected to the program. Populated when the member selects Pricing Plans at checkout.  | read-only: true | validation: maxItems 100, format GUID
        - name: couponId | type: string | description: GUID of the coupon applied to the payment order. Populated when a coupon is applied with [Apply Coupon](https://dev.wix.com/docs/api-reference/business-management/online-programs/join-applications/apply-coupon.md).  | read-only: true | validation: format GUID
     - name: member | type: Member | description: Snapshot of the member identified by `memberId`, copied from the Members API. It isn't the authoritative member record.  | read-only: true 
        - name: firstName | type: string | description: Member contact's first name.  | read-only: true | validation: maxLength 1000
        - name: lastName | type: string | description: Member contact's last name.  | read-only: true | validation: maxLength 1000
        - name: email | type: string | description: Member's login email.  | read-only: true | validation: format EMAIL
        - name: contactId | type: string | description: Member's contact GUID.  | read-only: true | validation: format GUID
        - name: nickname | type: string | description: Member's nickname.  | read-only: true | validation: maxLength 1000
        - name: profileImageUrl | type: string | description: URL of the member's profile image.  | read-only: true | validation: format WEB_URL
     - name: participantId | type: string | description: GUID of the participant created from the join application.  Populated when `status` is `APPROVED` and `paymentStatus` is `NO_PAYMENT_REQUIRED` or `PAYMENT_SUCCESSFUL`.  | read-only: true | validation: format GUID
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the join application object.  [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions.md) must be configured in the app dashboard before they can be accessed with API calls.  
        - 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).  | validation: format map
     - name: tags | type: Tags | description: Tags for categorizing and organizing join applications.  
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - 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.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - 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 results. Returned only when the request specifies aggregations.  
     - name: results | type: array<AggregationResults> | description: key = aggregation name (as derived from search request).  | validation: maxItems 10000
        - ONE-OF: 
           - name: values | type: ValueResults | description: Value aggregation results.  
              - name: results | type: array<ValueAggregationResult> | description: List of value aggregations.  | validation: maxItems 250
                 - name: value | type: string | description: Value of the field.  | validation: maxLength 100
                 - name: count | type: integer | description: Count of entities with this value.  
           - name: ranges | type: RangeResults | description: Range aggregation results.  
              - name: results | type: array<RangeAggregationResult> | description: List of ranges returned in same order as requested.  | validation: maxItems 50
                 - 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<NestedValueAggregationResult> | description: List of value aggregations.  | validation: maxItems 1000
                 - name: value | type: string | description: Value of the field.  | validation: maxLength 1000
                 - 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.  | validation: maxLength 100
                    - 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.  | validation: maxLength 200
           - name: dateHistogram | type: DateHistogramResults | description: Date histogram aggregation results.  
              - name: results | type: array<DateHistogramResult> | description: List of date histogram aggregations.  | validation: maxItems 200
                 - name: value | type: string | description: Date in ISO 8601 format.  | validation: maxLength 100
                 - name: count | type: integer | description: Count of documents in the bucket.  
           - name: nested | type: NestedResults | description: Nested aggregation results.  
              - name: results | type: array<Results> | description: List of nested aggregations.  | validation: maxItems 1000
                 - name: results | type: Map<string,NestedResultValue> | description: List of nested aggregations.  | validation: format map
                    - ONE-OF: 
                       - name: value | type: ValueResult | description: Value aggregation result.  
                          - name: value | type: string | description: Value of the field.  | validation: maxLength 1000
                          - name: count | type: integer | description: Count of entities with this value.  | validation: format int32
                       - 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.  | validation: format int32
                       - 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.  | validation: maxLength 100
        - 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.  | validation: maxLength 200


```

### Examples

### Search join applications with aggregation
Searches join applications and returns a nested aggregation by program and status

```javascript
import { joinApplications } from "@wix/online-programs";

async function searchJoinApplications() {
  const response = await joinApplications.searchJoinApplications({
    search: {
      expression: "jordan.taylor@example.com",
      fields: ["member.email"],
    },
    aggregations: [
      {
        name: "byProgramAndStatus",
        type: "NESTED",
        nested: {
          nestedAggregations: [
            { name: "programId", type: "VALUE", fieldPath: "programId", value: {} },
            { name: "status", type: "VALUE", fieldPath: "status", value: {} },
          ],
        },
      },
    ],
    cursorPaging: { limit: 5 },
  });
}

/* Promise resolves to:
 * {
 *   "joinApplications": [
 *     {
 *       "_id": "0f4be143-f402-4960-985b-5c3a6ce6b5f7",
 *       "revision": "1",
 *       "_createdDate": "2026-06-01T14:23:26.498Z",
 *       "_updatedDate": "2026-06-01T14:23:27.219Z",
 *       "memberId": "6c7c7b22-67a2-43c7-9d27-3b8ed07d9a45",
 *       "programId": "8d3f2b9f-2c31-4f45-8e5a-1f4b9259a6c2",
 *       "status": "APPROVAL_PENDING",
 *       "paymentStatus": "PAYMENT_PENDING"
 *     }
 *   ],
 *   "pagingMetadata": { "count": 1, "cursors": {}, "hasNext": false },
 *   "aggregationData": {
 *     "results": [
 *       {
 *         "name": "byProgramAndStatus",
 *         "type": "NESTED",
 *         "fieldPath": "",
 *         "nested": {
 *           "results": [
 *             {
 *               "results": {
 *                 "programId": { "value": { "value": "8d3f2b9f-2c31-4f45-8e5a-1f4b9259a6c2" } },
 *                 "status": { "value": { "value": "APPROVAL_PENDING", "count": 1 } }
 *               }
 *             }
 *           ]
 *         }
 *       }
 *     ]
 *   }
 * }
 */

```

### Search join applications by member email
Searches join applications by member email with status filtering and sorting

```javascript
import { joinApplications } from "@wix/online-programs";

async function searchJoinApplications() {
  const response = await joinApplications.searchJoinApplications({
    search: {
      expression: "jordan.taylor@example.com",
      fields: ["member.email"],
    },
    filter: { status: { $eq: "APPROVAL_PENDING" } },
    sort: [{ fieldName: "_createdDate", order: "DESC" }],
    cursorPaging: { limit: 10 },
  });
}

/* Promise resolves to:
 * {
 *   "joinApplications": [
 *     {
 *       "_id": "0f4be143-f402-4960-985b-5c3a6ce6b5f7",
 *       "revision": "1",
 *       "_createdDate": "2026-06-01T14:23:26.498Z",
 *       "_updatedDate": "2026-06-01T14:23:27.219Z",
 *       "memberId": "6c7c7b22-67a2-43c7-9d27-3b8ed07d9a45",
 *       "programId": "8d3f2b9f-2c31-4f45-8e5a-1f4b9259a6c2",
 *       "status": "APPROVAL_PENDING",
 *       "paymentStatus": "PAYMENT_PENDING",
 *       "member": {
 *         "firstName": "Jordan",
 *         "lastName": "Taylor",
 *         "email": "jordan.taylor@example.com",
 *         "contactId": "6c7c7b22-67a2-43c7-9d27-3b8ed07d9a45",
 *         "nickname": "jordan.taylor"
 *       },
 *       "tags": { "publicTags": { "tagIds": ["lead"] } }
 *     }
 *   ],
 *   "pagingMetadata": { "count": 1, "cursors": {}, "hasNext": false }
 * }
 */

```

### searchJoinApplications (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 { joinApplications } from '@wix/online-programs';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function searchJoinApplications(search) {
  const response = await myWixClient.joinApplications.searchJoinApplications(search);
};
```

---