Skip to content

Latest commit

 

History

History
142 lines (102 loc) · 5.82 KB

JobsApi.md

File metadata and controls

142 lines (102 loc) · 5.82 KB

MergeAtsApi.JobsApi

All URIs are relative to https://api.merge.dev/api/ats/v1

Method HTTP request Description
jobsList GET /jobs
jobsRetrieve GET /jobs/{id}

jobsList

PaginatedJobList jobsList(xAccountToken, opts)

Returns a list of `Job` objects.

Example

import MergeAtsApi from 'merge_ats_api';
let defaultClient = MergeAtsApi.ApiClient.instance;
// Configure API key authorization: tokenAuth
let tokenAuth = defaultClient.authentications['tokenAuth'];
tokenAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//tokenAuth.apiKeyPrefix = 'Token';

let apiInstance = new MergeAtsApi.JobsApi();
let xAccountToken = "xAccountToken_example"; // String | Token identifying the end user.
let opts = {
  'createdAfter': new Date("2013-10-20T19:20:30+01:00"), // Date | If provided, will only return objects created after this datetime.
  'createdBefore': new Date("2013-10-20T19:20:30+01:00"), // Date | If provided, will only return objects created before this datetime.
  'cursor': cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw, // String | The pagination cursor value.
  'expand': departments,offices,hiring_managers, // String | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
  'includeRemoteData': true, // Boolean | Whether to include the original data Merge fetched from the third-party to produce these models.
  'modifiedAfter': new Date("2013-10-20T19:20:30+01:00"), // Date | If provided, will only return objects modified after this datetime.
  'modifiedBefore': new Date("2013-10-20T19:20:30+01:00"), // Date | If provided, will only return objects modified before this datetime.
  'pageSize': 56, // Number | Number of results to return per page.
  'remoteId': "remoteId_example", // String | The API provider's ID for the given object.
  'status': "status_example" // String | If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING')
};
apiInstance.jobsList(xAccountToken, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
xAccountToken String Token identifying the end user.
createdAfter Date If provided, will only return objects created after this datetime. [optional]
createdBefore Date If provided, will only return objects created before this datetime. [optional]
cursor String The pagination cursor value. [optional]
expand String Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. [optional]
includeRemoteData Boolean Whether to include the original data Merge fetched from the third-party to produce these models. [optional]
modifiedAfter Date If provided, will only return objects modified after this datetime. [optional]
modifiedBefore Date If provided, will only return objects modified before this datetime. [optional]
pageSize Number Number of results to return per page. [optional]
remoteId String The API provider's ID for the given object. [optional]
status String If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') [optional]

Return type

PaginatedJobList

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

jobsRetrieve

Job jobsRetrieve(xAccountToken, id, opts)

Returns a `Job` object with the given `id`.

Example

import MergeAtsApi from 'merge_ats_api';
let defaultClient = MergeAtsApi.ApiClient.instance;
// Configure API key authorization: tokenAuth
let tokenAuth = defaultClient.authentications['tokenAuth'];
tokenAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//tokenAuth.apiKeyPrefix = 'Token';

let apiInstance = new MergeAtsApi.JobsApi();
let xAccountToken = "xAccountToken_example"; // String | Token identifying the end user.
let id = null; // String | 
let opts = {
  'expand': departments,offices,hiring_managers, // String | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
  'includeRemoteData': true // Boolean | Whether to include the original data Merge fetched from the third-party to produce these models.
};
apiInstance.jobsRetrieve(xAccountToken, id, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
xAccountToken String Token identifying the end user.
id String
expand String Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. [optional]
includeRemoteData Boolean Whether to include the original data Merge fetched from the third-party to produce these models. [optional]

Return type

Job

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json