List candidates

recruitment/list-candidates@1.0.0
14 providers

List candidates

Returns paginated list of candidates.

Input
Job ID
Page
Page limit
Result
candidates
Pagination
Rate limit

1.Choose a provider

2.Use ListCandidates with mock in your code

npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('recruitment/list-candidates@1.0.0');

  // Use the profile
  const result = await profile
    .getUseCase('ListCandidates')
    .perform({
      jobId: 'JOB_ID'
    }, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

jobId
Uniquie identifier of the job the candidate is applying for.
page
Pagination cursor. Get the cursor from `pagination` field returned in the use case result. Use either `previousPage` or `nextPage` as cursor value.
limit
Maximum number of candidates returned in single page.

Example

{
  "jobId": "JOB_ID"
}

Result (object)

candidates
pagination
The pagination state.
rateLimit
Rate limit details.

Example

{
  "candidates": [
    {
      "id": "CANDIDATE_ID",
      "jobId": "JOB_ID",
      "name": "John Doe",
      "email": "john.doe@acme.com"
    }
  ]
}

Implementation details

Provider
mock
Use case
ListCandidates
Author
@superface
Source
Verified