Partner organisations only. A Payroll organisation calling this
endpoint receives 405 Method Not Allowed. An employer-scoped access
token receives 403 Forbidden.
Returns one person who currently has Workplace Platform access to a managed organisation, using Penfold’s identifier for them as returned when they were registered or listed. The response has the same fields as an item in the list of workplace admins.
Returns 404 Not Found when the organisation does not exist or is not
managed by your Partner organisation, when the admin is not registered
on that organisation, or when the admin’s access has been removed.
Path parameters
-
Unique identifier for the managed organisation.
-
Penfold’s identifier for the workplace admin, as returned when they were registered.
Responses
-
Workplace admin retrieved successfully.
-
Unauthorized
-
Forbidden, the access token is scoped to an employer.
-
Organisation not found or not managed by your Partner organisation, or workplace admin not registered on that organisation (including admins whose access has been removed).
-
Method not allowed
curl \
--request GET 'https://payroll-api.getpenfold.dev/v4/organisations/{organisation_id}/workplace_admins/{workplace_admin_id}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"id": "cm1wxyz2e0000abc123456789",
"email": "jane.smith@example.com",
"first_name": "Jane",
"last_name": "Smith",
"external_id": "usr_01HXYZ"
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}