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

# Create customer

> Create a new customer with contact information and group assignment



## OpenAPI

````yaml /api-reference/v2/openapi.json post /customers
openapi: 3.1.0
info:
  title: Clopos Open API v2
  description: >-
    The **Clopos Open API v2** provides secure and unified access to the Clopos
    ecosystem, enabling seamless integration of POS, ordering, payments, and
    restaurant management services.
  contact:
    email: dev@clopos.com
  version: 2.0.0
  license:
    name: ''
servers:
  - url: https://integrations.clopos.com/open-api/v2
    description: '**Base Url**'
security:
  - xToken: []
tags:
  - name: Authentication
  - name: Venues
  - name: Users
  - name: Customers
  - name: Menu
  - name: Stations
  - name: Products
  - name: Price Lists
  - name: Sales
  - name: Orders
  - name: Receipts
paths:
  /customers:
    post:
      tags:
        - Customers
      summary: Create customer
      description: Create a new customer with contact information and group assignment
      requestBody:
        description: Customer details
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerRequest'
      responses:
        '200':
          description: Customer created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCustomerResponse'
        '400':
          description: Validation error - missing required fields or invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict - duplicate unique field (code, phone, or cid)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateCustomerRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          example: John Doe
        email:
          type: string
          format: email
          example: john.doe@example.com
        phone:
          type: string
          example: '+15551234567'
        code:
          type: string
          example: CUST001
        cid:
          type: string
          format: uuid
          example: 0f9654bc-9520-43d7-8109-317d9820f54c
        description:
          type: string
          example: Test Customer
        group_id:
          type: integer
          example: 1
        gender:
          type: integer
          nullable: true
          example: 1
        date_of_birth:
          type: string
          format: date
          example: '1990-05-15'
    CreateCustomerResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/Customer'
        message:
          type: string
        time:
          type: integer
        timestamp:
          type: string
          format: date-time
        unix:
          type: integer
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
    Customer:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        group_id:
          type: integer
        balance:
          $ref: '#/components/schemas/Balance'
        cashback_balance:
          $ref: '#/components/schemas/CashbackBalance'
        group:
          $ref: '#/components/schemas/CustomerGroup'
        created_at:
          type: string
          format: date-time
    Balance:
      type: object
      properties:
        id:
          type: integer
        amount:
          type: number
        type:
          type: string
    CashbackBalance:
      type: object
      properties:
        id:
          type: integer
          nullable: true
        amount:
          type: number
        type:
          type: string
    CustomerGroup:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        discount_type:
          type: string
          nullable: true
        discount_value:
          type: number
        system_type:
          type: string
        total_amount:
          type: number
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    xToken:
      type: apiKey
      in: header
      name: x-token
      description: JWT access token obtained from /v2/auth endpoint

````