PatchMailinglistsById
Function: patchMailinglistsById()
patchMailinglistsById<
ThrowOnError>(options):RequestResult<PatchMailinglistsByIdResponses,PatchMailinglistsByIdErrors,ThrowOnError>
Defined in: app/api/sdk.gen.ts:484
Partially updates an existing mailing list identified by its ID using a JSON Patch document. This endpoint allows authorized users to modify specific fields of an existing mailing list without needing to provide the entire entity. The method accepts a Microsoft.AspNetCore.JsonPatch.JsonPatchDocument`1 in the request body, which specifies the operations to be performed on the mailing list. The UpdateMailinglist function of the IMailinglistService is called with the ID, patch document, user ID, and cancellation token to handle the patching logic. If the patch is successful, it returns an HTTP 204 No Content response; if the mailing list is not found, a 404 Not Found response is returned. The endpoint also handles exceptions, returning a 403 Forbidden response for unauthorized access and a 400 Bad Request response for other errors. This functionality provides flexibility for users to make partial updates to mailing lists efficiently.
Type Parameters
ThrowOnError
ThrowOnError *extends* boolean = false
Parameters
options
Options<PatchMailinglistsByIdData, ThrowOnError>
Returns
RequestResult<PatchMailinglistsByIdResponses, PatchMailinglistsByIdErrors, ThrowOnError>