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

# Get Withdrawals

Search through all withdrawals across your entire member base, you can filter by member, by cycle or by date range.

### Filtering

* **Member ID (`memberId`)**: Filter withdrawals by a specific member's internal Onsi ID.
* **Pay Cycle ID (`payCycleId`)**: Filter withdrawals by a specific pay cycle ID.
* **From Date (`fromDate`)**: Start the results after this date (ISO 8601 datetime format).
* **To Date (`toDate`)**: End the results before this date (ISO 8601 datetime format).

### Pagination

We return a `hasMore` flag to indicate if there are more results to fetch, we do not return a `total` for this resource.

* **Has More (`hasMore`)**: Whether there are more results to fetch.


## OpenAPI

````yaml GET /v1/pay/withdrawals
openapi: 3.0.2
info:
  title: BMO Partner API
  version: v1
servers:
  - url: https://api.onsi.com
    description: Production
  - url: https://api.onsi.dev
    description: Sandbox
security:
  - apiKey: []
paths:
  /v1/pay/withdrawals:
    get:
      tags:
        - pay
      summary: Show withdrawals for the pay cycle
      operationId: getWithdrawals
      parameters:
        - name: payCycleId
          in: query
          description: Filter by pay cycle
          schema:
            example: pc_<id>
            type: string
        - name: memberId
          in: query
          description: Filter by member
          schema:
            example: mem_<id>
            type: string
        - name: skip
          in: query
          required: true
          schema:
            default: 0
            type: number
        - name: take
          in: query
          required: true
          schema:
            default: 50
            type: number
        - name: fromDate
          in: query
          description: Start the results after this date
          schema:
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        - name: toDate
          in: query
          description: End the results before this date
          schema:
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdrawals:
                    type: array
                    items:
                      $ref: '#/components/schemas/Withdrawal'
                  hasMore:
                    example: false
                    description: Whether there are more results to fetch
                    type: boolean
                  skip:
                    example: 0
                    type: number
                  take:
                    example: 50
                    type: number
                required:
                  - withdrawals
                  - hasMore
                  - skip
                  - take
                additionalProperties: false
components:
  schemas:
    Withdrawal:
      title: Withdrawal
      description: >-
        A withdrawal is a completed On Demand Pay withdrawal from the member to
        their bank account
      type: object
      properties:
        id:
          example: w_<id>
          description: The unique identifier for a PayWithdrawal, prefixed with w_
          type: string
        netAmount:
          $ref: '#/components/schemas/WithdrawalNetAmount'
        fee:
          $ref: '#/components/schemas/WithdrawalFee'
        payCycleId:
          example: pc_<id>
          description: The unique identifier for a PayCycle, prefixed with pc_
          type: string
        memberId:
          example: mem_<id>
          description: The unique identifier for a Member, prefixed with mem_
          type: string
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - id
        - netAmount
        - fee
        - payCycleId
        - memberId
        - createdAt
      additionalProperties: false
    WithdrawalNetAmount:
      title: WithdrawalNetAmount
      description: The amount of money the member received after fees
      type: object
      properties:
        amount:
          example: 1050
          description: Price in lowest denomination of currency (e.g. cents)
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        currency:
          example: GBP
          description: ISO 4217 currency code
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BOV
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CAD
            - CDF
            - CHE
            - CHF
            - CHW
            - CLF
            - CLP
            - CNY
            - COP
            - COU
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MXV
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - USN
            - UYI
            - UYU
            - UYW
            - UZS
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XAG
            - XAU
            - XBA
            - XBB
            - XBC
            - XBD
            - XCD
            - XDR
            - XOF
            - XPD
            - XPF
            - XPT
            - XSU
            - XTS
            - XUA
            - XXX
            - YER
            - ZAR
            - ZMW
            - ZWL
      required:
        - amount
        - currency
      additionalProperties: false
      x-instanceOf: Money
    WithdrawalFee:
      title: WithdrawalFee
      description: The fee charged for the withdrawal
      type: object
      properties:
        amount:
          example: 1050
          description: Price in lowest denomination of currency (e.g. cents)
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        currency:
          example: GBP
          description: ISO 4217 currency code
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BOV
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CAD
            - CDF
            - CHE
            - CHF
            - CHW
            - CLF
            - CLP
            - CNY
            - COP
            - COU
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MXV
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - USN
            - UYI
            - UYU
            - UYW
            - UZS
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XAG
            - XAU
            - XBA
            - XBB
            - XBC
            - XBD
            - XCD
            - XDR
            - XOF
            - XPD
            - XPF
            - XPT
            - XSU
            - XTS
            - XUA
            - XXX
            - YER
            - ZAR
            - ZMW
            - ZWL
      required:
        - amount
        - currency
      additionalProperties: false
      x-instanceOf: Money
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````