Skip to content

katana_public_api_client.api.product.update_product

katana_public_api_client.api.product.update_product

Classes

Functions

asyncio(id, *, client, body) async

Update a product

Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters:

  • id (int) –
  • body (UpdateProductRequest) –

    Request payload for updating an existing finished product's properties, configurations, and manufacturing specifications Example: {'name': 'Professional Kitchen Knife Set', 'uom': 'set', 'category_name': 'Premium Kitchenware', 'is_sellable': True, 'is_producible': True, 'is_purchasable': False, 'is_auto_assembly': False, 'default_supplier_id': 1501, 'additional_info': 'High-carbon stainless steel with ergonomic handles, dishwasher safe', 'batch_tracked': False, 'serial_tracked': True, 'operations_in_sequence': True, 'purchase_uom': 'set', 'purchase_uom_conversion_rate': 1.0, 'custom_field_collection_id': 5, 'configs': [{'name': 'Piece Count', 'values': ['6-piece', '8-piece', '12-piece']}, {'name': 'Handle Material', 'values': ['Wood', 'Steel', 'Composite']}]}.

Raises:

  • UnexpectedStatus

    If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

  • TimeoutException

    If the request takes longer than Client.timeout.

Returns:

Source code in katana_public_api_client/api/product/update_product.py
async def asyncio(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdateProductRequest,
) -> DetailedErrorResponse | ErrorResponse | Product | None:
    """Update a product

     Updates the specified product by setting the values of the parameters passed.
        Any parameters not provided will be left unchanged.

    Args:
        id (int):
        body (UpdateProductRequest): Request payload for updating an existing finished product's
            properties, configurations, and manufacturing specifications Example: {'name':
            'Professional Kitchen Knife Set', 'uom': 'set', 'category_name': 'Premium Kitchenware',
            'is_sellable': True, 'is_producible': True, 'is_purchasable': False, 'is_auto_assembly':
            False, 'default_supplier_id': 1501, 'additional_info': 'High-carbon stainless steel with
            ergonomic handles, dishwasher safe', 'batch_tracked': False, 'serial_tracked': True,
            'operations_in_sequence': True, 'purchase_uom': 'set', 'purchase_uom_conversion_rate':
            1.0, 'custom_field_collection_id': 5, 'configs': [{'name': 'Piece Count', 'values':
            ['6-piece', '8-piece', '12-piece']}, {'name': 'Handle Material', 'values': ['Wood',
            'Steel', 'Composite']}]}.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.


    Returns:
        Union[DetailedErrorResponse, ErrorResponse, Product]
    """

    return (
        await asyncio_detailed(
            id=id,
            client=client,
            body=body,
        )
    ).parsed

asyncio_detailed(id, *, client, body) async

Update a product

Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters:

  • id (int) –
  • body (UpdateProductRequest) –

    Request payload for updating an existing finished product's properties, configurations, and manufacturing specifications Example: {'name': 'Professional Kitchen Knife Set', 'uom': 'set', 'category_name': 'Premium Kitchenware', 'is_sellable': True, 'is_producible': True, 'is_purchasable': False, 'is_auto_assembly': False, 'default_supplier_id': 1501, 'additional_info': 'High-carbon stainless steel with ergonomic handles, dishwasher safe', 'batch_tracked': False, 'serial_tracked': True, 'operations_in_sequence': True, 'purchase_uom': 'set', 'purchase_uom_conversion_rate': 1.0, 'custom_field_collection_id': 5, 'configs': [{'name': 'Piece Count', 'values': ['6-piece', '8-piece', '12-piece']}, {'name': 'Handle Material', 'values': ['Wood', 'Steel', 'Composite']}]}.

Raises:

  • UnexpectedStatus

    If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

  • TimeoutException

    If the request takes longer than Client.timeout.

Returns:

Source code in katana_public_api_client/api/product/update_product.py
async def asyncio_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdateProductRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | Product]:
    """Update a product

     Updates the specified product by setting the values of the parameters passed.
        Any parameters not provided will be left unchanged.

    Args:
        id (int):
        body (UpdateProductRequest): Request payload for updating an existing finished product's
            properties, configurations, and manufacturing specifications Example: {'name':
            'Professional Kitchen Knife Set', 'uom': 'set', 'category_name': 'Premium Kitchenware',
            'is_sellable': True, 'is_producible': True, 'is_purchasable': False, 'is_auto_assembly':
            False, 'default_supplier_id': 1501, 'additional_info': 'High-carbon stainless steel with
            ergonomic handles, dishwasher safe', 'batch_tracked': False, 'serial_tracked': True,
            'operations_in_sequence': True, 'purchase_uom': 'set', 'purchase_uom_conversion_rate':
            1.0, 'custom_field_collection_id': 5, 'configs': [{'name': 'Piece Count', 'values':
            ['6-piece', '8-piece', '12-piece']}, {'name': 'Handle Material', 'values': ['Wood',
            'Steel', 'Composite']}]}.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.


    Returns:
        Response[Union[DetailedErrorResponse, ErrorResponse, Product]]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

    response = await client.get_async_httpx_client().request(**kwargs)

    return _build_response(client=client, response=response)

sync(id, *, client, body)

Update a product

Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters:

  • id (int) –
  • body (UpdateProductRequest) –

    Request payload for updating an existing finished product's properties, configurations, and manufacturing specifications Example: {'name': 'Professional Kitchen Knife Set', 'uom': 'set', 'category_name': 'Premium Kitchenware', 'is_sellable': True, 'is_producible': True, 'is_purchasable': False, 'is_auto_assembly': False, 'default_supplier_id': 1501, 'additional_info': 'High-carbon stainless steel with ergonomic handles, dishwasher safe', 'batch_tracked': False, 'serial_tracked': True, 'operations_in_sequence': True, 'purchase_uom': 'set', 'purchase_uom_conversion_rate': 1.0, 'custom_field_collection_id': 5, 'configs': [{'name': 'Piece Count', 'values': ['6-piece', '8-piece', '12-piece']}, {'name': 'Handle Material', 'values': ['Wood', 'Steel', 'Composite']}]}.

Raises:

  • UnexpectedStatus

    If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

  • TimeoutException

    If the request takes longer than Client.timeout.

Returns:

Source code in katana_public_api_client/api/product/update_product.py
def sync(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdateProductRequest,
) -> DetailedErrorResponse | ErrorResponse | Product | None:
    """Update a product

     Updates the specified product by setting the values of the parameters passed.
        Any parameters not provided will be left unchanged.

    Args:
        id (int):
        body (UpdateProductRequest): Request payload for updating an existing finished product's
            properties, configurations, and manufacturing specifications Example: {'name':
            'Professional Kitchen Knife Set', 'uom': 'set', 'category_name': 'Premium Kitchenware',
            'is_sellable': True, 'is_producible': True, 'is_purchasable': False, 'is_auto_assembly':
            False, 'default_supplier_id': 1501, 'additional_info': 'High-carbon stainless steel with
            ergonomic handles, dishwasher safe', 'batch_tracked': False, 'serial_tracked': True,
            'operations_in_sequence': True, 'purchase_uom': 'set', 'purchase_uom_conversion_rate':
            1.0, 'custom_field_collection_id': 5, 'configs': [{'name': 'Piece Count', 'values':
            ['6-piece', '8-piece', '12-piece']}, {'name': 'Handle Material', 'values': ['Wood',
            'Steel', 'Composite']}]}.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.


    Returns:
        Union[DetailedErrorResponse, ErrorResponse, Product]
    """

    return sync_detailed(
        id=id,
        client=client,
        body=body,
    ).parsed

sync_detailed(id, *, client, body)

Update a product

Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters:

  • id (int) –
  • body (UpdateProductRequest) –

    Request payload for updating an existing finished product's properties, configurations, and manufacturing specifications Example: {'name': 'Professional Kitchen Knife Set', 'uom': 'set', 'category_name': 'Premium Kitchenware', 'is_sellable': True, 'is_producible': True, 'is_purchasable': False, 'is_auto_assembly': False, 'default_supplier_id': 1501, 'additional_info': 'High-carbon stainless steel with ergonomic handles, dishwasher safe', 'batch_tracked': False, 'serial_tracked': True, 'operations_in_sequence': True, 'purchase_uom': 'set', 'purchase_uom_conversion_rate': 1.0, 'custom_field_collection_id': 5, 'configs': [{'name': 'Piece Count', 'values': ['6-piece', '8-piece', '12-piece']}, {'name': 'Handle Material', 'values': ['Wood', 'Steel', 'Composite']}]}.

Raises:

  • UnexpectedStatus

    If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

  • TimeoutException

    If the request takes longer than Client.timeout.

Returns:

Source code in katana_public_api_client/api/product/update_product.py
def sync_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
    body: UpdateProductRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | Product]:
    """Update a product

     Updates the specified product by setting the values of the parameters passed.
        Any parameters not provided will be left unchanged.

    Args:
        id (int):
        body (UpdateProductRequest): Request payload for updating an existing finished product's
            properties, configurations, and manufacturing specifications Example: {'name':
            'Professional Kitchen Knife Set', 'uom': 'set', 'category_name': 'Premium Kitchenware',
            'is_sellable': True, 'is_producible': True, 'is_purchasable': False, 'is_auto_assembly':
            False, 'default_supplier_id': 1501, 'additional_info': 'High-carbon stainless steel with
            ergonomic handles, dishwasher safe', 'batch_tracked': False, 'serial_tracked': True,
            'operations_in_sequence': True, 'purchase_uom': 'set', 'purchase_uom_conversion_rate':
            1.0, 'custom_field_collection_id': 5, 'configs': [{'name': 'Piece Count', 'values':
            ['6-piece', '8-piece', '12-piece']}, {'name': 'Handle Material', 'values': ['Wood',
            'Steel', 'Composite']}]}.

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.


    Returns:
        Response[Union[DetailedErrorResponse, ErrorResponse, Product]]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

    response = client.get_httpx_client().request(
        **kwargs,
    )

    return _build_response(client=client, response=response)