Partner organisations only. A Payroll organisation calling this
endpoint receives 405 Method Not Allowed. An employer-scoped access
token receives 403 Forbidden.
While you manage the request’s organisation, links the workplace admins and employees already on the client’s organisation to your platform’s identifiers, so they can sign in to Penfold through your platform. Read Penfold’s identifiers from the workplace admin and employee endpoints, match them to your people, and send the pairs.
Each row is linked, skipped or failed on its own, and one failed row does not stop the others. A row that was already linked is skipped, so you can safely send the whole batch again after fixing the failed rows.
Returns 404 Not Found when the request does not exist or was sent by
another organisation.
Path parameters
-
Penfold’s identifier for the partner management request, as returned when it was created.
Responses
-
Every row was processed. Check each row’s
result. -
Bad request, the request is malformed, has no rows, or has more than 1,000 rows in total.
-
Unauthorized
-
Forbidden, the access token is scoped to an employer.
-
Partner management request not found, or sent by another organisation.
-
Method not allowed
-
Nothing can be linked for this request. Nothing was linked. Use
code, noterror, to tell the cases apart;erroris a human-readable message and its wording may change.
curl \
--request POST 'https://payroll-api.getpenfold.dev/v4/partner_management_requests/{partner_management_request_id}/sso_identity_links' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"workplace_admins": [
{
"workplace_admin_id": "cm1wxyz2e0000abc123456789",
"external_id": "usr_01HXYZ"
}
],
"employees": [
{
"employee_id": "cm1emp12e0000abc123456789",
"external_id": "wkr_01HXYZ"
}
]
}'
{
"workplace_admins": [
{
"workplace_admin_id": "cm1wxyz2e0000abc123456789",
"external_id": "usr_01HXYZ"
}
],
"employees": [
{
"employee_id": "cm1emp12e0000abc123456789",
"external_id": "wkr_01HXYZ"
}
]
}
{
"workplace_admins": [
{
"workplace_admin_id": "cm1wxyz2e0000abc123456789",
"external_id": "usr_01HXYZ",
"result": "Linked",
"reason": "WorkplaceAdminNotFound"
}
],
"employees": [
{
"employee_id": "cm1emp12e0000abc123456789",
"external_id": "wkr_01HXYZ",
"result": "Linked",
"reason": "EmployeeNotFound"
}
]
}
{
"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."
}
{
"code": "OrganisationNotManagedByPartner",
"error": "you do not manage this request's organisation"
}
{
"code": "SsoNotConfigured",
"error": "single sign-on is not configured"
}