Skip to content

katana_public_api_client.api.storage_bin.get_bin_inventory

katana_public_api_client.api.storage_bin.get_bin_inventory

Classes

Functions

asyncio(*, client, granularity=UNSET, location_id=UNSET, variant_id=UNSET, bin_location_id=UNSET, batch_id=UNSET, serial_number_id=UNSET, limit=UNSET, page=UNSET) async

List bin inventory levels

Returns per-bin inventory levels at the chosen granularity. granularity=VARIANT (default) returns one row per (location, variant, bin); BATCH and SERIAL_NUMBER break rows down further by the matching traceability axis. Each row carries three decimal-string quantities: quantity_in_stock, quantity_committed, and quantity_expected.

A null bin_location_id, batch_id, or serial_number_id denotes stock whose traceability on that axis has not been set (unassigned bin, unbatched stock, untraced serial). Pass ?<param>=null to target those rows. Bin inventory levels are computed asynchronously and are eventually consistent.

Parameters:

  • granularity (BinInventoryGranularity | Unset, default: UNSET ) –

    Row granularity for a bin inventory query. VARIANT returns one row per (location, variant, bin); BATCH and SERIAL_NUMBER break rows down further by the matching traceability axis.

  • location_id (int | Unset, default: UNSET ) –
  • variant_id (int | Unset, default: UNSET ) –
  • bin_location_id (str | Unset, default: UNSET ) –
  • batch_id (str | Unset, default: UNSET ) –
  • serial_number_id (str | Unset, default: UNSET ) –
  • limit (int | Unset, default: UNSET ) –

    Default: 50.

  • page (int | Unset, default: UNSET ) –

    Default: 1.

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/storage_bin/get_bin_inventory.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    granularity: BinInventoryGranularity | Unset = UNSET,
    location_id: int | Unset = UNSET,
    variant_id: int | Unset = UNSET,
    bin_location_id: str | Unset = UNSET,
    batch_id: str | Unset = UNSET,
    serial_number_id: str | Unset = UNSET,
    limit: int | Unset = UNSET,
    page: int | Unset = UNSET,
) -> BinInventoryListResponse | DetailedErrorResponse | ErrorResponse | None:
    """List bin inventory levels

     Returns per-bin inventory levels at the chosen granularity. `granularity=VARIANT` (default) returns
    one row per (location, variant, bin); `BATCH` and `SERIAL_NUMBER` break rows down further by the
    matching traceability axis. Each row carries three decimal-string quantities: `quantity_in_stock`,
    `quantity_committed`, and `quantity_expected`.

    A null `bin_location_id`, `batch_id`, or `serial_number_id` denotes stock whose traceability on that
    axis has not been set (unassigned bin, unbatched stock, untraced serial). Pass `?<param>=null` to
    target those rows. Bin inventory levels are computed asynchronously and are eventually consistent.

    Args:
        granularity (BinInventoryGranularity | Unset): Row granularity for a bin inventory query.
            `VARIANT` returns one row per
            (location, variant, bin); `BATCH` and `SERIAL_NUMBER` break rows down further
            by the matching traceability axis.
        location_id (int | Unset):
        variant_id (int | Unset):
        bin_location_id (str | Unset):
        batch_id (str | Unset):
        serial_number_id (str | Unset):
        limit (int | Unset):  Default: 50.
        page (int | Unset):  Default: 1.


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

    return (
        await asyncio_detailed(
            client=client,
            granularity=granularity,
            location_id=location_id,
            variant_id=variant_id,
            bin_location_id=bin_location_id,
            batch_id=batch_id,
            serial_number_id=serial_number_id,
            limit=limit,
            page=page,
        )
    ).parsed

asyncio_detailed(*, client, granularity=UNSET, location_id=UNSET, variant_id=UNSET, bin_location_id=UNSET, batch_id=UNSET, serial_number_id=UNSET, limit=UNSET, page=UNSET) async

List bin inventory levels

Returns per-bin inventory levels at the chosen granularity. granularity=VARIANT (default) returns one row per (location, variant, bin); BATCH and SERIAL_NUMBER break rows down further by the matching traceability axis. Each row carries three decimal-string quantities: quantity_in_stock, quantity_committed, and quantity_expected.

A null bin_location_id, batch_id, or serial_number_id denotes stock whose traceability on that axis has not been set (unassigned bin, unbatched stock, untraced serial). Pass ?<param>=null to target those rows. Bin inventory levels are computed asynchronously and are eventually consistent.

Parameters:

  • granularity (BinInventoryGranularity | Unset, default: UNSET ) –

    Row granularity for a bin inventory query. VARIANT returns one row per (location, variant, bin); BATCH and SERIAL_NUMBER break rows down further by the matching traceability axis.

  • location_id (int | Unset, default: UNSET ) –
  • variant_id (int | Unset, default: UNSET ) –
  • bin_location_id (str | Unset, default: UNSET ) –
  • batch_id (str | Unset, default: UNSET ) –
  • serial_number_id (str | Unset, default: UNSET ) –
  • limit (int | Unset, default: UNSET ) –

    Default: 50.

  • page (int | Unset, default: UNSET ) –

    Default: 1.

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/storage_bin/get_bin_inventory.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    granularity: BinInventoryGranularity | Unset = UNSET,
    location_id: int | Unset = UNSET,
    variant_id: int | Unset = UNSET,
    bin_location_id: str | Unset = UNSET,
    batch_id: str | Unset = UNSET,
    serial_number_id: str | Unset = UNSET,
    limit: int | Unset = UNSET,
    page: int | Unset = UNSET,
) -> Response[BinInventoryListResponse | DetailedErrorResponse | ErrorResponse]:
    """List bin inventory levels

     Returns per-bin inventory levels at the chosen granularity. `granularity=VARIANT` (default) returns
    one row per (location, variant, bin); `BATCH` and `SERIAL_NUMBER` break rows down further by the
    matching traceability axis. Each row carries three decimal-string quantities: `quantity_in_stock`,
    `quantity_committed`, and `quantity_expected`.

    A null `bin_location_id`, `batch_id`, or `serial_number_id` denotes stock whose traceability on that
    axis has not been set (unassigned bin, unbatched stock, untraced serial). Pass `?<param>=null` to
    target those rows. Bin inventory levels are computed asynchronously and are eventually consistent.

    Args:
        granularity (BinInventoryGranularity | Unset): Row granularity for a bin inventory query.
            `VARIANT` returns one row per
            (location, variant, bin); `BATCH` and `SERIAL_NUMBER` break rows down further
            by the matching traceability axis.
        location_id (int | Unset):
        variant_id (int | Unset):
        bin_location_id (str | Unset):
        batch_id (str | Unset):
        serial_number_id (str | Unset):
        limit (int | Unset):  Default: 50.
        page (int | Unset):  Default: 1.


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

    kwargs = _get_kwargs(
        granularity=granularity,
        location_id=location_id,
        variant_id=variant_id,
        bin_location_id=bin_location_id,
        batch_id=batch_id,
        serial_number_id=serial_number_id,
        limit=limit,
        page=page,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, granularity=UNSET, location_id=UNSET, variant_id=UNSET, bin_location_id=UNSET, batch_id=UNSET, serial_number_id=UNSET, limit=UNSET, page=UNSET)

List bin inventory levels

Returns per-bin inventory levels at the chosen granularity. granularity=VARIANT (default) returns one row per (location, variant, bin); BATCH and SERIAL_NUMBER break rows down further by the matching traceability axis. Each row carries three decimal-string quantities: quantity_in_stock, quantity_committed, and quantity_expected.

A null bin_location_id, batch_id, or serial_number_id denotes stock whose traceability on that axis has not been set (unassigned bin, unbatched stock, untraced serial). Pass ?<param>=null to target those rows. Bin inventory levels are computed asynchronously and are eventually consistent.

Parameters:

  • granularity (BinInventoryGranularity | Unset, default: UNSET ) –

    Row granularity for a bin inventory query. VARIANT returns one row per (location, variant, bin); BATCH and SERIAL_NUMBER break rows down further by the matching traceability axis.

  • location_id (int | Unset, default: UNSET ) –
  • variant_id (int | Unset, default: UNSET ) –
  • bin_location_id (str | Unset, default: UNSET ) –
  • batch_id (str | Unset, default: UNSET ) –
  • serial_number_id (str | Unset, default: UNSET ) –
  • limit (int | Unset, default: UNSET ) –

    Default: 50.

  • page (int | Unset, default: UNSET ) –

    Default: 1.

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/storage_bin/get_bin_inventory.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    granularity: BinInventoryGranularity | Unset = UNSET,
    location_id: int | Unset = UNSET,
    variant_id: int | Unset = UNSET,
    bin_location_id: str | Unset = UNSET,
    batch_id: str | Unset = UNSET,
    serial_number_id: str | Unset = UNSET,
    limit: int | Unset = UNSET,
    page: int | Unset = UNSET,
) -> BinInventoryListResponse | DetailedErrorResponse | ErrorResponse | None:
    """List bin inventory levels

     Returns per-bin inventory levels at the chosen granularity. `granularity=VARIANT` (default) returns
    one row per (location, variant, bin); `BATCH` and `SERIAL_NUMBER` break rows down further by the
    matching traceability axis. Each row carries three decimal-string quantities: `quantity_in_stock`,
    `quantity_committed`, and `quantity_expected`.

    A null `bin_location_id`, `batch_id`, or `serial_number_id` denotes stock whose traceability on that
    axis has not been set (unassigned bin, unbatched stock, untraced serial). Pass `?<param>=null` to
    target those rows. Bin inventory levels are computed asynchronously and are eventually consistent.

    Args:
        granularity (BinInventoryGranularity | Unset): Row granularity for a bin inventory query.
            `VARIANT` returns one row per
            (location, variant, bin); `BATCH` and `SERIAL_NUMBER` break rows down further
            by the matching traceability axis.
        location_id (int | Unset):
        variant_id (int | Unset):
        bin_location_id (str | Unset):
        batch_id (str | Unset):
        serial_number_id (str | Unset):
        limit (int | Unset):  Default: 50.
        page (int | Unset):  Default: 1.


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

    return sync_detailed(
        client=client,
        granularity=granularity,
        location_id=location_id,
        variant_id=variant_id,
        bin_location_id=bin_location_id,
        batch_id=batch_id,
        serial_number_id=serial_number_id,
        limit=limit,
        page=page,
    ).parsed

sync_detailed(*, client, granularity=UNSET, location_id=UNSET, variant_id=UNSET, bin_location_id=UNSET, batch_id=UNSET, serial_number_id=UNSET, limit=UNSET, page=UNSET)

List bin inventory levels

Returns per-bin inventory levels at the chosen granularity. granularity=VARIANT (default) returns one row per (location, variant, bin); BATCH and SERIAL_NUMBER break rows down further by the matching traceability axis. Each row carries three decimal-string quantities: quantity_in_stock, quantity_committed, and quantity_expected.

A null bin_location_id, batch_id, or serial_number_id denotes stock whose traceability on that axis has not been set (unassigned bin, unbatched stock, untraced serial). Pass ?<param>=null to target those rows. Bin inventory levels are computed asynchronously and are eventually consistent.

Parameters:

  • granularity (BinInventoryGranularity | Unset, default: UNSET ) –

    Row granularity for a bin inventory query. VARIANT returns one row per (location, variant, bin); BATCH and SERIAL_NUMBER break rows down further by the matching traceability axis.

  • location_id (int | Unset, default: UNSET ) –
  • variant_id (int | Unset, default: UNSET ) –
  • bin_location_id (str | Unset, default: UNSET ) –
  • batch_id (str | Unset, default: UNSET ) –
  • serial_number_id (str | Unset, default: UNSET ) –
  • limit (int | Unset, default: UNSET ) –

    Default: 50.

  • page (int | Unset, default: UNSET ) –

    Default: 1.

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/storage_bin/get_bin_inventory.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    granularity: BinInventoryGranularity | Unset = UNSET,
    location_id: int | Unset = UNSET,
    variant_id: int | Unset = UNSET,
    bin_location_id: str | Unset = UNSET,
    batch_id: str | Unset = UNSET,
    serial_number_id: str | Unset = UNSET,
    limit: int | Unset = UNSET,
    page: int | Unset = UNSET,
) -> Response[BinInventoryListResponse | DetailedErrorResponse | ErrorResponse]:
    """List bin inventory levels

     Returns per-bin inventory levels at the chosen granularity. `granularity=VARIANT` (default) returns
    one row per (location, variant, bin); `BATCH` and `SERIAL_NUMBER` break rows down further by the
    matching traceability axis. Each row carries three decimal-string quantities: `quantity_in_stock`,
    `quantity_committed`, and `quantity_expected`.

    A null `bin_location_id`, `batch_id`, or `serial_number_id` denotes stock whose traceability on that
    axis has not been set (unassigned bin, unbatched stock, untraced serial). Pass `?<param>=null` to
    target those rows. Bin inventory levels are computed asynchronously and are eventually consistent.

    Args:
        granularity (BinInventoryGranularity | Unset): Row granularity for a bin inventory query.
            `VARIANT` returns one row per
            (location, variant, bin); `BATCH` and `SERIAL_NUMBER` break rows down further
            by the matching traceability axis.
        location_id (int | Unset):
        variant_id (int | Unset):
        bin_location_id (str | Unset):
        batch_id (str | Unset):
        serial_number_id (str | Unset):
        limit (int | Unset):  Default: 50.
        page (int | Unset):  Default: 1.


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

    kwargs = _get_kwargs(
        granularity=granularity,
        location_id=location_id,
        variant_id=variant_id,
        bin_location_id=bin_location_id,
        batch_id=batch_id,
        serial_number_id=serial_number_id,
        limit=limit,
        page=page,
    )

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

    return _build_response(client=client, response=response)