Customer
Interface
The signed-in buyer, as returned by activation.confirm, login, me and updateMe.
The profile fields read null until emailVerified is true.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Company name of a business buyer. |
|
| No | ISO 8601 datetime the customer record was created, by a guest booking or by signup. |
|
| No | Account email, trimmed and lower-cased. The login identifier. Max 320 characters. |
|
| No |
|
|
| No | First name. |
|
| No |
|
|
| No | Customer id ( |
|
| No | Last name. |
|
| No | Phone number in free form, 3 to 40 characters. |
|
| No | Preferred language as a normalized BCP 47 tag (e.g. |
|
| Yes | The accepted terms version, its language, the mode and the date. |
|
| No | ISO 8601 datetime the buyer accepted the shop's terms at activation. |
CustomerActivationConfirmInput
Interface
Input for activation.confirm: the token from the activation link, the password, the
terms acceptance, and the optional profile and marketing consent.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | The buyer's acceptance of the shop's terms, ticked on the activation page. Only |
|
| Yes | Optional label of the consent text shown (e.g. |
|
| Yes | Optional first name, at most 100 characters. Applied only when the account has none on file. |
|
| Yes | Optional last name, at most 100 characters. Applied only when the account has none on file. |
|
| Yes | Optional language tag of the activation page (e.g. |
|
| Yes | Optional marketing opt-in. When |
|
| No | Chosen password, 8 to 100 characters. |
|
| Yes | Optional phone number, 3 to 40 characters. Applied only when the account has none on file. |
|
| No | The single-use activation token from the emailed link. |
CustomerAddress
Interface
A saved postal address in the authenticated buyer's address book. Optional
address fields are returned as null, never omitted.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Street line 1 (number and street). Always set. Max 255 characters. |
|
| No | Street line 2 (apartment, floor, building). |
|
| No | Buyer-chosen label such as |
|
| No | City or town. Always set. Max 120 characters. |
|
| No | Company name for a business delivery. |
|
| No | ISO 3166-1 alpha-2 country code in uppercase (for example |
|
| No | ISO 8601 creation datetime (for example |
|
| No | Recipient first name. Always set. Max 120 characters. |
|
| No | Prefixed wire identifier (for example |
|
| No |
|
|
| No |
|
|
| No | Recipient last name. Always set. Max 120 characters. |
|
| No | Contact phone for the delivery. |
|
| No | Postal or ZIP code as unvalidated free-form text. Always set. Max 32 characters. |
|
| No | Province, state, or region. |
|
| No | ISO 8601 datetime of the last edit. Equal to |
CustomerAddressInput
Interface
Fields accepted when saving a new buyer address.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Street line 1. Required. Max 255 characters. |
|
| Yes | Street line 2 (apartment, floor). Pass |
|
| Yes | Optional label such as |
|
| No | City or town. Required. Max 120 characters. |
|
| Yes | Company name for a business delivery. Pass |
|
| No | ISO 3166-1 alpha-2 country code. The API normalizes it to uppercase. |
|
| No | Recipient first name. Required. Max 120 characters. |
|
| Yes | Mark this address as the default billing address, unsetting the previous one. |
|
| Yes | Mark this address as the default shipping address, unsetting the previous one. |
|
| No | Recipient last name. Required. Max 120 characters. |
|
| Yes | Optional buyer-supplied extension data stored with the address but not returned by storefront reads. |
|
| Yes | Contact phone for the delivery. Pass |
|
| No | Postal or ZIP code. Required. Max 32 characters. |
|
| Yes | Province, state, or region. Pass |
CustomerAddressUpdateInput
TypeAlias
Partial address edit. At least one field must be present or the API returns HTTP 422.
type CustomerAddressUpdateInput = AtLeastOne<CustomerAddressInput>CustomerAuthResult
Interface
The result of activation.confirm or login. The SDK keeps token in client memory
and sends it on account calls; store it yourself to keep the buyer signed in across
reloads. register returns no session.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | The signed-in buyer. |
|
| No | Session token. Pass it back with |
CustomerBooking
TypeAlias
A booking in the me history: its reference, slot, party size and status. Contact
details and the booked resource are not included.
type CustomerBooking = Pick<Booking, "reference" | "startsAt" | "endsAt" | "partySize"> & { status: CustomerBookingStatus }CustomerBookingStatus
TypeAlias
Status of a booking in the me history. 'pending' means a required deposit is not
paid yet.
type CustomerBookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "no_show"CustomerEmailVerificationResult
Interface
The result of verifyEmail. An invalid, expired or used token throws instead.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Always |
CustomerLoginInput
Interface
Credentials for login.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Account email. |
|
| No | Account password. |
CustomerLogoutOptions
Interface
Options for logout.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes |
|
CustomerProfileUpdateInput
Interface
Input for customers.updateMe.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Preferred language tag for account emails: letters, digits, |
CustomerRegisterInput
Interface
Input for register: only the email to send the activation link to. The password,
terms, profile and consent go to CustomerActivationConfirmInput.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Account email, trimmed and lower-cased by the server. The login identifier. |
CustomerSession
Interface
The result of me: the signed-in buyer and their bookings. Until the email is
verified, only bookings made while signed in are listed.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Up to 100 bookings, latest start first. |
|
| No | The signed-in buyer. |
CustomerSpamOptions
Interface
Options for the anti-spam protected customer calls: register, passwordReset.request
and the address-book writes.
Extends: SubmitOptions, BaseRequestOptions
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Set |
|
| Yes |
|
|
| Yes | Epoch milliseconds when the buyer started the form. Defaults to client creation,<br>capped at 55 minutes ago. Pass it when the site uses custom anti-spam timing. |
|
| Yes | Locale of this request (e.g. |
|
| Yes | reCAPTCHA token, required when the site or form uses reCAPTCHA. A v3<br>token must carry the method's action: |
MarketingChannel
TypeAlias
A marketing channel the buyer can consent to. More channels may be added to this union.
type MarketingChannel = "whatsapp" | "email"MarketingConsentList
Interface
The consent read/write response: one entry per channel in MarketingChannel.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Per-channel effective consent, one entry for every known channel. |
MarketingConsentState
Interface
The consent state of one marketing channel.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | The channel this entry describes. |
|
| No |
|
MarketingConsentUpdateInput
Interface
Input for marketingConsent.update.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | The channel to change, or the literal |
|
| Yes | Optional label of the consent text shown, cut to 100 characters. Stored with an<br>opt-in; an opt-out keeps the earlier value. |
|
| Yes | Optional language tag the consent was given in (e.g. |
|
| No |
|
PasswordResetConfirmInput
Interface
Input for passwordReset.confirm.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | The new password, 8 to 100 characters. |
|
| No | The single-use reset token from the emailed link. |
PasswordResetRequestInput
Interface
Input for passwordReset.request.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | The account email to send a reset link to. The call always resolves, whether or not it exists. |
TermsAcceptance
Interface
The proof of the buyer's acceptance of the shop's terms: which frozen version of the terms page was accepted, in which language, how, and when.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | ISO 8601 datetime of the acceptance (e.g. |
|
| No | BCP 47 language of the accepted terms version (e.g. |
|
| No | How the terms were accepted: |
|
| No | Identifier of the frozen terms version the buyer accepted. |