# SibApiV3Sdk::NotesApi All URIs are relative to *https://api.sendinblue.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- [**crm_notes_get**](NotesApi.md#crm_notes_get) | **GET** /crm/notes | Get all notes [**crm_notes_id_delete**](NotesApi.md#crm_notes_id_delete) | **DELETE** /crm/notes/{id} | Delete a note [**crm_notes_id_get**](NotesApi.md#crm_notes_id_get) | **GET** /crm/notes/{id} | Get a note [**crm_notes_id_patch**](NotesApi.md#crm_notes_id_patch) | **PATCH** /crm/notes/{id} | Update a note [**crm_notes_post**](NotesApi.md#crm_notes_post) | **POST** /crm/notes | Create a note # **crm_notes_get** > NoteList crm_notes_get(opts) Get all notes ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::NotesApi.new opts = { entity: 'entity_example', # String | Filter by note entity type entity_ids: 'entity_ids_example', # String | Filter by note entity IDs date_from: 56, # Integer | dateFrom to date range filter type (timestamp in milliseconds) date_to: 56, # Integer | dateTo to date range filter type (timestamp in milliseconds) offset: 789, # Integer | Index of the first document of the page limit: 50, # Integer | Number of documents per page sort: 'sort_example' # String | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed } begin #Get all notes result = api_instance.crm_notes_get(opts) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling NotesApi->crm_notes_get: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **entity** | **String**| Filter by note entity type | [optional] **entity_ids** | **String**| Filter by note entity IDs | [optional] **date_from** | **Integer**| dateFrom to date range filter type (timestamp in milliseconds) | [optional] **date_to** | **Integer**| dateTo to date range filter type (timestamp in milliseconds) | [optional] **offset** | **Integer**| Index of the first document of the page | [optional] **limit** | **Integer**| Number of documents per page | [optional] [default to 50] **sort** | **String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | [optional] ### Return type [**NoteList**](NoteList.md) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **crm_notes_id_delete** > crm_notes_id_delete(id) Delete a note ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::NotesApi.new id = 'id_example' # String | Note ID to delete begin #Delete a note api_instance.crm_notes_id_delete(id) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling NotesApi->crm_notes_id_delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| Note ID to delete | ### Return type nil (empty response body) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **crm_notes_id_get** > Note crm_notes_id_get(id) Get a note ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::NotesApi.new id = 'id_example' # String | Note ID to get begin #Get a note result = api_instance.crm_notes_id_get(id) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling NotesApi->crm_notes_id_get: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| Note ID to get | ### Return type [**Note**](Note.md) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **crm_notes_id_patch** > crm_notes_id_patch(id, body) Update a note ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::NotesApi.new id = 'id_example' # String | Note ID to update body = SibApiV3Sdk::NoteData.new # NoteData | Note data to update a note begin #Update a note api_instance.crm_notes_id_patch(id, body) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling NotesApi->crm_notes_id_patch: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| Note ID to update | **body** | [**NoteData**](NoteData.md)| Note data to update a note | ### Return type nil (empty response body) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **crm_notes_post** > NoteId crm_notes_post(body) Create a note ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::NotesApi.new body = SibApiV3Sdk::NoteData.new # NoteData | Note data to create a note. begin #Create a note result = api_instance.crm_notes_post(body) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling NotesApi->crm_notes_post: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**NoteData**](NoteData.md)| Note data to create a note. | ### Return type [**NoteId**](NoteId.md) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json