Skip to content

Latest commit

 

History

History
157 lines (112 loc) · 6.63 KB

TeamsApi.md

File metadata and controls

157 lines (112 loc) · 6.63 KB

MergeHRISClient\TeamsApi

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

Method HTTP request Description
teamsList() GET /teams
teamsRetrieve() GET /teams/{id}

teamsList()

teamsList($x_account_token, $created_after, $created_before, $cursor, $include_deleted_data, $include_remote_data, $modified_after, $modified_before, $page_size, $parent_team_id, $remote_id): \MergeHRISClient\Model\PaginatedTeamList

Returns a list of Team objects.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: tokenAuth
$config = MergeHRISClient\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MergeHRISClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new MergeHRISClient\Api\TeamsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_account_token = 'x_account_token_example'; // string | Token identifying the end user.
$created_after = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | If provided, will only return objects created after this datetime.
$created_before = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | If provided, will only return objects created before this datetime.
$cursor = cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw; // string | The pagination cursor value.
$include_deleted_data = True; // bool | Whether to include data that was marked as deleted by third party webhooks.
$include_remote_data = True; // bool | Whether to include the original data Merge fetched from the third-party to produce these models.
$modified_after = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | If provided, only objects synced by Merge after this date time will be returned.
$modified_before = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | If provided, only objects synced by Merge before this date time will be returned.
$page_size = 56; // int | Number of results to return per page.
$parent_team_id = 'parent_team_id_example'; // string | If provided, will only return teams with this parent team.
$remote_id = 'remote_id_example'; // string | The API provider's ID for the given object.

try {
    $result = $apiInstance->teamsList($x_account_token, $created_after, $created_before, $cursor, $include_deleted_data, $include_remote_data, $modified_after, $modified_before, $page_size, $parent_team_id, $remote_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TeamsApi->teamsList: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
x_account_token string Token identifying the end user.
created_after \DateTime If provided, will only return objects created after this datetime. [optional]
created_before \DateTime If provided, will only return objects created before this datetime. [optional]
cursor string The pagination cursor value. [optional]
include_deleted_data bool Whether to include data that was marked as deleted by third party webhooks. [optional]
include_remote_data bool Whether to include the original data Merge fetched from the third-party to produce these models. [optional]
modified_after \DateTime If provided, only objects synced by Merge after this date time will be returned. [optional]
modified_before \DateTime If provided, only objects synced by Merge before this date time will be returned. [optional]
page_size int Number of results to return per page. [optional]
parent_team_id string If provided, will only return teams with this parent team. [optional]
remote_id string The API provider's ID for the given object. [optional]

Return type

\MergeHRISClient\Model\PaginatedTeamList

Authorization

tokenAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

teamsRetrieve()

teamsRetrieve($x_account_token, $id, $include_remote_data): \MergeHRISClient\Model\Team

Returns a Team object with the given id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: tokenAuth
$config = MergeHRISClient\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MergeHRISClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new MergeHRISClient\Api\TeamsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_account_token = 'x_account_token_example'; // string | Token identifying the end user.
$id = 'id_example'; // string
$include_remote_data = True; // bool | Whether to include the original data Merge fetched from the third-party to produce these models.

try {
    $result = $apiInstance->teamsRetrieve($x_account_token, $id, $include_remote_data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TeamsApi->teamsRetrieve: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
x_account_token string Token identifying the end user.
id string
include_remote_data bool Whether to include the original data Merge fetched from the third-party to produce these models. [optional]

Return type

\MergeHRISClient\Model\Team

Authorization

tokenAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]