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

# Update a customer

> Updates the details of the customer associated with the supplied `customer_id`



## OpenAPI

````yaml /api-reference/openapi.yaml post /v2/customers/{customer_id}
openapi: 3.1.0
info:
  title: Public Imprint API
  version: '2.0'
servers:
  - url: https://dev.sbx.imprint.co
    description: Imprint public api sandbox
security:
  - basicAuth: []
  - bearerAuth: []
paths:
  /v2/customers/{customer_id}:
    post:
      tags:
        - Customers
      summary: Update a customer
      description: >-
        Updates the details of the customer associated with the supplied
        `customer_id`
      operationId: updateCustomer
      parameters:
        - name: customer_id
          in: path
          required: true
          description: The unique identifier for the customer
          schema:
            type: string
            example: BBB815E9-F654-438D-9AD3-3F7BB8136FC0
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: customer@example.com
                phone:
                  type: string
                  pattern: ^\+?[1-9]\d{1,14}$
                  example: '+14155552671'
                first_name:
                  type: string
                  example: John
                last_name:
                  type: string
                  example: Doe
                preferred_language:
                  type: string
                  example: en
                street_line1:
                  type: string
                  example: 123 Main St
                street_line2:
                  type: string
                  example: Apt 4B
                city:
                  type: string
                  example: San Francisco
                state:
                  type: string
                  example: CA
                postal_code:
                  type: string
                  example: '94105'
                customer_history:
                  $ref: '#/components/schemas/CustomerAccountHistory'
                metadata:
                  type: object
                  description: Additional customer data
                  additionalProperties: true
                  example:
                    preferred_language: en
      responses:
        '200':
          description: Customer updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestError'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerNotFoundError'
components:
  schemas:
    CustomerAccountHistory:
      type: object
      description: A Customer's account history with the partner
      properties:
        email:
          type: string
          format: email
          description: Customer's email address
          example: customer@example.com
        phone:
          type: string
          description: Customer's phone number in E.164 format
          example: '+14155552671'
        first_name:
          type: string
          description: The customer's first name
          example: John
        last_name:
          type: string
          description: The customer's last name
          example: Doe
        preferred_language:
          type: string
          description: Customer's preferred language code as defined by ISO 639-1
          example: en
        address:
          $ref: '#/components/schemas/Address'
        account_tenure:
          type: integer
          description: The customer's account tenure with the partner, in months
          example: 13
        ltv_amount:
          type: integer
          description: >-
            The Life Time Value for the customer's account, in the min currency
            unit (cents for USD)
          example: 34000
        ltv_currency:
          type: string
          description: The 3 char currency code of the amount in iso-4217
          example: USD
        loyalty_tier:
          type: string
          description: The customer's current loyalty tier
          example: GOLD
        account_created_at:
          type: string
          description: >-
            The RFC-3339 timestamp when the customer's account was created with
            the partner
          example: '2025-02-13T19:08:07.000Z'
        transaction_count:
          type: integer
          description: >-
            The number of lifetime transactions the customer has made with the
            partner
          example: 100
    Customer:
      type: object
      description: Represents a customer in the Imprint system
      required:
        - id
      properties:
        id:
          type: string
          description: Unique identifier for the customer
          example: 9B5E1EE0-2E1C-46E7-81B9-3C3917204BE4
        email:
          type: string
          format: email
          description: Customer's email address
          example: customer@example.com
        phone:
          type: string
          description: Customer's phone number in E.164 format
          example: '+14155552671'
        statuses:
          type: object
          description: >-
            Map of the customer's enrolled card program name to the customer's
            status.
          additionalProperties:
            $ref: '#/components/schemas/CustomerProgramStatus'
          example:
            Card Program Name: OPEN
        first_name:
          type: string
          description: The customer's first name.
          example: John
        last_name:
          type: string
          description: The customer's last name.
          example: Doe
        preferred_language:
          type: string
          description: Customer's preferred language code as defined by ISO 639-1
          example: en
        ssn4:
          type: string
          description: Customer's Social Security Number in 4 digits
          example: '1234'
        date_of_birth:
          $ref: '#/components/schemas/DateOfBirth'
        address:
          $ref: '#/components/schemas/Address'
        partner_customer_id:
          $ref: '#/components/schemas/PartnerCustomerId'
        metadata:
          type: object
          description: >-
            Set of key-value pairs for storing additional information about the
            customer.
          additionalProperties: true
          example:
            preferred_language: en
        created_at:
          type: string
          description: the RFC-3339 date when the customer was created
          example: '2025-02-13T19:08:07.000Z'
        updated_at:
          type: string
          description: the RFC-3339 date when the customer was created
          example: '2025-02-13T19:08:07.000Z'
    InvalidRequestError:
      type: object
      properties:
        path:
          type: string
          description: The path of the endpoint returning the error
          example: /v2/customers
        details:
          type: array
          items:
            type: string
          description: The details of the error being returned
          example:
            - 'email: must be a well-formed email address'
        error:
          type: string
          description: The category of error being returned
          example: Bad Request
        status:
          type: integer
          description: The HTTP status code of the error
          example: 400
        timestamp:
          type: string
          description: The timestamp that the error occurred
          example: '2025-01-20T18:18:22.923+00:00'
    CustomerNotFoundError:
      type: object
      required:
        - type
        - message
      properties:
        type:
          type: string
          description: The category of error being returned
          example: CUSTOMER_NOT_FOUND_ERROR
        message:
          type: string
          description: A message describing the cause of the error
          example: 'Customer not found for provided ID: CSMR-v1-123'
        param:
          type: string
          description: The param causing the error
          example: customer_id
    Address:
      type: object
      description: Mailing address information
      properties:
        street_line1:
          type: string
          description: Primary street address
          example: 123 Main St
        street_line2:
          type: string
          description: Secondary street address (apartment, suite, etc.)
          example: Apt 4B
        city:
          type: string
          description: City name
          example: San Francisco
        state:
          type: string
          description: State or province
          example: CA
        postal_code:
          type: string
          description: ZIP or postal code
          example: '94105'
        country:
          type: string
          description: ISO-3166-1 alpha-3 Country Code
          example: USA
    CustomerProgramStatus:
      type: string
      description: Status of a customer within a card program.
      enum:
        - OPEN
        - CLOSED
    DateOfBirth:
      type: object
      description: Customer's date of birth
      properties:
        year:
          type: integer
          description: Year of birth
          minimum: 1900
          example: 1990
        month:
          type: integer
          description: Month of birth
          minimum: 1
          maximum: 12
          example: 1
        day:
          type: integer
          description: Day of birth
          minimum: 1
          maximum: 31
          example: 1
    PartnerCustomerId:
      type: string
      description: The unique identifier for the customer in the partner's system
      example: PARTNER_USER_456
  securitySchemes:
    bearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers-- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http

````