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

# Identify anonymous customers

> Identify an anonymous customer by providing their real information. This endpoint converts an anonymous customer to a regular customer. The customer must have been created with `is_anonymous: true`. Optionally, you can provide a `new_id` to change the customer's ID during identification.



## OpenAPI

````yaml PATCH /customers/{id}/identify/anonymous
openapi: 3.0.1
info:
  title: Fire spark Storefront API
  description: Customer-facing channel endpoints for Fire spark.
  version: 1.0.0
servers:
  - url: https://firespark.cloud/api/storefront/v1
security:
  - bearerAuth: []
paths:
  /customers/{id}/identify/anonymous:
    patch:
      summary: Identify anonymous customers
      description: >-
        Identify an anonymous customer by providing their real information. This
        endpoint converts an anonymous customer to a regular customer. The
        customer must have been created with `is_anonymous: true`. Optionally,
        you can provide a `new_id` to change the customer's ID during
        identification.
      parameters:
        - in: path
          name: id
          description: The current customer unique identifier (the anonymous ID)
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerIdentify'
      responses:
        '200':
          description: Customer identified successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/StoreFrontCustomer'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Customer is not anonymous or validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CustomerIdentify:
      type: object
      required:
        - name
        - email
      description: >-
        Schema for identifying an anonymous customer. Converts an anonymous
        customer to a regular customer with real information.
      properties:
        new_id:
          type: string
          description: Optional new customer ID to replace the anonymous ID
        name:
          description: The full name of the customer
          type: string
          example: John Smith
        email:
          description: The email of the customer
          type: string
          format: email
        gender:
          description: The gender of the customer
          type: string
          nullable: true
          enum:
            - MALE
            - FEMALE
        dob:
          description: The date of birth of the customer
          type: string
          nullable: true
          format: date-time
        document_type:
          description: >-
            The document type of the customer. If provided, document_number is
            required.
          type: string
          nullable: true
        document_number:
          description: >-
            The document number of the customer. If provided, document_type is
            required.
          type: string
          nullable: true
          maxLength: 50
        country:
          description: The country of the customer
          type: string
          nullable: true
          maxLength: 100
        phone:
          description: >-
            The customer's phone number in international format. Required for
            WhatsApp delivery.
          type: string
          nullable: true
          example: +593 99 123 4567
        tags:
          type: object
          description: Include your conditions customer tags here
        devices:
          type: array
          description: Customer devices for push notifications
          items:
            $ref: '#/components/schemas/Device'
        email_status:
          description: The email status of the customer
          type: string
          enum:
            - VALID
            - BOUNCED
            - UNSUBSCRIBED
            - COMPLAINED
        consent:
          $ref: '#/components/schemas/Consent'
          description: The customer's consent preferences
          nullable: true
        metadata:
          description: The metadata of the customer
          type: object
    StoreFrontCustomer:
      type: object
      description: >-
        Customer profile returned by Storefront API endpoints. Omits internal
        fields such as `birthday`.
      required:
        - uid
        - id
        - name
        - status
        - registration_date
        - organization_id
        - merchant_id
      properties:
        uid:
          type: string
          format: uuid
          description: Fire spark internal customer identifier
        organization_id:
          type: string
          format: uuid
          description: Fire spark organization identifier
        merchant_id:
          type: string
          format: uuid
          description: Fire spark merchant identifier
        id:
          type: string
          description: Your customer unique identifier
        status:
          description: The status of the customer
          type: string
          enum:
            - ACTIVE
            - INACTIVE
        is_anonymous:
          description: Whether the customer is anonymous
          type: boolean
          default: false
        name:
          description: The full name of the customer
          type: string
          example: John Smith
        email:
          description: The email of the customer
          type: string
          format: email
          nullable: true
        email_verified:
          description: Whether the customer's email is verified
          type: boolean
          default: false
        gender:
          description: The gender of the customer
          type: string
          nullable: true
          enum:
            - MALE
            - FEMALE
            - OTHER
        dob:
          description: The date of birth of the customer
          type: string
          nullable: true
          format: date-time
        document_type:
          description: The document type of the customer
          type: string
          nullable: true
        document_number:
          description: The document number of the customer
          type: string
          nullable: true
          maxLength: 50
        country:
          description: The country of the customer
          type: string
          nullable: true
          maxLength: 100
        phone:
          description: The customer's phone number in international format
          type: string
          nullable: true
          example: +593 99 123 4567
        phone_verified:
          description: Whether the customer's phone number is verified
          type: boolean
          default: false
        registration_date:
          description: The date when the customer was registered
          type: string
          format: date-time
        devices:
          type: array
          maxItems: 10
          description: Customer devices for push notifications
          items:
            $ref: '#/components/schemas/CustomerDevice'
        delivery_addresses:
          type: array
          maxItems: 10
          items:
            $ref: '#/components/schemas/DeliveryAddress'
        billing_profiles:
          type: array
          maxItems: 10
          items:
            $ref: '#/components/schemas/BillingProfile'
        consent:
          $ref: '#/components/schemas/Consent'
          description: The customer's consent preferences
          nullable: true
        metadata:
          description: Custom metadata for the customer. Must serialize to 1MB or less.
          type: object
          nullable: true
          additionalProperties: true
    Error:
      required:
        - error
        - details
      type: object
      properties:
        error:
          type: string
        details:
          type: string
    Device:
      type: object
      properties:
        device_token:
          type: string
          description: The unique token that identifies the device
        device_info:
          type: object
          description: Optional information about the device
          properties:
            platform:
              type: string
              enum:
                - ios
                - android
                - web
                - windows
                - macos
              description: The platform of the device
            model:
              type: string
              description: The model of the device
            osVersion:
              type: string
              description: The operating system version of the device
        expires_at:
          type: string
          format: date-time
          description: The date when the device token expires
        created_at:
          type: string
          format: date-time
          description: The date when the device was registered
    Consent:
      type: object
      description: >-
        Channel-level marketing and messaging consent preferences. Omitted flags
        default to false.
      properties:
        email:
          type: boolean
          description: Consent for email marketing
          default: false
        push_notifications:
          type: boolean
          description: Consent for push notifications
          default: false
        in_app_messages:
          type: boolean
          description: Consent for in-app messages
          default: false
        phone_calls:
          type: boolean
          description: Consent for phone calls
          default: false
        sms:
          type: boolean
          description: Consent for SMS messages
          default: false
        whatsapp:
          type: boolean
          description: Consent for WhatsApp messages
          default: false
    CustomerDevice:
      type: object
      required:
        - id
        - os
        - fcm_token
        - created_at
        - updated_at
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
          description: External device identifier
        os:
          type: string
          enum:
            - IOS
            - ANDROID
            - WEB
          description: Device operating system
        fcm_token:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
          description: Firebase Cloud Messaging token
        created_at:
          type: string
          format: date-time
          description: When the device was registered
        updated_at:
          type: string
          format: date-time
          description: When the device was last updated
    DeliveryAddress:
      type: object
      required:
        - alias
        - address_line1
      properties:
        alias:
          type: string
          maxLength: 100
        address_line1:
          type: string
          maxLength: 100
        address_line2:
          type: string
          maxLength: 100
        city:
          type: string
          maxLength: 100
        state:
          type: string
          maxLength: 100
        zip:
          type: string
          maxLength: 100
        country:
          type: string
          maxLength: 100
        reference:
          type: string
          maxLength: 100
        latitude:
          type: number
          minimum: -90
          maximum: 90
        longitude:
          type: number
          minimum: -180
          maximum: 180
        instructions:
          type: string
          maxLength: 100
        preferred:
          type: boolean
          default: false
        metadata:
          description: Custom metadata. Must serialize to 1MB or less.
          type: object
          nullable: true
          additionalProperties: true
    BillingProfile:
      type: object
      required:
        - alias
        - type
        - legal_name
        - address_line1
        - tax_id
        - tax_id_type
      properties:
        alias:
          type: string
          maxLength: 100
        type:
          type: string
          enum:
            - INDIVIDUAL
            - BUSINESS
          description: Whether this profile is for an individual or a business
        legal_name:
          type: string
          maxLength: 100
        address_line1:
          type: string
          maxLength: 100
        address_line2:
          type: string
          maxLength: 100
        city:
          type: string
          maxLength: 100
        state:
          type: string
          maxLength: 100
        zip:
          type: string
          maxLength: 100
        country:
          type: string
          maxLength: 100
        tax_id:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
        tax_id_type:
          type: string
          enum:
            - VAT
            - EIN
            - SSN
            - TIN
            - NIF
            - CUIT
            - RUT
            - NIT
            - RCN
            - RUC
            - CI
            - DNI
            - PASSPORT
            - OTHER
        preferred:
          type: boolean
          default: false
        metadata:
          description: Custom metadata. Must serialize to 1MB or less.
          type: object
          nullable: true
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````