Skip to content

katana_public_api_client.api.bin_transfer.create_bin_transfer

katana_public_api_client.api.bin_transfer.create_bin_transfer

Classes

Functions

asyncio(*, client, body) async

Create a bin transfer

Creates a bin transfer, optionally with rows and per-row traceability in one call. Bin transfers move stock between bin locations within a single location. New transfers start in CREATED; status changes go through the status endpoint.

Parameters:

  • body (CreateBinTransferRequest) –

    Request payload for creating a bin transfer, optionally with rows and per-row traceability in a single call. Example: {'location_id': 1, 'bin_transfer_number': 'BT-1', 'additional_info': 'urgent transfer', 'bin_transfer_rows': [{'variant_id': 42, 'quantity': '3', 'source_bin_location_id': 7, 'target_bin_location_id': 9, 'traceability': [{'batch_id': 100, 'quantity': '3'}]}]}.

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/bin_transfer/create_bin_transfer.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    body: CreateBinTransferRequest,
) -> BinTransfer | DetailedErrorResponse | ErrorResponse | None:
    """Create a bin transfer

     Creates a bin transfer, optionally with rows and per-row traceability in one
    call. Bin transfers move stock between bin locations within a single location.
    New transfers start in `CREATED`; status changes go through the status endpoint.

    Args:
        body (CreateBinTransferRequest): Request payload for creating a bin transfer, optionally
            with rows and per-row
            traceability in a single call. Example: {'location_id': 1, 'bin_transfer_number': 'BT-1',
            'additional_info': 'urgent transfer', 'bin_transfer_rows': [{'variant_id': 42, 'quantity':
            '3', 'source_bin_location_id': 7, 'target_bin_location_id': 9, 'traceability':
            [{'batch_id': 100, 'quantity': '3'}]}]}.

    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:
        BinTransfer | DetailedErrorResponse | ErrorResponse
    """

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

asyncio_detailed(*, client, body) async

Create a bin transfer

Creates a bin transfer, optionally with rows and per-row traceability in one call. Bin transfers move stock between bin locations within a single location. New transfers start in CREATED; status changes go through the status endpoint.

Parameters:

  • body (CreateBinTransferRequest) –

    Request payload for creating a bin transfer, optionally with rows and per-row traceability in a single call. Example: {'location_id': 1, 'bin_transfer_number': 'BT-1', 'additional_info': 'urgent transfer', 'bin_transfer_rows': [{'variant_id': 42, 'quantity': '3', 'source_bin_location_id': 7, 'target_bin_location_id': 9, 'traceability': [{'batch_id': 100, 'quantity': '3'}]}]}.

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/bin_transfer/create_bin_transfer.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreateBinTransferRequest,
) -> Response[BinTransfer | DetailedErrorResponse | ErrorResponse]:
    """Create a bin transfer

     Creates a bin transfer, optionally with rows and per-row traceability in one
    call. Bin transfers move stock between bin locations within a single location.
    New transfers start in `CREATED`; status changes go through the status endpoint.

    Args:
        body (CreateBinTransferRequest): Request payload for creating a bin transfer, optionally
            with rows and per-row
            traceability in a single call. Example: {'location_id': 1, 'bin_transfer_number': 'BT-1',
            'additional_info': 'urgent transfer', 'bin_transfer_rows': [{'variant_id': 42, 'quantity':
            '3', 'source_bin_location_id': 7, 'target_bin_location_id': 9, 'traceability':
            [{'batch_id': 100, 'quantity': '3'}]}]}.

    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[BinTransfer | DetailedErrorResponse | ErrorResponse]
    """

    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 bin transfer

Creates a bin transfer, optionally with rows and per-row traceability in one call. Bin transfers move stock between bin locations within a single location. New transfers start in CREATED; status changes go through the status endpoint.

Parameters:

  • body (CreateBinTransferRequest) –

    Request payload for creating a bin transfer, optionally with rows and per-row traceability in a single call. Example: {'location_id': 1, 'bin_transfer_number': 'BT-1', 'additional_info': 'urgent transfer', 'bin_transfer_rows': [{'variant_id': 42, 'quantity': '3', 'source_bin_location_id': 7, 'target_bin_location_id': 9, 'traceability': [{'batch_id': 100, 'quantity': '3'}]}]}.

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/bin_transfer/create_bin_transfer.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    body: CreateBinTransferRequest,
) -> BinTransfer | DetailedErrorResponse | ErrorResponse | None:
    """Create a bin transfer

     Creates a bin transfer, optionally with rows and per-row traceability in one
    call. Bin transfers move stock between bin locations within a single location.
    New transfers start in `CREATED`; status changes go through the status endpoint.

    Args:
        body (CreateBinTransferRequest): Request payload for creating a bin transfer, optionally
            with rows and per-row
            traceability in a single call. Example: {'location_id': 1, 'bin_transfer_number': 'BT-1',
            'additional_info': 'urgent transfer', 'bin_transfer_rows': [{'variant_id': 42, 'quantity':
            '3', 'source_bin_location_id': 7, 'target_bin_location_id': 9, 'traceability':
            [{'batch_id': 100, 'quantity': '3'}]}]}.

    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:
        BinTransfer | DetailedErrorResponse | ErrorResponse
    """

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

sync_detailed(*, client, body)

Create a bin transfer

Creates a bin transfer, optionally with rows and per-row traceability in one call. Bin transfers move stock between bin locations within a single location. New transfers start in CREATED; status changes go through the status endpoint.

Parameters:

  • body (CreateBinTransferRequest) –

    Request payload for creating a bin transfer, optionally with rows and per-row traceability in a single call. Example: {'location_id': 1, 'bin_transfer_number': 'BT-1', 'additional_info': 'urgent transfer', 'bin_transfer_rows': [{'variant_id': 42, 'quantity': '3', 'source_bin_location_id': 7, 'target_bin_location_id': 9, 'traceability': [{'batch_id': 100, 'quantity': '3'}]}]}.

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/bin_transfer/create_bin_transfer.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: CreateBinTransferRequest,
) -> Response[BinTransfer | DetailedErrorResponse | ErrorResponse]:
    """Create a bin transfer

     Creates a bin transfer, optionally with rows and per-row traceability in one
    call. Bin transfers move stock between bin locations within a single location.
    New transfers start in `CREATED`; status changes go through the status endpoint.

    Args:
        body (CreateBinTransferRequest): Request payload for creating a bin transfer, optionally
            with rows and per-row
            traceability in a single call. Example: {'location_id': 1, 'bin_transfer_number': 'BT-1',
            'additional_info': 'urgent transfer', 'bin_transfer_rows': [{'variant_id': 42, 'quantity':
            '3', 'source_bin_location_id': 7, 'target_bin_location_id': 9, 'traceability':
            [{'batch_id': 100, 'quantity': '3'}]}]}.

    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[BinTransfer | DetailedErrorResponse | ErrorResponse]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)