> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eat-now.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a customer

> Partial update: only the provided fields change, `null` clears a field. `tags` replaces the whole list; `custom_fields` only changes the given fields. The customer is shared by all their reservations. Requires `CUSTOMERS_WRITE` and `CUSTOMERS_READ`.



## OpenAPI

````yaml https://app.eat-now.io/api/partner/v1/openapi.json patch /api/partner/v1/customers/{id}
openapi: 3.0.3
info:
  title: EatNow Partner API
  version: v1
  description: >-
    Version 1 of the EatNow partner API.


    This API is designed for trusted partner integrations that need
    restaurant-scoped access to availability, reservation management, and
    operational reference data.


    Authentication

    - Use `Authorization: Bearer <token>` with a partner API token created from
    the EatNow dashboard.

    - Access is controlled by credential scopes and each request is resolved to
    a single restaurant.


    Base URL

    - The server URL in this document is the canonical base URL for the current
    environment.


    Errors

    - Endpoint errors use `error.code`, `error.message`, and `error.request_id`.
    Errors raised before the endpoint, including rate limiting, may use another
    format.

    - Validation, authentication, authorization, conflicts, and not-found cases
    all use the same top-level error shape.


    Rate limits

    - The partner route rule allows 600 requests per minute per client IP. Back
    off on 429. When present, x-ratelimit-reset is an epoch timestamp in
    milliseconds.


    Public endpoints

    - `GET /api/partner/v1` and `GET /api/partner/v1/openapi.json` are public.

    - All business endpoints require Bearer authentication.
servers:
  - url: https://app.eat-now.io
security: []
tags:
  - name: Meta
    description: Platform metadata and schema endpoints
  - name: Authentication
    description: Credential validation and auth context endpoints
  - name: Availability
    description: Bookable slot search and exact slot validation
  - name: Catalog
    description: Reference data for restaurant tables, rooms, prescribers, and discounts
  - name: Reservations
    description: Reservation lookup, search, update, and cancellation
  - name: Customers
    description: >-
      Customer (CRM) records, independent of reservations: list, sync, create,
      update
  - name: Webhooks
    description: Webhook endpoints a key subscribes to V1 events (reservations, customers)
  - name: Missed Calls
    description: Report missed calls and trigger WhatsApp follow-up templates
externalDocs:
  description: Integration guides, authentication, errors, and webhook reference
  url: https://docs.eat-now.io/api-reference/introduction
paths:
  /api/partner/v1/customers/{id}:
    patch:
      tags:
        - Customers
      summary: Update a customer
      description: >-
        Partial update: only the provided fields change, `null` clears a field.
        `tags` replaces the whole list; `custom_fields` only changes the given
        fields. The customer is shared by all their reservations. Requires
        `CUSTOMERS_WRITE` and `CUSTOMERS_READ`.
      operationId: updatePartnerCustomer
      parameters:
        - schema:
            type: string
            minLength: 1
            description: EatNow customer identifier.
          required: true
          description: EatNow customer identifier.
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerApiCustomerPatchRequest'
            examples:
              tags:
                summary: Tag a customer and withdraw newsletter consent
                value:
                  tags:
                    - VIP
                    - Wine club
                  newsletter_consent: false
      responses:
        '200':
          description: Updated customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiCustomerDetailResponse'
        '400':
          description: Request validation failed (see `error.details.issues`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '403':
          description: >-
            Scope is insufficient. Required: `CUSTOMERS_READ` and
            `CUSTOMERS_WRITE`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '404':
          description: >-
            Customer not found in the authenticated restaurant (WhatsApp draft
            contacts are not exposed).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '422':
          description: >-
            A custom field is unknown for this restaurant or its value does not
            fit the field type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '429':
          description: >-
            Rate limit exceeded. Configured limit: 600 requests per minute per
            client IP for the partner route rule. This middleware response may
            not use the PartnerApiError envelope or include request_id. Back off
            before retrying.
        '500':
          description: >-
            Unexpected server error. Preserve error.request_id for support.
            Before retrying a write, check whether it already succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
      security:
        - PartnerBearerToken: []
components:
  schemas:
    PartnerApiCustomerPatchRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
        email:
          type: string
          nullable: true
          format: email
        phone_number:
          type: string
          nullable: true
          minLength: 3
          maxLength: 40
          description: >-
            E.164 (`+33612345678`) recommended. A national number is read with
            the restaurant's country.
        lang:
          type: string
          enum:
            - FR
            - EN
            - IT
            - ES
            - DE
            - PT
        external_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
          description: Partner-side identifier of the customer.
        tags:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 100
          maxItems: 100
          description: Replaces all the customer's tags.
        note:
          type: string
          nullable: true
          maxLength: 10000
          description: Internal staff note.
        custom_fields:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - nullable: true
              - type: array
                items:
                  type: string
          description: >-
            Custom field values keyed by field id (see `GET
            /api/partner/v1/customer-fields`). Only the given fields change;
            `null` clears one. The value must fit the field type: TEXT → string,
            NUMBER → number within `min`/`max`, DATE → `YYYY-MM-DD`, BOOLEAN →
            boolean, SELECT → one option value, MULTI_SELECT → an array of
            distinct option values (at most `max_items`).
        newsletter_consent:
          type: boolean
          description: >-
            Newsletter consent. `false` withdraws it; channel opt-outs
            (`marketing_opt_outs`) are managed by EatNow.
      additionalProperties: false
      description: >-
        Partial customer update. Include only the fields that should change;
        `null` clears a field.
    PartnerApiCustomerDetailResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PartnerApiCustomerDetail'
      required:
        - data
    PartnerApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/PartnerApiErrorCode'
            message:
              type: string
            request_id:
              type: string
            details:
              type: object
              additionalProperties:
                nullable: true
          required:
            - code
            - message
            - request_id
      required:
        - error
    PartnerApiCustomerDetail:
      type: object
      properties:
        id:
          type: string
        external_id:
          type: string
          nullable: true
          description: >-
            Partner-side identifier of the customer. Matched first when creating
            a customer.
        name:
          type: string
        email:
          type: string
          nullable: true
          format: email
        phone_number:
          type: string
          nullable: true
          description: >-
            Phone number as stored, spaces removed. E.164 when it was provided
            that way.
        country_code:
          type: string
          nullable: true
        lang:
          type: string
          enum:
            - FR
            - EN
            - IT
            - ES
            - DE
            - PT
        tags:
          type: array
          items:
            type: string
        note:
          type: string
          nullable: true
          description: Internal staff note.
        custom_fields:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/PartnerApiMetadataField'
          description: >-
            Values of the restaurant's customer custom fields, keyed by field id
            (see `GET /api/partner/v1/customer-fields`).
        newsletter_consent:
          type: boolean
        marketing_opt_outs:
          type: array
          items:
            type: string
            enum:
              - EMAIL
              - WHATSAPP
          description: >-
            Channels on which the customer must not receive marketing
            (unsubscribed, bounced, blocked).
        blacklisted:
          type: boolean
          description: >-
            Blacklisted by the restaurant: new reservations for this customer
            are rejected.
        stats:
          $ref: '#/components/schemas/PartnerApiCustomerStats'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - external_id
        - name
        - email
        - phone_number
        - country_code
        - lang
        - tags
        - note
        - custom_fields
        - newsletter_consent
        - marketing_opt_outs
        - blacklisted
        - stats
        - created_at
        - updated_at
    PartnerApiErrorCode:
      type: string
      enum:
        - AUTHENTICATION_REQUIRED
        - INVALID_AUTHENTICATION
        - INSUFFICIENT_SCOPE
        - RESTAURANT_SUSPENDED
        - VALIDATION_ERROR
        - RESOURCE_NOT_FOUND
        - RESOURCE_CONFLICT
        - RATE_LIMITED
        - INTERNAL_ERROR
    PartnerApiMetadataField:
      type: object
      properties:
        name:
          type: string
        value:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - nullable: true
            - type: array
              items:
                type: string
      required:
        - name
        - value
    PartnerApiCustomerStats:
      type: object
      properties:
        reservation_count:
          type: integer
          description: >-
            Reservations that are neither canceled nor rejected, upcoming ones
            and no-shows included.
        confirmed_count:
          type: integer
          description: '`reservation_count` minus the no-shows.'
        no_show_count:
          type: integer
        feedback_count:
          type: integer
        average_feedback_score:
          type: number
          nullable: true
        total_amount_paid:
          type: integer
          description: >-
            Total paid over the customer's reservations, in the smallest
            currency unit (for example cents).
        average_basket:
          type: number
          description: >-
            `total_amount_paid` divided by the covers of those reservations, in
            the smallest currency unit.
        last_reservation_date:
          type: string
          nullable: true
          description: >-
            Day (`YYYY-MM-DD`, restaurant calendar) of the latest reservation
            that is neither canceled nor rejected. Can be in the future.
      required:
        - reservation_count
        - confirmed_count
        - no_show_count
        - feedback_count
        - average_feedback_score
        - total_amount_paid
        - average_basket
        - last_reservation_date
      description: >-
        Figures computed by EatNow from the customer's reservations. Read-only.
        Their changes do not move `updated_at`.
  securitySchemes:
    PartnerBearerToken:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: >-
        Restaurant-scoped partner API token passed as `Authorization: Bearer
        <token>`.
      x-default: your_token_here

````