All URIs are relative to https://api.merge.dev/api/ticketing/v1
Method | HTTP request | Description |
---|---|---|
contactsList | GET /contacts | |
contactsRetrieve | GET /contacts/{id} |
PaginatedContactList contactsList(x_account_token, opts)
Returns a list of `Contact` objects.
import MergeTicketingApi from 'merge_ticketing_api';
let defaultClient = MergeTicketingApi.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 MergeTicketingApi.ContactsApi();
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.
'expand': account, // 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.
'page_size': 56, // Number | Number of results to return per page.
'remote_id': "remote_id_example" // String | The API provider's ID for the given object.
};
apiInstance.contactsList(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] |
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] |
page_size | Number | Number of results to return per page. | [optional] |
remote_id | String | The API provider's ID for the given object. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Contact contactsRetrieve(x_account_token, id, opts)
Returns a `Contact` object with the given `id`.
import MergeTicketingApi from 'merge_ticketing_api';
let defaultClient = MergeTicketingApi.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 MergeTicketingApi.ContactsApi();
let x_account_token = "x_account_token_example"; // String | Token identifying the end user.
let id = null; // String |
let opts = {
'expand': account, // 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.
};
apiInstance.contactsRetrieve(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] |
- Content-Type: Not defined
- Accept: application/json