Skip to content

katana_public_api_client.api.purchase_order.find_purchase_orders

katana_public_api_client.api.purchase_order.find_purchase_orders

Classes

Functions

asyncio(*, client, ids=UNSET, order_no=UNSET, entity_type=UNSET, status=UNSET, billing_status=UNSET, currency=UNSET, location_id=UNSET, tracking_location_id=UNSET, supplier_id=UNSET, extend=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 purchase orders

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

Parameters:

  • ids (Union[Unset, list[int]], default: UNSET ) –
  • order_no (Union[Unset, str], default: UNSET ) –
  • entity_type (Union[Unset, FindPurchaseOrdersEntityType], default: UNSET ) –
  • status (Union[Unset, FindPurchaseOrdersStatus], default: UNSET ) –
  • billing_status (Union[Unset, FindPurchaseOrdersBillingStatus], default: UNSET ) –
  • currency (Union[Unset, str], default: UNSET ) –
  • location_id (Union[Unset, int], default: UNSET ) –
  • tracking_location_id (Union[Unset, float], default: UNSET ) –
  • supplier_id (Union[Unset, float], default: UNSET ) –
  • extend (Union[Unset, list[FindPurchaseOrdersExtendItem]], 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/purchase_order/find_purchase_orders.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    ids: Unset | list[int] = UNSET,
    order_no: Unset | str = UNSET,
    entity_type: Unset | FindPurchaseOrdersEntityType = UNSET,
    status: Unset | FindPurchaseOrdersStatus = UNSET,
    billing_status: Unset | FindPurchaseOrdersBillingStatus = UNSET,
    currency: Unset | str = UNSET,
    location_id: Unset | int = UNSET,
    tracking_location_id: Unset | float = UNSET,
    supplier_id: Unset | float = UNSET,
    extend: Unset | list[FindPurchaseOrdersExtendItem] = 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 | PurchaseOrderListResponse | None:
    """List all purchase orders

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

    Args:
        ids (Union[Unset, list[int]]):
        order_no (Union[Unset, str]):
        entity_type (Union[Unset, FindPurchaseOrdersEntityType]):
        status (Union[Unset, FindPurchaseOrdersStatus]):
        billing_status (Union[Unset, FindPurchaseOrdersBillingStatus]):
        currency (Union[Unset, str]):
        location_id (Union[Unset, int]):
        tracking_location_id (Union[Unset, float]):
        supplier_id (Union[Unset, float]):
        extend (Union[Unset, list[FindPurchaseOrdersExtendItem]]):
        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, PurchaseOrderListResponse]
    """

    return (
        await asyncio_detailed(
            client=client,
            ids=ids,
            order_no=order_no,
            entity_type=entity_type,
            status=status,
            billing_status=billing_status,
            currency=currency,
            location_id=location_id,
            tracking_location_id=tracking_location_id,
            supplier_id=supplier_id,
            extend=extend,
            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, order_no=UNSET, entity_type=UNSET, status=UNSET, billing_status=UNSET, currency=UNSET, location_id=UNSET, tracking_location_id=UNSET, supplier_id=UNSET, extend=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 purchase orders

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

Parameters:

  • ids (Union[Unset, list[int]], default: UNSET ) –
  • order_no (Union[Unset, str], default: UNSET ) –
  • entity_type (Union[Unset, FindPurchaseOrdersEntityType], default: UNSET ) –
  • status (Union[Unset, FindPurchaseOrdersStatus], default: UNSET ) –
  • billing_status (Union[Unset, FindPurchaseOrdersBillingStatus], default: UNSET ) –
  • currency (Union[Unset, str], default: UNSET ) –
  • location_id (Union[Unset, int], default: UNSET ) –
  • tracking_location_id (Union[Unset, float], default: UNSET ) –
  • supplier_id (Union[Unset, float], default: UNSET ) –
  • extend (Union[Unset, list[FindPurchaseOrdersExtendItem]], 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/purchase_order/find_purchase_orders.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    ids: Unset | list[int] = UNSET,
    order_no: Unset | str = UNSET,
    entity_type: Unset | FindPurchaseOrdersEntityType = UNSET,
    status: Unset | FindPurchaseOrdersStatus = UNSET,
    billing_status: Unset | FindPurchaseOrdersBillingStatus = UNSET,
    currency: Unset | str = UNSET,
    location_id: Unset | int = UNSET,
    tracking_location_id: Unset | float = UNSET,
    supplier_id: Unset | float = UNSET,
    extend: Unset | list[FindPurchaseOrdersExtendItem] = 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 | PurchaseOrderListResponse]:
    """List all purchase orders

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

    Args:
        ids (Union[Unset, list[int]]):
        order_no (Union[Unset, str]):
        entity_type (Union[Unset, FindPurchaseOrdersEntityType]):
        status (Union[Unset, FindPurchaseOrdersStatus]):
        billing_status (Union[Unset, FindPurchaseOrdersBillingStatus]):
        currency (Union[Unset, str]):
        location_id (Union[Unset, int]):
        tracking_location_id (Union[Unset, float]):
        supplier_id (Union[Unset, float]):
        extend (Union[Unset, list[FindPurchaseOrdersExtendItem]]):
        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, PurchaseOrderListResponse]]
    """

    kwargs = _get_kwargs(
        ids=ids,
        order_no=order_no,
        entity_type=entity_type,
        status=status,
        billing_status=billing_status,
        currency=currency,
        location_id=location_id,
        tracking_location_id=tracking_location_id,
        supplier_id=supplier_id,
        extend=extend,
        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, order_no=UNSET, entity_type=UNSET, status=UNSET, billing_status=UNSET, currency=UNSET, location_id=UNSET, tracking_location_id=UNSET, supplier_id=UNSET, extend=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 purchase orders

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

Parameters:

  • ids (Union[Unset, list[int]], default: UNSET ) –
  • order_no (Union[Unset, str], default: UNSET ) –
  • entity_type (Union[Unset, FindPurchaseOrdersEntityType], default: UNSET ) –
  • status (Union[Unset, FindPurchaseOrdersStatus], default: UNSET ) –
  • billing_status (Union[Unset, FindPurchaseOrdersBillingStatus], default: UNSET ) –
  • currency (Union[Unset, str], default: UNSET ) –
  • location_id (Union[Unset, int], default: UNSET ) –
  • tracking_location_id (Union[Unset, float], default: UNSET ) –
  • supplier_id (Union[Unset, float], default: UNSET ) –
  • extend (Union[Unset, list[FindPurchaseOrdersExtendItem]], 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/purchase_order/find_purchase_orders.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    ids: Unset | list[int] = UNSET,
    order_no: Unset | str = UNSET,
    entity_type: Unset | FindPurchaseOrdersEntityType = UNSET,
    status: Unset | FindPurchaseOrdersStatus = UNSET,
    billing_status: Unset | FindPurchaseOrdersBillingStatus = UNSET,
    currency: Unset | str = UNSET,
    location_id: Unset | int = UNSET,
    tracking_location_id: Unset | float = UNSET,
    supplier_id: Unset | float = UNSET,
    extend: Unset | list[FindPurchaseOrdersExtendItem] = 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 | PurchaseOrderListResponse | None:
    """List all purchase orders

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

    Args:
        ids (Union[Unset, list[int]]):
        order_no (Union[Unset, str]):
        entity_type (Union[Unset, FindPurchaseOrdersEntityType]):
        status (Union[Unset, FindPurchaseOrdersStatus]):
        billing_status (Union[Unset, FindPurchaseOrdersBillingStatus]):
        currency (Union[Unset, str]):
        location_id (Union[Unset, int]):
        tracking_location_id (Union[Unset, float]):
        supplier_id (Union[Unset, float]):
        extend (Union[Unset, list[FindPurchaseOrdersExtendItem]]):
        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, PurchaseOrderListResponse]
    """

    return sync_detailed(
        client=client,
        ids=ids,
        order_no=order_no,
        entity_type=entity_type,
        status=status,
        billing_status=billing_status,
        currency=currency,
        location_id=location_id,
        tracking_location_id=tracking_location_id,
        supplier_id=supplier_id,
        extend=extend,
        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, order_no=UNSET, entity_type=UNSET, status=UNSET, billing_status=UNSET, currency=UNSET, location_id=UNSET, tracking_location_id=UNSET, supplier_id=UNSET, extend=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 purchase orders

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

Parameters:

  • ids (Union[Unset, list[int]], default: UNSET ) –
  • order_no (Union[Unset, str], default: UNSET ) –
  • entity_type (Union[Unset, FindPurchaseOrdersEntityType], default: UNSET ) –
  • status (Union[Unset, FindPurchaseOrdersStatus], default: UNSET ) –
  • billing_status (Union[Unset, FindPurchaseOrdersBillingStatus], default: UNSET ) –
  • currency (Union[Unset, str], default: UNSET ) –
  • location_id (Union[Unset, int], default: UNSET ) –
  • tracking_location_id (Union[Unset, float], default: UNSET ) –
  • supplier_id (Union[Unset, float], default: UNSET ) –
  • extend (Union[Unset, list[FindPurchaseOrdersExtendItem]], 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/purchase_order/find_purchase_orders.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    ids: Unset | list[int] = UNSET,
    order_no: Unset | str = UNSET,
    entity_type: Unset | FindPurchaseOrdersEntityType = UNSET,
    status: Unset | FindPurchaseOrdersStatus = UNSET,
    billing_status: Unset | FindPurchaseOrdersBillingStatus = UNSET,
    currency: Unset | str = UNSET,
    location_id: Unset | int = UNSET,
    tracking_location_id: Unset | float = UNSET,
    supplier_id: Unset | float = UNSET,
    extend: Unset | list[FindPurchaseOrdersExtendItem] = 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 | PurchaseOrderListResponse]:
    """List all purchase orders

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

    Args:
        ids (Union[Unset, list[int]]):
        order_no (Union[Unset, str]):
        entity_type (Union[Unset, FindPurchaseOrdersEntityType]):
        status (Union[Unset, FindPurchaseOrdersStatus]):
        billing_status (Union[Unset, FindPurchaseOrdersBillingStatus]):
        currency (Union[Unset, str]):
        location_id (Union[Unset, int]):
        tracking_location_id (Union[Unset, float]):
        supplier_id (Union[Unset, float]):
        extend (Union[Unset, list[FindPurchaseOrdersExtendItem]]):
        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, PurchaseOrderListResponse]]
    """

    kwargs = _get_kwargs(
        ids=ids,
        order_no=order_no,
        entity_type=entity_type,
        status=status,
        billing_status=billing_status,
        currency=currency,
        location_id=location_id,
        tracking_location_id=tracking_location_id,
        supplier_id=supplier_id,
        extend=extend,
        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)