thena-platform-client 1.0.0
Python client for the Thena Platform API
Requires Python: >=3.6
Keywords: API, Thena Platform, Client

# swagger-client
The Thena Platform API description

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import swagger_client 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import swagger_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
activity_id = 'activity_id_example' # str | 
attachment_id = 'attachment_id_example' # str | 

try:
    # Removes an attachment from an account activity
    api_instance.v1_accounts_activities_activity_id_attachments_attachment_id_delete(activity_id, attachment_id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_activities_activity_id_attachments_attachment_id_delete: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
activity_id = 'activity_id_example' # str | 

try:
    # Deletes an account activity
    api_instance.v1_accounts_activities_activity_id_delete(activity_id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_activities_activity_id_delete: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.UpdateAccountActivityDto() # UpdateAccountActivityDto | 
activity_id = 'activity_id_example' # str | 

try:
    # Updates an account activity
    api_response = api_instance.v1_accounts_activities_activity_id_put(body, activity_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_activities_activity_id_put: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
account_id = 'account_id_example' # str | The identifier of the account to find activities for (optional)
type = 'type_example' # str | The identifier / value of the type of the activity (optional)
status = 'status_example' # str | The identifier / value of the status of the activity (optional)
page = 1.2 # float | The page number (optional)
limit = 1.2 # float | The limit number of activities to fetch (optional)

try:
    # Fetches all account activities
    api_response = api_instance.v1_accounts_activities_get(account_id=account_id, type=type, status=status, page=page, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_activities_get: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.CreateAccountActivityDto() # CreateAccountActivityDto | 

try:
    # Creates an account activity
    api_response = api_instance.v1_accounts_activities_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_activities_post: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
attribute = 'attribute_example' # str | Attribute type

try:
    # Gets all account attribute values
    api_response = api_instance.v1_accounts_attributes_get(attribute)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_attributes_get: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | 
force_delete = true # bool | 

try:
    # Deletes an account attribute value
    api_instance.v1_accounts_attributes_id_delete(id, force_delete)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_attributes_id_delete: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.UpdateAccountAttributeValueDto() # UpdateAccountAttributeValueDto | 
id = 'id_example' # str | 

try:
    # Updates an account attribute value
    api_response = api_instance.v1_accounts_attributes_id_put(body, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_attributes_id_put: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.CreateAccountAttributeValueDto() # CreateAccountAttributeValueDto | 

try:
    # Creates an account attribute value
    api_response = api_instance.v1_accounts_attributes_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_attributes_post: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.BulkCreateCustomerContactsDto() # BulkCreateCustomerContactsDto | 

try:
    # Bulk create customer contacts
    api_response = api_instance.v1_accounts_contacts_bulk_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_contacts_bulk_post: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
contact_id = 'contact_id_example' # str | 

try:
    # Delete a customer contact
    api_instance.v1_accounts_contacts_contact_id_delete(contact_id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_contacts_contact_id_delete: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.UpdateCustomerContactDto() # UpdateCustomerContactDto | 
contact_id = 'contact_id_example' # str | 

try:
    # Update a customer contact
    api_response = api_instance.v1_accounts_contacts_contact_id_put(body, contact_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_contacts_contact_id_put: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
account_id = 'account_id_example' # str | Account ID of the customer contact (optional)
contact_type = 'contact_type_example' # str | Contact type of the customer contact to find. (Fetches all contacts satisfying other conditions if not provided) (optional)
page = 1.2 # float | The page number (optional)
limit = 1.2 # float | The limit number of contacts to fetch (optional)

try:
    # Get all customer contacts
    api_response = api_instance.v1_accounts_contacts_get(account_id=account_id, contact_type=contact_type, page=page, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_contacts_get: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.IngestCustomerContactDTO() # IngestCustomerContactDTO | 

try:
    # Ingest users
    api_instance.v1_accounts_contacts_ingest_post(body)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_contacts_ingest_post: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.CreateCustomerContactDto() # CreateCustomerContactDto | 

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

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
source = 'source_example' # str | The source of the accounts to find (optional)
status = 'status_example' # str | The identifier / value of the status attribute (optional)
classification = 'classification_example' # str | The identifier / value of the classification attribute (optional)
health = 'health_example' # str | The identifier / value of the health attribute (optional)
industry = 'industry_example' # str | The identifier / value of the industry attribute (optional)
account_owner_id = 'account_owner_id_example' # str | The identifier of the account owner (optional)
page = 1.2 # float | The page number (optional)
limit = 1.2 # float | The limit number of accounts to fetch (optional)

try:
    # Get all accounts
    api_response = api_instance.v1_accounts_get(source=source, status=status, classification=classification, health=health, industry=industry, account_owner_id=account_owner_id, page=page, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_get: %s\n" % e)

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

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

try:
    # Delete an account
    api_instance.v1_accounts_id_delete(id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_id_delete: %s\n" % e)

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

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

try:
    # Get account details
    api_response = api_instance.v1_accounts_id_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_id_get: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.UpdateAccountDto() # UpdateAccountDto | 
id = 'id_example' # str | 

try:
    # Update an account
    api_response = api_instance.v1_accounts_id_put(body, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_id_put: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
account_id = 'account_id_example' # str | The identifier of the account to find notes for (optional)
type = 'type_example' # str | The identifier / value of the type attribute of the note (optional)
page = 1.2 # float | The page number (optional)
limit = 1.2 # float | The limit number of notes to fetch (optional)

try:
    # Fetches all account notes by account ID or by note ID
    api_response = api_instance.v1_accounts_notes_get(account_id=account_id, type=type, page=page, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_notes_get: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
note_id = 'note_id_example' # str | 
attachment_id = 'attachment_id_example' # str | 

try:
    # Removes an attachment from an account note
    api_instance.v1_accounts_notes_note_id_attachments_attachment_id_delete(note_id, attachment_id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_notes_note_id_attachments_attachment_id_delete: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
note_id = 'note_id_example' # str | 

try:
    # Deletes an account note
    api_instance.v1_accounts_notes_note_id_delete(note_id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_notes_note_id_delete: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.UpdateAccountNoteDto() # UpdateAccountNoteDto | 
note_id = 'note_id_example' # str | 

try:
    # Updates an account note
    api_response = api_instance.v1_accounts_notes_note_id_put(body, note_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_notes_note_id_put: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.CreateAccountNoteDto() # CreateAccountNoteDto | 

try:
    # Creates an account note
    api_response = api_instance.v1_accounts_notes_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_notes_post: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.CreateAccountDto() # CreateAccountDto | 

try:
    # Create an account
    api_response = api_instance.v1_accounts_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_post: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
account_id = 'account_id_example' # str | Account ID (optional)
relationship_type_id = 'relationship_type_id_example' # str | The identifier of the relationship type attribute (optional)
page = 1.2 # float | The page number (optional)
limit = 1.2 # float | The limit number of relationships to fetch (optional)

try:
    # Get all account relationships
    api_response = api_instance.v1_accounts_relationships_get(account_id=account_id, relationship_type_id=relationship_type_id, page=page, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_relationships_get: %s\n" % e)

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

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

try:
    # Delete an account relationship
    api_instance.v1_accounts_relationships_id_delete(id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_relationships_id_delete: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.UpdateAccountRelationshipDto() # UpdateAccountRelationshipDto | 
id = 'id_example' # str | 

try:
    # Update an account relationship
    api_response = api_instance.v1_accounts_relationships_id_put(body, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_relationships_id_put: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.CreateAccountRelationshipDto() # CreateAccountRelationshipDto | 

try:
    # Create an account relationship
    api_response = api_instance.v1_accounts_relationships_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_relationships_post: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))

try:
    # Get all account relationship types
    api_response = api_instance.v1_accounts_relationships_types_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_relationships_types_get: %s\n" % e)

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

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

try:
    # Delete an account relationship type
    api_instance.v1_accounts_relationships_types_id_delete(id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_relationships_types_id_delete: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.UpdateAccountRelationshipTypeDto() # UpdateAccountRelationshipTypeDto | 
id = 'id_example' # str | 

try:
    # Update an account relationship type
    api_response = api_instance.v1_accounts_relationships_types_id_put(body, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_relationships_types_id_put: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.CreateAccountRelationshipTypeDto() # CreateAccountRelationshipTypeDto | 

try:
    # Create an account relationship type
    api_response = api_instance.v1_accounts_relationships_types_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_relationships_types_post: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
account_id = 'account_id_example' # str | The identifier of the account to find tasks for (optional)
activity_id = 'activity_id_example' # str | The identifier of the activity to find tasks for (optional)
assignee_id = 'assignee_id_example' # str | The identifier of the assignee to find tasks for (optional)
type = 'type_example' # str | The identifier / value of the type attribute of the task (optional)
status = 'status_example' # str | The identifier / value of the status attribute of the task (optional)
priority = 'priority_example' # str | The identifier / value of the priority attribute of the task (optional)
page = 1.2 # float | The page number (optional)
limit = 1.2 # float | The limit number of tasks to fetch (optional)

try:
    # Fetches all account tasks by account ID or by task ID
    api_response = api_instance.v1_accounts_tasks_get(account_id=account_id, activity_id=activity_id, assignee_id=assignee_id, type=type, status=status, priority=priority, page=page, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_tasks_get: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
body = swagger_client.CreateAccountTaskDto() # CreateAccountTaskDto | 

try:
    # Creates an account task
    api_response = api_instance.v1_accounts_tasks_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_tasks_post: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
task_id = 'task_id_example' # str | 
attachment_id = 'attachment_id_example' # str | 

try:
    # Removes an attachment from an account task
    api_instance.v1_accounts_tasks_task_id_attachments_attachment_id_delete(task_id, attachment_id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_tasks_task_id_attachments_attachment_id_delete: %s\n" % e)

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

# create an instance of the API class
api_instance = swagger_client.AccountsApi(swagger_client.ApiClient(configuration))
task_id = 'task_id_example' # str | 

try:
    # Deletes an account task
    api_instance.v1_accounts_tasks_task_id_delete(task_id)
except ApiException as e:
    print("Exception when calling AccountsApi->v1_accounts_tasks_task_id_delete: %s\n" % e)

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