Skip to content

Latest commit

 

History

History
150 lines (112 loc) · 4.96 KB

WebhookReceiversApi.md

File metadata and controls

150 lines (112 loc) · 4.96 KB

WebhookReceiversApi

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

Method HTTP request Description
webhookReceiversCreate POST /webhook-receivers
webhookReceiversList GET /webhook-receivers

webhookReceiversCreate

WebhookReceiver webhookReceiversCreate(xAccountToken, webhookReceiverRequest)

Creates a `WebhookReceiver` object with the given values.

Example

// Import classes:
import merge_hris_client.ApiClient;
import merge_hris_client.ApiException;
import merge_hris_client.Configuration;
import merge_hris_client.auth.*;
import merge_hris_client.models.*;
import merge_hris_client.api.WebhookReceiversApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.merge.dev/api/hris/v1");
    
    // Configure API key authorization: tokenAuth
    ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth");
    tokenAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //tokenAuth.setApiKeyPrefix("Token");

    WebhookReceiversApi apiInstance = new WebhookReceiversApi(defaultClient);
    String xAccountToken = "xAccountToken_example"; // String | Token identifying the end user.
    WebhookReceiverRequest webhookReceiverRequest = new WebhookReceiverRequest(); // WebhookReceiverRequest | 
    try {
      WebhookReceiver result = apiInstance.webhookReceiversCreate(xAccountToken, webhookReceiverRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhookReceiversApi#webhookReceiversCreate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
xAccountToken String Token identifying the end user.
webhookReceiverRequest WebhookReceiverRequest

Return type

WebhookReceiver

Authorization

tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

webhookReceiversList

List<WebhookReceiver> webhookReceiversList(xAccountToken)

Returns a list of `WebhookReceiver` objects.

Example

// Import classes:
import merge_hris_client.ApiClient;
import merge_hris_client.ApiException;
import merge_hris_client.Configuration;
import merge_hris_client.auth.*;
import merge_hris_client.models.*;
import merge_hris_client.api.WebhookReceiversApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.merge.dev/api/hris/v1");
    
    // Configure API key authorization: tokenAuth
    ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth");
    tokenAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //tokenAuth.setApiKeyPrefix("Token");

    WebhookReceiversApi apiInstance = new WebhookReceiversApi(defaultClient);
    String xAccountToken = "xAccountToken_example"; // String | Token identifying the end user.
    try {
      List<WebhookReceiver> result = apiInstance.webhookReceiversList(xAccountToken);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling WebhookReceiversApi#webhookReceiversList");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
xAccountToken String Token identifying the end user.

Return type

List<WebhookReceiver>

Authorization

tokenAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -