# Search Order

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /order/search:
    post:
      summary: Search Order
      deprecated: false
      description: >-
        :::highlight purple 📌

        Use this API to search and retrieve orders associated with your merchant
        account. Supports pagination and sorting to help you efficiently filter
        and manage order records within your application.

        :::
      tags:
        - Payment Gateway/APIs - Payment Gateway /Order
      parameters:
        - name: offset
          in: query
          description: Starting record index
          required: false
          example: '0'
          schema:
            type: string
        - name: limit
          in: query
          description: Number of records to fetch
          required: false
          example: '10'
          schema:
            type: string
        - name: orderBy
          in: query
          description: Field name to sort by
          required: false
          example: id
          schema:
            type: string
        - name: direction
          in: query
          description: Sort direction (ASC / DESC)
          required: false
          example: DESC
          schema:
            type: string
        - name: Authorization
          in: header
          description: Token generated with your Access key and secret key
          required: true
          example: ''
          schema:
            type: string
        - name: merchantAccessKey
          in: header
          description: The access key generated for your account
          required: true
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Request object for fetching transaction/order details using
                multiple filters.
              properties:
                orderIds:
                  type: array
                  description: >-
                    List of system-generated order IDs to fetch specific
                    transactions.
                  items:
                    type: string
                  examples:
                    - - ORD123456
                      - ORD789012
                merchantOrderId:
                  type: string
                  description: Merchant's unique order reference ID.
                  examples:
                    - MORD_001
                merchantUniqueId:
                  type: integer
                  description: Unique identifier assigned to the merchant.
                  examples:
                    - 141
                amountFrom:
                  type: number
                  description: Minimum transaction amount for filtering.
                  examples:
                    - 10.5
                amountTo:
                  type: number
                  description: Maximum transaction amount for filtering.
                  examples:
                    - 5000
                status:
                  type: string
                  description: Transaction status filter.
                  enum:
                    - CREATED
                    - PAID
                    - CANCELLED
                    - ATTEMPTED
                    - EXPIRED
                  examples:
                    - ATTEMPTED
                type:
                  type: string
                  description: Type of transaction.
                  enum:
                    - SALE
                    - REFUND
                  examples:
                    - SALE
                merchantDetailId:
                  type: string
                  description: Unique identifier for merchant configuration (MID).
                  examples:
                    - MD1LU8ZG5RUUUZZA
                requestSource:
                  type: string
                  description: Source from which the request was initiated.
                  enum:
                    - API
                    - SDK
                    - CHECKOUT
                  examples:
                    - API
                consentTransaction:
                  type: boolean
                  description: Indicates whether the transaction is consent-based.
                  examples:
                    - true
                productCode:
                  type: string
                  description: Product code associated with the transaction.
                  examples:
                    - DEFAULT
                chargesFrom:
                  type: number
                  description: Minimum transaction charges for filtering.
                  examples:
                    - 1
                chargesTo:
                  type: number
                  description: Maximum transaction charges for filtering.
                  examples:
                    - 100
                customerEmail:
                  type: string
                  description: Customer's email ID used in the transaction.
                  examples:
                    - customer@example.com
                customerPhone:
                  type: string
                  description: Customer's phone number.
                  examples:
                    - '9876543210'
                createdFrom:
                  type: string
                  description: >-
                    Start date-time for filtering based on order creation time.
                    Format: yyyy-MM-dd HH:mm:ss
                  examples:
                    - '2024-01-01 00:00:00'
                createdTo:
                  type: string
                  description: >-
                    End date-time for filtering based on order creation time.
                    Format: yyyy-MM-dd HH:mm:ss
                  examples:
                    - '2024-12-31 23:59:59'
                lastModifiedFrom:
                  type: string
                  description: >-
                    Start date-time for filtering based on last modification
                    time. Format: yyyy-MM-dd HH:mm:ss
                  examples:
                    - '2024-01-01 00:00:00'
                lastModifiedTo:
                  type: string
                  description: >-
                    End date-time for filtering based on last modification time.
                    Format: yyyy-MM-dd HH:mm:ss
                  examples:
                    - '2024-12-31 23:59:59'
                productId:
                  type: string
                  description: Internal product identifier.
                  examples:
                    - PG001
              x-apidog-orders:
                - orderIds
                - merchantOrderId
                - merchantUniqueId
                - amountFrom
                - amountTo
                - status
                - type
                - merchantDetailId
                - requestSource
                - consentTransaction
                - productCode
                - chargesFrom
                - chargesTo
                - customerEmail
                - customerPhone
                - createdFrom
                - createdTo
                - lastModifiedFrom
                - lastModifiedTo
                - productId
              examples:
                - orderIds:
                    - ORD123456
                  merchantOrderId: MORD_001
                  merchantUniqueId: 141
                  amountFrom: 10.5
                  amountTo: 5000
                  status: SUCCESS
                  type: SALE
                  merchantDetailId: MD1LU8ZG5RUUUZZA
                  requestSource: API
                  consentTransaction: true
                  productCode: DEFAULT
                  chargesFrom: 1
                  chargesTo: 100
                  customerEmail: customer@example.com
                  customerPhone: '9876543210'
                  createdFrom: '2024-01-01 00:00:00'
                  createdTo: '2024-12-31 23:59:59'
                  lastModifiedFrom: '2024-01-01 00:00:00'
                  lastModifiedTo: '2024-12-31 23:59:59'
                  productId: PG001
            example:
              orderIds:
                - ORD123456
              merchantOrderId: MORD_001
              merchantUniqueId: 141
              amountFrom: 10.5
              amountTo: 5000
              status: ATTEMPTED
              type: SALE
              merchantDetailId: MD1LU8ZG5RUUUZZA
              requestSource: API
              consentTransaction: true
              productCode: DEFAULT
              chargesFrom: 1
              chargesTo: 100
              customerEmail: customer@example.com
              customerPhone: '9876543210'
              createdFrom: '2024-01-01 00:00:00'
              createdTo: '2024-12-31 23:59:59'
              lastModifiedFrom: '2024-01-01 00:00:00'
              lastModifiedTo: '2024-12-31 23:59:59'
              productId: PG001
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  response_code:
                    type: integer
                    description: Application-level status code
                  response_message:
                    type: string
                    description: High-level status description.
                  payload:
                    type: object
                    properties:
                      recordsCount:
                        type: integer
                        description: No of records
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            orderId:
                              type: string
                              description: >-
                                EnKash orderId, received in response of create
                                order API
                            created:
                              type: string
                              description: Order creation timestamp
                            lastModified:
                              type: string
                              description: Last update timestamp
                            merchantOrderId:
                              type: string
                              description: Merchant-side reference ID
                            amount:
                              type: integer
                              description: Transaction amount
                            notifyUrl:
                              type: string
                              description: webhook url configured by merchant
                            status:
                              type: string
                              description: Payment status (PAID, FAILED, etc.)
                            merchantName:
                              type: string
                              description: Merchant display name
                            productCode:
                              type: string
                              description: Product category
                          required:
                            - orderId
                            - created
                            - lastModified
                            - merchantOrderId
                            - amount
                            - status
                            - merchantName
                            - productCode
                            - notifyUrl
                          x-apidog-orders:
                            - orderId
                            - created
                            - lastModified
                            - merchantOrderId
                            - amount
                            - notifyUrl
                            - status
                            - merchantName
                            - productCode
                    required:
                      - recordsCount
                      - data
                    x-apidog-orders:
                      - recordsCount
                      - data
                required:
                  - response_code
                  - response_message
                  - payload
                x-apidog-orders:
                  - response_code
                  - response_message
                  - payload
              example:
                response_code: 0
                response_message: Success
                payload:
                  recordsCount: 22821
                  data:
                    - orderId: ORD1761641489688yWNgF
                      created: '2025-10-28 14:21:29'
                      lastModified: '2025-10-28 14:21:29'
                      merchantOrderId: ENK250115111122111259999
                      amount: 20
                      notifyUrl: '9999999999'
                      status: ATTEMPTED
                      merchantName: Priyanka Tech
                      productCode: DEFAULT
                    - orderId: ORD1761634569168V1sf7
                      created: '2025-10-28 12:26:09'
                      lastModified: '2025-10-28 12:26:09'
                      merchantOrderId: RANDOMID129
                      amount: 100
                      status: PAID
                      merchantName: Jnana Inventive Private Limited
                      productCode: DEFAULT
                    - orderId: ORD1761632947038bYKQ2
                      created: '2025-10-28 11:59:07'
                      lastModified: '2025-10-28 11:59:07'
                      merchantOrderId: '17616329464177308363'
                      amount: 148
                      notifyUrl: '9892322922'
                      status: PAID
                      merchantName: Meenal Subhasis Majumder
                      productCode: DEFAULT
                    - orderId: ORD1761629455767cRraa
                      created: '2025-10-28 11:00:55'
                      lastModified: '2025-10-28 11:00:55'
                      merchantOrderId: '17616294557488607757'
                      amount: 148
                      notifyUrl: '9892322922'
                      status: PAID
                      merchantName: Meenal Subhasis Majumder
                      productCode: DEFAULT
                    - orderId: ORD1761579076202suGHX
                      created: '2025-10-27 21:01:16'
                      lastModified: '2025-10-27 21:01:16'
                      merchantOrderId: '17615790756520541805'
                      amount: 295
                      notifyUrl: '9989545670'
                      status: PAID
                      merchantName: Meenal Subhasis Majumder
                      productCode: DEFAULT
                    - orderId: ORD1761579071462GHVFo
                      created: '2025-10-27 21:01:11'
                      lastModified: '2025-10-27 21:01:11'
                      merchantOrderId: '17615790703327399974'
                      amount: 590
                      notifyUrl: '9000090000'
                      status: PAID
                      merchantName: Meenal Subhasis Majumder
                      productCode: DEFAULT
                    - orderId: ORD1761570944399lyqRm
                      created: '2025-10-27 18:45:44'
                      lastModified: '2025-10-27 18:45:44'
                      merchantOrderId: RANDOMID1216
                      amount: 100
                      status: PAID
                      merchantName: Jnana Inventive Private Limited
                      productCode: DEFAULT
                    - orderId: ORD17615705518644ijWI
                      created: '2025-10-27 18:39:11'
                      lastModified: '2025-10-27 18:39:11'
                      merchantOrderId: RANDOMID1215
                      amount: 100
                      status: PAID
                      merchantName: Jnana Inventive Private Limited
                      productCode: DEFAULT
                    - orderId: ORD1761570435942Um6Mw
                      created: '2025-10-27 18:37:15'
                      lastModified: '2025-10-27 18:37:15'
                      merchantOrderId: RANDOMID1214
                      amount: 100
                      status: PAID
                      merchantName: Jnana Inventive Private Limited
                      productCode: DEFAULT
                    - orderId: ORD1761570261102WMCTa
                      created: '2025-10-27 18:34:21'
                      lastModified: '2025-10-27 18:34:21'
                      merchantOrderId: RANDOMID1213
                      amount: 100
                      status: PAID
                      merchantName: Jnana Inventive Private Limited
                      productCode: DEFAULT
          headers: {}
          x-apidog-name: Success
        '504':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example: |-
                <html>
                <head><title>504 Gateway Time-out</title></head>
                <body>
                <center><h1>504 Gateway Time-out</h1></center>
                </body>
                </html>
          headers: {}
          x-apidog-name: Bad Gateway
      security: []
      x-apidog-folder: Payment Gateway/APIs - Payment Gateway /Order
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-23490722-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
