All URIs are relative to https://api.merge.dev/api/hris/v1
Method | HTTP request | Description |
---|---|---|
employmentsList | GET /employments | |
employmentsRetrieve | GET /employments/{id} |
PaginatedEmploymentList employmentsList(x_account_token, opts)
Returns a list of `Employment` objects.
import MergeHrisApi from 'merge_hris_api';
let defaultClient = MergeHrisApi.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 MergeHrisApi.EmploymentsApi();
let x_account_token = "x_account_token_example"; // String | Token identifying the end user.
let opts = {
'created_after': new Date("2013-10-20T19:20:30+01:00"), // Date | If provided, will only return objects created after this datetime.
'created_before': 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.
'employee_id': "employee_id_example", // String | If provided, will only return employments for this employee.
'expand': employee,pay_group, // String | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
'include_deleted_data': true, // Boolean | Whether to include data that was marked as deleted by third party webhooks.
'include_remote_data': true, // Boolean | Whether to include the original data Merge fetched from the third-party to produce these models.
'modified_after': new Date("2013-10-20T19:20:30+01:00"), // Date | If provided, will only return objects modified after this datetime.
'modified_before': new Date("2013-10-20T19:20:30+01:00"), // Date | If provided, will only return objects modified before this datetime.
'order_by': "order_by_example", // String | Overrides the default ordering for this endpoint.
'page_size': 56, // Number | Number of results to return per page.
'remote_fields': employment_type,flsa_status,pay_frequency,pay_period, // String | Which fields should be returned in non-normalized form.
'remote_id': "remote_id_example" // String | The API provider's ID for the given object.
};
apiInstance.employmentsList(x_account_token, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
x_account_token | String | Token identifying the end user. | |
created_after | Date | If provided, will only return objects created after this datetime. | [optional] |
created_before | Date | If provided, will only return objects created before this datetime. | [optional] |
cursor | String | The pagination cursor value. | [optional] |
employee_id | String | If provided, will only return employments for this employee. | [optional] |
expand | String | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] |
include_deleted_data | Boolean | Whether to include data that was marked as deleted by third party webhooks. | [optional] |
include_remote_data | Boolean | Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] |
modified_after | Date | If provided, will only return objects modified after this datetime. | [optional] |
modified_before | Date | If provided, will only return objects modified before this datetime. | [optional] |
order_by | String | Overrides the default ordering for this endpoint. | [optional] |
page_size | Number | Number of results to return per page. | [optional] |
remote_fields | String | Which fields should be returned in non-normalized form. | [optional] |
remote_id | String | The API provider's ID for the given object. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Employment employmentsRetrieve(x_account_token, id, opts)
Returns an `Employment` object with the given `id`.
import MergeHrisApi from 'merge_hris_api';
let defaultClient = MergeHrisApi.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 MergeHrisApi.EmploymentsApi();
let x_account_token = "x_account_token_example"; // String | Token identifying the end user.
let id = null; // String |
let opts = {
'expand': employee,pay_group, // String | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
'include_remote_data': true, // Boolean | Whether to include the original data Merge fetched from the third-party to produce these models.
'remote_fields': employment_type,flsa_status,pay_frequency,pay_period // String | Which fields should be returned in non-normalized form.
};
apiInstance.employmentsRetrieve(x_account_token, id, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
x_account_token | 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] |
include_remote_data | Boolean | Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] |
remote_fields | String | Which fields should be returned in non-normalized form. | [optional] |
- Content-Type: Not defined
- Accept: application/json