Skip to content

katana_public_api_client.api.sales_order.search_sales_orders

katana_public_api_client.api.sales_order.search_sales_orders

Classes

Functions

asyncio(*, client, body) async

Search sales orders

Searches sales orders using a structured filter body with nested logical operators (and / or) and per-field comparators. Only the fields in the request schema may appear in where / order; unknown fields return 422. Custom field values are addressable via custom_fields.<uuid> nested paths. Returns the same shape as GET /sales_orders — a paginated list of SalesOrder records.

Parameters:

  • body (SalesOrderSearchRequest) –

    Structured filter body for POST /sales_orders/search. Returns the same paginated {"data": [...]} shape as GET /sales_orders plus an X-Pagination header. Beta — request/response shape may evolve before GA. Example: {'filter': {'where': {'and': [{'status': {'inq': ['NOT_SHIPPED', 'PACKED']}}, {'created_at': {'gte': '2026-01-01T00:00:00.000Z'}}, {'custom_fields.0c8f1d6e-3c2a-4f5b-9d77-12ab34cd56ef': 2}]}, 'order': ['created_at DESC', 'id DESC'], 'limit': 50, 'page': 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/sales_order/search_sales_orders.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    body: SalesOrderSearchRequest,
) -> DetailedErrorResponse | ErrorResponse | SalesOrderListResponse | None:
    """Search sales orders

     Searches sales orders using a structured filter body with nested
    logical operators (``and`` / ``or``) and per-field comparators.
    Only the fields in the request schema may appear in ``where`` /
    ``order``; unknown fields return 422. Custom field values are
    addressable via ``custom_fields.<uuid>`` nested paths. Returns the
    same shape as ``GET /sales_orders`` — a paginated list of
    ``SalesOrder`` records.

    Args:
        body (SalesOrderSearchRequest): Structured filter body for ``POST /sales_orders/search``.
            Returns
            the same paginated ``{"data": [...]}`` shape as
            ``GET /sales_orders`` plus an ``X-Pagination`` header. Beta —
            request/response shape may evolve before GA.
             Example: {'filter': {'where': {'and': [{'status': {'inq': ['NOT_SHIPPED', 'PACKED']}},
            {'created_at': {'gte': '2026-01-01T00:00:00.000Z'}},
            {'custom_fields.0c8f1d6e-3c2a-4f5b-9d77-12ab34cd56ef': 2}]}, 'order': ['created_at DESC',
            'id DESC'], 'limit': 50, 'page': 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:
        DetailedErrorResponse | ErrorResponse | SalesOrderListResponse
    """

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

asyncio_detailed(*, client, body) async

Search sales orders

Searches sales orders using a structured filter body with nested logical operators (and / or) and per-field comparators. Only the fields in the request schema may appear in where / order; unknown fields return 422. Custom field values are addressable via custom_fields.<uuid> nested paths. Returns the same shape as GET /sales_orders — a paginated list of SalesOrder records.

Parameters:

  • body (SalesOrderSearchRequest) –

    Structured filter body for POST /sales_orders/search. Returns the same paginated {"data": [...]} shape as GET /sales_orders plus an X-Pagination header. Beta — request/response shape may evolve before GA. Example: {'filter': {'where': {'and': [{'status': {'inq': ['NOT_SHIPPED', 'PACKED']}}, {'created_at': {'gte': '2026-01-01T00:00:00.000Z'}}, {'custom_fields.0c8f1d6e-3c2a-4f5b-9d77-12ab34cd56ef': 2}]}, 'order': ['created_at DESC', 'id DESC'], 'limit': 50, 'page': 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/sales_order/search_sales_orders.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: SalesOrderSearchRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | SalesOrderListResponse]:
    """Search sales orders

     Searches sales orders using a structured filter body with nested
    logical operators (``and`` / ``or``) and per-field comparators.
    Only the fields in the request schema may appear in ``where`` /
    ``order``; unknown fields return 422. Custom field values are
    addressable via ``custom_fields.<uuid>`` nested paths. Returns the
    same shape as ``GET /sales_orders`` — a paginated list of
    ``SalesOrder`` records.

    Args:
        body (SalesOrderSearchRequest): Structured filter body for ``POST /sales_orders/search``.
            Returns
            the same paginated ``{"data": [...]}`` shape as
            ``GET /sales_orders`` plus an ``X-Pagination`` header. Beta —
            request/response shape may evolve before GA.
             Example: {'filter': {'where': {'and': [{'status': {'inq': ['NOT_SHIPPED', 'PACKED']}},
            {'created_at': {'gte': '2026-01-01T00:00:00.000Z'}},
            {'custom_fields.0c8f1d6e-3c2a-4f5b-9d77-12ab34cd56ef': 2}]}, 'order': ['created_at DESC',
            'id DESC'], 'limit': 50, 'page': 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[DetailedErrorResponse | ErrorResponse | SalesOrderListResponse]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, body)

Search sales orders

Searches sales orders using a structured filter body with nested logical operators (and / or) and per-field comparators. Only the fields in the request schema may appear in where / order; unknown fields return 422. Custom field values are addressable via custom_fields.<uuid> nested paths. Returns the same shape as GET /sales_orders — a paginated list of SalesOrder records.

Parameters:

  • body (SalesOrderSearchRequest) –

    Structured filter body for POST /sales_orders/search. Returns the same paginated {"data": [...]} shape as GET /sales_orders plus an X-Pagination header. Beta — request/response shape may evolve before GA. Example: {'filter': {'where': {'and': [{'status': {'inq': ['NOT_SHIPPED', 'PACKED']}}, {'created_at': {'gte': '2026-01-01T00:00:00.000Z'}}, {'custom_fields.0c8f1d6e-3c2a-4f5b-9d77-12ab34cd56ef': 2}]}, 'order': ['created_at DESC', 'id DESC'], 'limit': 50, 'page': 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/sales_order/search_sales_orders.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    body: SalesOrderSearchRequest,
) -> DetailedErrorResponse | ErrorResponse | SalesOrderListResponse | None:
    """Search sales orders

     Searches sales orders using a structured filter body with nested
    logical operators (``and`` / ``or``) and per-field comparators.
    Only the fields in the request schema may appear in ``where`` /
    ``order``; unknown fields return 422. Custom field values are
    addressable via ``custom_fields.<uuid>`` nested paths. Returns the
    same shape as ``GET /sales_orders`` — a paginated list of
    ``SalesOrder`` records.

    Args:
        body (SalesOrderSearchRequest): Structured filter body for ``POST /sales_orders/search``.
            Returns
            the same paginated ``{"data": [...]}`` shape as
            ``GET /sales_orders`` plus an ``X-Pagination`` header. Beta —
            request/response shape may evolve before GA.
             Example: {'filter': {'where': {'and': [{'status': {'inq': ['NOT_SHIPPED', 'PACKED']}},
            {'created_at': {'gte': '2026-01-01T00:00:00.000Z'}},
            {'custom_fields.0c8f1d6e-3c2a-4f5b-9d77-12ab34cd56ef': 2}]}, 'order': ['created_at DESC',
            'id DESC'], 'limit': 50, 'page': 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:
        DetailedErrorResponse | ErrorResponse | SalesOrderListResponse
    """

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

sync_detailed(*, client, body)

Search sales orders

Searches sales orders using a structured filter body with nested logical operators (and / or) and per-field comparators. Only the fields in the request schema may appear in where / order; unknown fields return 422. Custom field values are addressable via custom_fields.<uuid> nested paths. Returns the same shape as GET /sales_orders — a paginated list of SalesOrder records.

Parameters:

  • body (SalesOrderSearchRequest) –

    Structured filter body for POST /sales_orders/search. Returns the same paginated {"data": [...]} shape as GET /sales_orders plus an X-Pagination header. Beta — request/response shape may evolve before GA. Example: {'filter': {'where': {'and': [{'status': {'inq': ['NOT_SHIPPED', 'PACKED']}}, {'created_at': {'gte': '2026-01-01T00:00:00.000Z'}}, {'custom_fields.0c8f1d6e-3c2a-4f5b-9d77-12ab34cd56ef': 2}]}, 'order': ['created_at DESC', 'id DESC'], 'limit': 50, 'page': 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/sales_order/search_sales_orders.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: SalesOrderSearchRequest,
) -> Response[DetailedErrorResponse | ErrorResponse | SalesOrderListResponse]:
    """Search sales orders

     Searches sales orders using a structured filter body with nested
    logical operators (``and`` / ``or``) and per-field comparators.
    Only the fields in the request schema may appear in ``where`` /
    ``order``; unknown fields return 422. Custom field values are
    addressable via ``custom_fields.<uuid>`` nested paths. Returns the
    same shape as ``GET /sales_orders`` — a paginated list of
    ``SalesOrder`` records.

    Args:
        body (SalesOrderSearchRequest): Structured filter body for ``POST /sales_orders/search``.
            Returns
            the same paginated ``{"data": [...]}`` shape as
            ``GET /sales_orders`` plus an ``X-Pagination`` header. Beta —
            request/response shape may evolve before GA.
             Example: {'filter': {'where': {'and': [{'status': {'inq': ['NOT_SHIPPED', 'PACKED']}},
            {'created_at': {'gte': '2026-01-01T00:00:00.000Z'}},
            {'custom_fields.0c8f1d6e-3c2a-4f5b-9d77-12ab34cd56ef': 2}]}, 'order': ['created_at DESC',
            'id DESC'], 'limit': 50, 'page': 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[DetailedErrorResponse | ErrorResponse | SalesOrderListResponse]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)