Optional client information supplied when checking out on behalf of someone else than the current user.
Optional message from the client to the business.
Timestamp of when the cart was completed.
This field cannot be edited and once completed cannot be changed.
When the cart has reserved bookable items, the end time of the latest item.
This value is null
when there are no reservations.
Current validation errors.
When the cart has reserved bookable items, the timestamp when reservations
(e.g. service time selections) expire and need to be selected again. This
value is null
when there are no reservations and is reset into the future
whenever a new reservation is added.
The ID of an object
Timestamp when the cart was created.
When the cart has reserved bookable items, the starting time of the earliest
item. This value is null
when there are no reservations.
Summary of the cart, including e.g. line item totals.
Timestamp when the cart was last updated.
Adds tags to the appointment booked within a cart.
A map with a Boolean success
key or an error if one of the tags doesn't exist.
Add a bookable item to a cart
The bookable item
Optional discount code applied to the item. Invalid discount codes are ignored without an error, check discountCode
on the selected item to see if the code was valid.
The guest this item is booked for. A null value indicates the cart owner, or current client. When finding available times for bookable items, it's assumed that two items having different guests can be booked simultaneously.
Selected bookable item options. Note that the selections must conform to the option group requirements, e.g. limits on the number of options. Otherwise an error is returned.
The selected bookable item staff variant.
Promise containing the updated cart
Retrieves available dates for all bookable cart items.
Lower (inclusive) search range bound. When null, the current date plus the location's minimum booking lead time (i.e. the earliest possible date to book) is used.
Upper (inclusive) search range bound. When null, the lower bound plus one week is used.
Optional override for the timezone set in Carts.create
Promise containing the list of Bookable Dates
Retrieves available staff variants for a specific bookable cart item, given
a time that was retrieved earlier using cartBookableTimes
. In other words,
returns all variants that can be selected for the item while still keeping
the overall starting time.
Because this query assumes that variants of other items stay constant, variants of multiple items must be updated separately by retrieving the variants for one item first, updating that item, and then retrieving the variants for another item.
Timing of an item is affected when the variant is updated, which is why any
existing reservations are invalidated and the times must be reserved again
using reserveCartBookableItems
.
The bookable time.
The selected bookable item.
Promise containing the list of Bookable Item Staff Variants
Retrieves available times for all bookable cart items, given a date that was retrieved earlier using getDates
.
Optional override for the timezone set in Carts.create
Promise containing the list of Bookable Times
Reserve one starting time for bookable cart items, i.e. all bookable items are to be performed starting at this time. Note that this call may fail if the time is no longer available.
Promise containing the updated cart
Update a cart's selected bookable item.
This invalidates existing reservations when the guest, staff variant, or options are updated.
The bookable item
Optional discount code applied to the item. Invalid discount codes are ignored without an error, check discountCode
on the selected item to see if the code was valid.
The guest this item is booked for. A null value indicates the cart owner, or current client. When finding available times for bookable items, it's assumed that two items having different guests can be booked simultaneously.
Selected bookable item options. Note that the selections must conform to the option group requirements, e.g. limits on the number of options. Otherwise an error is returned.
The selected bookable item staff variant.
Promise containing the updated cart
Add a credit card payment method to a cart.
Promise containing the updated cart
Completes the checkout process.
This will first check for any errors in the cart, aborting if any errors exist. Then, it will lock the cart, proceed to attempt to charge the card for any purchaseable items, book all appointments, send relevant email receipts and confirmations, and then mark the cart as completed.
Promise containing the updated cart and the appointments
Select an available payment method to be used with all selected cart items. Note that this call may fail if the payment method is not compatible with all items.
This is currently the only way to associate payment methods with cart items. Other mutations may be added later in order to support more complex payment scenarios.
Promise containing the updated cart
Update a cart. Only some fields can be updated, there are other operations available to update more fields.
Promise containing the updated cart
Update a cart's selected gift card item.
The gift card item
Price applied to the gift card item
Promise containing the updated cart
Add a gift card item to a cart
The gift card item
Price applied to the gift card item
Promise containing the updated cart
Create an email fulfillment for a gift card item. A digital copy of the gift card will be sent to the recipient after the order is completed.
The CartGiftCardItem.
The name of the person sending the item.
The email of the person receiving the item
The name of the person receiving the item
A message to include from the sender
Delete a gift card item email fulfillment.
The CartGiftCardItem.
Promise containing the updated cart
Update a gift card item email fulfillment.
A message to include from the sender
A list of guests added to the cart
Add an offer to a cart.
When the offer code exists, it's possible that it's not applicable to any items in the cart, in which case the offer is accepted but pricing doesn't change. This status can be checked on each offer. When applicable items are added later, their pricing is updated then.
When the offer code doesn't exist, a CART_OFFER_CODE_INVALID
error is
returned.
The offer code identifier
Remove an offer from the cart.
The Offer code
Promise containing the updated cart
Categories of items available to be checked out.
Note that this list updates as the cart changes. For instance, some incompatible items may be disabled after others are added to the cart.
Clients should retrieve this list again after mutations or make sure errors are handled when items cannot be added.
Promise containing the list of available categories
Payment methods available for this cart. Some methods may already be
present, for instance when the current user is authenticated. Additional
methods can be added using the addCart...PaymentMethod
mutations.
Note that not all of these payment methods can be used with every cart item. Subsets of supported payment methods are available through the item objects instead.
Features available to the cart.
Location associated with the cart
A list of offers applied to the cart.
Offers can be applied manually using addCartOffer
and an offer code, but
it's also possible for offers to be auto-applied. At this time auto-applied
offers cannot be removed from the cart.
All selected items pending checkout.
Note that the ordering of this list is not stable, and may change depending on the current state of the cart.
Remove a selected item from a cart. Using this invalidates existing reservations when the item being removed is a bookable item.
Promise containing the updated cart
Sends an cart ownership code to the user via email. See takeOwnershipByCode({cartId, codeId, codeValue}) for next step.
The email address that the client has on their account
The cart ownership codeId - see takeOwnershipByCode({cartId, codeId, codeValue})
Sends a cart ownership code to the user via SMS. See takeOwnershipByCode({cartId, codeId, codeValue}) for next step.
The mobile phone number that the client has on their account
The cart ownership codeId - see takeOwnershipByCode({cartId, codeId, codeValue})
Sets a location for the cart.
Alternative methods for setting a location is passing a locationId argument when creating a cart or when adding a first item to an existing cart.
Note that the location can only be set once and cannot be changed. When
a location is already present on the cart, this mutation returns a
CART_LOCATION_ALREADY_SET
error.
Take ownership of a cart, linking the client to this cart.
The ownership code id returned by sendOwnershipCodeByEmail/sendOwnershipCodeBySms
The ownership code value from the email/SMS
The updated cart
Add a purchasable item to a cart
The purchasable item
Discount code applied to the item. Invalid discount codes are ignored without an error, check discountCode
on the selected item to see if the code was valid.
Promise containing the updated cart
Creates a waitlist entry for the cart with the specified date and time ranges as the boundary for the preferred bookable time. Only selected bookable items will be included in the waitlist entry for the cart.
This mutation marks the cart as completed, it can no longer be modified.
The preferred lower bound date and time of the bookable items.
The preferred upper bound date and time of the bookable items.
Optional override for the timezone set in Carts.create
Promise containing the updated cart
Update a cart's selected purchasable item.
Optional discount code applied to the item. Invalid discount codes are ignored without an error, check discountCode
on the selected item to see if the code was valid.
Promise containing the updated cart
Generated using TypeDoc
Optional gratuity defined in advance for bookable items.