Skip to content

Latest commit

 

History

History
270 lines (192 loc) · 30.1 KB

File metadata and controls

270 lines (192 loc) · 30.1 KB

Products

Overview

Available Operations

get_products_v1_products_get

Retrieve a paginated list of products based on filters and search query.

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.products.get_products_v1_products_get(page=1, size=50)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
query Optional[str] Search term to filter products by name or other details.
status_in Optional[str] Filter products by status (comma-separated)
product_category_in Optional[str] Filter products by category (comma-separated)
product_subcategory_in Optional[str] Filter products by subcategory (comma-separated)
source_in Optional[str] Filter products by source (comma-separated)
order_by Optional[str] Order results by specified fields (comma-separated)
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.PageProductRead

Errors

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

create_product_v1_products_post

The Create Product API allows users to manually create a new product in the system. This includes specifying product details such as category, subcategory, and tax exemption status, etc. You can retrieve supported categories and subcategories from GET /products/categories endpoint

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.products.create_product_v1_products_post(external_id="prod_001", name="T-shirts", tax_exempt=False, description="Common items of everyday wearing apparel designed for human use, covering a wide variety of non-specialized garments.", status=models.ProductStatusEnum.APPROVED, source=models.SourceEnum.BIGCOMMERCE)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
external_id str ✔️ A unique external identifier for the product.
name str ✔️ The name of the product.
product_category models.ProductCategoryEnum ✔️ N/A
product_subcategory models.ProductSubCategoryEnum ✔️ N/A
tax_exempt bool ✔️ Specifies whether the product is tax-exempt.
description Optional[str] A description of the product.
status Optional[models.ProductStatusEnum] N/A
source Optional[models.SourceEnum] N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ProductRead

Errors

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

get_product_categories_v1_products_categories_get

The Get Product Categories API retrieves all product categories. This endpoint helps users understand and select the appropriate categories for their products.

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.products.get_product_categories_v1_products_categories_get()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ProductCategories

Errors

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

retrieve

The Get Product By ID API retrieves detailed information about a single product by its unique ID. This API helps in viewing the specific details of a product, including its attributes, status, and categorization.

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.products.retrieve(product_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
product_id str ✔️ The unique identifier for the product you want to retrieve.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ProductRead

Errors

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

update

The Update Product API allows users to modify the details of an existing product identified by its unique product_id. You can retrieve supported categories and subcategories from GET /products/categories endpoint

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.products.update(product_id="<id>", name="Updated T-Shirt", product_category="Physical", product_subcategory="General Clothing", tax_exempt=False, external_id="prod_001", description="An updated description for the product", status=models.ProductStatusEnum.APPROVED, classification_failed=False)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
product_id str ✔️ Unique identifier of the product to be updated.
name str ✔️ Name of the product.
product_category str ✔️ Main category of the product.
For example, Physical, Digital, etc. You can
retrieve supported categories from GET /products/categories endpoint
product_subcategory str ✔️ Subcategory of the product.
For example, General Clothing, UNKNOWN, etc. You can
retrieve supported subcategories from GET /products/categories endpoint
tax_exempt bool ✔️ Indicates whether the product is tax-exempt.
id Optional[str] The unique identifier of the product to be updated.
external_id Optional[str] External identifier provided for the product,
typically by the source system.
sku List[str] N/A
description Optional[str] Description of the product.
status Optional[models.ProductStatusEnum] N/A
classification_failed Optional[bool] Indicates if the product classification failed.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ProductRead

Errors

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