Skip to content

Latest commit

 

History

History
762 lines (684 loc) · 215 KB

README.md

File metadata and controls

762 lines (684 loc) · 215 KB

Companies

(crm.companies)

Overview

Available Operations

list

List companies

Example Usage

import apideck_unify
from apideck_unify import Apideck
import os

with Apideck(
    api_key=os.getenv("APIDECK_API_KEY", ""),
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:

    res = apideck.crm.companies.list(raw=False, consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", limit=20, filter_={
        "name": "SpaceX",
    }, sort={
        "by": apideck_unify.CompaniesSortBy.CREATED_AT,
        "direction": apideck_unify.SortDirection.DESC,
    }, pass_through={
        "search": "San Francisco",
    }, fields="id,updated_at")

    while res is not None:
        # Handle items

        res = res.next()

Parameters

Parameter Type Required Description Example
raw Optional[bool] Include raw response. Mostly used for debugging purposes
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
cursor OptionalNullable[str] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
limit Optional[int] Number of results to return. Minimum 1, Maximum 200, Default 20
filter_ Optional[models.CompaniesFilter] Apply filters {
"name": "SpaceX"
}
sort Optional[models.CompaniesSort] Apply sorting {
"by": "created_at",
"direction": "desc"
}
pass_through Dict[str, Any] Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads {
"search": "San Francisco"
}
fields OptionalNullable[str] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
id,updated_at
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.CrmCompaniesAllResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*

create

Create company

Example Usage

import apideck_unify
from apideck_unify import Apideck
import dateutil.parser
import os

with Apideck(
    api_key=os.getenv("APIDECK_API_KEY", ""),
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:

    res = apideck.crm.companies.create(name="SpaceX", raw=False, consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", owner_id="12345", image="https://www.spacex.com/static/images/share.jpg", description="Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.", vat_number="BE0689615164", currency=apideck_unify.Currency.USD, status="Open", fax="+12129876543", annual_revenue="+$35m", number_of_employees="500-1000", industry="Apparel", ownership="Public", sales_tax_number="12456EN", payee_number="78932EN", abn_or_tfn="46 115 614 695", abn_branch="123", acn="XXX XXX XXX", first_name="Elon", last_name="Musk", bank_accounts=[
        {
            "bank_name": "Monzo",
            "account_number": "123465",
            "account_name": "SPACEX LLC",
            "account_type": apideck_unify.AccountType.CREDIT_CARD,
            "iban": "CH2989144532982975332",
            "bic": "AUDSCHGGXXX",
            "routing_number": "012345678",
            "bsb_number": "062-001",
            "branch_identifier": "001",
            "bank_code": "BNH",
            "currency": apideck_unify.Currency.USD,
        },
        {
            "bank_name": "Monzo",
            "account_number": "123465",
            "account_name": "SPACEX LLC",
            "account_type": apideck_unify.AccountType.CREDIT_CARD,
            "iban": "CH2989144532982975332",
            "bic": "AUDSCHGGXXX",
            "routing_number": "012345678",
            "bsb_number": "062-001",
            "branch_identifier": "001",
            "bank_code": "BNH",
            "currency": apideck_unify.Currency.USD,
        },
    ], websites=[
        {
            "url": "http://example.com",
            "id": "12345",
            "type": apideck_unify.WebsiteType.PRIMARY,
        },
        {
            "url": "http://example.com",
            "id": "12345",
            "type": apideck_unify.WebsiteType.PRIMARY,
        },
    ], addresses=[
        {
            "id": "123",
            "type": apideck_unify.Type.PRIMARY,
            "string": "25 Spring Street, Blackburn, VIC 3130",
            "name": "HQ US",
            "line1": "Main street",
            "line2": "apt #",
            "line3": "Suite #",
            "line4": "delivery instructions",
            "street_number": "25",
            "city": "San Francisco",
            "state": "CA",
            "postal_code": "94104",
            "country": "US",
            "latitude": "40.759211",
            "longitude": "-73.984638",
            "county": "Santa Clara",
            "contact_name": "Elon Musk",
            "salutation": "Mr",
            "phone_number": "111-111-1111",
            "fax": "122-111-1111",
            "email": "elon@musk.com",
            "website": "https://elonmusk.com",
            "notes": "Address notes or delivery instructions.",
            "row_version": "1-12345",
        },
        {
            "id": "123",
            "type": apideck_unify.Type.PRIMARY,
            "string": "25 Spring Street, Blackburn, VIC 3130",
            "name": "HQ US",
            "line1": "Main street",
            "line2": "apt #",
            "line3": "Suite #",
            "line4": "delivery instructions",
            "street_number": "25",
            "city": "San Francisco",
            "state": "CA",
            "postal_code": "94104",
            "country": "US",
            "latitude": "40.759211",
            "longitude": "-73.984638",
            "county": "Santa Clara",
            "contact_name": "Elon Musk",
            "salutation": "Mr",
            "phone_number": "111-111-1111",
            "fax": "122-111-1111",
            "email": "elon@musk.com",
            "website": "https://elonmusk.com",
            "notes": "Address notes or delivery instructions.",
            "row_version": "1-12345",
        },
    ], social_links=[
        {
            "url": "https://www.twitter.com/apideck",
            "id": "12345",
            "type": "twitter",
        },
    ], phone_numbers=[
        {
            "number": "111-111-1111",
            "id": "12345",
            "country_code": "1",
            "area_code": "323",
            "extension": "105",
            "type": apideck_unify.PhoneNumberType.PRIMARY,
        },
    ], emails=[
        {
            "email": "elon@musk.com",
            "id": "123",
            "type": apideck_unify.EmailType.PRIMARY,
        },
        {
            "email": "elon@musk.com",
            "id": "123",
            "type": apideck_unify.EmailType.PRIMARY,
        },
        {
            "email": "elon@musk.com",
            "id": "123",
            "type": apideck_unify.EmailType.PRIMARY,
        },
    ], row_type={
        "id": "12345",
        "name": "Customer Account",
    }, custom_fields=[
        {
            "id": "2389328923893298",
            "name": "employee_level",
            "description": "Employee Level",
            "value": "Uses Salesforce and Marketo",
        },
        {
            "id": "2389328923893298",
            "name": "employee_level",
            "description": "Employee Level",
            "value": 10,
        },
        {
            "id": "2389328923893298",
            "name": "employee_level",
            "description": "Employee Level",
            "value": "Uses Salesforce and Marketo",
        },
    ], tags=[
        "New",
    ], read_only=False, salutation="Mr", birthday=dateutil.parser.parse("2000-08-12").date(), pass_through=[
        {
            "service_id": "<id>",
            "extend_paths": [
                {
                    "path": "$.nested.property",
                    "value": {
                        "TaxClassificationRef": {
                            "value": "EUC-99990201-V1-00020000",
                        },
                    },
                },
                {
                    "path": "$.nested.property",
                    "value": {
                        "TaxClassificationRef": {
                            "value": "EUC-99990201-V1-00020000",
                        },
                    },
                },
                {
                    "path": "$.nested.property",
                    "value": {
                        "TaxClassificationRef": {
                            "value": "EUC-99990201-V1-00020000",
                        },
                    },
                },
            ],
        },
        {
            "service_id": "<id>",
            "extend_paths": [
                {
                    "path": "$.nested.property",
                    "value": {
                        "TaxClassificationRef": {
                            "value": "EUC-99990201-V1-00020000",
                        },
                    },
                },
                {
                    "path": "$.nested.property",
                    "value": {
                        "TaxClassificationRef": {
                            "value": "EUC-99990201-V1-00020000",
                        },
                    },
                },
            ],
        },
        {
            "service_id": "<id>",
            "extend_paths": [
                {
                    "path": "$.nested.property",
                    "value": {
                        "TaxClassificationRef": {
                            "value": "EUC-99990201-V1-00020000",
                        },
                    },
                },
                {
                    "path": "$.nested.property",
                    "value": {
                        "TaxClassificationRef": {
                            "value": "EUC-99990201-V1-00020000",
                        },
                    },
                },
                {
                    "path": "$.nested.property",
                    "value": {
                        "TaxClassificationRef": {
                            "value": "EUC-99990201-V1-00020000",
                        },
                    },
                },
            ],
        },
    ])

    assert res.create_company_response is not None

    # Handle response
    print(res.create_company_response)

Parameters

Parameter Type Required Description Example
name Nullable[str] ✔️ Name of the company SpaceX
raw Optional[bool] Include raw response. Mostly used for debugging purposes
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
owner_id OptionalNullable[str] Owner ID 12345
image OptionalNullable[str] The Image URL of the company https://www.spacex.com/static/images/share.jpg
description OptionalNullable[str] A description of the company Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.
vat_number OptionalNullable[str] The VAT number of the company BE0689615164
currency OptionalNullable[models.Currency] Indicates the associated currency for an amount of money. Values correspond to ISO 4217. USD
status OptionalNullable[str] The status of the company Open
fax OptionalNullable[str] The fax number of the company +12129876543
annual_revenue OptionalNullable[str] The annual revenue of the company +$35m
number_of_employees OptionalNullable[str] Number of employees 500-1000
industry OptionalNullable[str] The industry represents the type of business the company is in. Apparel
ownership OptionalNullable[str] The ownership indicates the type of ownership of the company. Public
sales_tax_number OptionalNullable[str] A sales tax number is a unique number that identifies a company for tax purposes. 12456EN
payee_number OptionalNullable[str] A payee number is a unique number that identifies a payee for tax purposes. 78932EN
abn_or_tfn OptionalNullable[str] An ABN is necessary for operating a business, while a TFN (Tax File Number) is required for any person working in Australia. 46 115 614 695
abn_branch OptionalNullable[str] An ABN Branch (also known as a GST Branch) is used if part of your business needs to account for GST separately from its parent entity. 123
acn OptionalNullable[str] The Australian Company Number (ACN) is a nine digit number with the last digit being a check digit calculated using a modified modulus 10 calculation. ASIC has adopted a convention of always printing and displaying the ACN in the format XXX XXX XXX; three blocks of three characters, each block separated by a blank. XXX XXX XXX
first_name OptionalNullable[str] The first name of the person. Elon
last_name OptionalNullable[str] The last name of the person. Musk
bank_accounts List[models.BankAccount] N/A
websites List[models.Website] N/A
addresses List[models.Address] N/A
social_links List[models.SocialLink] N/A
phone_numbers List[models.PhoneNumber] N/A
emails List[models.Email] N/A
row_type Optional[models.CompanyRowType] N/A
custom_fields List[models.CustomField] N/A
tags List[str] N/A [
"New"
]
read_only OptionalNullable[bool] Whether the company is read-only or not false
salutation OptionalNullable[str] A formal salutation for the person. For example, 'Mr', 'Mrs' Mr
birthday datetime The date of birth of the person. 2000-08-12
pass_through List[models.PassThroughBody] The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.CrmCompaniesAddResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*

get

Get company

Example Usage

from apideck_unify import Apideck
import os

with Apideck(
    api_key=os.getenv("APIDECK_API_KEY", ""),
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:

    res = apideck.crm.companies.get(id="<id>", raw=False, consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", fields="id,updated_at")

    assert res.get_company_response is not None

    # Handle response
    print(res.get_company_response)

Parameters

Parameter Type Required Description Example
id str ✔️ ID of the record you are acting upon.
raw Optional[bool] Include raw response. Mostly used for debugging purposes
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
fields OptionalNullable[str] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
id,updated_at
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.CrmCompaniesOneResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*

update

Update company

Example Usage

import apideck_unify
from apideck_unify import Apideck
import dateutil.parser
import os

with Apideck(
    api_key=os.getenv("APIDECK_API_KEY", ""),
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:

    res = apideck.crm.companies.update(id="<id>", name="SpaceX", raw=False, consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", owner_id="12345", image="https://www.spacex.com/static/images/share.jpg", description="Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.", vat_number="BE0689615164", currency=apideck_unify.Currency.USD, status="Open", fax="+12129876543", annual_revenue="+$35m", number_of_employees="500-1000", industry="Apparel", ownership="Public", sales_tax_number="12456EN", payee_number="78932EN", abn_or_tfn="46 115 614 695", abn_branch="123", acn="XXX XXX XXX", first_name="Elon", last_name="Musk", bank_accounts=[
        {
            "bank_name": "Monzo",
            "account_number": "123465",
            "account_name": "SPACEX LLC",
            "account_type": apideck_unify.AccountType.CREDIT_CARD,
            "iban": "CH2989144532982975332",
            "bic": "AUDSCHGGXXX",
            "routing_number": "012345678",
            "bsb_number": "062-001",
            "branch_identifier": "001",
            "bank_code": "BNH",
            "currency": apideck_unify.Currency.USD,
        },
        {
            "bank_name": "Monzo",
            "account_number": "123465",
            "account_name": "SPACEX LLC",
            "account_type": apideck_unify.AccountType.CREDIT_CARD,
            "iban": "CH2989144532982975332",
            "bic": "AUDSCHGGXXX",
            "routing_number": "012345678",
            "bsb_number": "062-001",
            "branch_identifier": "001",
            "bank_code": "BNH",
            "currency": apideck_unify.Currency.USD,
        },
        {
            "bank_name": "Monzo",
            "account_number": "123465",
            "account_name": "SPACEX LLC",
            "account_type": apideck_unify.AccountType.CREDIT_CARD,
            "iban": "CH2989144532982975332",
            "bic": "AUDSCHGGXXX",
            "routing_number": "012345678",
            "bsb_number": "062-001",
            "branch_identifier": "001",
            "bank_code": "BNH",
            "currency": apideck_unify.Currency.USD,
        },
    ], websites=[
        {
            "url": "http://example.com",
            "id": "12345",
            "type": apideck_unify.WebsiteType.PRIMARY,
        },
        {
            "url": "http://example.com",
            "id": "12345",
            "type": apideck_unify.WebsiteType.PRIMARY,
        },
    ], addresses=[
        {
            "id": "123",
            "type": apideck_unify.Type.PRIMARY,
            "string": "25 Spring Street, Blackburn, VIC 3130",
            "name": "HQ US",
            "line1": "Main street",
            "line2": "apt #",
            "line3": "Suite #",
            "line4": "delivery instructions",
            "street_number": "25",
            "city": "San Francisco",
            "state": "CA",
            "postal_code": "94104",
            "country": "US",
            "latitude": "40.759211",
            "longitude": "-73.984638",
            "county": "Santa Clara",
            "contact_name": "Elon Musk",
            "salutation": "Mr",
            "phone_number": "111-111-1111",
            "fax": "122-111-1111",
            "email": "elon@musk.com",
            "website": "https://elonmusk.com",
            "notes": "Address notes or delivery instructions.",
            "row_version": "1-12345",
        },
        {
            "id": "123",
            "type": apideck_unify.Type.PRIMARY,
            "string": "25 Spring Street, Blackburn, VIC 3130",
            "name": "HQ US",
            "line1": "Main street",
            "line2": "apt #",
            "line3": "Suite #",
            "line4": "delivery instructions",
            "street_number": "25",
            "city": "San Francisco",
            "state": "CA",
            "postal_code": "94104",
            "country": "US",
            "latitude": "40.759211",
            "longitude": "-73.984638",
            "county": "Santa Clara",
            "contact_name": "Elon Musk",
            "salutation": "Mr",
            "phone_number": "111-111-1111",
            "fax": "122-111-1111",
            "email": "elon@musk.com",
            "website": "https://elonmusk.com",
            "notes": "Address notes or delivery instructions.",
            "row_version": "1-12345",
        },
    ], social_links=[
        {
            "url": "https://www.twitter.com/apideck",
            "id": "12345",
            "type": "twitter",
        },
        {
            "url": "https://www.twitter.com/apideck",
            "id": "12345",
            "type": "twitter",
        },
        {
            "url": "https://www.twitter.com/apideck",
            "id": "12345",
            "type": "twitter",
        },
    ], phone_numbers=[
        {
            "number": "111-111-1111",
            "id": "12345",
            "country_code": "1",
            "area_code": "323",
            "extension": "105",
            "type": apideck_unify.PhoneNumberType.PRIMARY,
        },
        {
            "number": "111-111-1111",
            "id": "12345",
            "country_code": "1",
            "area_code": "323",
            "extension": "105",
            "type": apideck_unify.PhoneNumberType.PRIMARY,
        },
    ], emails=[
        {
            "email": "elon@musk.com",
            "id": "123",
            "type": apideck_unify.EmailType.PRIMARY,
        },
        {
            "email": "elon@musk.com",
            "id": "123",
            "type": apideck_unify.EmailType.PRIMARY,
        },
    ], row_type={
        "id": "12345",
        "name": "Customer Account",
    }, custom_fields=[
        {
            "id": "2389328923893298",
            "name": "employee_level",
            "description": "Employee Level",
            "value": "Uses Salesforce and Marketo",
        },
        {
            "id": "2389328923893298",
            "name": "employee_level",
            "description": "Employee Level",
            "value": [
                {},
            ],
        },
        {
            "id": "2389328923893298",
            "name": "employee_level",
            "description": "Employee Level",
            "value": 10,
        },
    ], tags=[
        "New",
    ], read_only=False, salutation="Mr", birthday=dateutil.parser.parse("2000-08-12").date(), pass_through=[
        {
            "service_id": "<id>",
            "extend_paths": [
                {
                    "path": "$.nested.property",
                    "value": {
                        "TaxClassificationRef": {
                            "value": "EUC-99990201-V1-00020000",
                        },
                    },
                },
            ],
        },
    ])

    assert res.update_company_response is not None

    # Handle response
    print(res.update_company_response)

Parameters

Parameter Type Required Description Example
id str ✔️ ID of the record you are acting upon.
name Nullable[str] ✔️ Name of the company SpaceX
raw Optional[bool] Include raw response. Mostly used for debugging purposes
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
owner_id OptionalNullable[str] Owner ID 12345
image OptionalNullable[str] The Image URL of the company https://www.spacex.com/static/images/share.jpg
description OptionalNullable[str] A description of the company Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.
vat_number OptionalNullable[str] The VAT number of the company BE0689615164
currency OptionalNullable[models.Currency] Indicates the associated currency for an amount of money. Values correspond to ISO 4217. USD
status OptionalNullable[str] The status of the company Open
fax OptionalNullable[str] The fax number of the company +12129876543
annual_revenue OptionalNullable[str] The annual revenue of the company +$35m
number_of_employees OptionalNullable[str] Number of employees 500-1000
industry OptionalNullable[str] The industry represents the type of business the company is in. Apparel
ownership OptionalNullable[str] The ownership indicates the type of ownership of the company. Public
sales_tax_number OptionalNullable[str] A sales tax number is a unique number that identifies a company for tax purposes. 12456EN
payee_number OptionalNullable[str] A payee number is a unique number that identifies a payee for tax purposes. 78932EN
abn_or_tfn OptionalNullable[str] An ABN is necessary for operating a business, while a TFN (Tax File Number) is required for any person working in Australia. 46 115 614 695
abn_branch OptionalNullable[str] An ABN Branch (also known as a GST Branch) is used if part of your business needs to account for GST separately from its parent entity. 123
acn OptionalNullable[str] The Australian Company Number (ACN) is a nine digit number with the last digit being a check digit calculated using a modified modulus 10 calculation. ASIC has adopted a convention of always printing and displaying the ACN in the format XXX XXX XXX; three blocks of three characters, each block separated by a blank. XXX XXX XXX
first_name OptionalNullable[str] The first name of the person. Elon
last_name OptionalNullable[str] The last name of the person. Musk
bank_accounts List[models.BankAccount] N/A
websites List[models.Website] N/A
addresses List[models.Address] N/A
social_links List[models.SocialLink] N/A
phone_numbers List[models.PhoneNumber] N/A
emails List[models.Email] N/A
row_type Optional[models.CompanyRowType] N/A
custom_fields List[models.CustomField] N/A
tags List[str] N/A [
"New"
]
read_only OptionalNullable[bool] Whether the company is read-only or not false
salutation OptionalNullable[str] A formal salutation for the person. For example, 'Mr', 'Mrs' Mr
birthday datetime The date of birth of the person. 2000-08-12
pass_through List[models.PassThroughBody] The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.CrmCompaniesUpdateResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*

delete

Delete company

Example Usage

from apideck_unify import Apideck
import os

with Apideck(
    api_key=os.getenv("APIDECK_API_KEY", ""),
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:

    res = apideck.crm.companies.delete(id="<id>", raw=False, consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce")

    assert res.delete_company_response is not None

    # Handle response
    print(res.delete_company_response)

Parameters

Parameter Type Required Description Example
id str ✔️ ID of the record you are acting upon.
raw Optional[bool] Include raw response. Mostly used for debugging purposes
consumer_id Optional[str] ID of the consumer which you want to get or push data from test-consumer
app_id Optional[str] The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.CrmCompaniesDeleteResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*