Skip to content

katana_public_api_client.api.serial_number.delete_serial_numbers

katana_public_api_client.api.serial_number.delete_serial_numbers

Classes

Functions

asyncio(*, client, body) async

Delete serial numbers

Deletes serial numbers for a resource.

DELETE is unconditionally idempotent. Empirically (live-API probes 2026-05-19) the endpoint returns 204 No Content for every request variant tested: valid id, already-deleted id, mixed valid+invalid id batches, pure-invalid id, and resource_id mismatch between body and the SN's actual parent. The endpoint does NOT validate the request body — callers cannot detect id didn't exist or id belongs to wrong resource via the response. If strong confirmation is needed, follow up with a GET /serial_numbers filtered by resource_id and verify the deleted ids are absent.

Parameters:

  • body (DeleteSerialNumbersRequest) –

    Request payload for deleting serial numbers from a resource. The delete is scoped to a single resource (resource_type + resource_id) and a list of serial-number IDs. Example: {'resource_type': 'ManufacturingOrder', 'resource_id': 3001, 'ids': [1001, 1002]}.

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/serial_number/delete_serial_numbers.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    body: DeleteSerialNumbersRequest,
) -> Any | ErrorResponse | None:
    """Delete serial numbers

     Deletes serial numbers for a resource.

    **DELETE is unconditionally idempotent.** Empirically (live-API
    probes 2026-05-19) the endpoint returns 204 No Content for every
    request variant tested: valid id, already-deleted id, mixed
    valid+invalid id batches, pure-invalid id, and ``resource_id``
    mismatch between body and the SN's actual parent. The endpoint
    does NOT validate the request body — callers cannot detect
    ``id didn't exist`` or ``id belongs to wrong resource`` via
    the response. If strong confirmation is needed, follow up with a
    ``GET /serial_numbers`` filtered by ``resource_id`` and verify
    the deleted ids are absent.

    Args:
        body (DeleteSerialNumbersRequest): Request payload for deleting serial numbers from a
            resource. The
            delete is scoped to a single resource (``resource_type`` +
            ``resource_id``) and a list of serial-number IDs.
             Example: {'resource_type': 'ManufacturingOrder', 'resource_id': 3001, 'ids': [1001,
            1002]}.

    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:
        Any | ErrorResponse
    """

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

asyncio_detailed(*, client, body) async

Delete serial numbers

Deletes serial numbers for a resource.

DELETE is unconditionally idempotent. Empirically (live-API probes 2026-05-19) the endpoint returns 204 No Content for every request variant tested: valid id, already-deleted id, mixed valid+invalid id batches, pure-invalid id, and resource_id mismatch between body and the SN's actual parent. The endpoint does NOT validate the request body — callers cannot detect id didn't exist or id belongs to wrong resource via the response. If strong confirmation is needed, follow up with a GET /serial_numbers filtered by resource_id and verify the deleted ids are absent.

Parameters:

  • body (DeleteSerialNumbersRequest) –

    Request payload for deleting serial numbers from a resource. The delete is scoped to a single resource (resource_type + resource_id) and a list of serial-number IDs. Example: {'resource_type': 'ManufacturingOrder', 'resource_id': 3001, 'ids': [1001, 1002]}.

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/serial_number/delete_serial_numbers.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: DeleteSerialNumbersRequest,
) -> Response[Any | ErrorResponse]:
    """Delete serial numbers

     Deletes serial numbers for a resource.

    **DELETE is unconditionally idempotent.** Empirically (live-API
    probes 2026-05-19) the endpoint returns 204 No Content for every
    request variant tested: valid id, already-deleted id, mixed
    valid+invalid id batches, pure-invalid id, and ``resource_id``
    mismatch between body and the SN's actual parent. The endpoint
    does NOT validate the request body — callers cannot detect
    ``id didn't exist`` or ``id belongs to wrong resource`` via
    the response. If strong confirmation is needed, follow up with a
    ``GET /serial_numbers`` filtered by ``resource_id`` and verify
    the deleted ids are absent.

    Args:
        body (DeleteSerialNumbersRequest): Request payload for deleting serial numbers from a
            resource. The
            delete is scoped to a single resource (``resource_type`` +
            ``resource_id``) and a list of serial-number IDs.
             Example: {'resource_type': 'ManufacturingOrder', 'resource_id': 3001, 'ids': [1001,
            1002]}.

    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[Any | 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)

Delete serial numbers

Deletes serial numbers for a resource.

DELETE is unconditionally idempotent. Empirically (live-API probes 2026-05-19) the endpoint returns 204 No Content for every request variant tested: valid id, already-deleted id, mixed valid+invalid id batches, pure-invalid id, and resource_id mismatch between body and the SN's actual parent. The endpoint does NOT validate the request body — callers cannot detect id didn't exist or id belongs to wrong resource via the response. If strong confirmation is needed, follow up with a GET /serial_numbers filtered by resource_id and verify the deleted ids are absent.

Parameters:

  • body (DeleteSerialNumbersRequest) –

    Request payload for deleting serial numbers from a resource. The delete is scoped to a single resource (resource_type + resource_id) and a list of serial-number IDs. Example: {'resource_type': 'ManufacturingOrder', 'resource_id': 3001, 'ids': [1001, 1002]}.

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/serial_number/delete_serial_numbers.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    body: DeleteSerialNumbersRequest,
) -> Any | ErrorResponse | None:
    """Delete serial numbers

     Deletes serial numbers for a resource.

    **DELETE is unconditionally idempotent.** Empirically (live-API
    probes 2026-05-19) the endpoint returns 204 No Content for every
    request variant tested: valid id, already-deleted id, mixed
    valid+invalid id batches, pure-invalid id, and ``resource_id``
    mismatch between body and the SN's actual parent. The endpoint
    does NOT validate the request body — callers cannot detect
    ``id didn't exist`` or ``id belongs to wrong resource`` via
    the response. If strong confirmation is needed, follow up with a
    ``GET /serial_numbers`` filtered by ``resource_id`` and verify
    the deleted ids are absent.

    Args:
        body (DeleteSerialNumbersRequest): Request payload for deleting serial numbers from a
            resource. The
            delete is scoped to a single resource (``resource_type`` +
            ``resource_id``) and a list of serial-number IDs.
             Example: {'resource_type': 'ManufacturingOrder', 'resource_id': 3001, 'ids': [1001,
            1002]}.

    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:
        Any | ErrorResponse
    """

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

sync_detailed(*, client, body)

Delete serial numbers

Deletes serial numbers for a resource.

DELETE is unconditionally idempotent. Empirically (live-API probes 2026-05-19) the endpoint returns 204 No Content for every request variant tested: valid id, already-deleted id, mixed valid+invalid id batches, pure-invalid id, and resource_id mismatch between body and the SN's actual parent. The endpoint does NOT validate the request body — callers cannot detect id didn't exist or id belongs to wrong resource via the response. If strong confirmation is needed, follow up with a GET /serial_numbers filtered by resource_id and verify the deleted ids are absent.

Parameters:

  • body (DeleteSerialNumbersRequest) –

    Request payload for deleting serial numbers from a resource. The delete is scoped to a single resource (resource_type + resource_id) and a list of serial-number IDs. Example: {'resource_type': 'ManufacturingOrder', 'resource_id': 3001, 'ids': [1001, 1002]}.

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/serial_number/delete_serial_numbers.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    body: DeleteSerialNumbersRequest,
) -> Response[Any | ErrorResponse]:
    """Delete serial numbers

     Deletes serial numbers for a resource.

    **DELETE is unconditionally idempotent.** Empirically (live-API
    probes 2026-05-19) the endpoint returns 204 No Content for every
    request variant tested: valid id, already-deleted id, mixed
    valid+invalid id batches, pure-invalid id, and ``resource_id``
    mismatch between body and the SN's actual parent. The endpoint
    does NOT validate the request body — callers cannot detect
    ``id didn't exist`` or ``id belongs to wrong resource`` via
    the response. If strong confirmation is needed, follow up with a
    ``GET /serial_numbers`` filtered by ``resource_id`` and verify
    the deleted ids are absent.

    Args:
        body (DeleteSerialNumbersRequest): Request payload for deleting serial numbers from a
            resource. The
            delete is scoped to a single resource (``resource_type`` +
            ``resource_id``) and a list of serial-number IDs.
             Example: {'resource_type': 'ManufacturingOrder', 'resource_id': 3001, 'ids': [1001,
            1002]}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)