Skip to content

Latest commit

 

History

History
198 lines (140 loc) · 7.31 KB

AttachmentsApi.md

File metadata and controls

198 lines (140 loc) · 7.31 KB

MergeAtsApi.AttachmentsApi

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

Method HTTP request Description
attachmentsCreate POST /attachments
attachmentsList GET /attachments
attachmentsRetrieve GET /attachments/{id}

attachmentsCreate

Attachment attachmentsCreate(xAccountToken, opts)

Creates an `Attachment` object with the given values.

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.AttachmentsApi();
let xAccountToken = "xAccountToken_example"; // String | Token identifying the end user.
let opts = {
  'remoteUserId': "remoteUserId_example", // String | The ID of the RemoteUser modifying the resource. This can be found in the ID field (not remote_id) in the RemoteUser table.
  'runAsync': true, // Boolean | Whether or not third-party updates should be run asynchronously.
  'attachmentRequest': new MergeAtsApi.AttachmentRequest() // AttachmentRequest | 
};
apiInstance.attachmentsCreate(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.
remoteUserId String The ID of the RemoteUser modifying the resource. This can be found in the ID field (not remote_id) in the RemoteUser table. [optional]
runAsync Boolean Whether or not third-party updates should be run asynchronously. [optional]
attachmentRequest AttachmentRequest [optional]

Return type

Attachment

Authorization

tokenAuth

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: application/json

attachmentsList

PaginatedAttachmentList attachmentsList(xAccountToken, opts)

Returns a list of `Attachment` 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.AttachmentsApi();
let xAccountToken = "xAccountToken_example"; // String | Token identifying the end user.
let opts = {
  'candidateId': "candidateId_example", // String | If provided, will only return attachments for this candidate.
  '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.
  '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.
};
apiInstance.attachmentsList(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.
candidateId String If provided, will only return attachments for this candidate. [optional]
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]
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]

Return type

PaginatedAttachmentList

Authorization

tokenAuth

HTTP request headers

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

attachmentsRetrieve

Attachment attachmentsRetrieve(xAccountToken, id, opts)

Returns an `Attachment` 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.AttachmentsApi();
let xAccountToken = "xAccountToken_example"; // String | Token identifying the end user.
let id = null; // String | 
let opts = {
  'includeRemoteData': true // Boolean | Whether to include the original data Merge fetched from the third-party to produce these models.
};
apiInstance.attachmentsRetrieve(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
includeRemoteData Boolean Whether to include the original data Merge fetched from the third-party to produce these models. [optional]

Return type

Attachment

Authorization

tokenAuth

HTTP request headers

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