Skip to content

Latest commit

 

History

History
588 lines (411 loc) · 15.9 KB

DealsApi.md

File metadata and controls

588 lines (411 loc) · 15.9 KB

Brevo::DealsApi

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

Method HTTP request Description
crm_attributes_deals_get GET /crm/attributes/deals Get deal attributes
crm_deals_get GET /crm/deals Get all deals
crm_deals_id_delete DELETE /crm/deals/{id} Delete a deal
crm_deals_id_get GET /crm/deals/{id} Get a deal
crm_deals_id_patch PATCH /crm/deals/{id} Update a deal
crm_deals_link_unlink_id_patch PATCH /crm/deals/link-unlink/{id} Link and Unlink a deal with contacts and companies
crm_deals_post POST /crm/deals Create a deal
crm_pipeline_details_all_get GET /crm/pipeline/details/all Get all pipelines
crm_pipeline_details_get GET /crm/pipeline/details Get pipeline stages
crm_pipeline_details_pipeline_id_get GET /crm/pipeline/details/{pipelineID} Get a pipeline

crm_attributes_deals_get

DealAttributes crm_attributes_deals_get

Get deal attributes

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

begin
  #Get deal attributes
  result = api_instance.crm_attributes_deals_get
  p result
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_attributes_deals_get: #{e}"
end

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

crm_deals_get

DealsList crm_deals_get(opts)

Get all deals

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

opts = { 
  filters_attributes_deal_name: 'filters_attributes_deal_name_example', # String | Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering.
  filters_linked_companies_ids: 'filters_linked_companies_ids_example', # String | Filter by linked companies ids
  filters_linked_contacts_ids: 'filters_linked_contacts_ids_example', # String | Filter by linked companies ids
  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
  sort_by: 'sort_by_example' # String | The field used to sort field names.
}

begin
  #Get all deals
  result = api_instance.crm_deals_get(opts)
  p result
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_deals_get: #{e}"
end

Parameters

Name Type Description Notes
filters_attributes_deal_name String Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering. [optional]
filters_linked_companies_ids String Filter by linked companies ids [optional]
filters_linked_contacts_ids String Filter by linked companies ids [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]
sort_by 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

crm_deals_id_delete

crm_deals_id_delete(id)

Delete a deal

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

id = 'id_example' # String | 


begin
  #Delete a deal
  api_instance.crm_deals_id_delete(id)
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_deals_id_delete: #{e}"
end

Parameters

Name Type Description Notes
id String

Return type

nil (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

crm_deals_id_get

Deal crm_deals_id_get(id)

Get a deal

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

id = 'id_example' # String | 


begin
  #Get a deal
  result = api_instance.crm_deals_id_get(id)
  p result
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_deals_id_get: #{e}"
end

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

crm_deals_id_patch

crm_deals_id_patch(id, body)

Update a deal

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

id = 'id_example' # String | 

body = Brevo::Body7.new # Body7 | Updated deal details.


begin
  #Update a deal
  api_instance.crm_deals_id_patch(id, body)
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_deals_id_patch: #{e}"
end

Parameters

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

Return type

nil (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

crm_deals_link_unlink_id_patch

crm_deals_link_unlink_id_patch(id, body)

Link and Unlink a deal with contacts and companies

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

id = 'id_example' # String | 

body = Brevo::Body8.new # Body8 | Linked / Unlinked contacts and companies ids.


begin
  #Link and Unlink a deal with contacts and companies
  api_instance.crm_deals_link_unlink_id_patch(id, body)
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_deals_link_unlink_id_patch: #{e}"
end

Parameters

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

Return type

nil (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

crm_deals_post

InlineResponse2011 crm_deals_post(body)

Create a deal

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

body = Brevo::Body6.new # Body6 | Deal create data.


begin
  #Create a deal
  result = api_instance.crm_deals_post(body)
  p result
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_deals_post: #{e}"
end

Parameters

Name Type Description Notes
body Body6 Deal create data.

Return type

InlineResponse2011

Authorization

api-key, partner-key

HTTP request headers

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

crm_pipeline_details_all_get

Pipelines crm_pipeline_details_all_get

Get all pipelines

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

begin
  #Get all pipelines
  result = api_instance.crm_pipeline_details_all_get
  p result
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_pipeline_details_all_get: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

Pipelines

Authorization

api-key, partner-key

HTTP request headers

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

crm_pipeline_details_get

Pipeline crm_pipeline_details_get

Get pipeline stages

This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead.

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

begin
  #Get pipeline stages
  result = api_instance.crm_pipeline_details_get
  p result
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_pipeline_details_get: #{e}"
end

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

crm_pipeline_details_pipeline_id_get

Pipelines crm_pipeline_details_pipeline_id_get(pipeline_id)

Get a pipeline

Example

# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::DealsApi.new

pipeline_id = 'pipeline_id_example' # String | 


begin
  #Get a pipeline
  result = api_instance.crm_pipeline_details_pipeline_id_get(pipeline_id)
  p result
rescue Brevo::ApiError => e
  puts "Exception when calling DealsApi->crm_pipeline_details_pipeline_id_get: #{e}"
end

Parameters

Name Type Description Notes
pipeline_id String

Return type

Pipelines

Authorization

api-key, partner-key

HTTP request headers

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