Skip to content

Latest commit

 

History

History
424 lines (316 loc) · 14.6 KB

CompaniesApi.md

File metadata and controls

424 lines (316 loc) · 14.6 KB

sib_api_v3_sdk.CompaniesApi

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

Method HTTP request Description
companies_attributes_get GET /companies/attributes Get company attributes
companies_get GET /companies Get all companies
companies_id_delete DELETE /companies/{id} Delete a company
companies_id_get GET /companies/{id} Get a company
companies_id_patch PATCH /companies/{id} Update a company
companies_link_unlink_id_patch PATCH /companies/link-unlink/{id} Link and Unlink company with contacts and deals
companies_post POST /companies Create a company

companies_attributes_get

CompanyAttributes companies_attributes_get()

Get company attributes

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.CompaniesApi(sib_api_v3_sdk.ApiClient(configuration))

try:
    # Get company attributes
    api_response = api_instance.companies_attributes_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CompaniesApi->companies_attributes_get: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

CompanyAttributes

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]

companies_get

CompaniesList companies_get(filters=filters, linked_contacts_ids=linked_contacts_ids, linked_deals_ids=linked_deals_ids, page=page, limit=limit, sort=sort, sort_by=sort_by)

Get all companies

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.CompaniesApi(sib_api_v3_sdk.ApiClient(configuration))
filters = 'filters_example' # str | Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} (optional)
linked_contacts_ids = 789 # int | Filter by linked contacts ids (optional)
linked_deals_ids = 'linked_deals_ids_example' # str | Filter by linked deals ids (optional)
page = 789 # int | Index of the first document of the page (optional)
limit = 50 # int | Number of documents per page (optional) (default to 50)
sort = 'sort_example' # str | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional)
sort_by = 'sort_by_example' # str | The field used to sort field names. (optional)

try:
    # Get all companies
    api_response = api_instance.companies_get(filters=filters, linked_contacts_ids=linked_contacts_ids, linked_deals_ids=linked_deals_ids, page=page, limit=limit, sort=sort, sort_by=sort_by)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CompaniesApi->companies_get: %s\n" % e)

Parameters

Name Type Description Notes
filters str Filter by attrbutes. If you have filter for owner on your side please send it as {"attributes.owner":"5b1a17d914b73d35a76ca0c7"} [optional]
linked_contacts_ids int Filter by linked contacts ids [optional]
linked_deals_ids str Filter by linked deals ids [optional]
page int Index of the first document of the page [optional]
limit int Number of documents per page [optional] [default to 50]
sort str Sort the results in the ascending/descending order. Default order is descending by creation if `sort` is not passed [optional]
sort_by str The field used to sort field names. [optional]

Return type

CompaniesList

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]

companies_id_delete

companies_id_delete(id)

Delete a company

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.CompaniesApi(sib_api_v3_sdk.ApiClient(configuration))
id = 'id_example' # str | 

try:
    # Delete a company
    api_instance.companies_id_delete(id)
except ApiException as e:
    print("Exception when calling CompaniesApi->companies_id_delete: %s\n" % e)

Parameters

Name Type Description Notes
id str

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]

companies_id_get

Company companies_id_get(id)

Get a company

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.CompaniesApi(sib_api_v3_sdk.ApiClient(configuration))
id = 'id_example' # str | 

try:
    # Get a company
    api_response = api_instance.companies_id_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CompaniesApi->companies_id_get: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

Company

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]

companies_id_patch

Company companies_id_patch(id, body)

Update a company

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.CompaniesApi(sib_api_v3_sdk.ApiClient(configuration))
id = 'id_example' # str | 
body = sib_api_v3_sdk.Body1() # Body1 | Updated company details.

try:
    # Update a company
    api_response = api_instance.companies_id_patch(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CompaniesApi->companies_id_patch: %s\n" % e)

Parameters

Name Type Description Notes
id str
body Body1 Updated company details.

Return type

Company

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]

companies_link_unlink_id_patch

companies_link_unlink_id_patch(id, body)

Link and Unlink company with contacts and deals

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.CompaniesApi(sib_api_v3_sdk.ApiClient(configuration))
id = 'id_example' # str | 
body = sib_api_v3_sdk.Body2() # Body2 | Linked / Unlinked contacts and deals ids.

try:
    # Link and Unlink company with contacts and deals
    api_instance.companies_link_unlink_id_patch(id, body)
except ApiException as e:
    print("Exception when calling CompaniesApi->companies_link_unlink_id_patch: %s\n" % e)

Parameters

Name Type Description Notes
id str
body Body2 Linked / Unlinked contacts and deals 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]

companies_post

InlineResponse200 companies_post(body)

Create a company

Example

from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = sib_api_v3_sdk.CompaniesApi(sib_api_v3_sdk.ApiClient(configuration))
body = sib_api_v3_sdk.Body() # Body | Company create data.

try:
    # Create a company
    api_response = api_instance.companies_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CompaniesApi->companies_post: %s\n" % e)

Parameters

Name Type Description Notes
body Body Company create data.

Return type

InlineResponse200

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]