Partner organisations only. A Payroll organisation calling this
endpoint receives 405 Method Not Allowed. An employer-scoped access
token receives 403 Forbidden.
Hands a managed organisation back to Penfold, for example when the customer leaves you but stays with Penfold. The organisation and its employers stay on Penfold.
This ends your access to the organisation and its employers. Requests
for them return 404 Not Found and you receive no more webhooks about
them, unless an employer is also in another organisation you manage.
Returns 404 Not Found when the organisation does not exist, is not
managed by your Partner organisation, or has already been disconnected.
POST
/organisations/{organisation_id}/disconnect
curl \
--request POST 'https://payroll-api.getpenfold.dev/v4/organisations/{organisation_id}/disconnect' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (401)
{
"error": "Bad request: invalid data provided."
}
Response examples (403)
{
"error": "Bad request: invalid data provided."
}
Response examples (404)
{
"error": "Bad request: invalid data provided."
}
Response examples (405)
{
"error": "Bad request: invalid data provided."
}