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 (string xAccountToken, DateTime? createdAfter = null, DateTime? createdBefore = null, string cursor = null, string employeeId = null, bool? includeDeletedData = null, bool? includeRemoteData = null, DateTime? modifiedAfter = null, DateTime? modifiedBefore = null, string orderBy = null, int? pageSize = null, string remoteFields = null, string remoteId = null, string showEnumOrigins = null)
Returns a list of Employment
objects.
using System.Collections.Generic;
using System.Diagnostics;
using Merge.HRISClient.Api;
using Merge.HRISClient.Client;
using Merge.HRISClient.Model;
namespace Example
{
public class EmploymentsListExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.merge.dev/api/hris/v1";
// Configure API key authorization: tokenAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new EmploymentsApi(config);
var xAccountToken = xAccountToken_example; // string | Token identifying the end user.
var createdAfter = 2013-10-20T19:20:30+01:00; // DateTime? | If provided, will only return objects created after this datetime. (optional)
var createdBefore = 2013-10-20T19:20:30+01:00; // DateTime? | If provided, will only return objects created before this datetime. (optional)
var cursor = cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw; // string | The pagination cursor value. (optional)
var employeeId = employeeId_example; // string | If provided, will only return employments for this employee. (optional)
var includeDeletedData = true; // bool? | Whether to include data that was marked as deleted by third party webhooks. (optional)
var includeRemoteData = true; // bool? | Whether to include the original data Merge fetched from the third-party to produce these models. (optional)
var modifiedAfter = 2013-10-20T19:20:30+01:00; // DateTime? | If provided, only objects synced by Merge after this date time will be returned. (optional)
var modifiedBefore = 2013-10-20T19:20:30+01:00; // DateTime? | If provided, only objects synced by Merge before this date time will be returned. (optional)
var orderBy = orderBy_example; // string | Overrides the default ordering for this endpoint. (optional)
var pageSize = 56; // int? | Number of results to return per page. (optional)
var remoteFields = employment_type,flsa_status,pay_frequency,pay_period; // string | Deprecated. Use show_enum_origins. (optional)
var remoteId = remoteId_example; // string | The API provider's ID for the given object. (optional)
var showEnumOrigins = employment_type,flsa_status,pay_frequency,pay_period; // string | Which fields should be returned in non-normalized form. (optional)
try
{
PaginatedEmploymentList result = apiInstance.EmploymentsList(xAccountToken, createdAfter, createdBefore, cursor, employeeId, includeDeletedData, includeRemoteData, modifiedAfter, modifiedBefore, orderBy, pageSize, remoteFields, remoteId, showEnumOrigins);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmploymentsApi.EmploymentsList: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
xAccountToken | string | Token identifying the end user. | |
createdAfter | DateTime? | If provided, will only return objects created after this datetime. | [optional] |
createdBefore | DateTime? | If provided, will only return objects created before this datetime. | [optional] |
cursor | string | The pagination cursor value. | [optional] |
employeeId | string | If provided, will only return employments for this employee. | [optional] |
includeDeletedData | bool? | Whether to include data that was marked as deleted by third party webhooks. | [optional] |
includeRemoteData | bool? | Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] |
modifiedAfter | DateTime? | If provided, only objects synced by Merge after this date time will be returned. | [optional] |
modifiedBefore | DateTime? | If provided, only objects synced by Merge before this date time will be returned. | [optional] |
orderBy | string | Overrides the default ordering for this endpoint. | [optional] |
pageSize | int? | Number of results to return per page. | [optional] |
remoteFields | string | Deprecated. Use show_enum_origins. | [optional] |
remoteId | string | The API provider's ID for the given object. | [optional] |
showEnumOrigins | string | Which fields should be returned in non-normalized form. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Employment EmploymentsRetrieve (string xAccountToken, Guid id, bool? includeRemoteData = null, string remoteFields = null, string showEnumOrigins = null)
Returns an Employment
object with the given id
.
using System.Collections.Generic;
using System.Diagnostics;
using Merge.HRISClient.Api;
using Merge.HRISClient.Client;
using Merge.HRISClient.Model;
namespace Example
{
public class EmploymentsRetrieveExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.merge.dev/api/hris/v1";
// Configure API key authorization: tokenAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new EmploymentsApi(config);
var xAccountToken = xAccountToken_example; // string | Token identifying the end user.
var id = new Guid(); // Guid |
var includeRemoteData = true; // bool? | Whether to include the original data Merge fetched from the third-party to produce these models. (optional)
var remoteFields = employment_type,flsa_status,pay_frequency,pay_period; // string | Deprecated. Use show_enum_origins. (optional)
var showEnumOrigins = employment_type,flsa_status,pay_frequency,pay_period; // string | Which fields should be returned in non-normalized form. (optional)
try
{
Employment result = apiInstance.EmploymentsRetrieve(xAccountToken, id, includeRemoteData, remoteFields, showEnumOrigins);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmploymentsApi.EmploymentsRetrieve: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
xAccountToken | string | Token identifying the end user. | |
id | Guid | ||
includeRemoteData | bool? | Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] |
remoteFields | string | Deprecated. Use show_enum_origins. | [optional] |
showEnumOrigins | string | Which fields should be returned in non-normalized form. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]