Skip to content

Latest commit

 

History

History
1776 lines (1308 loc) · 56.5 KB

ClientsApi.md

File metadata and controls

1776 lines (1308 loc) · 56.5 KB

ClientsApi

All URIs are relative to https://hornet-trunk.dev.xtrf.eu/home-api

Method HTTP request Description
create POST /customers/persons Creates a new person.
create1 POST /customers Creates a new client.
delete1 DELETE /customers/persons/{personId} Removes a person.
delete1_0 DELETE /customers/priceLists/{priceListId} Removes a customer price list.
delete2 DELETE /customers/{customerId} Removes a client.
generateSingleUseSignInToken POST /customers/persons/accessToken Generates a single use sign-in token.
getAddress GET /customers/{customerId}/address Returns address of a given client.
getAllIds1 GET /customers/persons/ids Returns persons' internal identifiers.
getAllIds2 GET /customers/ids Returns clients' internal identifiers.
getAllNamesWithIds GET /customers Returns list of simple clients representations
getById1 GET /customers/persons/{personId} Returns person details.
getById2 GET /customers/{customerId} Returns client details.
getCategories GET /customers/{customerId}/categories Returns categories of a given client.
getContact GET /customers/persons/{personId}/contact Returns contact of a given person.
getContact1 GET /customers/{customerId}/contact Returns contact of a given client.
getCorrespondenceAddress GET /customers/{customerId}/correspondenceAddress Returns correspondence address of a given client.
getCustomField GET /customers/{customerId}/customFields/{customFieldKey} Returns custom field of a given client.
getCustomFields GET /customers/persons/{personId}/customFields Returns custom fields of a given person.
getCustomFields1 GET /customers/{customerId}/customFields Returns custom fields of a given client.
getIndustries GET /customers/{customerId}/industries Returns industries of a given client.
update PUT /customers/persons/{personId} Updates an existing person.
updateAddress PUT /customers/{customerId}/address Updates address of a given client.
updateCategories PUT /customers/{customerId}/categories Updates categories of a given client.
updateContact PUT /customers/persons/{personId}/contact Updates contact of a given person.
updateContact_0 PUT /customers/{customerId}/contact Updates contact of a given client.
updateCorrespondenceAddress PUT /customers/{customerId}/correspondenceAddress Updates correspondence address of a given client.
updateCustomField PUT /customers/{customerId}/customFields/{customFieldKey} Updates given custom field of a given client.
updateCustomFields PUT /customers/persons/{personId}/customFields Updates custom fields of a given person.
updateCustomFields_0 PUT /customers/{customerId}/customFields Updates custom fields of a given client.
updateIndustries PUT /customers/{customerId}/industries Updates industries of a given client.
update_0 PUT /customers/{customerId} Updates an existing client.

create

CustomerPersonDTO create(body)

Creates a new person.

Creates a new person. Required fields are presented in the example. Other fields (from PUT) may also be specified here.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
CustomerPersonDTO body = new CustomerPersonDTO(); // CustomerPersonDTO | Brand new person.
try {
    CustomerPersonDTO result = apiInstance.create(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#create");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CustomerPersonDTO Brand new person.

Return type

CustomerPersonDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

create1

CustomerDTO create1(body)

Creates a new client.

Creates a new client. Required fields are presented in the example. Other fields (from PUT) may also be specified here.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
CustomerDTO body = new CustomerDTO(); // CustomerDTO | Created user object
try {
    CustomerDTO result = apiInstance.create1(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#create1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CustomerDTO Created user object

Return type

CustomerDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

delete1

delete1(personId)

Removes a person.

Removes a person.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long personId = 789L; // Long | person's internal identifier
try {
    apiInstance.delete1(personId);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#delete1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
personId Long person's internal identifier

Return type

null (empty response body)

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

delete1_0

delete1_0(priceListId)

Removes a customer price list.

Removes a customer price list.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long priceListId = 789L; // Long | customer price list's internal identifier
try {
    apiInstance.delete1_0(priceListId);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#delete1_0");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
priceListId Long customer price list's internal identifier

Return type

null (empty response body)

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

delete2

delete2(customerId)

Removes a client.

Removes a client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long customerId = 789L; // Long | client's internal identifier
try {
    apiInstance.delete2(customerId);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#delete2");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerId Long client's internal identifier

Return type

null (empty response body)

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

generateSingleUseSignInToken

AccessTokenDTO generateSingleUseSignInToken(body)

Generates a single use sign-in token.

Generates a single use sign-in token for the customer person found for given login or e-mail. Returns 'url' and 'token' which allows to sign-in to customer portal as this person. Token is valid for two minutes and can be used only once. To sign-in to customer portal you should post 'token' provided as the 'accessToken' form param to the 'url' using POST method.Detailed description is available in the Customer API <a href=&quot;/api-doc/customer-api/authentication&quot;>authentication</a>.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
AccessTokenRequestDTO body = new AccessTokenRequestDTO(); // AccessTokenRequestDTO | Generated sign-in token.
try {
    AccessTokenDTO result = apiInstance.generateSingleUseSignInToken(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#generateSingleUseSignInToken");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body AccessTokenRequestDTO Generated sign-in token.

Return type

AccessTokenDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getAddress

AddressDTO getAddress(customerId)

Returns address of a given client.

Returns address of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long customerId = 789L; // Long | client's internal identifier
try {
    AddressDTO result = apiInstance.getAddress(customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getAddress");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerId Long client's internal identifier

Return type

AddressDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getAllIds1

List<Integer> getAllIds1(updatedSince)

Returns persons' internal identifiers.

Returns persons' internal identifiers.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long updatedSince = 789L; // Long | only persons modified since this timestamp
try {
    List<Integer> result = apiInstance.getAllIds1(updatedSince);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getAllIds1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
updatedSince Long only persons modified since this timestamp [optional]

Return type

List<Integer>

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getAllIds2

List<Integer> getAllIds2(updatedSince, nameEquals)

Returns clients' internal identifiers.

Returns clients' internal identifiers.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long updatedSince = 789L; // Long | only clients modified since this timestamp
String nameEquals = "nameEquals_example"; // String | exact name of client
try {
    List<Integer> result = apiInstance.getAllIds2(updatedSince, nameEquals);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getAllIds2");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
updatedSince Long only clients modified since this timestamp [optional]
nameEquals String exact name of client [optional]

Return type

List<Integer>

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getAllNamesWithIds

List<EntityWithNameDTO> getAllNamesWithIds(updatedSince)

Returns list of simple clients representations

Returns list of simple clients representations

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long updatedSince = 789L; // Long | only clients modified since this timestamp
try {
    List<EntityWithNameDTO> result = apiInstance.getAllNamesWithIds(updatedSince);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getAllNamesWithIds");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
updatedSince Long only clients modified since this timestamp [optional]

Return type

List<EntityWithNameDTO>

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getById1

CustomerPersonDTO getById1(personId)

Returns person details.

Returns person details.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long personId = 789L; // Long | person's internal identifier
try {
    CustomerPersonDTO result = apiInstance.getById1(personId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getById1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
personId Long person's internal identifier

Return type

CustomerPersonDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getById2

CustomerDTO getById2(customerId, embed)

Returns client details.

Returns client details.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long customerId = 789L; // Long | client's internal identifier
String embed = "embed_example"; // String | list of adittional fields which should be embedded in the response (ie. persons)
try {
    CustomerDTO result = apiInstance.getById2(customerId, embed);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getById2");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerId Long client's internal identifier
embed String list of adittional fields which should be embedded in the response (ie. persons) [optional]

Return type

CustomerDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getCategories

CategoriesDTO getCategories(customerId)

Returns categories of a given client.

Returns categories of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long customerId = 789L; // Long | client's internal identifier
try {
    CategoriesDTO result = apiInstance.getCategories(customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getCategories");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerId Long client's internal identifier

Return type

CategoriesDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getContact

PersonContactDTO getContact(personId)

Returns contact of a given person.

Returns contact of a given person.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long personId = 789L; // Long | person's internal identifier
try {
    PersonContactDTO result = apiInstance.getContact(personId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getContact");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
personId Long person's internal identifier

Return type

PersonContactDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getContact1

ContactDTO getContact1(customerId)

Returns contact of a given client.

Returns contact of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long customerId = 789L; // Long | client's internal identifier
try {
    ContactDTO result = apiInstance.getContact1(customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getContact1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerId Long client's internal identifier

Return type

ContactDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getCorrespondenceAddress

AddressDTO getCorrespondenceAddress(customerId)

Returns correspondence address of a given client.

Returns correspondence address of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long customerId = 789L; // Long | client's internal identifier
try {
    AddressDTO result = apiInstance.getCorrespondenceAddress(customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getCorrespondenceAddress");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerId Long client's internal identifier

Return type

AddressDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getCustomField

CustomFieldDTO getCustomField(customerId, customFieldKey)

Returns custom field of a given client.

Returns custom field of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long customerId = 789L; // Long | client's internal identifier
String customFieldKey = "customFieldKey_example"; // String | custom field's key
try {
    CustomFieldDTO result = apiInstance.getCustomField(customerId, customFieldKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getCustomField");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerId Long client's internal identifier
customFieldKey String custom field's key

Return type

CustomFieldDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getCustomFields

CustomFieldsDTO getCustomFields(personId)

Returns custom fields of a given person.

Returns custom fields of a given person.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long personId = 789L; // Long | person's internal identifier
try {
    CustomFieldsDTO result = apiInstance.getCustomFields(personId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getCustomFields");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
personId Long person's internal identifier

Return type

CustomFieldsDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getCustomFields1

CustomFieldsDTO getCustomFields1(customerId)

Returns custom fields of a given client.

Returns custom fields of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long customerId = 789L; // Long | client's internal identifier
try {
    CustomFieldsDTO result = apiInstance.getCustomFields1(customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getCustomFields1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerId Long client's internal identifier

Return type

CustomFieldsDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

getIndustries

IndustriesDTO getIndustries(customerId)

Returns industries of a given client.

Returns industries of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
Long customerId = 789L; // Long | client's internal identifier
try {
    IndustriesDTO result = apiInstance.getIndustries(customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#getIndustries");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
customerId Long client's internal identifier

Return type

IndustriesDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

update

CustomerPersonDTO update(body, personId)

Updates an existing person.

Only specified fields will be changed. One may not specify embeddable fields here - use separate API calls for updating them.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
CustomerPersonDTO body = new CustomerPersonDTO(); // CustomerPersonDTO | Updated existing person.
Long personId = 789L; // Long | person's internal identifier
try {
    CustomerPersonDTO result = apiInstance.update(body, personId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#update");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CustomerPersonDTO Updated existing person.
personId Long person's internal identifier

Return type

CustomerPersonDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateAddress

AddressDTO updateAddress(body, customerId)

Updates address of a given client.

Updates address of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
AddressDTO body = new AddressDTO(); // AddressDTO | Updated address of a given client.
Long customerId = 789L; // Long | client's internal identifier
try {
    AddressDTO result = apiInstance.updateAddress(body, customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#updateAddress");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body AddressDTO Updated address of a given client.
customerId Long client's internal identifier

Return type

AddressDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateCategories

CategoriesDTO updateCategories(body, customerId)

Updates categories of a given client.

Updates categories of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
List<Long> body = Arrays.asList({
  "description" : "ref",
  "value" : "/home-api/assets/examples/customers/updateCategories.json#requestBody"
}L); // List<Long> | Updated categories of a given client.
Long customerId = 789L; // Long | client's internal identifier
try {
    CategoriesDTO result = apiInstance.updateCategories(body, customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#updateCategories");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body List<Long> Updated categories of a given client.
customerId Long client's internal identifier

Return type

CategoriesDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateContact

PersonContactDTO updateContact(body, personId)

Updates contact of a given person.

Updates contact of a given person. Sets that this person uses specific address and contact (not the one from customer).

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
PersonContactDTO body = new PersonContactDTO(); // PersonContactDTO | Updated contact of a given person.
Long personId = 789L; // Long | person's internal identifier
try {
    PersonContactDTO result = apiInstance.updateContact(body, personId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#updateContact");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body PersonContactDTO Updated contact of a given person.
personId Long person's internal identifier

Return type

PersonContactDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateContact_0

ContactDTO updateContact_0(body, customerId)

Updates contact of a given client.

Updates contact of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
ContactDTO body = new ContactDTO(); // ContactDTO | Updated contact of a given client.
Long customerId = 789L; // Long | client's internal identifier
try {
    ContactDTO result = apiInstance.updateContact_0(body, customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#updateContact_0");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ContactDTO Updated contact of a given client.
customerId Long client's internal identifier

Return type

ContactDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateCorrespondenceAddress

AddressDTO updateCorrespondenceAddress(body, customerId)

Updates correspondence address of a given client.

Updates correspondence address of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
AddressDTO body = new AddressDTO(); // AddressDTO | Updated address of a given client.
Long customerId = 789L; // Long | client's internal identifier
try {
    AddressDTO result = apiInstance.updateCorrespondenceAddress(body, customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#updateCorrespondenceAddress");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body AddressDTO Updated address of a given client.
customerId Long client's internal identifier

Return type

AddressDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateCustomField

CustomFieldDTO updateCustomField(body, customerId, customFieldKey)

Updates given custom field of a given client.

Updates given custom field of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
CustomFieldDTO body = new CustomFieldDTO(); // CustomFieldDTO | Updated custom field of a given client.
Long customerId = 789L; // Long | client's internal identifier
String customFieldKey = "customFieldKey_example"; // String | custom field's key
try {
    CustomFieldDTO result = apiInstance.updateCustomField(body, customerId, customFieldKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#updateCustomField");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CustomFieldDTO Updated custom field of a given client.
customerId Long client's internal identifier
customFieldKey String custom field's key

Return type

CustomFieldDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateCustomFields

CustomFieldsDTO updateCustomFields(body, personId)

Updates custom fields of a given person.

Updates custom fields of a given person.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
List<CustomFieldDTO> body = Arrays.asList(new CustomFieldDTO()); // List<CustomFieldDTO> | Updated custom fields of a given person.
Long personId = 789L; // Long | person's internal identifier
try {
    CustomFieldsDTO result = apiInstance.updateCustomFields(body, personId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#updateCustomFields");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body List<CustomFieldDTO> Updated custom fields of a given person.
personId Long person's internal identifier

Return type

CustomFieldsDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateCustomFields_0

CustomFieldsDTO updateCustomFields_0(body, customerId)

Updates custom fields of a given client.

Updates custom fields of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
List<CustomFieldDTO> body = Arrays.asList(new CustomFieldDTO()); // List<CustomFieldDTO> | Updated custom fields of a given client.
Long customerId = 789L; // Long | client's internal identifier
try {
    CustomFieldsDTO result = apiInstance.updateCustomFields_0(body, customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#updateCustomFields_0");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body List<CustomFieldDTO> Updated custom fields of a given client.
customerId Long client's internal identifier

Return type

CustomFieldsDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

updateIndustries

IndustriesDTO updateIndustries(body, customerId)

Updates industries of a given client.

Updates industries of a given client.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
List<Long> body = Arrays.asList({
  "description" : "ref",
  "value" : "/home-api/assets/examples/customers/updateIndustries.json#requestBody"
}L); // List<Long> | Updated industries of a given client.
Long customerId = 789L; // Long | client's internal identifier
try {
    IndustriesDTO result = apiInstance.updateIndustries(body, customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#updateIndustries");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body List<Long> Updated industries of a given client.
customerId Long client's internal identifier

Return type

IndustriesDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8

update_0

CustomerDTO update_0(body, customerId)

Updates an existing client.

Only specified fields will be changed (id is required). One may not specify embeddable fields here - use separate API calls for updating them.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ClientsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: X-AUTH-ACCESS-TOKEN
ApiKeyAuth X-AUTH-ACCESS-TOKEN = (ApiKeyAuth) defaultClient.getAuthentication("X-AUTH-ACCESS-TOKEN");
X-AUTH-ACCESS-TOKEN.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-AUTH-ACCESS-TOKEN.setApiKeyPrefix("Token");

ClientsApi apiInstance = new ClientsApi();
CustomerDTO body = new CustomerDTO(); // CustomerDTO | Updated client
Long customerId = 789L; // Long | client's internal identifier
try {
    CustomerDTO result = apiInstance.update_0(body, customerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClientsApi#update_0");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CustomerDTO Updated client
customerId Long client's internal identifier

Return type

CustomerDTO

Authorization

X-AUTH-ACCESS-TOKEN

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.xtrf-v1+json;charset=UTF-8