Skip to content

Latest commit

 

History

History
348 lines (240 loc) · 38.4 KB

File metadata and controls

348 lines (240 loc) · 38.4 KB

Nexus

Overview

Available Operations

get_all

Get a list of all nexuses for the organization.

Example Usage

from kintsugi_tax_platform_sdk import SDK


with SDK(
    api_key_header="<YOUR_API_KEY_HERE>",
) as sdk:

    res = sdk.nexus.get_all(x_organization_id="org_12345", 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 Example
x_organization_id Nullable[str] ✔️ The unique identifier for the organization making the request org_12345
without_pagination Optional[bool] Return all results without pagination
disregard_view OptionalNullable[str] Filter nexuses by disregard view: 'exposed' or 'disregarded'
search_query OptionalNullable[str] Search nexuses by state code or state name
status_in OptionalNullable[str] N/A
state_code OptionalNullable[str] N/A
state_code_in OptionalNullable[str] N/A
country_code_in OptionalNullable[str] N/A
tax_type_in OptionalNullable[str] N/A
order_by OptionalNullable[str] N/A
collected_tax_nexus_met OptionalNullable[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.ResponseGetNexusForOrgV1NexusGet

Errors

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

get_physical

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

Example Usage

from kintsugi_tax_platform_sdk import SDK


with SDK(
    api_key_header="<YOUR_API_KEY_HERE>",
) as sdk:

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

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
x_organization_id Nullable[str] ✔️ The unique identifier for the organization making the request org_12345
page Optional[int] Page number
size Optional[int] Page size
country_code OptionalNullable[str] N/A
state_code OptionalNullable[str] N/A
order_by OptionalNullable[str] N/A
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(
    api_key_header="<YOUR_API_KEY_HERE>",
) as sdk:

    res = sdk.nexus.create_physical(x_organization_id="org_12345", country_code=models.CountryCodeEnum.US, state_code="CA", start_date=date.fromisoformat("2024-01-01"), category=models.PhysicalNexusCategory.PHYSICAL_BUSINESS_LOCATION, end_date=date.fromisoformat("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 Example
x_organization_id Nullable[str] ✔️ The unique identifier for the organization making the request org_12345
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 datetime The date when the
nexus ended, if applicable.
external_id OptionalNullable[str] Optional
external identifier for the nexus.
source Optional[models.PhysicalNexusSource] N/A
street_1 OptionalNullable[str] Primary street address for the physical presence location.
street_2 OptionalNullable[str] Additional street address details, such as suite or unit number.
city OptionalNullable[str] City of the physical presence location.
postal_code OptionalNullable[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 */*

get_physical_nexus_categories_v1_nexus_physical_nexus_categories_get

Get physical nexus categories

Example Usage

from kintsugi_tax_platform_sdk import SDK


with SDK(
    api_key_header="<YOUR_API_KEY_HERE>",
) as sdk:

    res = sdk.nexus.get_physical_nexus_categories_v1_nexus_physical_nexus_categories_get(x_organization_id="org_12345")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
x_organization_id Nullable[str] ✔️ The unique identifier for the organization making the request org_12345
country_code OptionalNullable[models.CountryCodeEnum] N/A
state_code OptionalNullable[str] N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

List[models.PhysicalNexusCategories]

Errors

Error Type Status Code Content Type
errors.HTTPValidationError 422 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


with SDK(
    api_key_header="<YOUR_API_KEY_HERE>",
) as sdk:

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

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
physical_nexus_id str ✔️ The unique identifier of the physical
nexus to delete.
x_organization_id Nullable[str] ✔️ The unique identifier for the organization making the request org_12345
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 */*

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(
    api_key_header="<YOUR_API_KEY_HERE>",
) as sdk:

    res = sdk.nexus.update_physical_nexus(physical_nexus_id="<id>", x_organization_id="org_12345", start_date=date.fromisoformat("2024-01-01"), category=models.PhysicalNexusCategory.PHYSICAL_BUSINESS_LOCATION, end_date=date.fromisoformat("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 Example
physical_nexus_id str ✔️ The unique identifier of the physical
nexus to update.
x_organization_id Nullable[str] ✔️ The unique identifier for the organization making the request org_12345
start_date datetime ✔️ The date when the nexus became
effective (YYYY-MM-DD).
category models.PhysicalNexusCategory ✔️ N/A
end_date datetime The date when the
nexus ends, if applicable (YYYY-MM-DD).
street_1 OptionalNullable[str] Primary street address for the physical presence location.
street_2 OptionalNullable[str] Additional street address details, such as suite or unit number.
city OptionalNullable[str] City of the physical presence location.
postal_code OptionalNullable[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 */*

get_nexus_details_for_id_v1_nexus_nexus_id_get

Get details for a specific nexus by its ID.

Example Usage

from kintsugi_tax_platform_sdk import SDK


with SDK(
    api_key_header="<YOUR_API_KEY_HERE>",
) as sdk:

    res = sdk.nexus.get_nexus_details_for_id_v1_nexus_nexus_id_get(nexus_id="<id>", x_organization_id="org_12345")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
nexus_id str ✔️ The unique identifier of the nexus.
x_organization_id Nullable[str] ✔️ The unique identifier for the organization making the request org_12345
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.NexusResponse

Errors

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