---
title: OrganizationApi
---

## PureCloud::OrganizationApi

All URIs are relative to *https://api.mypurecloud.com*

Method | Description
------------- | ------------- | -------------
[**get_fieldconfig**](OrganizationApi.html#get_fieldconfig) | Fetch field config for an entity type
[**get_me**](OrganizationApi.html#get_me) | Get organization.
[**patch_features**](OrganizationApi.html#patch_features) | Update organization
{: class="table table-striped"}

<a name="get_fieldconfig"></a>

## -[**FieldConfig**](FieldConfig.html) get_fieldconfig(type)

Fetch field config for an entity type



Wraps GET /api/v2/fieldconfig 


### Example
~~~ruby
# load the gem
require 'purecloud'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"

@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment

PureCloud.configure do |config|
  config.access_token = @authToken
end

api_instance = PureCloud::OrganizationApi.new

type = "type_example" # String | Field type


begin
  #Fetch field config for an entity type
  result = api_instance.get_fieldconfig(type)
  p result
rescue PureCloud::ApiError => e
  puts "Exception when calling OrganizationApi->get_fieldconfig: #{e}"
end
~~~

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **type** | **String**| Field type | 
{: class="table table-striped"}


### Return type

[**FieldConfig**](FieldConfig.html)

### HTTP request headers

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



<a name="get_me"></a>

## -[**Organization**](Organization.html) get_me

Get organization.



Wraps GET /api/v2/organizations/me 


### Example
~~~ruby
# load the gem
require 'purecloud'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"

@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment

PureCloud.configure do |config|
  config.access_token = @authToken
end

api_instance = PureCloud::OrganizationApi.new

begin
  #Get organization.
  result = api_instance.get_me
  p result
rescue PureCloud::ApiError => e
  puts "Exception when calling OrganizationApi->get_me: #{e}"
end
~~~

### Parameters
This endpoint does not need any parameter.
{: class="table table-striped"}


### Return type

[**Organization**](Organization.html)

### HTTP request headers

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



<a name="patch_features"></a>

## -Hash&lt;String, String&gt;** patch_features(opts)

Update organization



Wraps PATCH /api/v2/organizations/features 


### Example
~~~ruby
# load the gem
require 'purecloud'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"

@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment

PureCloud.configure do |config|
  config.access_token = @authToken
end

api_instance = PureCloud::OrganizationApi.new

opts = { 
  body: PureCloud::EntryFeatureBoolean.new # EntryFeatureBoolean | Feature to update.
}

begin
  #Update organization
  result = api_instance.patch_features(opts)
  p result
rescue PureCloud::ApiError => e
  puts "Exception when calling OrganizationApi->patch_features: #{e}"
end
~~~

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**EntryFeatureBoolean**](EntryFeatureBoolean.html)| Feature to update. | [optional] 
{: class="table table-striped"}


### Return type

**Hash&lt;String, String&gt;**

### HTTP request headers

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