Skip to main content
GET
/
v1
/
pay
/
withdrawals
Show withdrawals for the pay cycle
curl --request GET \
  --url https://api.onsi.com/v1/pay/withdrawals \
  --header 'x-api-key: <api-key>'
{
  "withdrawals": [
    {
      "id": "w_<id>",
      "netAmount": {
        "amount": 1050,
        "currency": "GBP"
      },
      "fee": {
        "amount": 1050,
        "currency": "GBP"
      },
      "payCycleId": "pc_<id>",
      "memberId": "mem_<id>",
      "createdAt": "2023-11-07T05:31:56Z"
    }
  ],
  "hasMore": false,
  "skip": 0,
  "take": 50
}

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.

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.

Authorizations

x-api-key
string
header
required

Query Parameters

payCycleId
string

Filter by pay cycle

Example:

"pc_<id>"

memberId
string

Filter by member

Example:

"mem_<id>"

skip
number
default:0
required
take
number
default:50
required
fromDate
string<date-time>

Start the results after this date

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))$
toDate
string<date-time>

End the results before this date

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))$

Response

200 - application/json

200

withdrawals
Withdrawal · object[]
required
hasMore
boolean
required

Whether there are more results to fetch

Example:

false

skip
number
required
Example:

0

take
number
required
Example:

50