DELETE
/
employer
/
benefits
/
{benefit_id}
/
individuals
import Finch from '@tryfinch/finch-api';

const client = new Finch({
  accessToken: 'My Access Token',
});

async function main() {
  // Automatically fetches more pages as needed.
  for await (const unenrolledIndividual of client.hris.benefits.individuals.unenrollMany('benefit_id')) {
    console.log(unenrolledIndividual.individual_id);
  }
}

main();
[
  {
    "individual_id": "7fc9fb3a-2a62-47c1-9a5a-c9146483b58e",
    "code": 200,
    "body": {
      "name": "success",
      "finch_code": "unenrolled_individual_benefit",
      "message": "Unenrolled individual from benefit"
    }
  },
  {
    "individual_id": "e63c21ab-7cde-49d8-b6d6-ce208e84bf09",
    "code": 200,
    "body": {
      "name": "success",
      "finch_code": "unenrolled_individual_benefit",
      "message": "Unenrolled individual from benefit"
    }
  }
]

Availability: Automated and Assisted providers

This is a live request to the provider. Latencies may vary from seconds to minutes depending on the provider.

Authorizations

Authorization
string
header
required

Please use your Access Token

Headers

Finch-API-Version
string
default:
2020-09-17
required

Header used to specify the version for a given API request. Current version is 2020-09-17.

Content-Type
string
default:
application/json
required

Used to indicate the original media type of the resource

Path Parameters

benefit_id
string
required

Body

application/json
individual_ids
string[]

Array of individual_ids to unenroll.

Response

200
application/json
Success for all individuals. Unenrolled all individuals from the benefit.
job_id
string