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
}

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

Start the results after this date

toDate
string

End the results before this date

Response

200 - application/json

200

The response is of type object.