Superface

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

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });

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
id
ID of the candidate.
jobId
ID of a job the candidate is applying for. Use recruitment/list-jobs profile to list job IDs.
name
The name of the candidate.
email
Email of the candidate.
createdAt
ISO8601 timestamp when was thethe candidate created.
updatedAt
ISO8601 timestamp when was the candidate lastly updated.
pagination
The pagination state.
previousPage
Previous page cursor.
nextPage
Next page cursor.
rateLimit
Rate limit details.
bucket
Different parts of API may have different rate limits. Bucket identifies to which part of API the rate limits apply.
totalRequests
Total requests available in the time window.
remainingRequests
Remaining requests available in the time window.
remainingRequestsPercentage
Remaining requests available in the time window in percents.
resetTimestamp
Timestamp when the rate limits will reset (in Unix Timestamp format). Available only for providers without rolling rate limit window.

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