> 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 # QueryParticipations # Package: calendar # Namespace: ParticipationsService # Method link: https://dev.wix.com/docs/api-reference/business-management/calendar/participations-v3/query-participations.md ## Permission Scopes: Manage Calendars: SCOPE.DC-CALENDAR.MANAGE ## Introduction Retrieves a list of `participations`, given the provided paging, filtering, and sorting. Query Participations runs with these defaults, which you can override: - `createdDate` is sorted in `DESC` order - `cursorPaging.limit` is `50` To learn how to query participations, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md). --- ## REST API ### Schema ``` Method: queryParticipations Description: Retrieves a list of `participations`, given the provided paging, filtering, and sorting. Query Participations runs with these defaults, which you can override: - `createdDate` is sorted in `DESC` order - `cursorPaging.limit` is `50` To learn how to query participations, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md). URL: https://www.wixapis.com/calendar/v3/participations/query Method: POST Method parameters: param name: query | type: CursorQuery - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. - name: limit | type: integer | description: Number of participations to load. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. You can get 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 in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` Return type: QueryParticipationsResponse - name: participations | type: array | description: Retrieved `participation` objects matching the provided query. - ONE-OF: - name: scheduleId | type: string | description: GUID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) associated with the participation. - name: eventId | type: string | description: GUID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) associated with the participation. - name: id | type: string | description: Participation GUID. - name: externalId | type: string | description: External GUID. - name: participant | type: Participant | description: Information about the participant. - name: name | type: string | description: Participant name. Min: 1 character Max: 200 characters - name: phone | type: string | description: Participant's phone number. - name: email | type: string | description: Participant's email address. - name: contactId | type: string | description: [Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object.md) GUID of the parcipant. - name: partySize | type: integer | description: Party size of the group or `1` for individuals. Min: `1` Max: `1000` - name: status | type: Status | description: Status of the party's participation in the event. Depending on your implementation, confirmation may be handled by the business owner or the customer. Supported values: + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). Default: `CONFIRMED` - enum: - CONFIRMED: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - PENDING_CONFIRMATION: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - name: appId | type: string | description: GUID of the app that owns the participation `object`. Identical to `appId` of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) that the related [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belongs to. - name: revision | type: string | description: Revision number, which increments by 1 each time the participation is updated. To prevent conflicting changes, the current revision must be passed when updating the participation. Ignored when creating a participation. - name: createdDate | type: string | description: Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: updatedDate | type: string | description: Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the participation. - 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: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata. - name: count | type: integer | description: Number of items returned in the response. - name: cursors | type: Cursors | description: Offset that was requested. - name: next | type: string | description: Cursor pointing to next page in the list of results. - name: prev | type: string | description: Cursor pointing to previous page in the list of results. - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page. ``` ### Examples ### Query all participations ```curl curl -X POST \ 'https://www.wixapis.com/calendar/v3/participations/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' ``` ### Query participations by event ID ```curl curl -X POST \ 'https://www.wixapis.com/calendar/v3/participations/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "query": { "filter": { "eventId": "130o4ncdcmm8csGKUihodsF8Lnx5vQuUmP9uqeurIYireDpysq5nOxSIMvXKf80QrOXzc09i1GXRepTUj2L01bzmifAqWHwp2pTmmtR3TmHJx7Tv6ODrmgS" } } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.calendar.ParticipationsService.queryParticipations(query) Description: Retrieves a list of `participations`, given the provided paging, filtering, and sorting. Query Participations runs with these defaults, which you can override: - `createdDate` is sorted in `DESC` order - `cursorPaging.limit` is `50` To learn how to query participations, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: query Method parameters: param name: query | type: ParticipationQuery | required: true - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. - name: limit | type: integer | description: Number of participations to load. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. You can get 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 in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` Return type: PROMISE - name: participations | type: array | description: Retrieved `participation` objects matching the provided query. - ONE-OF: - name: scheduleId | type: string | description: GUID of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) associated with the participation. - name: eventId | type: string | description: GUID of the [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) associated with the participation. - name: _id | type: string | description: Participation GUID. - name: externalId | type: string | description: External GUID. - name: participant | type: Participant | description: Information about the participant. - name: name | type: string | description: Participant name. Min: 1 character Max: 200 characters - name: phone | type: string | description: Participant's phone number. - name: email | type: string | description: Participant's email address. - name: contactId | type: string | description: [Contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object.md) GUID of the parcipant. - name: partySize | type: integer | description: Party size of the group or `1` for individuals. Min: `1` Max: `1000` - name: status | type: Status | description: Status of the party's participation in the event. Depending on your implementation, confirmation may be handled by the business owner or the customer. Supported values: + `CONFIRMED`: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). + `PENDING_CONFIRMATION`: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). Default: `CONFIRMED` - enum: - CONFIRMED: The party's participation is confirmed. For example, the business owner has confirmed a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - PENDING_CONFIRMATION: The party's participation is awaiting confirmation. For example, the business owner still needs to approve the [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings.md). - name: appId | type: string | description: GUID of the app that owns the participation `object`. Identical to `appId` of the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md) that the related [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) belongs to. - name: revision | type: string | description: Revision number, which increments by 1 each time the participation is updated. To prevent conflicting changes, the current revision must be passed when updating the participation. Ignored when creating a participation. - name: _createdDate | type: Date | description: Date the participation was created in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: _updatedDate | type: Date | description: Date the participation was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format. - name: extendedFields | type: ExtendedFields | description: Extensions enabling applications or users to save custom data related to the participation. - 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: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata. - name: count | type: integer | description: Number of items returned in the response. - name: cursors | type: Cursors | description: Offset that was requested. - name: next | type: string | description: Cursor pointing to next page in the list of results. - name: prev | type: string | description: Cursor pointing to previous page in the list of results. - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page. ``` ### Examples ### queryParticipations ```javascript import { participations } from '@wix/calendar'; async function queryParticipations(query) { const response = await participations.queryParticipations(query); }; ``` ### queryParticipations (with elevated permissions) ```javascript import { participations } from '@wix/calendar'; import { auth } from '@wix/essentials'; async function myQueryParticipationsMethod(query) { const elevatedQueryParticipations = auth.elevate(participations.queryParticipations); const response = await elevatedQueryParticipations(query); } ``` ### queryParticipations (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 { participations } from '@wix/calendar'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { participations }, // Include the auth strategy and host as relevant }); async function queryParticipations(query) { const response = await myWixClient.participations.queryParticipations(query); }; ``` ---