github.com/grokify/go-ringcentral-client@v0.3.31/engagedigital/v1/client/docs/CustomFieldsApi.md (about) 1 # \CustomFieldsApi 2 3 All URIs are relative to *https://DOMAIN.api.engagement.dimelo.com/1.0* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateCustomField**](CustomFieldsApi.md#CreateCustomField) | **Post** /custom_fields | Creating a custom field 8 [**DeleteCustomField**](CustomFieldsApi.md#DeleteCustomField) | **Delete** /custom_fields/{customFieldId} | Deleting a custom field 9 [**GetAllCustomFields**](CustomFieldsApi.md#GetAllCustomFields) | **Get** /custom_fields | Getting all custom fields 10 [**GetCustomField**](CustomFieldsApi.md#GetCustomField) | **Get** /custom_fields/{customFieldId} | Getting a custom field from its id 11 [**UpdateCustomField**](CustomFieldsApi.md#UpdateCustomField) | **Put** /custom_fields/{customFieldId} | Updating a custom field 12 13 14 15 ## CreateCustomField 16 17 > CustomField CreateCustomField(ctx, associatedTypeName, label, optional) 18 Creating a custom field 19 20 This method creates a custom field. In case of success it renders the custom field, otherwise, it renders an error (422 HTTP code). Authorization: only users that can create custom fields. 21 22 ### Required Parameters 23 24 25 Name | Type | Description | Notes 26 ------------- | ------------- | ------------- | ------------- 27 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 28 **associatedTypeName** | **string**| The associated type of custom field. It can be IdentityGroup or Intervention. | 29 **label** | **string**| The label of the custom field. | 30 **optional** | ***CreateCustomFieldOpts** | optional parameters | nil if no parameters 31 32 ### Optional Parameters 33 34 Optional parameters are passed through a pointer to a CreateCustomFieldOpts struct 35 36 37 Name | Type | Description | Notes 38 ------------- | ------------- | ------------- | ------------- 39 40 41 **key** | **optional.String**| The key of the custom field (example: customer_id). This is used to determine how it is stored on identity groups. | 42 **type_** | **optional.String**| The type of the custom field. It can be string, boolean, text, integer, float, single_choice, | 43 **choices** | [**optional.Interface of []string**](string.md)| A list of choices to be for single_choice, or multiple_choice types. This must be given | 44 **multiple** | **optional.Bool**| true or false, this as no effect on single_choice, multiple_choice or boolean types | 45 **position** | **optional.Int32**| an integer that indicates custom field’s position between others (default: -1). | [default to -1] 46 47 ### Return type 48 49 [**CustomField**](CustomField.md) 50 51 ### Authorization 52 53 No authorization required 54 55 ### HTTP request headers 56 57 - **Content-Type**: Not defined 58 - **Accept**: application/json 59 60 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 61 [[Back to Model list]](../README.md#documentation-for-models) 62 [[Back to README]](../README.md) 63 64 65 ## DeleteCustomField 66 67 > CustomField DeleteCustomField(ctx, customFieldId) 68 Deleting a custom field 69 70 This method destroys an existing custom field. It renders custom field itself. It renders a 404 if id is invalid. Authorization: only users that are able to destroy custom fields.. 71 72 ### Required Parameters 73 74 75 Name | Type | Description | Notes 76 ------------- | ------------- | ------------- | ------------- 77 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 78 **customFieldId** | **string**| | 79 80 ### Return type 81 82 [**CustomField**](CustomField.md) 83 84 ### Authorization 85 86 No authorization required 87 88 ### HTTP request headers 89 90 - **Content-Type**: Not defined 91 - **Accept**: application/json 92 93 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 94 [[Back to Model list]](../README.md#documentation-for-models) 95 [[Back to README]](../README.md) 96 97 98 ## GetAllCustomFields 99 100 > GetAllCustomFieldsResponse GetAllCustomFields(ctx, optional) 101 Getting all custom fields 102 103 This method renders custom fields ordered by position (ascending). Authorization: only users that can see custom fields in administration section. 104 105 ### Required Parameters 106 107 108 Name | Type | Description | Notes 109 ------------- | ------------- | ------------- | ------------- 110 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 111 **optional** | ***GetAllCustomFieldsOpts** | optional parameters | nil if no parameters 112 113 ### Optional Parameters 114 115 Optional parameters are passed through a pointer to a GetAllCustomFieldsOpts struct 116 117 118 Name | Type | Description | Notes 119 ------------- | ------------- | ------------- | ------------- 120 **offset** | **optional.Int32**| The record index to start. Default value is 0. | 121 **limit** | **optional.Int32**| The max number of records to return. Default value is 30, max value is 150. | 122 123 ### Return type 124 125 [**GetAllCustomFieldsResponse**](GetAllCustomFieldsResponse.md) 126 127 ### Authorization 128 129 No authorization required 130 131 ### HTTP request headers 132 133 - **Content-Type**: Not defined 134 - **Accept**: application/json 135 136 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 137 [[Back to Model list]](../README.md#documentation-for-models) 138 [[Back to README]](../README.md) 139 140 141 ## GetCustomField 142 143 > CustomField GetCustomField(ctx, customFieldId) 144 Getting a custom field from its id 145 146 This method renders a custom field from given id. Authorization: only users that can see custom fields in administration section. 147 148 ### Required Parameters 149 150 151 Name | Type | Description | Notes 152 ------------- | ------------- | ------------- | ------------- 153 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 154 **customFieldId** | **string**| | 155 156 ### Return type 157 158 [**CustomField**](CustomField.md) 159 160 ### Authorization 161 162 No authorization required 163 164 ### HTTP request headers 165 166 - **Content-Type**: Not defined 167 - **Accept**: application/json 168 169 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 170 [[Back to Model list]](../README.md#documentation-for-models) 171 [[Back to README]](../README.md) 172 173 174 ## UpdateCustomField 175 176 > CustomField UpdateCustomField(ctx, customFieldId, optional) 177 Updating a custom field 178 179 This method updates an existing custom field from given attributes and renders it in case of success. Authorization: only users that are able to update custom fields. 180 181 ### Required Parameters 182 183 184 Name | Type | Description | Notes 185 ------------- | ------------- | ------------- | ------------- 186 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 187 **customFieldId** | **string**| | 188 **optional** | ***UpdateCustomFieldOpts** | optional parameters | nil if no parameters 189 190 ### Optional Parameters 191 192 Optional parameters are passed through a pointer to a UpdateCustomFieldOpts struct 193 194 195 Name | Type | Description | Notes 196 ------------- | ------------- | ------------- | ------------- 197 198 **label** | **optional.String**| Custom field’s label. | 199 **choices** | [**optional.Interface of []string**](string.md)| | 200 **position** | **optional.Int32**| Custom field’s position. | 201 202 ### Return type 203 204 [**CustomField**](CustomField.md) 205 206 ### Authorization 207 208 No authorization required 209 210 ### HTTP request headers 211 212 - **Content-Type**: Not defined 213 - **Accept**: application/json 214 215 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 216 [[Back to Model list]](../README.md#documentation-for-models) 217 [[Back to README]](../README.md) 218