> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# SDK Types: Customer

**Published**: 2026-11-30
**Category**: Types

## `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 |
| --- | --- | --- | --- |
| `companyName` | `string \| null` | No | Company name of a business buyer. `null` for a personal account or while the email is unverified. |
| `createdAt` | `string` | No | ISO 8601 datetime the customer record was created, by a guest booking or by signup. |
| `email` | `string` | No | Account email, trimmed and lower-cased. The login identifier. Max 320 characters. |
| `emailVerified` | `boolean` | No | `true` once the buyer has proven they control `email`. |
| `firstName` | `string \| null` | No | First name. `null` when never provided or while the email is unverified. |
| `hasAccount` | `boolean` | No | `true` once the buyer has completed `activation.confirm`, verified their email or<br>reset their password. A guest record created by a booking reads `false`. |
| `id` | `string` | No | Customer id (`'cust_...'`), stable across sessions. |
| `lastName` | `string \| null` | No | Last name. `null` when never provided or while the email is unverified. |
| `phone` | `string \| null` | No | Phone number in free form, 3 to 40 characters. `null` when never provided or while the email is unverified. |
| `preferredLocale` | `string \| null` | No | Preferred language as a normalized BCP 47 tag (e.g. `'pt-BR'`), used for account<br>emails. `null` when unset (the site default applies) or while the email is unverified. |
| `termsAcceptance` | `TermsAcceptance \| null` | Yes | The accepted terms version, its language, the mode and the date. `null` when no terms were accepted. |
| `termsAcceptedAt` | `string \| null` | No | ISO 8601 datetime the buyer accepted the shop's terms at activation. `null` for a guest never activated. |


---

## `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 |
| --- | --- | --- | --- |
| `acceptsTerms` | `true` | No | The buyer's acceptance of the shop's terms, ticked on the activation page. Only `true` is accepted. |
| `consentVersion` | `string` | Yes | Optional label of the consent text shown (e.g. `'newsletter-2026-10'`), cut to 100<br>characters. Stored only when `marketingOptIn` is `true`. |
| `firstName` | `string` | Yes | Optional first name, at most 100 characters. Applied only when the account has none on file. |
| `lastName` | `string` | Yes | Optional last name, at most 100 characters. Applied only when the account has none on file. |
| `locale` | `string` | Yes | Optional language tag of the activation page (e.g. `'pt-BR'`). Stored as the buyer's<br>preferred language. An unusable value is ignored, never an error. |
| `marketingOptIn` | `boolean` | Yes | Optional marketing opt-in. When `true`, opts the buyer in on every channel that has<br>no recorded choice yet; an existing opt-in or opt-out is kept. |
| `password` | `string` | No | Chosen password, 8 to 100 characters. |
| `phone` | `string` | Yes | Optional phone number, 3 to 40 characters. Applied only when the account has none on file. |
| `token` | `string` | 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 |
| --- | --- | --- | --- |
| `address1` | `string` | No | Street line 1 (number and street). Always set. Max 255 characters. |
| `address2` | `string \| null` | No | Street line 2 (apartment, floor, building). `null` when not needed. Max 255 characters. |
| `addressName` | `string \| null` | No | Buyer-chosen label such as `Home` or `Office`. `null` when the buyer did not name it. |
| `city` | `string` | No | City or town. Always set. Max 120 characters. |
| `company` | `string \| null` | No | Company name for a business delivery. `null` for a personal address. Max 180 characters. |
| `countryCode` | `string` | No | ISO 3166-1 alpha-2 country code in uppercase (for example `FR`). |
| `createdAt` | `string` | No | ISO 8601 creation datetime (for example `2026-07-20T10:30:00.000Z`). |
| `firstName` | `string` | No | Recipient first name. Always set. Max 120 characters. |
| `id` | `string` | No | Prefixed wire identifier (for example `addr_01h9kz...`). Stable for the life of the address. |
| `isDefaultBilling` | `boolean` | No | `true` for the buyer's at-most-one default billing address. |
| `isDefaultShipping` | `boolean` | No | `true` for the buyer's at-most-one default shipping address. |
| `lastName` | `string` | No | Recipient last name. Always set. Max 120 characters. |
| `phone` | `string \| null` | No | Contact phone for the delivery. `null` when not provided. Max 32 characters. |
| `postalCode` | `string` | No | Postal or ZIP code as unvalidated free-form text. Always set. Max 32 characters. |
| `province` | `string \| null` | No | Province, state, or region. `null` in countries that do not use one. Max 120 characters. |
| `updatedAt` | `string` | No | ISO 8601 datetime of the last edit. Equal to `createdAt` until the address is edited. |


---

## `CustomerAddressInput`

*Interface*

Fields accepted when saving a new buyer address.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `address1` | `string` | No | Street line 1. Required. Max 255 characters. |
| `address2` | `string \| null` | Yes | Street line 2 (apartment, floor). Pass `null` to clear it. Max 255 characters. |
| `addressName` | `string \| null` | Yes | Optional label such as `Home`. Pass `null` to leave the address unlabeled. Max 120 characters. |
| `city` | `string` | No | City or town. Required. Max 120 characters. |
| `company` | `string \| null` | Yes | Company name for a business delivery. Pass `null` to clear it. Max 180 characters. |
| `countryCode` | `string` | No | ISO 3166-1 alpha-2 country code. The API normalizes it to uppercase. |
| `firstName` | `string` | No | Recipient first name. Required. Max 120 characters. |
| `isDefaultBilling` | `boolean` | Yes | Mark this address as the default billing address, unsetting the previous one. |
| `isDefaultShipping` | `boolean` | Yes | Mark this address as the default shipping address, unsetting the previous one. |
| `lastName` | `string` | No | Recipient last name. Required. Max 120 characters. |
| `metadata` | `Record<string, unknown>` | Yes | Optional buyer-supplied extension data stored with the address but not returned by storefront reads. |
| `phone` | `string \| null` | Yes | Contact phone for the delivery. Pass `null` to clear it. Max 32 characters. |
| `postalCode` | `string` | No | Postal or ZIP code. Required. Max 32 characters. |
| `province` | `string \| null` | Yes | Province, state, or region. Pass `null` to clear it. Max 120 characters. |


---

## `CustomerAddressUpdateInput`

*TypeAlias*

Partial address edit. At least one field must be present or the API returns HTTP 422.

```typescript
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 |
| --- | --- | --- | --- |
| `customer` | `Customer` | No | The signed-in buyer. |
| `token` | `string` | No | Session token. Pass it back with `createClient({ customerToken })` to restore the session. |


---

## `CustomerBooking`

*TypeAlias*

A booking in the `me` history: its reference, slot, party size and status. Contact
details and the booked resource are not included.

```typescript
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.

```typescript
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 |
| --- | --- | --- | --- |
| `emailVerified` | `boolean` | No | Always `true` on success. |


---

## `CustomerLoginInput`

*Interface*

Credentials for `login`.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `email` | `string` | No | Account email. |
| `password` | `string` | No | Account password. |


---

## `CustomerLogoutOptions`

*Interface*

Options for `logout`.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `everywhere` | `boolean` | Yes | `true` revokes every session token of the buyer on the server, then clears the local<br>one. Omitted or `false`, only the local token is cleared, with no request. |


---

## `CustomerProfileUpdateInput`

*Interface*

Input for `customers.updateMe`.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `preferredLocale` | `string \| null` | No | Preferred language tag for account emails: letters, digits, `-` and `_`, 1 to 35<br>characters (e.g. `'pt-BR'`). `null` or `''` clears it. The key is required. |


---

## `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 |
| --- | --- | --- | --- |
| `email` | `string` | 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 |
| --- | --- | --- | --- |
| `bookings` | `CustomerBooking[]` | No | Up to 100 bookings, latest start first. |
| `customer` | `Customer` | 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 |
| --- | --- | --- | --- |
| `fallback` | `boolean` | Yes | Set `false` to refuse records served in another locale: a detail read then<br>throws `NOT_FOUND` and a list drops them. Fallback is on by default. Reads<br>without locale fallback ignore it. |
| `fetchOptions` | `RequestInit` | Yes | `fetch()` options for this request, shallow-merged over the client's<br>`fetchOptions`, such as `{ next: { revalidate: 60 } }`. |
| `formStartedAt` | `number` | 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. |
| `locale` | `string` | Yes | Locale of this request (e.g. `'fr'`), overriding the client's `locale`.<br>Reads never reject a locale: a missing translation is served in another<br>locale and flagged `isFallback: true` (see LocaleResolution). Some<br>writes, such as `reviews.submit()`, refuse a locale the site does not enable. |
| `recaptchaToken` | `string` | Yes | reCAPTCHA token, required when the site or form uses reCAPTCHA. A v3<br>token must carry the method's action: `form_submit`, `review_submit`,<br>`booking_create`, `customer_register`, `password_reset_request` or<br>`checkout`. The SDK sends the token you create, it never creates one. |


---

## `MarketingChannel`

*TypeAlias*

A marketing channel the buyer can consent to. More channels may be added to this union.

```typescript
type MarketingChannel = "whatsapp" | "email"
```

---

## `MarketingConsentList`

*Interface*

The consent read/write response: one entry per channel in MarketingChannel.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `channels` | `MarketingConsentState[]` | No | Per-channel effective consent, one entry for every known channel. |


---

## `MarketingConsentState`

*Interface*

The consent state of one marketing channel.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `channel` | `MarketingChannel` | No | The channel this entry describes. |
| `optedIn` | `boolean` | No | `true` when the buyer's latest choice on this channel is an opt-in. `false` when no choice is recorded. |


---

## `MarketingConsentUpdateInput`

*Interface*

Input for `marketingConsent.update`.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `channel` | `MarketingChannel \| "all"` | No | The channel to change, or the literal `'all'` to change every channel at once. |
| `consentVersion` | `string` | 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. |
| `locale` | `string` | Yes | Optional language tag the consent was given in (e.g. `'pt-BR'`). Stored with an<br>opt-in; an unusable value is ignored, never an error. |
| `optIn` | `boolean` | No | `true` opts the buyer in on the target channels, `false` opts them out. |


---

## `PasswordResetConfirmInput`

*Interface*

Input for `passwordReset.confirm`.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `password` | `string` | No | The new password, 8 to 100 characters. |
| `token` | `string` | No | The single-use reset token from the emailed link. |


---

## `PasswordResetRequestInput`

*Interface*

Input for `passwordReset.request`.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `email` | `string` | 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 |
| --- | --- | --- | --- |
| `acceptedAt` | `string` | No | ISO 8601 datetime of the acceptance (e.g. `'2026-07-13T10:30:00.000Z'`). |
| `locale` | `string \| null` | No | BCP 47 language of the accepted terms version (e.g. `'fr'`): the language the<br>buyer read the terms in. `null` when no version is on file. |
| `mode` | `"checkbox" \| "notice"` | No | How the terms were accepted: `'checkbox'` (a ticked box, the storefront flows) or<br>`'notice'` (an approved notice in a messaging conversation). |
| `versionId` | `string \| null` | No | Identifier of the frozen terms version the buyer accepted. `null` for an<br>acceptance recorded before terms versions existed. |