Skip to content

katana_public_api_client.api.material.get_all_materials

katana_public_api_client.api.material.get_all_materials

Classes

Functions

asyncio(*, client, ids=UNSET, name=UNSET, uom=UNSET, default_supplier_id=UNSET, is_sellable=UNSET, batch_tracked=UNSET, purchase_uom=UNSET, purchase_uom_conversion_rate=UNSET, extend=UNSET, include_archived=UNSET, include_deleted=UNSET, limit=50, page=1, created_at_min=UNSET, created_at_max=UNSET, updated_at_min=UNSET, updated_at_max=UNSET) async

List all materials

Returns a list of materials you've previously created. The materials are returned in sorted order, with the most recent materials appearing first.

Parameters:

  • ids (Union[Unset, list[int]], default: UNSET ) –
  • name (Union[Unset, str], default: UNSET ) –
  • uom (Union[Unset, str], default: UNSET ) –
  • default_supplier_id (Union[Unset, int], default: UNSET ) –
  • is_sellable (Union[Unset, bool], default: UNSET ) –
  • batch_tracked (Union[Unset, bool], default: UNSET ) –
  • purchase_uom (Union[Unset, str], default: UNSET ) –
  • purchase_uom_conversion_rate (Union[Unset, float], default: UNSET ) –
  • extend (Union[Unset, list[GetAllMaterialsExtendItem]], default: UNSET ) –
  • include_archived (Union[Unset, bool], default: UNSET ) –
  • include_deleted (Union[Unset, bool], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

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

    Default: 1.

  • created_at_min (Union[Unset, datetime], default: UNSET ) –
  • created_at_max (Union[Unset, datetime], default: UNSET ) –
  • updated_at_min (Union[Unset, datetime], default: UNSET ) –
  • updated_at_max (Union[Unset, datetime], default: UNSET ) –

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/material/get_all_materials.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    ids: Unset | list[int] = UNSET,
    name: Unset | str = UNSET,
    uom: Unset | str = UNSET,
    default_supplier_id: Unset | int = UNSET,
    is_sellable: Unset | bool = UNSET,
    batch_tracked: Unset | bool = UNSET,
    purchase_uom: Unset | str = UNSET,
    purchase_uom_conversion_rate: Unset | float = UNSET,
    extend: Unset | list[GetAllMaterialsExtendItem] = UNSET,
    include_archived: Unset | bool = UNSET,
    include_deleted: Unset | bool = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
    created_at_min: Unset | datetime.datetime = UNSET,
    created_at_max: Unset | datetime.datetime = UNSET,
    updated_at_min: Unset | datetime.datetime = UNSET,
    updated_at_max: Unset | datetime.datetime = UNSET,
) -> ErrorResponse | MaterialListResponse | None:
    """List all materials

     Returns a list of materials you've previously created. The materials are returned in sorted order,
        with the most recent materials appearing first.

    Args:
        ids (Union[Unset, list[int]]):
        name (Union[Unset, str]):
        uom (Union[Unset, str]):
        default_supplier_id (Union[Unset, int]):
        is_sellable (Union[Unset, bool]):
        batch_tracked (Union[Unset, bool]):
        purchase_uom (Union[Unset, str]):
        purchase_uom_conversion_rate (Union[Unset, float]):
        extend (Union[Unset, list[GetAllMaterialsExtendItem]]):
        include_archived (Union[Unset, bool]):
        include_deleted (Union[Unset, bool]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  Default: 1.
        created_at_min (Union[Unset, datetime.datetime]):
        created_at_max (Union[Unset, datetime.datetime]):
        updated_at_min (Union[Unset, datetime.datetime]):
        updated_at_max (Union[Unset, datetime.datetime]):

    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, MaterialListResponse]
    """

    return (
        await asyncio_detailed(
            client=client,
            ids=ids,
            name=name,
            uom=uom,
            default_supplier_id=default_supplier_id,
            is_sellable=is_sellable,
            batch_tracked=batch_tracked,
            purchase_uom=purchase_uom,
            purchase_uom_conversion_rate=purchase_uom_conversion_rate,
            extend=extend,
            include_archived=include_archived,
            include_deleted=include_deleted,
            limit=limit,
            page=page,
            created_at_min=created_at_min,
            created_at_max=created_at_max,
            updated_at_min=updated_at_min,
            updated_at_max=updated_at_max,
        )
    ).parsed

asyncio_detailed(*, client, ids=UNSET, name=UNSET, uom=UNSET, default_supplier_id=UNSET, is_sellable=UNSET, batch_tracked=UNSET, purchase_uom=UNSET, purchase_uom_conversion_rate=UNSET, extend=UNSET, include_archived=UNSET, include_deleted=UNSET, limit=50, page=1, created_at_min=UNSET, created_at_max=UNSET, updated_at_min=UNSET, updated_at_max=UNSET) async

List all materials

Returns a list of materials you've previously created. The materials are returned in sorted order, with the most recent materials appearing first.

Parameters:

  • ids (Union[Unset, list[int]], default: UNSET ) –
  • name (Union[Unset, str], default: UNSET ) –
  • uom (Union[Unset, str], default: UNSET ) –
  • default_supplier_id (Union[Unset, int], default: UNSET ) –
  • is_sellable (Union[Unset, bool], default: UNSET ) –
  • batch_tracked (Union[Unset, bool], default: UNSET ) –
  • purchase_uom (Union[Unset, str], default: UNSET ) –
  • purchase_uom_conversion_rate (Union[Unset, float], default: UNSET ) –
  • extend (Union[Unset, list[GetAllMaterialsExtendItem]], default: UNSET ) –
  • include_archived (Union[Unset, bool], default: UNSET ) –
  • include_deleted (Union[Unset, bool], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

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

    Default: 1.

  • created_at_min (Union[Unset, datetime], default: UNSET ) –
  • created_at_max (Union[Unset, datetime], default: UNSET ) –
  • updated_at_min (Union[Unset, datetime], default: UNSET ) –
  • updated_at_max (Union[Unset, datetime], default: UNSET ) –

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/material/get_all_materials.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    ids: Unset | list[int] = UNSET,
    name: Unset | str = UNSET,
    uom: Unset | str = UNSET,
    default_supplier_id: Unset | int = UNSET,
    is_sellable: Unset | bool = UNSET,
    batch_tracked: Unset | bool = UNSET,
    purchase_uom: Unset | str = UNSET,
    purchase_uom_conversion_rate: Unset | float = UNSET,
    extend: Unset | list[GetAllMaterialsExtendItem] = UNSET,
    include_archived: Unset | bool = UNSET,
    include_deleted: Unset | bool = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
    created_at_min: Unset | datetime.datetime = UNSET,
    created_at_max: Unset | datetime.datetime = UNSET,
    updated_at_min: Unset | datetime.datetime = UNSET,
    updated_at_max: Unset | datetime.datetime = UNSET,
) -> Response[ErrorResponse | MaterialListResponse]:
    """List all materials

     Returns a list of materials you've previously created. The materials are returned in sorted order,
        with the most recent materials appearing first.

    Args:
        ids (Union[Unset, list[int]]):
        name (Union[Unset, str]):
        uom (Union[Unset, str]):
        default_supplier_id (Union[Unset, int]):
        is_sellable (Union[Unset, bool]):
        batch_tracked (Union[Unset, bool]):
        purchase_uom (Union[Unset, str]):
        purchase_uom_conversion_rate (Union[Unset, float]):
        extend (Union[Unset, list[GetAllMaterialsExtendItem]]):
        include_archived (Union[Unset, bool]):
        include_deleted (Union[Unset, bool]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  Default: 1.
        created_at_min (Union[Unset, datetime.datetime]):
        created_at_max (Union[Unset, datetime.datetime]):
        updated_at_min (Union[Unset, datetime.datetime]):
        updated_at_max (Union[Unset, datetime.datetime]):

    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, MaterialListResponse]]
    """

    kwargs = _get_kwargs(
        ids=ids,
        name=name,
        uom=uom,
        default_supplier_id=default_supplier_id,
        is_sellable=is_sellable,
        batch_tracked=batch_tracked,
        purchase_uom=purchase_uom,
        purchase_uom_conversion_rate=purchase_uom_conversion_rate,
        extend=extend,
        include_archived=include_archived,
        include_deleted=include_deleted,
        limit=limit,
        page=page,
        created_at_min=created_at_min,
        created_at_max=created_at_max,
        updated_at_min=updated_at_min,
        updated_at_max=updated_at_max,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, ids=UNSET, name=UNSET, uom=UNSET, default_supplier_id=UNSET, is_sellable=UNSET, batch_tracked=UNSET, purchase_uom=UNSET, purchase_uom_conversion_rate=UNSET, extend=UNSET, include_archived=UNSET, include_deleted=UNSET, limit=50, page=1, created_at_min=UNSET, created_at_max=UNSET, updated_at_min=UNSET, updated_at_max=UNSET)

List all materials

Returns a list of materials you've previously created. The materials are returned in sorted order, with the most recent materials appearing first.

Parameters:

  • ids (Union[Unset, list[int]], default: UNSET ) –
  • name (Union[Unset, str], default: UNSET ) –
  • uom (Union[Unset, str], default: UNSET ) –
  • default_supplier_id (Union[Unset, int], default: UNSET ) –
  • is_sellable (Union[Unset, bool], default: UNSET ) –
  • batch_tracked (Union[Unset, bool], default: UNSET ) –
  • purchase_uom (Union[Unset, str], default: UNSET ) –
  • purchase_uom_conversion_rate (Union[Unset, float], default: UNSET ) –
  • extend (Union[Unset, list[GetAllMaterialsExtendItem]], default: UNSET ) –
  • include_archived (Union[Unset, bool], default: UNSET ) –
  • include_deleted (Union[Unset, bool], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

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

    Default: 1.

  • created_at_min (Union[Unset, datetime], default: UNSET ) –
  • created_at_max (Union[Unset, datetime], default: UNSET ) –
  • updated_at_min (Union[Unset, datetime], default: UNSET ) –
  • updated_at_max (Union[Unset, datetime], default: UNSET ) –

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/material/get_all_materials.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    ids: Unset | list[int] = UNSET,
    name: Unset | str = UNSET,
    uom: Unset | str = UNSET,
    default_supplier_id: Unset | int = UNSET,
    is_sellable: Unset | bool = UNSET,
    batch_tracked: Unset | bool = UNSET,
    purchase_uom: Unset | str = UNSET,
    purchase_uom_conversion_rate: Unset | float = UNSET,
    extend: Unset | list[GetAllMaterialsExtendItem] = UNSET,
    include_archived: Unset | bool = UNSET,
    include_deleted: Unset | bool = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
    created_at_min: Unset | datetime.datetime = UNSET,
    created_at_max: Unset | datetime.datetime = UNSET,
    updated_at_min: Unset | datetime.datetime = UNSET,
    updated_at_max: Unset | datetime.datetime = UNSET,
) -> ErrorResponse | MaterialListResponse | None:
    """List all materials

     Returns a list of materials you've previously created. The materials are returned in sorted order,
        with the most recent materials appearing first.

    Args:
        ids (Union[Unset, list[int]]):
        name (Union[Unset, str]):
        uom (Union[Unset, str]):
        default_supplier_id (Union[Unset, int]):
        is_sellable (Union[Unset, bool]):
        batch_tracked (Union[Unset, bool]):
        purchase_uom (Union[Unset, str]):
        purchase_uom_conversion_rate (Union[Unset, float]):
        extend (Union[Unset, list[GetAllMaterialsExtendItem]]):
        include_archived (Union[Unset, bool]):
        include_deleted (Union[Unset, bool]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  Default: 1.
        created_at_min (Union[Unset, datetime.datetime]):
        created_at_max (Union[Unset, datetime.datetime]):
        updated_at_min (Union[Unset, datetime.datetime]):
        updated_at_max (Union[Unset, datetime.datetime]):

    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, MaterialListResponse]
    """

    return sync_detailed(
        client=client,
        ids=ids,
        name=name,
        uom=uom,
        default_supplier_id=default_supplier_id,
        is_sellable=is_sellable,
        batch_tracked=batch_tracked,
        purchase_uom=purchase_uom,
        purchase_uom_conversion_rate=purchase_uom_conversion_rate,
        extend=extend,
        include_archived=include_archived,
        include_deleted=include_deleted,
        limit=limit,
        page=page,
        created_at_min=created_at_min,
        created_at_max=created_at_max,
        updated_at_min=updated_at_min,
        updated_at_max=updated_at_max,
    ).parsed

sync_detailed(*, client, ids=UNSET, name=UNSET, uom=UNSET, default_supplier_id=UNSET, is_sellable=UNSET, batch_tracked=UNSET, purchase_uom=UNSET, purchase_uom_conversion_rate=UNSET, extend=UNSET, include_archived=UNSET, include_deleted=UNSET, limit=50, page=1, created_at_min=UNSET, created_at_max=UNSET, updated_at_min=UNSET, updated_at_max=UNSET)

List all materials

Returns a list of materials you've previously created. The materials are returned in sorted order, with the most recent materials appearing first.

Parameters:

  • ids (Union[Unset, list[int]], default: UNSET ) –
  • name (Union[Unset, str], default: UNSET ) –
  • uom (Union[Unset, str], default: UNSET ) –
  • default_supplier_id (Union[Unset, int], default: UNSET ) –
  • is_sellable (Union[Unset, bool], default: UNSET ) –
  • batch_tracked (Union[Unset, bool], default: UNSET ) –
  • purchase_uom (Union[Unset, str], default: UNSET ) –
  • purchase_uom_conversion_rate (Union[Unset, float], default: UNSET ) –
  • extend (Union[Unset, list[GetAllMaterialsExtendItem]], default: UNSET ) –
  • include_archived (Union[Unset, bool], default: UNSET ) –
  • include_deleted (Union[Unset, bool], default: UNSET ) –
  • limit (Union[Unset, int], default: 50 ) –

    Default: 50.

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

    Default: 1.

  • created_at_min (Union[Unset, datetime], default: UNSET ) –
  • created_at_max (Union[Unset, datetime], default: UNSET ) –
  • updated_at_min (Union[Unset, datetime], default: UNSET ) –
  • updated_at_max (Union[Unset, datetime], default: UNSET ) –

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/material/get_all_materials.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    ids: Unset | list[int] = UNSET,
    name: Unset | str = UNSET,
    uom: Unset | str = UNSET,
    default_supplier_id: Unset | int = UNSET,
    is_sellable: Unset | bool = UNSET,
    batch_tracked: Unset | bool = UNSET,
    purchase_uom: Unset | str = UNSET,
    purchase_uom_conversion_rate: Unset | float = UNSET,
    extend: Unset | list[GetAllMaterialsExtendItem] = UNSET,
    include_archived: Unset | bool = UNSET,
    include_deleted: Unset | bool = UNSET,
    limit: Unset | int = 50,
    page: Unset | int = 1,
    created_at_min: Unset | datetime.datetime = UNSET,
    created_at_max: Unset | datetime.datetime = UNSET,
    updated_at_min: Unset | datetime.datetime = UNSET,
    updated_at_max: Unset | datetime.datetime = UNSET,
) -> Response[ErrorResponse | MaterialListResponse]:
    """List all materials

     Returns a list of materials you've previously created. The materials are returned in sorted order,
        with the most recent materials appearing first.

    Args:
        ids (Union[Unset, list[int]]):
        name (Union[Unset, str]):
        uom (Union[Unset, str]):
        default_supplier_id (Union[Unset, int]):
        is_sellable (Union[Unset, bool]):
        batch_tracked (Union[Unset, bool]):
        purchase_uom (Union[Unset, str]):
        purchase_uom_conversion_rate (Union[Unset, float]):
        extend (Union[Unset, list[GetAllMaterialsExtendItem]]):
        include_archived (Union[Unset, bool]):
        include_deleted (Union[Unset, bool]):
        limit (Union[Unset, int]):  Default: 50.
        page (Union[Unset, int]):  Default: 1.
        created_at_min (Union[Unset, datetime.datetime]):
        created_at_max (Union[Unset, datetime.datetime]):
        updated_at_min (Union[Unset, datetime.datetime]):
        updated_at_max (Union[Unset, datetime.datetime]):

    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, MaterialListResponse]]
    """

    kwargs = _get_kwargs(
        ids=ids,
        name=name,
        uom=uom,
        default_supplier_id=default_supplier_id,
        is_sellable=is_sellable,
        batch_tracked=batch_tracked,
        purchase_uom=purchase_uom,
        purchase_uom_conversion_rate=purchase_uom_conversion_rate,
        extend=extend,
        include_archived=include_archived,
        include_deleted=include_deleted,
        limit=limit,
        page=page,
        created_at_min=created_at_min,
        created_at_max=created_at_max,
        updated_at_min=updated_at_min,
        updated_at_max=updated_at_max,
    )

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

    return _build_response(client=client, response=response)