Skip to content

katana_public_api_client.api.purchase_order.receive_purchase_order

katana_public_api_client.api.purchase_order.receive_purchase_order

Classes

Functions

asyncio(*, client, body) async

Receive a purchase order

If you receive the items on the purchase order, you can mark the purchase order as received. This will update the existing purchase order rows quantities to the quantities left unreceived and create a new rows with the received quantities and dates. If you want to mark all rows as received and the order doesn't contain batch tracked items, you can use PATCH /purchase_orders/id endpoint. Reverting the receive must also be done through that endpoint.

Parameters:

  • body (Union[PurchaseOrderReceiveRow, list[PurchaseOrderReceiveRow]]) –

    Request payload for recording the receipt of purchase order items at the facility Example: [{'purchase_order_row_id': 501, 'quantity': 150, 'received_date': '2024-02-15T10:00:00Z'}, {'purchase_order_row_id': 502, 'quantity': 75, 'received_date': '2024-02-15T10:00:00Z'}].

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/receive_purchase_order.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    body: Union["PurchaseOrderReceiveRow", list["PurchaseOrderReceiveRow"]],
) -> Any | DetailedErrorResponse | ErrorResponse | None:
    """Receive a purchase order

     If you receive the items on the purchase order, you can mark the purchase order as received.
        This will update the existing purchase order rows quantities to the quantities left unreceived
    and
        create a new rows with the received quantities and dates. If you want to mark all rows as
    received and
        the order doesn't contain batch tracked items, you can use PATCH /purchase_orders/id endpoint.
        Reverting the receive must also be done through that endpoint.

    Args:
        body (Union['PurchaseOrderReceiveRow', list['PurchaseOrderReceiveRow']]): Request payload
            for recording the receipt of purchase order items at the facility Example:
            [{'purchase_order_row_id': 501, 'quantity': 150, 'received_date': '2024-02-15T10:00:00Z'},
            {'purchase_order_row_id': 502, 'quantity': 75, 'received_date': '2024-02-15T10:00:00Z'}].

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

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

asyncio_detailed(*, client, body) async

Receive a purchase order

If you receive the items on the purchase order, you can mark the purchase order as received. This will update the existing purchase order rows quantities to the quantities left unreceived and create a new rows with the received quantities and dates. If you want to mark all rows as received and the order doesn't contain batch tracked items, you can use PATCH /purchase_orders/id endpoint. Reverting the receive must also be done through that endpoint.

Parameters:

  • body (Union[PurchaseOrderReceiveRow, list[PurchaseOrderReceiveRow]]) –

    Request payload for recording the receipt of purchase order items at the facility Example: [{'purchase_order_row_id': 501, 'quantity': 150, 'received_date': '2024-02-15T10:00:00Z'}, {'purchase_order_row_id': 502, 'quantity': 75, 'received_date': '2024-02-15T10:00:00Z'}].

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/receive_purchase_order.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: Union["PurchaseOrderReceiveRow", list["PurchaseOrderReceiveRow"]],
) -> Response[Any | DetailedErrorResponse | ErrorResponse]:
    """Receive a purchase order

     If you receive the items on the purchase order, you can mark the purchase order as received.
        This will update the existing purchase order rows quantities to the quantities left unreceived
    and
        create a new rows with the received quantities and dates. If you want to mark all rows as
    received and
        the order doesn't contain batch tracked items, you can use PATCH /purchase_orders/id endpoint.
        Reverting the receive must also be done through that endpoint.

    Args:
        body (Union['PurchaseOrderReceiveRow', list['PurchaseOrderReceiveRow']]): Request payload
            for recording the receipt of purchase order items at the facility Example:
            [{'purchase_order_row_id': 501, 'quantity': 150, 'received_date': '2024-02-15T10:00:00Z'},
            {'purchase_order_row_id': 502, 'quantity': 75, 'received_date': '2024-02-15T10:00:00Z'}].

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, body)

Receive a purchase order

If you receive the items on the purchase order, you can mark the purchase order as received. This will update the existing purchase order rows quantities to the quantities left unreceived and create a new rows with the received quantities and dates. If you want to mark all rows as received and the order doesn't contain batch tracked items, you can use PATCH /purchase_orders/id endpoint. Reverting the receive must also be done through that endpoint.

Parameters:

  • body (Union[PurchaseOrderReceiveRow, list[PurchaseOrderReceiveRow]]) –

    Request payload for recording the receipt of purchase order items at the facility Example: [{'purchase_order_row_id': 501, 'quantity': 150, 'received_date': '2024-02-15T10:00:00Z'}, {'purchase_order_row_id': 502, 'quantity': 75, 'received_date': '2024-02-15T10:00:00Z'}].

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/receive_purchase_order.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    body: Union["PurchaseOrderReceiveRow", list["PurchaseOrderReceiveRow"]],
) -> Any | DetailedErrorResponse | ErrorResponse | None:
    """Receive a purchase order

     If you receive the items on the purchase order, you can mark the purchase order as received.
        This will update the existing purchase order rows quantities to the quantities left unreceived
    and
        create a new rows with the received quantities and dates. If you want to mark all rows as
    received and
        the order doesn't contain batch tracked items, you can use PATCH /purchase_orders/id endpoint.
        Reverting the receive must also be done through that endpoint.

    Args:
        body (Union['PurchaseOrderReceiveRow', list['PurchaseOrderReceiveRow']]): Request payload
            for recording the receipt of purchase order items at the facility Example:
            [{'purchase_order_row_id': 501, 'quantity': 150, 'received_date': '2024-02-15T10:00:00Z'},
            {'purchase_order_row_id': 502, 'quantity': 75, 'received_date': '2024-02-15T10:00:00Z'}].

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

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

sync_detailed(*, client, body)

Receive a purchase order

If you receive the items on the purchase order, you can mark the purchase order as received. This will update the existing purchase order rows quantities to the quantities left unreceived and create a new rows with the received quantities and dates. If you want to mark all rows as received and the order doesn't contain batch tracked items, you can use PATCH /purchase_orders/id endpoint. Reverting the receive must also be done through that endpoint.

Parameters:

  • body (Union[PurchaseOrderReceiveRow, list[PurchaseOrderReceiveRow]]) –

    Request payload for recording the receipt of purchase order items at the facility Example: [{'purchase_order_row_id': 501, 'quantity': 150, 'received_date': '2024-02-15T10:00:00Z'}, {'purchase_order_row_id': 502, 'quantity': 75, 'received_date': '2024-02-15T10:00:00Z'}].

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/receive_purchase_order.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: Union["PurchaseOrderReceiveRow", list["PurchaseOrderReceiveRow"]],
) -> Response[Any | DetailedErrorResponse | ErrorResponse]:
    """Receive a purchase order

     If you receive the items on the purchase order, you can mark the purchase order as received.
        This will update the existing purchase order rows quantities to the quantities left unreceived
    and
        create a new rows with the received quantities and dates. If you want to mark all rows as
    received and
        the order doesn't contain batch tracked items, you can use PATCH /purchase_orders/id endpoint.
        Reverting the receive must also be done through that endpoint.

    Args:
        body (Union['PurchaseOrderReceiveRow', list['PurchaseOrderReceiveRow']]): Request payload
            for recording the receipt of purchase order items at the facility Example:
            [{'purchase_order_row_id': 501, 'quantity': 150, 'received_date': '2024-02-15T10:00:00Z'},
            {'purchase_order_row_id': 502, 'quantity': 75, 'received_date': '2024-02-15T10:00:00Z'}].

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)