> 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 # UpdateReservation # Package: reservations # Namespace: ReservationsService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/reservations/update-reservation.md ## Permission Scopes: Manage Reservations (Medium): SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM Manage Reservations (Full): SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL ## Introduction Updates a reservation. The fields `ignoreReservationLocationConflicts`, `ignoreTableCombinationConflicts` and `ignoreConflicts` should only be specified in the request if the identity you're authenticated as has the `MANAGE RESERVATIONS (FULL)` permission scope. Including these fields in the request without the required permissions results in an application error. Each time the reservation is updated, revision increments by 1. The existing revision must be specified when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites. --- ## REST API ### Schema ``` Method: updateReservation Description: Updates a reservation. The fields `ignoreReservationLocationConflicts`, `ignoreTableCombinationConflicts` and `ignoreConflicts` should only be specified in the request if the identity you're authenticated as has the `MANAGE RESERVATIONS (FULL)` permission scope. Including these fields in the request without the required permissions results in an application error. Each time the reservation is updated, revision increments by 1. The existing revision must be specified when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites. URL: https://www.wixapis.com/v1/reservations/{reservation.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: reservation, reservation.id, reservation.revision Method parameters: param name: force | type: force | description: If update should be forced. param name: ignoreConflicts | type: IgnoreConflicts - ONE-OF: - name: standardOptions | type: StandardOptions | description: Conflicts to ignore for standard reservations. - name: ignoreTableCombinationConflicts | type: array | description: Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it. Possible values: * `"RESERVED"`: One or more of the chosen tables are already reserved. * `"TOO_BIG"`: The party is too big for the selected table. * `"TOO_SMALL"`: The party is too small for the selected table. * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations. - enum: - UNKNOWN: Undefined conflict type. - RESERVED: One or more of the chosen tables are already reserved. - TOO_BIG: The party is too big for the selected table. - TOO_SMALL: The party is too small for the selected table. - OFFLINE_ONLY: The restaurant does not allow online reservations. - RESERVED_FOR_EXPERIENCE: The table is reserved for an active experience. - TABLE_NOT_IN_AREA: The table is not in the requested area. - name: ignoreReservationLocationConflicts | type: array | description: Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it. Possible values: * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings. * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings. - enum: - UNKNOWN: Undefined reservation location conflict type. - PARTY_PACING: The restaurant cannot accommodate a party of the given size according to party pacing settings. - SEAT_PACING: The required number of seats are unavailable according to seat pacing settings. - name: ignoreExperienceBlockingConflicts | type: array | description: Ignored experience blocking conflicts of the types specified in the array. This ensures that the reservation is created even if an experience blocks standard reservations at the given time. Possible values: * `"BLOCKED_BY_EXPERIENCE"`: Standard reservations are blocked by an active experience schedule. - enum: - UNKNOWN: Undefined experience blocking conflict type. - BLOCKED_BY_EXPERIENCE: Standard reservations are blocked by an active experience schedule. - name: experienceOptions | type: ExperienceOptions | description: Conflicts to ignore for experiences. - name: ignoreTableCombinationConflicts | type: array | description: Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it. Possible values: * `"RESERVED"`: One or more of the chosen tables are already reserved. * `"TOO_BIG"`: The party is too big for the selected table. * `"TOO_SMALL"`: The party is too small for the selected table. - enum: - UNKNOWN: Undefined conflict type. - RESERVED: One or more of the chosen tables are already reserved. - TOO_BIG: The party is too big for the selected table. - TOO_SMALL: The party is too small for the selected table. - OUTSIDE_EXPERIENCE_TABLE_LIST: The table or combination is not in the experience's specific table list. - name: ignoreExperienceConflicts | type: array | description: Ignored experience conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it. Possible values: * `"MAX_NUMBER_OF_GUESTS"`: The required number of seats are unavailable according to seat pacing settings. - enum: - UNKNOWN: Undefined reservation location conflict type. - MAXIMUM_NUMBER_OF_GUESTS: The number of guests exceeds the allowed limit. - name: ignoreConflictsType | type: IgnoreConflictsType | description: Types of conflicts to ignore. - enum: STANDARD, EXPERIENCE param name: ignoreReservationLocationConflicts | type: array param name: ignoreTableCombinationConflicts | type: array | description: Ignore table combination conflicts of the types included in the array. This ensures that the reservation is updated even if the given conflicts would normally prevent it. param name: reservation | type: Reservation | description: The reservation domain object. | required: true - name: id | type: string | description: Reservation GUID. | required: true - name: status | type: Status | description: Status of the reservation. See the [Reservation Lifecycle article](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/the-reservation-lifecycle.md) for an explanation of the role of statuses in the reservation lifecycle. - enum: - HELD: A customer has begun the reservation flow, a temporary reservation is created and will expire in 10 minutes unless the customer moves forward with the reservation flow. This phase temporarily reserves the required number of seats and tables for a given party size at a chosen time while a customer enters details and/or confirms their reservation request. - RESERVED: The reservation is confirmed. - CANCELED: The reservation is canceled. - FINISHED: The reservation completed successfully. - NO_SHOW: The customer didn't show up for their reservation. - SEATED: The customer is currently occupying the table. - REQUESTED: A customer finished requesting this reservation, meaning they have added all necessary details and confirmed the request. Restaurant staff can now either approve or decline the reservation request. - DECLINED: The restaurant’s owner or staff declined the customer’s request to make the reservation. - PAYMENT_INFORMATION_PENDING: The reservation is awaiting payment. It will expire in 10 minutes from the created time unless the customer provides payment information. This phase temporarily reserves the required number of seats and tables for the given party size at the chosen time. - name: source | type: Source | description: Reservation source. This indicates how the reservation was made. - enum: - OFFLINE: The reservation was made by a restaurant employee, for example when a customer calls to make a reservation. - ONLINE: The reservation was made through a website or app. - WALK_IN: The reservation was made by a restaurant employee when the customer arrived at the restaurant without a prior reservation. - name: details | type: Details | description: Reservation details. - name: reservationLocationId | type: string | description: GUID of the reservation location at which this reservation will be made. - name: tables | type: Tables | description: Tables used for this reservation. - name: ids | type: array | description: IDs of tables used for this reservation. If you don't specify an `ids` array, or you specify an empty array, no tables are assigned. - name: startDate | type: string | description: Start date and time of the reservation. - name: endDate | type: string | description: End date and time of the reservation. - name: partySize | type: integer | description: Party size. - name: reservee | type: Reservee | description: Information about the person the reservation is being made for. A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields. Attempting to create a reservation without these fields results in an error. - name: firstName | type: string | description: First name. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: lastName | type: string | description: Last name. - name: email | type: string | description: Email address. - name: phone | type: string | description: Phone number. This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: marketingConsent | type: boolean | description: Whether the reservee has given marketing consent. - name: customFields | type: object | description: Custom fields for the reservee in key-value pairs. The key is the custom field's GUID, and the value is the custom field's value. For example, a custom field for allergies might have the key-value pair `f4283b2d-6340-4cf9-bae7-8769e6b62127 : "Nuts, Seafood"`. Empty fields are not returned. - name: teamMessage | type: string | description: Team message. A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests. - name: revision | type: string | description: Revision number, which increments by 1 each time the reservation is updated. To prevent conflicting changes, the current revision must be specified when updating the reservation. Ignored when creating a reservation. | required: true - name: declineReason | type: string | description: The reason the reservation was declined. - name: extendedFields | type: ExtendedFields | description: Custom field data for the reservation object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.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). Return type: UpdateReservationResponse - name: reservation | type: Reservation | description: Reservation. - name: id | type: string | description: Reservation GUID. - name: status | type: Status | description: Status of the reservation. See the [Reservation Lifecycle article](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/the-reservation-lifecycle.md) for an explanation of the role of statuses in the reservation lifecycle. - enum: - HELD: A customer has begun the reservation flow, a temporary reservation is created and will expire in 10 minutes unless the customer moves forward with the reservation flow. This phase temporarily reserves the required number of seats and tables for a given party size at a chosen time while a customer enters details and/or confirms their reservation request. - RESERVED: The reservation is confirmed. - CANCELED: The reservation is canceled. - FINISHED: The reservation completed successfully. - NO_SHOW: The customer didn't show up for their reservation. - SEATED: The customer is currently occupying the table. - REQUESTED: A customer finished requesting this reservation, meaning they have added all necessary details and confirmed the request. Restaurant staff can now either approve or decline the reservation request. - DECLINED: The restaurant’s owner or staff declined the customer’s request to make the reservation. - PAYMENT_INFORMATION_PENDING: The reservation is awaiting payment. It will expire in 10 minutes from the created time unless the customer provides payment information. This phase temporarily reserves the required number of seats and tables for the given party size at the chosen time. - name: source | type: Source | description: Reservation source. This indicates how the reservation was made. - enum: - OFFLINE: The reservation was made by a restaurant employee, for example when a customer calls to make a reservation. - ONLINE: The reservation was made through a website or app. - WALK_IN: The reservation was made by a restaurant employee when the customer arrived at the restaurant without a prior reservation. - name: details | type: Details | description: Reservation details. - name: reservationLocationId | type: string | description: GUID of the reservation location at which this reservation will be made. - name: tables | type: Tables | description: Tables used for this reservation. - name: ids | type: array | description: IDs of tables used for this reservation. If you don't specify an `ids` array, or you specify an empty array, no tables are assigned. - name: startDate | type: string | description: Start date and time of the reservation. - name: endDate | type: string | description: End date and time of the reservation. - name: partySize | type: integer | description: Party size. - name: reservee | type: Reservee | description: Information about the person the reservation is being made for. A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields. Attempting to create a reservation without these fields results in an error. - name: firstName | type: string | description: First name. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: lastName | type: string | description: Last name. - name: email | type: string | description: Email address. - name: phone | type: string | description: Phone number. This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: marketingConsent | type: boolean | description: Whether the reservee has given marketing consent. - name: customFields | type: object | description: Custom fields for the reservee in key-value pairs. The key is the custom field's GUID, and the value is the custom field's value. For example, a custom field for allergies might have the key-value pair `f4283b2d-6340-4cf9-bae7-8769e6b62127 : "Nuts, Seafood"`. Empty fields are not returned. - name: contactId | type: string | description: Contact GUID. If a contact with this GUID does not exist on the site, one will be created. - name: reservedBy | type: ReservedBy | description: Information about the person making the reservation. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: contactId | type: string | description: Contact GUID for the person who made the reservation. If a contact with this GUID does not exist on the site, one will be created. - name: teamMessage | type: string | description: Team message. A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests. - name: createdDate | type: string | description: Date and time the reservation was created. - name: updatedDate | type: string | description: Date and time the reservation was changed. - name: revision | type: string | description: Revision number, which increments by 1 each time the reservation is updated. To prevent conflicting changes, the current revision must be specified when updating the reservation. Ignored when creating a reservation. - name: declineReason | type: string | description: The reason the reservation was declined. - name: paymentStatus | type: PaymentStatus | description: Payment status. - enum: - FREE: A reservation is free of charge. - NOT_PAID: Payment is not received yet. - PAID: The corresponding reservation order was fully paid. - PARTIALLY_REFUNDED: The corresponding reservation order was refunded, but the refund amount is less than the order total price. - FULLY_REFUNDED: The corresponding reservation order was fully refunded. The refund amount equals the total price. - PARTIALLY_PAID: The corresponding reservation order was partially paid. - name: extendedFields | type: ExtendedFields | description: Custom field data for the reservation object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.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). - name: archived | type: boolean | description: Whether the reservation is archived. Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section. Archived reservations can't be updated with Update Reservation. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: RESERVATION_VIOLATION | Description: Reservation data violates validation rules. HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: TIME_NOT_AVAILABLE | Description: The requested time slot isn't available due to conflicts. ``` ### Examples ### Update a reservation ```curl curl -X PATCH 'https://www.wixapis.com/table-reservations\ /reservations/v1/reservations/52b1af0a-12e5-4835-a453-7992ab86339c' \ -H 'Authorization: ' \ --data-binary '{ "reservation": { "details": { "partySize": 3 }, "reservee": { "firstName": "Pedro", "email": "pedro.doe@mail.com" }, "revision": "1" } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.reservations.ReservationsService.updateReservation(_id, reservation, options) Description: Updates a reservation. The fields `ignoreReservationLocationConflicts`, `ignoreTableCombinationConflicts` and `ignoreConflicts` should only be specified in the request if the identity you're authenticated as has the `MANAGE RESERVATIONS (FULL)` permission scope. Including these fields in the request without the required permissions results in an application error. Each time the reservation is updated, revision increments by 1. The existing revision must be specified when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: reservation, _id, reservation.revision Method parameters: param name: _id | type: string | description: Reservation GUID. | required: true param name: options | type: UpdateReservationOptions none - name: ignoreConflicts | type: IgnoreConflicts | description: Conflicts to ignore. - ONE-OF: - name: standardOptions | type: StandardOptions | description: Conflicts to ignore for standard reservations. - name: ignoreTableCombinationConflicts | type: array | description: Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it. Possible values: * `"RESERVED"`: One or more of the chosen tables are already reserved. * `"TOO_BIG"`: The party is too big for the selected table. * `"TOO_SMALL"`: The party is too small for the selected table. * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations. - enum: - UNKNOWN: Undefined conflict type. - RESERVED: One or more of the chosen tables are already reserved. - TOO_BIG: The party is too big for the selected table. - TOO_SMALL: The party is too small for the selected table. - OFFLINE_ONLY: The restaurant does not allow online reservations. - RESERVED_FOR_EXPERIENCE: The table is reserved for an active experience. - TABLE_NOT_IN_AREA: The table is not in the requested area. - name: ignoreReservationLocationConflicts | type: array | description: Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it. Possible values: * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings. * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings. - enum: - UNKNOWN: Undefined reservation location conflict type. - PARTY_PACING: The restaurant cannot accommodate a party of the given size according to party pacing settings. - SEAT_PACING: The required number of seats are unavailable according to seat pacing settings. - name: ignoreExperienceBlockingConflicts | type: array | description: Ignored experience blocking conflicts of the types specified in the array. This ensures that the reservation is created even if an experience blocks standard reservations at the given time. Possible values: * `"BLOCKED_BY_EXPERIENCE"`: Standard reservations are blocked by an active experience schedule. - enum: - UNKNOWN: Undefined experience blocking conflict type. - BLOCKED_BY_EXPERIENCE: Standard reservations are blocked by an active experience schedule. - name: experienceOptions | type: ExperienceOptions | description: Conflicts to ignore for experiences. - name: ignoreTableCombinationConflicts | type: array | description: Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it. Possible values: * `"RESERVED"`: One or more of the chosen tables are already reserved. * `"TOO_BIG"`: The party is too big for the selected table. * `"TOO_SMALL"`: The party is too small for the selected table. - enum: - UNKNOWN: Undefined conflict type. - RESERVED: One or more of the chosen tables are already reserved. - TOO_BIG: The party is too big for the selected table. - TOO_SMALL: The party is too small for the selected table. - OUTSIDE_EXPERIENCE_TABLE_LIST: The table or combination is not in the experience's specific table list. - name: ignoreExperienceConflicts | type: array | description: Ignored experience conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it. Possible values: * `"MAX_NUMBER_OF_GUESTS"`: The required number of seats are unavailable according to seat pacing settings. - enum: - UNKNOWN: Undefined reservation location conflict type. - MAXIMUM_NUMBER_OF_GUESTS: The number of guests exceeds the allowed limit. - name: ignoreConflictsType | type: IgnoreConflictsType | description: Types of conflicts to ignore. - enum: STANDARD, EXPERIENCE param name: reservation | type: UpdateReservation | description: The reservation domain object. | required: true - name: status | type: Status | description: Status of the reservation. See the [Reservation Lifecycle article](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/the-reservation-lifecycle.md) for an explanation of the role of statuses in the reservation lifecycle. - enum: - HELD: A customer has begun the reservation flow, a temporary reservation is created and will expire in 10 minutes unless the customer moves forward with the reservation flow. This phase temporarily reserves the required number of seats and tables for a given party size at a chosen time while a customer enters details and/or confirms their reservation request. - RESERVED: The reservation is confirmed. - CANCELED: The reservation is canceled. - FINISHED: The reservation completed successfully. - NO_SHOW: The customer didn't show up for their reservation. - SEATED: The customer is currently occupying the table. - REQUESTED: A customer finished requesting this reservation, meaning they have added all necessary details and confirmed the request. Restaurant staff can now either approve or decline the reservation request. - DECLINED: The restaurant’s owner or staff declined the customer’s request to make the reservation. - PAYMENT_INFORMATION_PENDING: The reservation is awaiting payment. It will expire in 10 minutes from the created time unless the customer provides payment information. This phase temporarily reserves the required number of seats and tables for the given party size at the chosen time. - name: source | type: Source | description: Reservation source. This indicates how the reservation was made. - enum: - OFFLINE: The reservation was made by a restaurant employee, for example when a customer calls to make a reservation. - ONLINE: The reservation was made through a website or app. - WALK_IN: The reservation was made by a restaurant employee when the customer arrived at the restaurant without a prior reservation. - name: details | type: Details | description: Reservation details. - name: reservationLocationId | type: string | description: GUID of the reservation location at which this reservation will be made. - name: tables | type: Tables | description: Tables used for this reservation. - name: ids | type: array | description: IDs of tables used for this reservation. If you don't specify an `ids` array, or you specify an empty array, no tables are assigned. - name: startDate | type: Date | description: Start date and time of the reservation. - name: endDate | type: Date | description: End date and time of the reservation. - name: partySize | type: integer | description: Party size. - name: reservee | type: Reservee | description: Information about the person the reservation is being made for. A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields. Attempting to create a reservation without these fields results in an error. - name: firstName | type: string | description: First name. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: lastName | type: string | description: Last name. - name: email | type: string | description: Email address. - name: phone | type: string | description: Phone number. This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: marketingConsent | type: boolean | description: Whether the reservee has given marketing consent. - name: customFields | type: object | description: Custom fields for the reservee in key-value pairs. The key is the custom field's GUID, and the value is the custom field's value. For example, a custom field for allergies might have the key-value pair `f4283b2d-6340-4cf9-bae7-8769e6b62127 : "Nuts, Seafood"`. Empty fields are not returned. - name: teamMessage | type: string | description: Team message. A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests. - name: revision | type: string | description: Revision number, which increments by 1 each time the reservation is updated. To prevent conflicting changes, the current revision must be specified when updating the reservation. Ignored when creating a reservation. | required: true - name: declineReason | type: string | description: The reason the reservation was declined. - name: extendedFields | type: ExtendedFields | description: Custom field data for the reservation object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.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). Return type: PROMISE - name: _id | type: string | description: Reservation GUID. - name: status | type: Status | description: Status of the reservation. See the [Reservation Lifecycle article](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/the-reservation-lifecycle.md) for an explanation of the role of statuses in the reservation lifecycle. - enum: - HELD: A customer has begun the reservation flow, a temporary reservation is created and will expire in 10 minutes unless the customer moves forward with the reservation flow. This phase temporarily reserves the required number of seats and tables for a given party size at a chosen time while a customer enters details and/or confirms their reservation request. - RESERVED: The reservation is confirmed. - CANCELED: The reservation is canceled. - FINISHED: The reservation completed successfully. - NO_SHOW: The customer didn't show up for their reservation. - SEATED: The customer is currently occupying the table. - REQUESTED: A customer finished requesting this reservation, meaning they have added all necessary details and confirmed the request. Restaurant staff can now either approve or decline the reservation request. - DECLINED: The restaurant’s owner or staff declined the customer’s request to make the reservation. - PAYMENT_INFORMATION_PENDING: The reservation is awaiting payment. It will expire in 10 minutes from the created time unless the customer provides payment information. This phase temporarily reserves the required number of seats and tables for the given party size at the chosen time. - name: source | type: Source | description: Reservation source. This indicates how the reservation was made. - enum: - OFFLINE: The reservation was made by a restaurant employee, for example when a customer calls to make a reservation. - ONLINE: The reservation was made through a website or app. - WALK_IN: The reservation was made by a restaurant employee when the customer arrived at the restaurant without a prior reservation. - name: details | type: Details | description: Reservation details. - name: reservationLocationId | type: string | description: GUID of the reservation location at which this reservation will be made. - name: tables | type: Tables | description: Tables used for this reservation. - name: ids | type: array | description: IDs of tables used for this reservation. If you don't specify an `ids` array, or you specify an empty array, no tables are assigned. - name: startDate | type: Date | description: Start date and time of the reservation. - name: endDate | type: Date | description: End date and time of the reservation. - name: partySize | type: integer | description: Party size. - name: reservee | type: Reservee | description: Information about the person the reservation is being made for. A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields. Attempting to create a reservation without these fields results in an error. - name: firstName | type: string | description: First name. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: lastName | type: string | description: Last name. - name: email | type: string | description: Email address. - name: phone | type: string | description: Phone number. This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: marketingConsent | type: boolean | description: Whether the reservee has given marketing consent. - name: customFields | type: object | description: Custom fields for the reservee in key-value pairs. The key is the custom field's GUID, and the value is the custom field's value. For example, a custom field for allergies might have the key-value pair `f4283b2d-6340-4cf9-bae7-8769e6b62127 : "Nuts, Seafood"`. Empty fields are not returned. - name: contactId | type: string | description: Contact GUID. If a contact with this GUID does not exist on the site, one will be created. - name: reservedBy | type: ReservedBy | description: Information about the person making the reservation. This field is required if the reservation's `source` is anything other than `WALK_IN`. - name: contactId | type: string | description: Contact GUID for the person who made the reservation. If a contact with this GUID does not exist on the site, one will be created. - name: teamMessage | type: string | description: Team message. A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests. - name: _createdDate | type: Date | description: Date and time the reservation was created. - name: _updatedDate | type: Date | description: Date and time the reservation was changed. - name: revision | type: string | description: Revision number, which increments by 1 each time the reservation is updated. To prevent conflicting changes, the current revision must be specified when updating the reservation. Ignored when creating a reservation. - name: declineReason | type: string | description: The reason the reservation was declined. - name: paymentStatus | type: PaymentStatus | description: Payment status. - enum: - FREE: A reservation is free of charge. - NOT_PAID: Payment is not received yet. - PAID: The corresponding reservation order was fully paid. - PARTIALLY_REFUNDED: The corresponding reservation order was refunded, but the refund amount is less than the order total price. - FULLY_REFUNDED: The corresponding reservation order was fully refunded. The refund amount equals the total price. - PARTIALLY_PAID: The corresponding reservation order was partially paid. - name: extendedFields | type: ExtendedFields | description: Custom field data for the reservation object. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.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). - name: archived | type: boolean | description: Whether the reservation is archived. Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section. Archived reservations can't be updated with Update Reservation. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: RESERVATION_VIOLATION | Description: Reservation data violates validation rules. HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: TIME_NOT_AVAILABLE | Description: The requested time slot isn't available due to conflicts. ``` ### Examples ### updateReservation ```javascript import { reservations } from '@wix/table-reservations'; async function updateReservation(_id,reservation,options) { const response = await reservations.updateReservation(_id,reservation,options); }; ``` ### updateReservation (with elevated permissions) ```javascript import { reservations } from '@wix/table-reservations'; import { auth } from '@wix/essentials'; async function myUpdateReservationMethod(_id,reservation,options) { const elevatedUpdateReservation = auth.elevate(reservations.updateReservation); const response = await elevatedUpdateReservation(_id,reservation,options); } ``` ### updateReservation (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 { reservations } from '@wix/table-reservations'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { reservations }, // Include the auth strategy and host as relevant }); async function updateReservation(_id,reservation,options) { const response = await myWixClient.reservations.updateReservation(_id,reservation,options); }; ``` ---