Partner organisations only. A Payroll organisation calling this
endpoint receives 405 Method Not Allowed. An employer-scoped access
token receives 403 Forbidden.
Returns the people who currently have Workplace Platform access to a managed organisation, newest first. Admins whose access has been removed are not included.
Pass external_id to find a single admin by your platform’s identifier
for them, as supplied when they were registered. At most one admin is
returned. An unknown identifier, or one belonging to an admin whose
access has been removed, returns an empty list rather than 404.
external_id is only accepted from Partner organisations that use
single sign-on with Penfold; other organisations receive 400.
Query parameters
-
The maximum number of workplace admins to return per page.
Minimum value is
1, maximum value is500. Default value is200. -
The page number to return in the list of workplace admins.
Minimum value is
1. Default value is1. -
Optional filter. Your platform’s identifier for the admin, as supplied when they were registered. Returns at most one admin. Must not be blank. Only accepted from Partner organisations that use single sign-on with Penfold.
Minimum length is
1.
Responses
-
List of workplace admins retrieved successfully.
-
Bad request. Either
page_sizeorpage_numberis out of range (novalidation_errors), orexternal_idwas supplied by an organisation that does not use single sign-on, or was blank (seevalidation_errors). -
Unauthorized
-
Forbidden, the access token is scoped to an employer.
-
Organisation not found, or not managed by your Partner organisation.
-
Method not allowed
curl \
--request GET 'https://payroll-api.getpenfold.dev/v4/organisations/{organisation_id}/workplace_admins' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"page_number": 1,
"page_size": 200,
"total_items": 3,
"items": [
{
"id": "cm1wxyz2e0000abc123456789",
"email": "jane.smith@example.com",
"first_name": "Jane",
"last_name": "Smith",
"external_id": "usr_01HXYZ"
}
]
}
{
"error": "Bad request: invalid data provided.",
"validation_errors": [
{
"field": "email",
"message": "Email address is invalid."
}
]
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}