Skip to content

Latest commit

 

History

History
270 lines (192 loc) · 25.2 KB

File metadata and controls

270 lines (192 loc) · 25.2 KB

Nexus

Overview

Available Operations

get_physical

Retrieve a paginated list of physical nexuses for a specific organization.

Example Usage

from kintsugi_tax_platform_sdk import SDK, models


with SDK(
    security=models.Security(
        api_key_header="<YOUR_API_KEY_HERE>",
        custom_header="<YOUR_API_KEY_HERE>",
    ),
) as sdk:

    res = sdk.nexus.get_physical(order_by="country_code,state_code,start_date,end_date", page=1, size=50)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
country_code Optional[str] N/A
state_code Optional[str] N/A
order_by Optional[str] N/A
page Optional[int] Page number
size Optional[int] Page size
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.PagePhysicalNexusRead

Errors

Error Type Status Code Content Type
errors.ErrorResponse 401, 404 application/json
errors.BackendSrcNexusResponsesValidationErrorResponse 422 application/json
errors.ErrorResponse 500 application/json
errors.APIError 4XX, 5XX */*

create_physical

The Create Physical Nexus API allows you to create a new physical nexus by specifying its attributes, including the location, start date, end date, etc.

Example Usage

from datetime import date
from kintsugi_tax_platform_sdk import SDK, models


with SDK(
    security=models.Security(
        api_key_header="<YOUR_API_KEY_HERE>",
        custom_header="<YOUR_API_KEY_HERE>",
    ),
) as sdk:

    res = sdk.nexus.create_physical(country_code=models.CountryCodeEnum.US, state_code="CA", start_date=date.fromisoformat("2024-01-01"), category=models.PhysicalNexusCategory.PHYSICAL_BUSINESS_LOCATION, end_date="2025-01-01", external_id="ext_ABC123", source=models.PhysicalNexusSource.USER, street_1="123 Main Street", street_2="Suite 100", city="San Francisco", postal_code="94102")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
country_code models.CountryCodeEnum ✔️ N/A
state_code str ✔️ The state or province code in
ISO 3166-2 format (e.g., CA).
start_date datetime ✔️ The date when the nexus became
effective (YYYY-MM-DD).
category models.PhysicalNexusCategory ✔️ N/A
end_date Optional[str] The date when the
nexus ended, if applicable.
external_id Optional[str] Optional
external identifier for the nexus.
source Optional[models.PhysicalNexusSource] N/A
street_1 Optional[str] Primary street address for the physical presence location.
street_2 Optional[str] Additional street address details, such as suite or unit number.
city Optional[str] City of the physical presence location.
postal_code Optional[str] ZIP or postal code of the physical presence location.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.PhysicalNexusRead

Errors

Error Type Status Code Content Type
errors.ErrorResponse 401 application/json
errors.BackendSrcNexusResponsesValidationErrorResponse 422 application/json
errors.ErrorResponse 500 application/json
errors.APIError 4XX, 5XX */*

update_physical_nexus

The Update Physical Nexus API allows you to modify the details of an existing physical nexus by its unique ID.

Example Usage

from datetime import date
from kintsugi_tax_platform_sdk import SDK, models


with SDK(
    security=models.Security(
        api_key_header="<YOUR_API_KEY_HERE>",
        custom_header="<YOUR_API_KEY_HERE>",
    ),
) as sdk:

    res = sdk.nexus.update_physical_nexus(physical_nexus_id="<id>", start_date=date.fromisoformat("2024-01-01"), category=models.PhysicalNexusCategory.PHYSICAL_BUSINESS_LOCATION, end_date="2025-01-01", street_1="123 Main Street", street_2="Suite 100", city="San Francisco", postal_code="94102")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
physical_nexus_id str ✔️ The unique identifier of the physical
nexus to update.
start_date datetime ✔️ The date when the nexus became
effective (YYYY-MM-DD).
category models.PhysicalNexusCategory ✔️ N/A
end_date Optional[str] The date when the
nexus ends, if applicable (YYYY-MM-DD).
street_1 Optional[str] Primary street address for the physical presence location.
street_2 Optional[str] Additional street address details, such as suite or unit number.
city Optional[str] City of the physical presence location.
postal_code Optional[str] ZIP or postal code of the physical presence location.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.PhysicalNexusRead

Errors

Error Type Status Code Content Type
errors.ErrorResponse 401, 404 application/json
errors.BackendSrcNexusResponsesValidationErrorResponse 422 application/json
errors.ErrorResponse 500 application/json
errors.APIError 4XX, 5XX */*

delete_physical_nexus

The Delete Physical Nexus API allows you to remove an existing physical nexus by its unique ID.

Example Usage

from kintsugi_tax_platform_sdk import SDK, models


with SDK(
    security=models.Security(
        api_key_header="<YOUR_API_KEY_HERE>",
        custom_header="<YOUR_API_KEY_HERE>",
    ),
) as sdk:

    res = sdk.nexus.delete_physical_nexus(physical_nexus_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
physical_nexus_id str ✔️ The unique identifier of the physical
nexus to delete.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

Any

Errors

Error Type Status Code Content Type
errors.ErrorResponse 401, 404 application/json
errors.BackendSrcNexusResponsesValidationErrorResponse 422 application/json
errors.ErrorResponse 500 application/json
errors.APIError 4XX, 5XX */*

get_all

Get a list of all nexuses for the organization.

Example Usage

from kintsugi_tax_platform_sdk import SDK, models


with SDK(
    security=models.Security(
        api_key_header="<YOUR_API_KEY_HERE>",
        custom_header="<YOUR_API_KEY_HERE>",
    ),
) as sdk:

    res = sdk.nexus.get_all(without_pagination=False, status_in="APPROACHING,NOT_EXPOSED,PENDING_REGISTRATION,EXPOSED,APPROACHING,REGISTERED", order_by="state_code,country_code", page=1, size=50)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
without_pagination Optional[bool] Return all results without pagination
disregard_view Optional[str] Filter nexuses by disregard view: 'exposed' or 'disregarded'
status_in Optional[str] N/A
state_code Optional[str] N/A
country_code_in Optional[str] N/A
order_by Optional[str] N/A
collected_tax_nexus_met Optional[bool] N/A
page Optional[int] N/A
size Optional[int] N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.PageNexusResponse

Errors

Error Type Status Code Content Type
errors.HTTPValidationError 422 application/json
errors.APIError 4XX, 5XX */*