Skip to content

katana_public_api_client.api.manufacturing_order.create_manufacturing_order

katana_public_api_client.api.manufacturing_order.create_manufacturing_order

Classes

Functions

asyncio(*, client, body) async

Create a manufacturing order

Creates a new manufacturing order object. Manufacturing order recipe and operation rows are created automatically based on the product recipe and operations.

Parameters:

  • body (CreateManufacturingOrderRequest) –

    Request payload for creating a new manufacturing order to initiate production of products or components. Example: {'variant_id': 2101, 'planned_quantity': 50, 'location_id': 1, 'order_created_date': '2024-01-15T08:00:00Z', 'production_deadline_date': '2024-01-25T17:00:00Z', 'additional_info': 'Priority order for new product launch'}.

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/manufacturing_order/create_manufacturing_order.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    body: CreateManufacturingOrderRequest,
) -> ErrorResponse | ManufacturingOrder | None:
    """Create a manufacturing order

     Creates a new manufacturing order object. Manufacturing order recipe and
      operation rows are created automatically based on the product recipe and operations.

    Args:
        body (CreateManufacturingOrderRequest): Request payload for creating a new manufacturing
            order to initiate production of products or components.
             Example: {'variant_id': 2101, 'planned_quantity': 50, 'location_id': 1,
            'order_created_date': '2024-01-15T08:00:00Z', 'production_deadline_date':
            '2024-01-25T17:00:00Z', 'additional_info': 'Priority order for new product launch'}.

    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[ErrorResponse, ManufacturingOrder]
    """

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

asyncio_detailed(*, client, body) async

Create a manufacturing order

Creates a new manufacturing order object. Manufacturing order recipe and operation rows are created automatically based on the product recipe and operations.

Parameters:

  • body (CreateManufacturingOrderRequest) –

    Request payload for creating a new manufacturing order to initiate production of products or components. Example: {'variant_id': 2101, 'planned_quantity': 50, 'location_id': 1, 'order_created_date': '2024-01-15T08:00:00Z', 'production_deadline_date': '2024-01-25T17:00:00Z', 'additional_info': 'Priority order for new product launch'}.

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/manufacturing_order/create_manufacturing_order.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreateManufacturingOrderRequest,
) -> Response[ErrorResponse | ManufacturingOrder]:
    """Create a manufacturing order

     Creates a new manufacturing order object. Manufacturing order recipe and
      operation rows are created automatically based on the product recipe and operations.

    Args:
        body (CreateManufacturingOrderRequest): Request payload for creating a new manufacturing
            order to initiate production of products or components.
             Example: {'variant_id': 2101, 'planned_quantity': 50, 'location_id': 1,
            'order_created_date': '2024-01-15T08:00:00Z', 'production_deadline_date':
            '2024-01-25T17:00:00Z', 'additional_info': 'Priority order for new product launch'}.

    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[ErrorResponse, ManufacturingOrder]]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, body)

Create a manufacturing order

Creates a new manufacturing order object. Manufacturing order recipe and operation rows are created automatically based on the product recipe and operations.

Parameters:

  • body (CreateManufacturingOrderRequest) –

    Request payload for creating a new manufacturing order to initiate production of products or components. Example: {'variant_id': 2101, 'planned_quantity': 50, 'location_id': 1, 'order_created_date': '2024-01-15T08:00:00Z', 'production_deadline_date': '2024-01-25T17:00:00Z', 'additional_info': 'Priority order for new product launch'}.

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/manufacturing_order/create_manufacturing_order.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    body: CreateManufacturingOrderRequest,
) -> ErrorResponse | ManufacturingOrder | None:
    """Create a manufacturing order

     Creates a new manufacturing order object. Manufacturing order recipe and
      operation rows are created automatically based on the product recipe and operations.

    Args:
        body (CreateManufacturingOrderRequest): Request payload for creating a new manufacturing
            order to initiate production of products or components.
             Example: {'variant_id': 2101, 'planned_quantity': 50, 'location_id': 1,
            'order_created_date': '2024-01-15T08:00:00Z', 'production_deadline_date':
            '2024-01-25T17:00:00Z', 'additional_info': 'Priority order for new product launch'}.

    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[ErrorResponse, ManufacturingOrder]
    """

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

sync_detailed(*, client, body)

Create a manufacturing order

Creates a new manufacturing order object. Manufacturing order recipe and operation rows are created automatically based on the product recipe and operations.

Parameters:

  • body (CreateManufacturingOrderRequest) –

    Request payload for creating a new manufacturing order to initiate production of products or components. Example: {'variant_id': 2101, 'planned_quantity': 50, 'location_id': 1, 'order_created_date': '2024-01-15T08:00:00Z', 'production_deadline_date': '2024-01-25T17:00:00Z', 'additional_info': 'Priority order for new product launch'}.

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/manufacturing_order/create_manufacturing_order.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreateManufacturingOrderRequest,
) -> Response[ErrorResponse | ManufacturingOrder]:
    """Create a manufacturing order

     Creates a new manufacturing order object. Manufacturing order recipe and
      operation rows are created automatically based on the product recipe and operations.

    Args:
        body (CreateManufacturingOrderRequest): Request payload for creating a new manufacturing
            order to initiate production of products or components.
             Example: {'variant_id': 2101, 'planned_quantity': 50, 'location_id': 1,
            'order_created_date': '2024-01-15T08:00:00Z', 'production_deadline_date':
            '2024-01-25T17:00:00Z', 'additional_info': 'Priority order for new product launch'}.

    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[ErrorResponse, ManufacturingOrder]]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)