# Search Customer

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/customer/search:
    post:
      summary: Search Customer
      deprecated: false
      description: >-

        :::highlight purple 📌

        Use this API to retrieve a list of customers based on filters such as
        name, email, phone number, or creation date. This helps you quickly find
        and manage customer profiles in your EnKash system.

        :::
      operationId: searchCustomerUsingPOST
      tags:
        - Payment Gateway/APIs - Payment Gateway /UPI QR
        - Customer Apis
      parameters:
        - name: direction
          in: query
          description: ''
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
        - name: limit
          in: query
          description: ''
          required: false
          schema:
            type: integer
            format: int32
            maximum: 5000
        - name: offset
          in: query
          description: ''
          required: false
          schema:
            type: integer
            format: int32
        - name: orderBy
          in: query
          description: ''
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerSearchRequest'
            example: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApplicationResponse%C2%ABGenericPaginationResponse%C2%ABCustomerResponse%C2%BB%C2%BB
          headers: {}
          x-apidog-name: OK
        '400':
          description: ''
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ApplicationResponse'
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Forbidden
        '404':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Not Found
        '422':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Unprocessable Request
        '500':
          description: ''
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Server Error
      security: []
      x-apidog-folder: Payment Gateway/APIs - Payment Gateway /UPI QR
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-8990300-run
components:
  schemas:
    CustomerSearchRequest:
      type: object
      properties:
        accountNumber:
          type: string
          description: Unique account number for the customer
        assignedAgent:
          type: string
          description: Name of the agent assigned to the customer
        balanceAmount:
          type: number
          description: Current balance amount for the customer
        companyId:
          type: string
          description: Unique identifier for the company
        contactNumber:
          type: string
          description: Contact number of the customer
        createdByName:
          type: string
          description: Name of the person who created the record
        createdOnFrom:
          type: string
          format: date-time
          description: Start date for the creation date range filter
        createdOnTo:
          type: string
          format: date-time
          description: End date for the creation date range filter
        customerIds:
          type: array
          items:
            type: string
          description: List of customer IDs
        customerStatus:
          type: string
          enum:
            - ACTIVE
            - ALL
            - INACTIVE
          description: Status of the customer
        dsoFrom:
          type: integer
          format: int32
          description: Start value for the Days Sales Outstanding (DSO) range
        dsoTo:
          type: integer
          format: int32
          description: End value for the Days Sales Outstanding (DSO) range
        ifsc:
          type: string
          description: IFSC code for the customer's bank
        legalName:
          type: string
          description: Legal name of the customer
        level:
          type: string
          enum:
            - LEVEL_1
            - LEVEL_2
            - LEVEL_3
          description: Level of the customer
        modifiedByName:
          type: string
          description: Name of the person who last modified the record
        modifiedOn:
          type: string
          format: date-time
          description: Date and time when the record was last modified
        panOrGstin:
          type: string
          description: PAN or GSTIN of the customer
        parentCompanyId:
          type: string
          description: Unique identifier for the parent company
        selectAll:
          type: boolean
          description: Flag to select all customers
        uniqueRefNo:
          type: string
          description: Unique reference number for the customer
      title: CustomerSearchRequest
      x-apidog-orders:
        - accountNumber
        - assignedAgent
        - balanceAmount
        - companyId
        - contactNumber
        - createdByName
        - createdOnFrom
        - createdOnTo
        - customerIds
        - customerStatus
        - dsoFrom
        - dsoTo
        - ifsc
        - legalName
        - level
        - modifiedByName
        - modifiedOn
        - panOrGstin
        - parentCompanyId
        - selectAll
        - uniqueRefNo
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponse«GenericPaginationResponse«CustomerResponse»»:
      type: object
      properties:
        errorResponse: &ref_1
          $ref: '#/components/schemas/ErrorResponse'
        payload:
          $ref: >-
            #/components/schemas/GenericPaginationResponse%C2%ABCustomerResponse%C2%BB
        response_code:
          type: integer
          format: int32
        response_message:
          type: string
      title: ApplicationResponse«GenericPaginationResponse«CustomerResponse»»
      x-apidog-orders:
        - errorResponse
        - payload
        - response_code
        - response_message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    GenericPaginationResponse«CustomerResponse»:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomerResponse'
        recordsCount:
          type: integer
          format: int64
      title: GenericPaginationResponse«CustomerResponse»
      x-apidog-orders:
        - data
        - recordsCount
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CustomerResponse:
      type: object
      properties:
        accountNumber:
          type: string
        active:
          type: boolean
        address:
          type: string
        assignedAgent:
          type: string
        bankName:
          type: string
        branchCodes:
          type: array
          items:
            type: string
        companyId:
          type: string
        contactEmail:
          type: string
        contactNumber:
          type: string
        createdBy:
          type: string
        createdByName:
          type: string
        createdOn:
          type: string
          format: date-time
        customerId:
          type: string
        customerKeyContacts:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/CustomerKeyContactResponse'
        customerLogo:
          type: string
        customerReminders:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/CustomerReminderConfigResponse'
        dsoMedian:
          type: integer
          format: int64
        id:
          type: integer
          format: int64
        ifsc:
          type: string
        legalName:
          type: string
        modifiedBy:
          type: string
        modifiedByName:
          type: string
        modifiedOn:
          type: string
          format: date-time
        netAmount:
          type: number
        panOrGstin:
          type: string
        parentCompanyId:
          type: string
        parentLegalName:
          type: string
        pinCode:
          type: string
        state:
          type: string
        uniqueRefNo:
          type: string
        warnings:
          type: array
          items:
            type: string
      title: CustomerResponse
      x-apidog-orders:
        - accountNumber
        - active
        - address
        - assignedAgent
        - bankName
        - branchCodes
        - companyId
        - contactEmail
        - contactNumber
        - createdBy
        - createdByName
        - createdOn
        - customerId
        - customerKeyContacts
        - customerLogo
        - customerReminders
        - dsoMedian
        - id
        - ifsc
        - legalName
        - modifiedBy
        - modifiedByName
        - modifiedOn
        - netAmount
        - panOrGstin
        - parentCompanyId
        - parentLegalName
        - pinCode
        - state
        - uniqueRefNo
        - warnings
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CustomerReminderConfigResponse:
      type: object
      properties:
        customerId:
          type: string
        customerReminderId:
          type: string
        dueDateDifference:
          type: integer
          format: int32
        reminderInterval:
          type: integer
          format: int32
        reminderTime:
          type: string
          examples:
            - HH:mm
        reminderType:
          type: string
          enum:
            - ONCE
            - RECURRING
        stage:
          type: string
      title: CustomerReminderConfigResponse
      x-apidog-orders:
        - customerId
        - customerReminderId
        - dueDateDifference
        - reminderInterval
        - reminderTime
        - reminderType
        - stage
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CustomerKeyContactResponse:
      type: object
      properties:
        createdBy:
          type: string
        createdOn:
          type: string
          format: date-time
        customerId:
          type: string
        customerName:
          type: string
        deleted:
          type: string
        email:
          type: string
        keyContactPersonId:
          type: string
        mail_enabled:
          type: boolean
        mobile:
          type: string
        modifiedBy:
          type: string
        modifiedOn:
          type: string
          format: date-time
        name:
          type: string
        sms_enabled:
          type: boolean
        whatsapp_enabled:
          type: boolean
      title: CustomerKeyContactResponse
      x-apidog-orders:
        - createdBy
        - createdOn
        - customerId
        - customerName
        - deleted
        - email
        - keyContactPersonId
        - mail_enabled
        - mobile
        - modifiedBy
        - modifiedOn
        - name
        - sms_enabled
        - whatsapp_enabled
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        apiSubErrors:
          type: array
          items:
            $ref: '#/components/schemas/ApiSubError'
        errorMessage:
          type: string
        errorType:
          type: string
          enum:
            - CLIENT_REQUEST_ABORT
            - CLIENT_REQUEST_ERROR
            - INVALID_ACCESS
            - RECORD_NOT_FOUND
            - SYSTEM_ERROR
            - UNAUTHORIZED
            - UNKNOWN_ERROR
            - UNPROCESSABLE_REQUEST
            - VALIDATION_ERROR
        requestId:
          type: string
        timestamp:
          type: string
          examples:
            - yyyy-MM-dd HH:mm:ss
      title: ErrorResponse
      x-apidog-orders:
        - apiSubErrors
        - errorMessage
        - errorType
        - requestId
        - timestamp
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApiSubError:
      type: object
      title: ApiSubError
      x-apidog-orders: []
      properties: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponse:
      type: object
      properties:
        errorResponse: *ref_1
        payload:
          type: object
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
        response_code:
          type: integer
          format: int32
        response_message:
          type: string
      title: ApplicationResponse
      x-apidog-orders:
        - errorResponse
        - payload
        - response_code
        - response_message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
