Skip to content

Latest commit

 

History

History
493 lines (371 loc) · 15.5 KB

DealsApi.md

File metadata and controls

493 lines (371 loc) · 15.5 KB

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

// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
try {
    DealAttributes result = apiInstance.crmAttributesDealsGet();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DealsApi#crmAttributesDealsGet");
    e.printStackTrace();
}

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

crmDealsGet

DealsList crmDealsGet(filtersAttributes, filtersLinkedCompaniesIds, filtersLinkedContactsIds, offset, limit, sort, sortBy)

Get all deals

Example

// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String filtersAttributes = "filtersAttributes_example"; // String | Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\"
String filtersLinkedCompaniesIds = "filtersLinkedCompaniesIds_example"; // String | Filter by linked companies ids
String filtersLinkedContactsIds = "filtersLinkedContactsIds_example"; // String | Filter by linked companies ids
Long offset = 789L; // Long | Index of the first document of the page
Long limit = 50L; // Long | Number of documents per page
String sort = "sort_example"; // String | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed
String sortBy = "sortBy_example"; // String | The field used to sort field names.
try {
    DealsList result = apiInstance.crmDealsGet(filtersAttributes, filtersLinkedCompaniesIds, filtersLinkedContactsIds, offset, limit, sort, sortBy);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DealsApi#crmDealsGet");
    e.printStackTrace();
}

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] [enum: asc, desc]
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

crmDealsIdDelete

crmDealsIdDelete(id)

Delete a deal

Example

// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String id = "id_example"; // String | 
try {
    apiInstance.crmDealsIdDelete(id);
} catch (ApiException e) {
    System.err.println("Exception when calling DealsApi#crmDealsIdDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String

Return type

null (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

crmDealsIdGet

Deal crmDealsIdGet(id)

Get a deal

Example

// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String id = "id_example"; // String | 
try {
    Deal result = apiInstance.crmDealsIdGet(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DealsApi#crmDealsIdGet");
    e.printStackTrace();
}

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

crmDealsIdPatch

crmDealsIdPatch(id, body)

Update a deal

Example

// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String id = "id_example"; // String | 
Body4 body = new Body4(); // Body4 | Updated deal details.
try {
    apiInstance.crmDealsIdPatch(id, body);
} catch (ApiException e) {
    System.err.println("Exception when calling DealsApi#crmDealsIdPatch");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String
body Body4 Updated deal details.

Return type

null (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

crmDealsLinkUnlinkIdPatch

crmDealsLinkUnlinkIdPatch(id, body)

Link and Unlink a deal with contacts and companies

Example

// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String id = "id_example"; // String | 
Body5 body = new Body5(); // Body5 | Linked / Unlinked contacts and companies ids.
try {
    apiInstance.crmDealsLinkUnlinkIdPatch(id, body);
} catch (ApiException e) {
    System.err.println("Exception when calling DealsApi#crmDealsLinkUnlinkIdPatch");
    e.printStackTrace();
}

Parameters

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

Return type

null (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

crmDealsPost

InlineResponse201 crmDealsPost(body)

Create a deal

Example

// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
Body3 body = new Body3(); // Body3 | Deal create data.
try {
    InlineResponse201 result = apiInstance.crmDealsPost(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DealsApi#crmDealsPost");
    e.printStackTrace();
}

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

crmPipelineDetailsGet

Pipeline crmPipelineDetailsGet()

Get pipeline stages

Example

// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");

// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
try {
    Pipeline result = apiInstance.crmPipelineDetailsGet();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling DealsApi#crmPipelineDetailsGet");
    e.printStackTrace();
}

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