# HivelocityApi.ProfileApi

All URIs are relative to *https://localhost/api/v2*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getBasicProfileResource**](ProfileApi.md#getBasicProfileResource) | **GET** /profile/basic | Get Basic Profile of current user or a contact with id
[**getProfileResource**](ProfileApi.md#getProfileResource) | **GET** /profile/ | Get Profile of current user or a contact with id
[**putProfileResource**](ProfileApi.md#putProfileResource) | **PUT** /profile/ | Update Profile of current user or a contact with id


<a name="getBasicProfileResource"></a>
# **getBasicProfileResource**
> BasicProfile getBasicProfileResource(opts)

Get Basic Profile of current user or a contact with id

The id is optional and if it is necessary must be sent as URL param.

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new HivelocityApi.ProfileApi();

var opts = { 
  'contactId': "contactId_example", // String | \"ID of Contact to manage Basic Profile\"
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getBasicProfileResource(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **contactId** | **String**| \"ID of Contact to manage Basic Profile\" | [optional] 
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**BasicProfile**](BasicProfile.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getProfileResource"></a>
# **getProfileResource**
> Profile getProfileResource(opts)

Get Profile of current user or a contact with id

The id is optional and if it is necessary must be sent as URL param.

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new HivelocityApi.ProfileApi();

var opts = { 
  'contactId': "contactId_example", // String | \"ID of Contact to manage Profile\"
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getProfileResource(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **contactId** | **String**| \"ID of Contact to manage Profile\" | [optional] 
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**Profile**](Profile.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="putProfileResource"></a>
# **putProfileResource**
> Profile putProfileResource(payload, opts)

Update Profile of current user or a contact with id

The id is optional and if it is necessary must be sent as URL param.

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new HivelocityApi.ProfileApi();

var payload = new HivelocityApi.ProfileUpdate(); // ProfileUpdate | 

var opts = { 
  'contactId': "contactId_example", // String | \"ID of Contact to manage Profile\"
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.putProfileResource(payload, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **payload** | [**ProfileUpdate**](ProfileUpdate.md)|  | 
 **contactId** | **String**| \"ID of Contact to manage Profile\" | [optional] 
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**Profile**](Profile.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

