Skip to content

Latest commit

 

History

History
442 lines (349 loc) · 14.9 KB

TasksApi.md

File metadata and controls

442 lines (349 loc) · 14.9 KB

brevo_csharp.Api.TasksApi

All URIs are relative to https://api.brevo.com/v3

Method HTTP request Description
CrmTasksGet GET /crm/tasks Get all tasks
CrmTasksIdDelete DELETE /crm/tasks/{id} Delete a task
CrmTasksIdGet GET /crm/tasks/{id} Get a task
CrmTasksIdPatch PATCH /crm/tasks/{id} Update a task
CrmTasksPost POST /crm/tasks Create a task
CrmTasktypesGet GET /crm/tasktypes Get all task types

CrmTasksGet

TaskList CrmTasksGet (string filterType = null, string filterStatus = null, string filterDate = null, string filterAssignTo = null, string filterContacts = null, string filterDeals = null, string filterCompanies = null, int? dateFrom = null, int? dateTo = null, long? offset = null, long? limit = null, string sort = null, string sortBy = null)

Get all tasks

Example

using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;

namespace Example
{
    public class CrmTasksGetExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new TasksApi();
            var filterType = filterType_example;  // string | Filter by task type (ID) (optional) 
            var filterStatus = filterStatus_example;  // string | Filter by task status (optional) 
            var filterDate = filterDate_example;  // string | Filter by date (optional) 
            var filterAssignTo = filterAssignTo_example;  // string | Filter by assignTo id (optional) 
            var filterContacts = filterContacts_example;  // string | Filter by contact ids (optional) 
            var filterDeals = filterDeals_example;  // string | Filter by deals ids (optional) 
            var filterCompanies = filterCompanies_example;  // string | Filter by companies ids (optional) 
            var dateFrom = 56;  // int? | dateFrom to date range filter type (timestamp in milliseconds) (optional) 
            var dateTo = 56;  // int? | dateTo to date range filter type (timestamp in milliseconds) (optional) 
            var offset = 789;  // long? | Index of the first document of the page (optional) 
            var limit = 789;  // long? | Number of documents per page (optional)  (default to 50)
            var sort = sort_example;  // string | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional) 
            var sortBy = sortBy_example;  // string | The field used to sort field names. (optional) 

            try
            {
                // Get all tasks
                TaskList result = apiInstance.CrmTasksGet(filterType, filterStatus, filterDate, filterAssignTo, filterContacts, filterDeals, filterCompanies, dateFrom, dateTo, offset, limit, sort, sortBy);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TasksApi.CrmTasksGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
filterType string Filter by task type (ID) [optional]
filterStatus string Filter by task status [optional]
filterDate string Filter by date [optional]
filterAssignTo string Filter by assignTo id [optional]
filterContacts string Filter by contact ids [optional]
filterDeals string Filter by deals ids [optional]
filterCompanies string Filter by companies ids [optional]
dateFrom int? dateFrom to date range filter type (timestamp in milliseconds) [optional]
dateTo int? dateTo to date range filter type (timestamp in milliseconds) [optional]
offset long? Index of the first document of the page [optional]
limit long? 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]
sortBy string The field used to sort field names. [optional]

Return type

TaskList

Authorization

api-key, partner-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CrmTasksIdDelete

void CrmTasksIdDelete (string id)

Delete a task

Example

using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;

namespace Example
{
    public class CrmTasksIdDeleteExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new TasksApi();
            var id = id_example;  // string | 

            try
            {
                // Delete a task
                apiInstance.CrmTasksIdDelete(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TasksApi.CrmTasksIdDelete: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CrmTasksIdGet

Task CrmTasksIdGet (string id)

Get a task

Example

using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;

namespace Example
{
    public class CrmTasksIdGetExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new TasksApi();
            var id = id_example;  // string | 

            try
            {
                // Get a task
                Task result = apiInstance.CrmTasksIdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TasksApi.CrmTasksIdGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string

Return type

Task

Authorization

api-key, partner-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CrmTasksIdPatch

void CrmTasksIdPatch (string id, Body10 body)

Update a task

Example

using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;

namespace Example
{
    public class CrmTasksIdPatchExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new TasksApi();
            var id = id_example;  // string | 
            var body = new Body10(); // Body10 | Updated task details.

            try
            {
                // Update a task
                apiInstance.CrmTasksIdPatch(id, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TasksApi.CrmTasksIdPatch: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string
body Body10 Updated task details.

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CrmTasksPost

InlineResponse2012 CrmTasksPost (Body9 body)

Create a task

Example

using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;

namespace Example
{
    public class CrmTasksPostExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new TasksApi();
            var body = new Body9(); // Body9 | Task name.

            try
            {
                // Create a task
                InlineResponse2012 result = apiInstance.CrmTasksPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TasksApi.CrmTasksPost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body Body9 Task name.

Return type

InlineResponse2012

Authorization

api-key, partner-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CrmTasktypesGet

TaskTypes CrmTasktypesGet ()

Get all task types

Example

using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;

namespace Example
{
    public class CrmTasktypesGetExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new TasksApi();

            try
            {
                // Get all task types
                TaskTypes result = apiInstance.CrmTasktypesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TasksApi.CrmTasktypesGet: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

TaskTypes

Authorization

api-key, partner-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]