Skip to content

katana_public_api_client.api.inventory.get_all_negative_stock

katana_public_api_client.api.inventory.get_all_negative_stock

Classes

Functions

asyncio(*, client, location_id=UNSET, variant_id=UNSET, latest_negative_stock_date_max=UNSET, latest_negative_stock_date_min=UNSET, name=UNSET, sku=UNSET, category=UNSET, limit=50, page=1) async

List all variants with negative stock

Returns a list of variants with negative stock balance. Each variant has a date of the latest stock movement that resulted in negative stock balance.

Parameters:

  • location_id (Union[Unset, int], default: UNSET ) –
  • variant_id (Union[Unset, int], default: UNSET ) –
  • latest_negative_stock_date_max (Union[Unset, str], default: UNSET ) –
  • latest_negative_stock_date_min (Union[Unset, str], default: UNSET ) –
  • name (Union[Unset, str], default: UNSET ) –
  • sku (Union[Unset, str], default: UNSET ) –
  • category (Union[Unset, str], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

  • page (Union[Unset, int], default: 1 ) –

    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/inventory/get_all_negative_stock.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    location_id: Unset | int = UNSET,
    variant_id: Unset | int = UNSET,
    latest_negative_stock_date_max: Unset | str = UNSET,
    latest_negative_stock_date_min: Unset | str = UNSET,
    name: Unset | str = UNSET,
    sku: Unset | str = UNSET,
    category: Unset | str = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
) -> ErrorResponse | NegativeStockListResponse | None:
    """List all variants with negative stock

     Returns a list of variants with negative stock balance.
      Each variant has a date of the latest stock movement that resulted in negative stock balance.

    Args:
        location_id (Union[Unset, int]):
        variant_id (Union[Unset, int]):
        latest_negative_stock_date_max (Union[Unset, str]):
        latest_negative_stock_date_min (Union[Unset, str]):
        name (Union[Unset, str]):
        sku (Union[Unset, str]):
        category (Union[Unset, str]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  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:
        Union[ErrorResponse, NegativeStockListResponse]
    """

    return (
        await asyncio_detailed(
            client=client,
            location_id=location_id,
            variant_id=variant_id,
            latest_negative_stock_date_max=latest_negative_stock_date_max,
            latest_negative_stock_date_min=latest_negative_stock_date_min,
            name=name,
            sku=sku,
            category=category,
            limit=limit,
            page=page,
        )
    ).parsed

asyncio_detailed(*, client, location_id=UNSET, variant_id=UNSET, latest_negative_stock_date_max=UNSET, latest_negative_stock_date_min=UNSET, name=UNSET, sku=UNSET, category=UNSET, limit=50, page=1) async

List all variants with negative stock

Returns a list of variants with negative stock balance. Each variant has a date of the latest stock movement that resulted in negative stock balance.

Parameters:

  • location_id (Union[Unset, int], default: UNSET ) –
  • variant_id (Union[Unset, int], default: UNSET ) –
  • latest_negative_stock_date_max (Union[Unset, str], default: UNSET ) –
  • latest_negative_stock_date_min (Union[Unset, str], default: UNSET ) –
  • name (Union[Unset, str], default: UNSET ) –
  • sku (Union[Unset, str], default: UNSET ) –
  • category (Union[Unset, str], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

  • page (Union[Unset, int], default: 1 ) –

    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/inventory/get_all_negative_stock.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    location_id: Unset | int = UNSET,
    variant_id: Unset | int = UNSET,
    latest_negative_stock_date_max: Unset | str = UNSET,
    latest_negative_stock_date_min: Unset | str = UNSET,
    name: Unset | str = UNSET,
    sku: Unset | str = UNSET,
    category: Unset | str = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
) -> Response[ErrorResponse | NegativeStockListResponse]:
    """List all variants with negative stock

     Returns a list of variants with negative stock balance.
      Each variant has a date of the latest stock movement that resulted in negative stock balance.

    Args:
        location_id (Union[Unset, int]):
        variant_id (Union[Unset, int]):
        latest_negative_stock_date_max (Union[Unset, str]):
        latest_negative_stock_date_min (Union[Unset, str]):
        name (Union[Unset, str]):
        sku (Union[Unset, str]):
        category (Union[Unset, str]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  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[Union[ErrorResponse, NegativeStockListResponse]]
    """

    kwargs = _get_kwargs(
        location_id=location_id,
        variant_id=variant_id,
        latest_negative_stock_date_max=latest_negative_stock_date_max,
        latest_negative_stock_date_min=latest_negative_stock_date_min,
        name=name,
        sku=sku,
        category=category,
        limit=limit,
        page=page,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, location_id=UNSET, variant_id=UNSET, latest_negative_stock_date_max=UNSET, latest_negative_stock_date_min=UNSET, name=UNSET, sku=UNSET, category=UNSET, limit=50, page=1)

List all variants with negative stock

Returns a list of variants with negative stock balance. Each variant has a date of the latest stock movement that resulted in negative stock balance.

Parameters:

  • location_id (Union[Unset, int], default: UNSET ) –
  • variant_id (Union[Unset, int], default: UNSET ) –
  • latest_negative_stock_date_max (Union[Unset, str], default: UNSET ) –
  • latest_negative_stock_date_min (Union[Unset, str], default: UNSET ) –
  • name (Union[Unset, str], default: UNSET ) –
  • sku (Union[Unset, str], default: UNSET ) –
  • category (Union[Unset, str], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

  • page (Union[Unset, int], default: 1 ) –

    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/inventory/get_all_negative_stock.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    location_id: Unset | int = UNSET,
    variant_id: Unset | int = UNSET,
    latest_negative_stock_date_max: Unset | str = UNSET,
    latest_negative_stock_date_min: Unset | str = UNSET,
    name: Unset | str = UNSET,
    sku: Unset | str = UNSET,
    category: Unset | str = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
) -> ErrorResponse | NegativeStockListResponse | None:
    """List all variants with negative stock

     Returns a list of variants with negative stock balance.
      Each variant has a date of the latest stock movement that resulted in negative stock balance.

    Args:
        location_id (Union[Unset, int]):
        variant_id (Union[Unset, int]):
        latest_negative_stock_date_max (Union[Unset, str]):
        latest_negative_stock_date_min (Union[Unset, str]):
        name (Union[Unset, str]):
        sku (Union[Unset, str]):
        category (Union[Unset, str]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  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:
        Union[ErrorResponse, NegativeStockListResponse]
    """

    return sync_detailed(
        client=client,
        location_id=location_id,
        variant_id=variant_id,
        latest_negative_stock_date_max=latest_negative_stock_date_max,
        latest_negative_stock_date_min=latest_negative_stock_date_min,
        name=name,
        sku=sku,
        category=category,
        limit=limit,
        page=page,
    ).parsed

sync_detailed(*, client, location_id=UNSET, variant_id=UNSET, latest_negative_stock_date_max=UNSET, latest_negative_stock_date_min=UNSET, name=UNSET, sku=UNSET, category=UNSET, limit=50, page=1)

List all variants with negative stock

Returns a list of variants with negative stock balance. Each variant has a date of the latest stock movement that resulted in negative stock balance.

Parameters:

  • location_id (Union[Unset, int], default: UNSET ) –
  • variant_id (Union[Unset, int], default: UNSET ) –
  • latest_negative_stock_date_max (Union[Unset, str], default: UNSET ) –
  • latest_negative_stock_date_min (Union[Unset, str], default: UNSET ) –
  • name (Union[Unset, str], default: UNSET ) –
  • sku (Union[Unset, str], default: UNSET ) –
  • category (Union[Unset, str], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

  • page (Union[Unset, int], default: 1 ) –

    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/inventory/get_all_negative_stock.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    location_id: Unset | int = UNSET,
    variant_id: Unset | int = UNSET,
    latest_negative_stock_date_max: Unset | str = UNSET,
    latest_negative_stock_date_min: Unset | str = UNSET,
    name: Unset | str = UNSET,
    sku: Unset | str = UNSET,
    category: Unset | str = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
) -> Response[ErrorResponse | NegativeStockListResponse]:
    """List all variants with negative stock

     Returns a list of variants with negative stock balance.
      Each variant has a date of the latest stock movement that resulted in negative stock balance.

    Args:
        location_id (Union[Unset, int]):
        variant_id (Union[Unset, int]):
        latest_negative_stock_date_max (Union[Unset, str]):
        latest_negative_stock_date_min (Union[Unset, str]):
        name (Union[Unset, str]):
        sku (Union[Unset, str]):
        category (Union[Unset, str]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  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[Union[ErrorResponse, NegativeStockListResponse]]
    """

    kwargs = _get_kwargs(
        location_id=location_id,
        variant_id=variant_id,
        latest_negative_stock_date_max=latest_negative_stock_date_max,
        latest_negative_stock_date_min=latest_negative_stock_date_min,
        name=name,
        sku=sku,
        category=category,
        limit=limit,
        page=page,
    )

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

    return _build_response(client=client, response=response)