Skip to content

Latest commit

 

History

History
565 lines (443 loc) · 18.3 KB

DealsApi.md

File metadata and controls

565 lines (443 loc) · 18.3 KB

sib_api_v3_sdk.Api.DealsApi

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

Method HTTP request Description
CrmAttributesDealsGet GET /crm/attributes/deals Get deal attributes
CrmDealsGet GET /crm/deals Get all deals
CrmDealsIdDelete DELETE /crm/deals/{id} Delete a deal
CrmDealsIdGet GET /crm/deals/{id} Get a deal
CrmDealsIdPatch PATCH /crm/deals/{id} Update a deal
CrmDealsLinkUnlinkIdPatch PATCH /crm/deals/link-unlink/{id} Link and Unlink a deal with contacts and companies
CrmDealsPost POST /crm/deals Create a deal
CrmPipelineDetailsGet GET /crm/pipeline/details Get pipeline stages

CrmAttributesDealsGet

DealAttributes CrmAttributesDealsGet ()

Get deal attributes

Example

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

namespace Example
{
    public class CrmAttributesDealsGetExample
    {
        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 DealsApi();

            try
            {
                // Get deal attributes
                DealAttributes result = apiInstance.CrmAttributesDealsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealsApi.CrmAttributesDealsGet: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

DealAttributes

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]

CrmDealsGet

DealsList CrmDealsGet (string filtersAttributes = null, string filtersLinkedCompaniesIds = null, string filtersLinkedContactsIds = null, long? offset = null, long? limit = null, string sort = null, string sortBy = null)

Get all deals

Example

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

namespace Example
{
    public class CrmDealsGetExample
    {
        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 DealsApi();
            var filtersAttributes = filtersAttributes_example;  // string | Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" (optional) 
            var filtersLinkedCompaniesIds = filtersLinkedCompaniesIds_example;  // string | Filter by linked companies ids (optional) 
            var filtersLinkedContactsIds = filtersLinkedContactsIds_example;  // string | Filter by linked companies ids (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 deals
                DealsList result = apiInstance.CrmDealsGet(filtersAttributes, filtersLinkedCompaniesIds, filtersLinkedContactsIds, offset, limit, sort, sortBy);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealsApi.CrmDealsGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
filtersAttributes string Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`." [optional]
filtersLinkedCompaniesIds string Filter by linked companies ids [optional]
filtersLinkedContactsIds string Filter by linked companies ids [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

DealsList

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]

CrmDealsIdDelete

void CrmDealsIdDelete (string id)

Delete a deal

Example

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

namespace Example
{
    public class CrmDealsIdDeleteExample
    {
        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 DealsApi();
            var id = id_example;  // string | 

            try
            {
                // Delete a deal
                apiInstance.CrmDealsIdDelete(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealsApi.CrmDealsIdDelete: " + 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]

CrmDealsIdGet

Deal CrmDealsIdGet (string id)

Get a deal

Example

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

namespace Example
{
    public class CrmDealsIdGetExample
    {
        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 DealsApi();
            var id = id_example;  // string | 

            try
            {
                // Get a deal
                Deal result = apiInstance.CrmDealsIdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealsApi.CrmDealsIdGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string

Return type

Deal

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]

CrmDealsIdPatch

void CrmDealsIdPatch (string id, Body4 body)

Update a deal

Example

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

namespace Example
{
    public class CrmDealsIdPatchExample
    {
        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 DealsApi();
            var id = id_example;  // string | 
            var body = new Body4(); // Body4 | Updated deal details.

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

Parameters

Name Type Description Notes
id string
body Body4 Updated deal 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]

CrmDealsLinkUnlinkIdPatch

void CrmDealsLinkUnlinkIdPatch (string id, Body5 body)

Link and Unlink a deal with contacts and companies

Example

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

namespace Example
{
    public class CrmDealsLinkUnlinkIdPatchExample
    {
        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 DealsApi();
            var id = id_example;  // string | 
            var body = new Body5(); // Body5 | Linked / Unlinked contacts and companies ids.

            try
            {
                // Link and Unlink a deal with contacts and companies
                apiInstance.CrmDealsLinkUnlinkIdPatch(id, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealsApi.CrmDealsLinkUnlinkIdPatch: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string
body Body5 Linked / Unlinked contacts and companies ids.

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]

CrmDealsPost

InlineResponse201 CrmDealsPost (Body3 body)

Create a deal

Example

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

namespace Example
{
    public class CrmDealsPostExample
    {
        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 DealsApi();
            var body = new Body3(); // Body3 | Deal create data.

            try
            {
                // Create a deal
                InlineResponse201 result = apiInstance.CrmDealsPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealsApi.CrmDealsPost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body Body3 Deal create data.

Return type

InlineResponse201

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]

CrmPipelineDetailsGet

Pipeline CrmPipelineDetailsGet ()

Get pipeline stages

Example

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

namespace Example
{
    public class CrmPipelineDetailsGetExample
    {
        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 DealsApi();

            try
            {
                // Get pipeline stages
                Pipeline result = apiInstance.CrmPipelineDetailsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DealsApi.CrmPipelineDetailsGet: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

Pipeline

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]