Partner organisations only. A Payroll organisation calling this
endpoint receives 405 Method Not Allowed. An employer-scoped access
token receives 403 Forbidden.
Removes a person’s Workplace Platform access to a managed organisation, for example when they leave the customer’s company. Once removed they can no longer sign in through your platform or with a password, and they no longer appear in the list of workplace admins.
Removal is idempotent: repeating the call for an admin who has already
been removed returns 200 and changes nothing. The same person can be
registered again later, including with the same external_id.
Path parameters
-
Unique identifier for the managed organisation.
-
Penfold’s identifier for the workplace admin, as returned when they were registered.
Responses
-
Workplace admin removed, or was already removed.
-
Unauthorized
-
Forbidden, the access token is scoped to an employer.
-
Organisation not found or not managed by your Partner organisation, or the workplace admin was never a member of it.
-
Method not allowed
-
Internal server error. The admin may be partially removed; retry the request.
curl \
--request DELETE 'https://payroll-api.getpenfold.dev/v4/organisations/{organisation_id}/workplace_admins/{workplace_admin_id}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}