> 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 # UpdateParticipation # Package: calendar # Namespace: ParticipationsService # Method link: https://dev.wix.com/docs/api-reference/business-management/calendar/participations-v3/update-participation.md ## Permission Scopes: Manage Calendars: SCOPE.DC-CALENDAR.MANAGE ## Introduction Updates a `participation` object. --- ## REST API ### Schema ``` Method: updateParticipation Description: Updates a `participation` object. URL: https://www.wixapis.com/calendar/v3/participations/{participation.id} Method: PATCH # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: participation, participation.id, participation.revision Method parameters: param name: participation | type: Participation | description: The `participation` object represents the relationship between a participant and an [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) or [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md). It includes details about the participant, whether the participation status is confirmed or pending, which app owns the relevant event or schedule, and allows for custom data extensions. | required: true - ONE-OF: - required: true - 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. | required: true - 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: 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. | required: true - 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). Return type: UpdateParticipationResponse - name: participation | type: Participation | description: Updated `participation` object. - 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). ``` ### Examples ### Update Participation Updates a participation's party size. ```curl curl -X PATCH \ 'https://www.wixapis.com/calendar/v3/participations/b123e549-eb05-4c6e-8dab-0409c7ebc006' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "participation": { "partySize": 5, "revision": "1" } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.calendar.ParticipationsService.updateParticipation(_id, participation) Description: Updates a `participation` object. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: participation, _id, participation.revision Method parameters: param name: _id | type: string | description: Participation GUID. | required: true param name: participation | type: UpdateParticipation | description: The `participation` object represents the relationship between a participant and an [event](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/event-object.md) or [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object.md). It includes details about the participant, whether the participation status is confirmed or pending, which app owns the relevant event or schedule, and allows for custom data extensions. | required: true - ONE-OF: - required: true - 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: 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: 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. | required: true - 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). Return type: PROMISE - 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). ``` ### Examples ### updateParticipation ```javascript import { participations } from '@wix/calendar'; async function updateParticipation(_id,participation) { const response = await participations.updateParticipation(_id,participation); }; ``` ### updateParticipation (with elevated permissions) ```javascript import { participations } from '@wix/calendar'; import { auth } from '@wix/essentials'; async function myUpdateParticipationMethod(_id,participation) { const elevatedUpdateParticipation = auth.elevate(participations.updateParticipation); const response = await elevatedUpdateParticipation(_id,participation); } ``` ### updateParticipation (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 updateParticipation(_id,participation) { const response = await myWixClient.participations.updateParticipation(_id,participation); }; ``` ---